CN116347110A - Audio/video data processing method, device, equipment, storage medium and computer program product - Google Patents

Audio/video data processing method, device, equipment, storage medium and computer program product Download PDF

Info

Publication number
CN116347110A
CN116347110A CN202111601221.0A CN202111601221A CN116347110A CN 116347110 A CN116347110 A CN 116347110A CN 202111601221 A CN202111601221 A CN 202111601221A CN 116347110 A CN116347110 A CN 116347110A
Authority
CN
China
Prior art keywords
target
video data
electronic device
code stream
audio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111601221.0A
Other languages
Chinese (zh)
Inventor
韩晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202111601221.0A priority Critical patent/CN116347110A/en
Publication of CN116347110A publication Critical patent/CN116347110A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/43615Interfacing a Home Network, e.g. for connecting the client to a plurality of peripherals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2181Source of audio or video content, e.g. local disk arrays comprising remotely distributed storage units, e.g. when movies are replicated over a plurality of video servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • H04N21/43076Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen of the same content streams on multiple devices, e.g. when family members are watching the same movie on different devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/434Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
    • H04N21/4341Demultiplexing of audio and video streams

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides an audio and video data processing method, an apparatus, a device, a storage medium and a computer program product, comprising: determining target video data and target audio data; encoding the target video data and the target audio data to obtain a target code stream; and pushing the target code stream to a plurality of target devices. To reduce the load on the electronic device.

Description

Audio/video data processing method, device, equipment, storage medium and computer program product
Technical Field
Embodiments of the present invention relate to the field of Virtual Reality (VR) technology, and in particular, to an audio and video data processing method, apparatus, device, storage medium, and computer program product.
Background
Currently, VR technology involves a one-to-many VR scenario, where one host may control multiple VR devices in a one-to-many VR scenario so that multiple VR devices may display the same or different VR scenarios. In a one-to-many VR scenario, it is necessary to install a VR application and a software development kit (Software Development Kit, SDK) on the host, where the SDK is used to implement one-to-many functions corresponding to a particular VR scenario.
However, since the SDKs of one-to-many corresponding to each VR scene are not exactly the same, when implementing one-to-many VR scenes, the SDKs for different VR scenes need to be installed on the host, which will cause the host to be overloaded.
Disclosure of Invention
The application provides an audio and video data processing method, an audio and video data processing device, audio and video data processing equipment, a storage medium and a computer program product, so that the load of electronic equipment can be reduced.
In a first aspect, an audio/video data processing method is provided, including: determining target video data and target audio data; encoding the target video data and the target audio data to obtain a target code stream; and pushing the target code stream to a plurality of target devices.
In a second aspect, there is provided an audio-video data processing apparatus comprising: the device comprises a determining module, an encoding module and a pushing module, wherein the determining module is used for determining target video data and target audio data; the encoding module is used for encoding the target video data and the target audio data to obtain a target code stream; the pushing module is used for pushing the target code stream to a plurality of target devices.
In a third aspect, there is provided an electronic device comprising: a processor and a memory for storing a computer program, the processor being for invoking and running the computer program stored in the memory for performing the method as in the first aspect or in various implementations thereof.
In a fourth aspect, a computer-readable storage medium is provided for storing a computer program for causing a computer to perform the method as in the first aspect or in various implementations thereof.
In a fifth aspect, a computer program product is provided comprising computer program instructions for causing a computer to perform the method as in the first aspect or in various implementations thereof.
In a sixth aspect, a computer program is provided, the computer program causing a computer to perform the method as in the first aspect or in various implementations thereof.
According to the technical scheme, the electronic equipment can firstly determine the target video data and the target audio data. The electronic device may then encode the determined video data and audio data to obtain a target stream of codes. The electronic device may then push the target code stream to a plurality of target devices. After receiving the target code stream sent by the electronic device, the target devices can decode the target code stream and play the video data and the audio data corresponding to the target code stream. Because the electronic device can send video data and audio data to a plurality of target devices, such as VR devices, without installing SDKs for different VR scenes in the whole process, so as to realize one-to-many VR scenes, thereby reducing the load of the electronic device.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an application scenario diagram provided in an embodiment of the present application;
fig. 2 is another application scenario diagram provided in an embodiment of the present application;
fig. 3 is a flowchart of an audio/video data processing method provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of a user interface provided by an embodiment of the present application;
fig. 5 is a schematic diagram of an audio/video data processing device according to an embodiment of the present application;
fig. 6 is a schematic block diagram of an electronic device 600 provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In this application embodiment, the terms "exemplary" or "such as" and the like are used to denote examples, illustrations, or descriptions, and any embodiment or solution described as "exemplary" or "such as" in this application embodiment should not be construed as being preferred or advantageous over other embodiments or solutions. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
As described above, in the prior art, when implementing one-to-many functions in VR scenes, a VR application and an SDK are required to be installed on a host, where the SDK is used to implement one-to-many functions corresponding to a specific VR scene, and since one-to-many SDKs corresponding to each VR scene are not identical, an SDK for a different VR scene needs to be installed on the host, which leads to a problem of excessive load on the host.
In order to solve the technical problems, the invention concept of the application is as follows: the electronic device may encode and push target video data and target audio data to a plurality of target devices.
It should be understood that the technical solution of the present application may be applied to the following scenarios, but is not limited to:
exemplary, fig. 1 is an application scenario diagram provided in an embodiment of the present application, and as shown in fig. 1, an electronic device 110 may communicate with a plurality of target devices 120.
It should be understood that the number of electronic devices and target devices in fig. 1 is merely illustrative, and in fact, any number of electronic devices and target devices may be provided as needed in practice, which is not limited in this application.
For example, fig. 2 is another application scenario diagram provided in an embodiment of the present application, as shown in fig. 2, an electronic device 210 may communicate with a target server 230, and the target server 230 may communicate with a plurality of target devices 220.
It should be understood that the number of electronic devices, target servers, and target devices in fig. 2 is merely illustrative, and in fact, any number of electronic devices, target servers, and target devices may be provided as needed in actual situations, which is not limited in this application.
In some implementations, the electronic device 110 in fig. 1 and the electronic device 210 in fig. 2 may be mobile phones, tablet computers, notebook computers, desktop computers, and the like, but are not limited thereto.
In some implementations, target device 120 in fig. 1, target device 220 in fig. 2 may each be, but are not limited to, a VR head-up, VR glasses, etc. that may play video data and audio data.
In some implementations, the target server 230 in fig. 2 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides a cloud computing service, which is not limited in this application.
In some implementations, the target server 230 may be on the same local area network as the electronic device 110, but is not limited thereto.
After the application scenario of the embodiment of the present application is introduced, the following details of the technical solution of the present application will be described:
fig. 3 is a flowchart of an audio/video data processing method according to an embodiment of the present application, where the method may be performed by the electronic device 110 shown in fig. 1 or the electronic device 210 shown in fig. 2, and the application is not limited thereto, and the audio/video data processing method is exemplified by the electronic device shown in fig. 1, and as shown in fig. 3, the method includes the following steps:
s301: the electronic device determines target video data and target audio data;
s302: the electronic equipment encodes the target video data and the target audio data to obtain a target code stream;
s303: the electronic device pushes the target code stream to a plurality of target devices.
In some implementations, the electronic device may determine the stored video data as target video data, where the stored video data may be video data stored locally by the electronic device, or may be video data stored by a device connected to the electronic device, such as a usb disk connected to the electronic device, where the application is not limited.
In other implementations, the electronic device may determine the video data currently being played by the recording electronic device as target video data.
In some implementations, the recording of the video data currently played by the electronic device may be one of the following, but is not limited thereto:
in the first case, the electronic device records the video data currently played on the desktop of the electronic device.
For example, the content of the video data currently played on the desktop of the electronic device may be an explanation about a slide (PPT) on the desktop of the electronic device, or the content of the video data currently played on the desktop of the electronic device may be an explanation about a word document on the desktop of the electronic device.
And secondly, the electronic equipment records the video data currently played by the target window of the electronic equipment.
In some implementations, the target window may be a window of an Application (App) installed on the electronic device, which is not limited in this Application.
For example, if the target window is a teaching App window installed on the electronic device, the content of the video data currently played by the target window of the electronic device may be the content of a teaching video currently played by the window of the teaching App, for example, the teaching video may be an explanation video of the solar system eight major planet.
And thirdly, the electronic equipment records the video data currently played in the target area in the target window of the electronic equipment.
In some implementations, the target window may be a window of an App installed on the electronic device, and the target area may be an area at a specific location in the target window, which is not limited in this application.
The target window is an teaching App window installed on the electronic device, the content of the video data currently played by the target window is an explanation about the solar system eight-major planet, the target area may be the area where the earth is located in the solar system eight-major planet, or the target area may also be the left half window of the target window, and the video data currently played by the target area in the target window of the electronic device recorded by the electronic device may be the video data of the area where the earth is located in the solar system eight-major planet currently played by the window of the teaching App, or may also be the video data of the left half window of the teaching App.
It should be understood that the application does not limit the type of the electronic device, the manner of the target video data determined by the electronic device, the data content of the video data currently played by the desktop of the electronic device, the content of the video data currently played by the target window of the electronic device, the position and the size of the target area in the target window, and the like.
In some implementations, the target audio data determined by the electronic device may be audio data corresponding to the target video data described above, but is not limited thereto.
For example, assuming that the target audio data is audio data corresponding to the target video data, and the target video data is currently played video data recorded by the electronic device, the electronic device may collect audio data corresponding to the video data when recording the video data currently played by the electronic device. The audio data may originate from inside the electronic device or from outside the electronic device. When the audio data is sourced from the inside of the electronic equipment, the electronic equipment can directly collect the audio data; when the audio data originates from outside the electronic device, for example, from an audio device such as a microphone or a speaker connected to the electronic device by a wired or wireless manner, the electronic device may collect the audio data through the audio device.
For example, assuming that the content of the video data is an explanation about a PPT on a desktop of the electronic device, the audio data corresponding to the video data collected by the electronic device may be audio data of an explanation about the PPT by an explanation about the PPT in a microphone connected to the electronic device collected by the electronic device.
For example, assuming that the video data is an explanation video about the solar eight major planets currently played by a window of a teaching App installed on the electronic device, and the audio data corresponding to the video data is the audio data currently played by the window of the teaching App, the electronic device may directly collect the audio data, that is, the electronic device may directly collect the audio data inside the electronic device.
It should be understood that the content, the determination manner, the audio device external to the electronic device, the connection manner of the audio device external to the electronic device and the electronic device, and the like of the target audio data are not limited in the present application.
In some implementations, before encoding the target video data and the target audio data, the electronic device may acquire target parameters, and then encode the target video data and the target audio data according to the acquired target parameters to obtain a target code stream, where the target parameters may include at least one of the following: coding scheme, coding parameters, code rate, resolution, but not limited thereto.
In some implementations, the electronic device may display a user interface before encoding the target video data and the target audio data, where the user interface may include candidate parameters corresponding to the target parameters.
It should be understood that the data size of the target video data and the target audio data is generally relatively large, so that the target video data and the target audio data need to be encoded to reduce the data size of the video data and the audio data, and before encoding, the electronic device may encode the target video data and the target audio data according to the acquired suitable target parameters, so that not only the encoding efficiency may be improved, but also the video data and the audio data with higher quality may be acquired after decoding.
It should be appreciated that the target parameters selected when encoding the target video data and the target audio data are not exactly the same. For video data, the encoding mode may include: the H.264 standard, the H.265 standard and the like, wherein the H.264 standard is a high-performance video coding and decoding technology, is widely applied to the fields of network streaming media data, various high-definition television broadcasting and the like, and the H.265 standard has higher coding efficiency than the H.264 standard, but has lower advantages when dealing with problems of slow dynamics, noise and the like in a dark area than the H.264 standard, so that a user can select a proper coding mode according to own requirements. Different coding modes may correspond to different coding parameters, for example, for the h.264 standard, the coding parameters mainly include: profile, level, where Profile may be divided into base Profile, main Profile and High Profile, where base Profile is generally used in the real-time communication field of video call, etc., main Profile is generally used in the streaming media field of network video playing, etc., high Profile is generally used in higher business occasions such as movies, high definition television, etc., and Level may define parameters such as maximum macroblock processing rate, maximum frame rate, etc. of a code stream, where Level includes: 1.1.1, 1.2, 1.3, 2, 2.1, 2.2, 3, 3.1, 3.2, 4, 4.1, 4.2, 5 and 5.1, the levels that different electronic devices can support are different, and the appropriate Level can be selected according to the different electronic devices. The bit rate refers to the number of bits of video data transmitted per unit time, and when the resolutions are the same, the larger the bit stream of the video file, the smaller the compression ratio, and the better the picture quality. Resolution may represent the size of a video, generally the greater the resolution of a video, the more clear the video.
For audio data, the encoding mode may include: advanced audio coding (Advanced Audio Coding, AAC), etc. Different coding modes can correspond to different coding parameters, and for the coding mode AAC, the coding parameters mainly include: AAC specifications, etc., the AAC specifications mainly include: nine specifications, such as Low Complexity (LC) specifications, high Efficiency (HE) specifications, different AAC specifications may be applicable to different applications, for example, the LC specifications may be applicable to music playing of electronic devices, etc. The code rate refers to the number of bits of audio data transmitted in a unit time, and the larger the code rate is, the better the sound quality is for the audio files with the same data format.
Illustratively, as shown in FIG. 4, the user interface presents candidate parameters corresponding to target parameters employed in encoding target video data and target audio data. Wherein, the target parameters adopted for encoding the target video data include: the coding mode, coding parameters, code rate and resolution, and candidate parameters corresponding to the coding mode comprise: the h.264 standard and the h.265 standard, assuming that the coding mode selected by the user is the h.264 standard, the candidate parameters corresponding to the coding parameters include: profile, level, the Profile includes: baseline Profile, main Profile and High Profile, wherein BP, MP, HP are used in FIG. 4 to represent Baseline Profile, main Profile, high Profile, respectively, level comprises: 1.2, 2.1 and 4.2, and candidate parameters corresponding to the code rate comprise: the candidate parameters corresponding to the resolution ratio of 16Mbps, 24Mbps and 32Mbps include: 2400X 1080, 1280X 720, 800X 480. The target parameters used in encoding the target audio data include: the coding mode, coding parameters and code rate, and candidate parameters corresponding to the coding mode comprise: the candidate parameters corresponding to the coding parameters include: AAC specifications, which mainly include: the candidate parameters corresponding to the code rate of LC specification and HE specification mainly comprise: 0.512Mbps, 1.411Mbps.
It should be understood that, the present application does not limit the target parameter, the candidate parameter corresponding to the target parameter, the content displayed by the user interface, the position information of the content to be displayed by the user interface in the user interface, and the like.
In some implementations, the electronic device may obtain a selection operation of a user on a candidate parameter corresponding to the target parameter in the user interface, and in response to the selection operation, the electronic device may obtain the target parameter from the candidate parameter corresponding to the target parameter. The selection operation may be a single click, a double click, a press, a drag to a designated area, or a hover touch gesture, which is not limited in this application.
For example, as shown in fig. 4, assuming that the selection operation is a clicking operation, the user may click on a candidate parameter to be selected from candidate parameters corresponding to each target parameter displayed in the user interface, and for the candidate parameter selected by the user, that is, the clicked candidate parameter, an icon for hooking may be displayed behind the candidate parameter, which indicates that the candidate parameter is the selected target parameter. After the electronic device obtains the click operation of the user, the electronic device responds to the click operation to obtain target parameters, wherein the target parameters adopted when the electronic device obtains the target video data for encoding include: the method comprises the steps of a coding mode, coding parameters, a code rate and resolution, wherein the coding mode is H.264 standard, profile in the coding parameters is Main Profile, level in the coding parameters is 4.2, the code rate is 24Mbps, the resolution is 2400×1080, and target parameters adopted when the electronic equipment can acquire and code target audio data comprise: coding mode, coding parameter, code rate, wherein coding mode is AAC, AAC specification in the coding parameter is LC specification, and code rate is 1.411Mbps.
It should be understood that the selection of the candidate parameter corresponding to each target parameter and the representation of the selected target parameter are not limited in this application.
In some implementations, the electronic device may encode the target video data and the target audio data based on FFmpeg, as this application is not limited in this regard.
It should be understood that FFmpeg is an audio/video codec frame, which includes more coding standards for video data and audio data, and can be used for encoding and decoding more video data and audio data, so that FFmpeg can ensure higher encoding and decoding quality.
For example, assuming that the content of the target video data is the description of the solar system eight major planets played by the window of the teaching App installed on the electronic device, the target audio data is the audio data currently played by the window of the teaching App, and the target parameters acquired by the electronic device are as described in fig. 4, when the electronic device encodes the target video data and the target audio data based on FFmpeg, the electronic device may send the target video data and the target audio data to FFmpeg, and set parameters required for FFmpeg encoding according to the acquired target parameters. The electronic device may then encode the target video data and the target audio data based on FFmpeg to obtain a target bitstream.
In some implementations, the electronic device may push the target code stream to multiple target devices after obtaining the target code stream. Specifically, the pushing of the target code stream to the plurality of target devices by the electronic device may be implemented by any of the following manners, but is not limited thereto:
in the first aspect, as shown in fig. 1, after obtaining the target code stream, the electronic device may directly push the target code stream to a plurality of target devices by using a user datagram protocol (User Datagram Protocol, UDP) multicast method.
In the second mode, as shown in fig. 2, after the electronic device obtains the target code stream, the target code stream may be pushed to the target server, and after the target server receives the target code stream pushed by the electronic device, the target server may push the target code stream to a plurality of target devices through UDP multicast. The target server may be a streaming media server, which is not limited in this application.
It should be understood that the present application does not limit the manner in which the electronic device pushes the target code stream to multiple target devices.
In some implementations, the electronic device may search for the target device and may add the found target device to the target packet, and in addition, the electronic device may delete some target devices from the target packet, which is not limited in this application.
In some implementations, the electronic device may discover the target device via UDP multicast.
For example, assuming that the target device is a VR device, the electronic device and the VR device may first join the same multicast address, and the electronic device may send target information to the VR device corresponding to the same multicast address through a UDP multicast manner, where the target information includes device information and communication protocol information of the VR device that needs to be discovered. The VR device may monitor and receive the target information, and when the device information in the target information received by the VR device matches with the device information of the VR device, the VR device may establish a connection with the electronic device through the communication protocol information in the target information, so that the electronic device may discover the VR device. Wherein the electronic device and the VR device are in the same local area network.
In some implementations, the device information may be a name of the target device, such as a VR device, or other information that may uniquely identify the target device, such as a VR device, which is not limited in this application.
In some implementations, the communication protocol information may include at least a communication protocol type, but is not limited thereto. For example, the communication protocol type may be UDP, which is not limited by the present application.
For example, assuming that the target device is a VR device, the communication protocol information includes a communication protocol type of UDP, the electronic device may join the same multicast address 238.1.1.1 as the VR device 1 and the VR device 2, and the electronic device may send the target information to the VR device 1 and the VR device 2 in a UDP multicast manner, where the target information includes that the device information is the VR device 1 and the communication protocol information is UDP. After the VR device 1 and the VR device 2 monitor and receive the target information, the device information in the target information and the own device information may be matched. Device information of VR device 1: device information in VR device 1 and target information: if the VR device 1 is matched, the VR device 1 can establish connection with the electronic device through communication protocol information UDP in the target information, and then the electronic device can discover the VR device 1; device information of VR device 2: device information in VR device 2 and target information: if VR device 1 is not matched, VR device 2 may not establish a connection with the electronic device via the communication protocol information UDP in the target information, and the electronic device may not discover VR device 2.
In some implementations, before pushing the target code stream to multiple target devices, the electronic device may select a target device that needs to be pushed, for example, the electronic device may push the target code stream to a target device found in real time, or may push the target code stream to a target device added in the target packet, which is not limited in this application.
In some implementations, the electronic device may send a control instruction to the plurality of target devices through a UDP multicast manner, where the control instruction is used to control a switching state of the plurality of target devices or control the plurality of target devices to decode a target code stream, and play video data and audio data corresponding to the target code stream.
For example, assuming that the target device is a VR device, the target packet is a packet 1, where the packet 1 includes a VR device 1, a VR device 2, and a VR device 3, the electronic device may first select the VR device 1 and the VR device 2 in the packet 1, then send a control instruction including a startup command to the VR device 1 and the VR device 2 in a UDP multicast manner, and after the VR device 1 and the VR device 2 receive the control instruction sent by the electronic device, respond to the control instruction, and the VR device 1 and the VR device 2 may perform startup.
In some implementations, the multiple target devices may send their performance parameters to the electronic device via UDP multicast, which may include, but are not limited to, the power of the target device, the wearing state, etc. Wherein, the electric quantity can be expressed in the form of percentage, for example, 60%, and the wearing state can be unworn, successful wearing, abnormal wearing and the like, and the application is not limited to the method.
Exemplary, at the electronic device and the target device: after the VR device 1 and the VR device 2 are connected, the electric quantity of the VR device 1 is 60%, the wearing state is not worn, the electric quantity of the VR device 2 is 100%, and the wearing state is successful, so that the VR device 1 can send the performance parameters including the electric quantity of 60% and the wearing state not worn to the electronic device in a UDP multicast mode, and the VR device 2 can send the performance parameters including the electric quantity of 100% and the wearing state successful to the electronic device in a UDP multicast mode.
In summary, the technical solution provided by the above embodiment at least brings the following beneficial effects: according to the technical scheme, the electronic equipment can determine the target video data and the target audio data first, and then the electronic equipment can encode the determined video data and audio data to obtain the target code stream. The electronic device may then push the target code stream to a plurality of target devices. After receiving the target code stream sent by the electronic device, the target devices can decode the target code stream and play the video data and the audio data corresponding to the target code stream. Because the electronic device can send video data and audio data to a plurality of target devices, such as VR devices, without installing SDKs for different VR scenes in the whole process, so as to realize one-to-many VR scenes, thereby reducing the load of the electronic device.
Further, the electronic device may acquire the appropriate target parameters before encoding the target video data and the target audio data, and then encode the target video data and the target audio data according to the target parameters, so that not only the encoding efficiency may be improved, but also the video data and the audio data with higher quality may be acquired after decoding.
Furthermore, the electronic device not only can discover the target device to be connected in a UDP multicast mode and perform operations such as adding, grouping and deleting the target device, but also can control the on-off state of the target device, the playing condition of video data and audio data and the like in a UDP multicast mode, and the electronic device can receive the performance parameters such as the electric quantity and the wearing state sent by the target device after being connected with the target device, so that the management and the control of the target device by the electronic device can be realized more conveniently.
Fig. 5 is a schematic diagram of an audio/video data processing apparatus according to an embodiment of the present application, where the audio/video data processing apparatus may be, but is not limited to, the electronic device 110 shown in fig. 1 or the electronic device 210 shown in fig. 2, and the audio/video data processing apparatus includes:
a determining module 501 for determining target video data and target audio data;
the encoding module 502 is configured to encode the target video data and the target audio data to obtain a target code stream;
a pushing module 503, configured to push the target code stream to a plurality of target devices.
In some implementations, the determining module 501 is specifically configured to: and recording the target video data currently played by the electronic equipment.
In some implementations, the determining module 501 is specifically configured to: recording the target video data currently played by a desktop of the electronic equipment; or recording the target video data currently played by a target window of the electronic equipment; or recording the target video data currently played by the target area in the target window of the electronic equipment.
In some implementations, the audio-video data processing apparatus further includes: an obtaining module 504, configured to obtain a target parameter; wherein the target parameters include at least one of: coding mode, coding parameters, code rate and resolution. Accordingly, the encoding module 502 is specifically configured to: and encoding the target video data and the target audio data according to the target parameters to obtain a target code stream.
In some implementations, the acquisition module 504 is specifically configured to: displaying a user interface, the user interface comprising: at least one candidate parameter corresponding to each target parameter; acquiring a selection operation; in response to the selecting operation, a target parameter is selected from at least one candidate parameter corresponding to each target parameter.
In some implementations, the pushing module 503 is specifically configured to: and pushing the target code stream to the target server so that the target server pushes the target code stream to a plurality of target devices in a UDP multicast mode.
In some implementations, the pushing module 503 is specifically configured to: and pushing the target code stream to a plurality of target devices in a UDP multicast mode.
In some implementations, the audio-video data processing apparatus further includes: a sending module 505, configured to send a control instruction to a plurality of target devices in a user datagram protocol UDP multicast manner; the control instruction is used for controlling the on-off states of the plurality of target devices or controlling the plurality of target devices to decode the target code stream and playing target video data and target audio data corresponding to the target code stream.
It should be understood that apparatus embodiments and method embodiments may correspond with each other and that similar descriptions may refer to the method embodiments. To avoid repetition, no further description is provided here. Specifically, the audio/video data processing apparatus shown in fig. 5 may execute the method embodiment on the electronic device side, and the foregoing and other operations and/or functions of each module in the audio/video data processing apparatus shown in fig. 5 are respectively for implementing the corresponding flow of the method embodiment on the electronic device side, which is not described herein for brevity.
The method embodiments of the electronic device side according to the embodiments of the present application are described above from the perspective of functional modules with reference to the accompanying drawings. It should be understood that the functional module may be implemented in hardware, or may be implemented by instructions in software, or may be implemented by a combination of hardware and software modules. Specifically, each step of the method embodiments in the embodiments of the present application may be implemented by an integrated logic circuit of hardware in a processor and/or an instruction in software form, and the steps of the method disclosed in connection with the embodiments of the present application may be directly implemented as a hardware decoding processor or implemented by a combination of hardware and software modules in the decoding processor. Alternatively, the software modules may be located in a well-established storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, and the like. The storage medium is located in a memory, and the processor reads information in the memory, and in combination with hardware, performs the steps in the above method embodiments.
Fig. 6 is a schematic block diagram of an electronic device 600 provided by an embodiment of the present application. The electronic device 600 may be an electronic device in the present application.
As shown in fig. 6, the electronic device 600 may include:
a memory 610 and a processor 620, the memory 610 being adapted to store a computer program and to transfer the program code to the processor 620. In other words, the processor 620 may call and run a computer program from the memory 610 to implement the methods in embodiments of the present application.
For example, the processor 620 may be configured to perform the method embodiments described above in accordance with instructions in the computer program.
In some embodiments of the present application, the processor 620 may include, but is not limited to:
a general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like.
In some embodiments of the present application, the memory 610 includes, but is not limited to:
volatile memory and/or nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (Double Data Rate SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct memory bus RAM (DR RAM).
In some embodiments of the present application, the computer program may be partitioned into one or more modules that are stored in the memory 610 and executed by the processor 620 to perform the methods provided herein. The one or more modules may be a series of computer program instruction segments capable of performing the specified functions, which are used to describe the execution of the computer program in the electronic device.
As shown in fig. 6, the electronic device may further include:
a transceiver 630, the transceiver 630 being connectable to the processor 620 or the memory 610.
The processor 620 may control the transceiver 630 to communicate with other devices, and in particular, may send information or data to other devices or receive information or data sent by other devices. Transceiver 630 may include a transmitter and a receiver. Transceiver 630 may further include antennas, the number of which may be one or more.
It will be appreciated that the various components in the electronic device are connected by a bus system that includes, in addition to a data bus, a power bus, a control bus, and a status signal bus.
The present application also provides a computer storage medium having stored thereon a computer program which, when executed by a computer, enables the computer to perform the method of the above-described method embodiments.
Embodiments of the present application also provide a computer program product comprising instructions which, when executed by a computer, cause the computer to perform the method of the method embodiments described above.
When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces, in whole or in part, a flow or function consistent with embodiments of the present application. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes or substitutions are covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. An audio/video data processing method, wherein the method is applied to an electronic device, and the method comprises:
determining target video data and target audio data;
encoding the target video data and the target audio data to obtain a target code stream;
and pushing the target code stream to a plurality of target devices.
2. The method of claim 1, wherein the determining the target video data comprises:
and recording the target video data currently played by the electronic equipment.
3. The method of claim 2, wherein said recording said target video data currently being played by said electronic device comprises:
recording the target video data currently played by a desktop of the electronic equipment; or alternatively, the process may be performed,
recording the target video data currently played by a target window of the electronic equipment; or alternatively, the process may be performed,
and recording the video data of the target currently played in a target area in a target window of the electronic equipment.
4. The method according to claim 1 or 2, wherein before encoding the target video data and the target audio data to obtain a target code stream, further comprising:
obtaining target parameters;
wherein the target parameters include at least one of: coding mode, coding parameters, code rate and resolution;
the encoding the target video data and the target audio data to obtain a target code stream includes:
and encoding the target video data and the target audio data according to the target parameters to obtain the target code stream.
5. The method of claim 4, wherein the obtaining the target parameter comprises:
displaying a user interface, the user interface comprising: at least one candidate parameter corresponding to each target parameter;
acquiring a selection operation;
and responding to the selection operation to select the target parameters from at least one candidate parameter corresponding to each target parameter.
6. The method according to claim 1 or 2, wherein pushing the target code stream to a plurality of target devices comprises:
pushing the target code stream to a target server, so that the target server pushes the target code stream to the plurality of target devices in a User Datagram Protocol (UDP) multicast mode.
7. The method according to claim 1 or 2, wherein pushing the target code stream to a plurality of target devices comprises:
and pushing the target code stream to the plurality of target devices in a UDP multicast mode.
8. The method according to claim 1 or 2, further comprising:
transmitting control instructions to the plurality of target devices in a UDP multicast mode;
the control instruction is used for controlling the on-off states of the target devices or controlling the target devices to decode the target code stream and playing the target video data and the target audio data corresponding to the target code stream.
9. An audio/video data processing apparatus, comprising:
the determining module is used for determining target video data and target audio data;
the encoding module is used for encoding the target video data and the target audio data to obtain a target code stream;
and the pushing module is used for pushing the target code stream to a plurality of target devices.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the audio video data processing method of any of claims 1-8 via execution of the executable instructions.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the audio-video data processing method of any one of claims 1 to 8.
12. A computer program product comprising instructions which, when run on an electronic device, cause the electronic device to perform the audio-visual data processing method of any one of claims 1-8.
CN202111601221.0A 2021-12-24 2021-12-24 Audio/video data processing method, device, equipment, storage medium and computer program product Pending CN116347110A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111601221.0A CN116347110A (en) 2021-12-24 2021-12-24 Audio/video data processing method, device, equipment, storage medium and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111601221.0A CN116347110A (en) 2021-12-24 2021-12-24 Audio/video data processing method, device, equipment, storage medium and computer program product

Publications (1)

Publication Number Publication Date
CN116347110A true CN116347110A (en) 2023-06-27

Family

ID=86890223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111601221.0A Pending CN116347110A (en) 2021-12-24 2021-12-24 Audio/video data processing method, device, equipment, storage medium and computer program product

Country Status (1)

Country Link
CN (1) CN116347110A (en)

Similar Documents

Publication Publication Date Title
US12010158B2 (en) Systems and methods for multi-device media broadcasting or recording with low-latency active control
CN111901674A (en) Video playing control and device
CN103475572B (en) Method, device and system for sending multiple pictures in instant messaging application
JP2018513583A (en) Audio video file live streaming method, system and server
US20100199151A1 (en) System and method for producing importance rate-based rich media, and server applied to the same
CN110557672B (en) Television program sharing method, television and storage medium
CN103327021B (en) Method, devices and system of multi-device interaction
TW201738770A (en) Cooperative provision of personalized user functions using shared and personal devices
CN111327921A (en) Video data processing method and device
KR20130004263A (en) Seamlessly transferring a communication
US9445142B2 (en) Information processing apparatus and control method thereof
CN108337556B (en) Method and device for playing audio-video file
CN103281294A (en) Data sharing method and electronic equipment
WO2021057684A1 (en) Video decoding method and apparatus, video encoding method and apparatus, storage medium, and electronic apparatus
WO2021057697A1 (en) Video encoding and decoding methods and apparatuses, storage medium, and electronic device
WO2023142716A1 (en) Encoding method and apparatus, real-time communication method and apparatus, device, and storage medium
US20170171579A1 (en) Method and Device for Transcoding Live Video
CN111356023B (en) Playing mode determining method and device
JP7029218B2 (en) Playback data acquisition method, equipment, equipment and storage medium
CN104581367A (en) Method and device for sharing multimedia content
CN103747284A (en) Video pushing method and server
WO2021057686A1 (en) Video decoding method and apparatus, video encoding method and apparatus, storage medium and electronic device
CN111541905B (en) Live broadcast method and device, computer equipment and storage medium
CN106550493B (en) Media resource sharing method and mobile terminal
CN106792125A (en) A kind of video broadcasting method and its terminal, system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination