CN114827747B - Streaming media data switching method, device, equipment and storage medium - Google Patents
Streaming media data switching method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN114827747B CN114827747B CN202210751038.7A CN202210751038A CN114827747B CN 114827747 B CN114827747 B CN 114827747B CN 202210751038 A CN202210751038 A CN 202210751038A CN 114827747 B CN114827747 B CN 114827747B
- Authority
- CN
- China
- Prior art keywords
- data stream
- switched
- data
- switching
- frame
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 238000012545 processing Methods 0.000 claims abstract description 27
- 238000006243 chemical reaction Methods 0.000 claims abstract description 24
- 230000005540 biological transmission Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 13
- 230000004044 response Effects 0.000 claims description 9
- 238000009877 rendering Methods 0.000 claims description 7
- 238000004806 packaging method and process Methods 0.000 claims description 6
- 238000004458 analytical method Methods 0.000 claims description 2
- 238000004519 manufacturing process Methods 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 230000000694 effects Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012856 packing Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000004888 barrier function Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005206 flow analysis Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
- H04N21/6437—Real-time Transport Protocol [RTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44008—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/268—Signal distribution or switching
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a method, a device, equipment and a storage medium for switching streaming media data. Relates to the technical field of streaming media. The data switching method comprises the steps of firstly generating a data switching instruction according to an obtained data switching request, and obtaining a data stream to be switched according to the data switching instruction. And then processing the data stream to be switched, determining whether the frame number of continuous multi-frame video frames from the first frame of video frame corresponding to the processed data stream to be switched meets a preset conversion condition, determining a target data stream according to the processed data stream to be switched under the condition of meeting the preset conversion condition, and finally switching the source data stream in a display state into the target data stream. Therefore, the acquired data stream can be processed in real time, the data stream can be switched without frames, and the field manufacturing requirement is met.
Description
Technical Field
The present invention relates to the field of streaming media technologies, and in particular, to a method, an apparatus, a device, and a storage medium for switching streaming media data.
Background
Conventional handoff stations are based on hardware development architecture and baseband signals. For example, in a relatively common streaming media data switching system developed by a field programmable gate array, core technologies such as signal scheduling and processing cannot be broken through, technical barriers are high, equipment cost is high, and the like. Under the requirement of ultra-high definition application of streaming media which has developed a trend at present, the technical difficulty of the conventional streaming media data switching system is greatly improved, and the requirements of field processing and display of data and the like cannot be met.
Disclosure of Invention
In view of the above problems, the present invention is proposed to provide a streaming media data switching method, apparatus, device and storage medium that overcome the above problems or at least partially solve the above problems.
According to a first aspect of the present invention, there is provided a streaming media data switching method, the method including:
acquiring a data switching request, and generating a data switching instruction based on the data switching request;
obtaining a data stream to be switched according to the data switching instruction, wherein the data stream to be switched at least comprises: a video data stream;
processing the data stream to be switched, and determining the frame number of continuous multi-frame video frames starting from the first frame video frame corresponding to the processed data stream to be switched;
when the frame number of continuous multi-frame video frames accords with a preset conversion condition, determining a target data stream according to the processed data stream to be converted;
and switching the source data stream in the display state into the target data stream.
According to a second aspect of the present invention, there is provided a streaming media data switching apparatus, the apparatus comprising:
the instruction determining module is used for acquiring a data switching request and generating a data switching instruction based on the data switching request;
a data stream obtaining module, configured to obtain a data stream to be switched according to the data switching instruction, where the data stream to be switched at least includes: a video data stream;
the data stream analysis module is used for processing the data stream to be switched and determining the frame number of continuous multi-frame video frames starting from the first frame video frame corresponding to the processed data stream to be switched;
the data stream determining module is used for determining a target data stream according to the processed data stream to be switched when the frame number of continuous multi-frame video frames accords with a preset switching condition;
and the data stream switching module is used for switching the source data stream in the display state into the target data stream.
According to a third aspect of the present invention, there is also provided an electronic apparatus comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods of any of the above.
According to a fourth aspect of the invention, there is also provided a computer readable storage medium storing a computer program for use in conjunction with an electronic device, the computer program being executable by a processor to perform the method of any of the above.
According to the scheme of the invention, a data switching instruction is generated according to the acquired data switching request, and the data stream to be switched is acquired according to the data switching instruction. And then processing the data stream to be switched, determining whether the frame number of continuous multi-frame video frames from the first frame of video frame corresponding to the processed data stream to be switched meets a preset conversion condition, determining a target data stream according to the processed data stream to be switched under the condition of meeting the preset conversion condition, and finally switching the source data stream in a display state into the target data stream. Therefore, the acquired data stream can be processed in real time, the data stream can be switched without a frame, and the field manufacturing requirement is met.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings.
In the drawings:
fig. 1 is a flowchart illustrating steps of a method for switching streaming media data according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of another method for switching streaming media data according to an embodiment of the present invention;
FIG. 3 is a schematic architecture diagram of a server system according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a change of data flow corresponding to a flower frame according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating steps of a method for switching streaming media data according to another embodiment of the present invention;
fig. 6 is a block diagram of a streaming media data switching device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Referring to fig. 1, a flowchart illustrating steps of a method for switching streaming media data according to an embodiment of the present invention is shown, and applied to a server, the method may include:
s101, acquiring a data switching request, and generating a data switching instruction based on the data switching request.
S102, obtaining a data stream to be switched according to the data switching instruction, wherein the data stream to be switched at least comprises: a video data stream.
In the embodiment of the invention, a control page is provided in the corresponding control terminal equipment, the related information of various data streams is displayed in the control page, the related information of the data streams to be switched is obtained based on the triggering of the data stream operation in the control page, and a data switching request is generated and uploaded to a server.
And after the server acquires the data switching request, generating a data switching instruction according to the obtained related information of the data stream to be switched. After issuing the data switching instruction, according to the response to the data switching instruction, the server acquires the data stream to be switched, which at least comprises a video data stream.
S103, processing the data stream to be switched, and determining the frame number of continuous multi-frame video frames from the first frame video frame corresponding to the processed data stream to be switched.
And S104, when the frame number of the continuous multi-frame video frame accords with the preset conversion condition, determining a target data stream according to the processed data stream to be converted.
And S105, switching the source data stream in the display state into the target data stream.
In the embodiment of the invention, the data stream to be switched is processed, namely, the data stream to be switched is further processed, so that the data stream to be switched can be better displayed. For example, the processing may include steps of video rendering, audio clipping, subtitle addition, and so on. And obtaining the processed data stream to be switched, wherein after the first frame of video frame in the processed data stream to be switched is obtained, the frame number of the video frame is counted.
And when the frame number of the continuously counted multi-frame video frames from the first frame video frame meets a preset conversion condition, for example, the frame number is more than a preset frame number, determining that the frame number meets the preset conversion condition, determining that the frame number is a target data stream according to the processed data stream to be converted, and switching the source data stream in a display state into the target data stream. Thereby realizing the switching of the data stream without the flower frames.
To sum up, in the streaming media data switching method provided in the embodiment of the present invention, a data switching instruction is first generated according to an obtained data switching request, and a data stream to be switched is obtained according to the data switching instruction. And then processing the data stream to be switched, determining whether the frame number of continuous multi-frame video frames from the first frame of video frame corresponding to the processed data stream to be switched meets a preset conversion condition, determining a target data stream according to the processed data stream to be switched under the condition of meeting the preset conversion condition, and finally switching the source data stream in a display state into the target data stream. Therefore, the acquired data stream can be processed in real time, the data stream can be switched without frames, and the field manufacturing requirement is met.
Referring to fig. 2, a flowchart illustrating steps of another streaming media data switching method provided in an embodiment of the present invention is shown, and applied to a server, the method may include:
s201, acquiring a data switching request, and generating a data switching instruction based on the data switching request.
S202, sending a data switching instruction to the network switching equipment.
S203, receiving a data stream to be switched returned by the network switching equipment, wherein the data stream to be switched is determined in response to the data switching instruction.
In the embodiment of the present invention, a control page is provided in a corresponding control terminal device, and related information of various data streams is displayed in the control page, as shown in fig. 3, where each data stream may be acquired in real time by each data acquisition device, or may be a video/audio file pre-stored in a local cache of a server. The data stream is in a 4K 10bit HDR format.
In one example, the related information of each data stream presented in the control page may include: flow identification, attributes, bandwidth, and connection status, etc. The stream identifier is used to distinguish different data streams, and the attribute is used to distinguish information such as the type of data stream. Based on the triggering of the data stream operation in the control page, for example, when each data stream is displayed in the control page, a configuration control corresponding to the data stream is provided, so that based on the triggering of the configuration control, the relevant information of the data stream to be switched is obtained, and a data switching request is generated and uploaded to the server.
In one example, the information related to the data stream to be switched may include a stream identifier and an attribute. After the switch of the server acquires the data switching request, the switch may parse the data switching request, and generate a data switching instruction according to the obtained relevant information of the data stream to be switched. For example, according to the stream identifier, the server is queried about the multicast address matched with the stream identifier, where the multicast address refers to the transmission channel address of different data streams in the network switching device. Therefore, the server can generate a data switching instruction according to the stream identification, the attribute and the multicast address, and send the data switching instruction to the network switching equipment.
In another example, the information related to the data stream to be switched may include a stream identifier, an attribute, and a multicast address. Therefore, after the server acquires the data switching request, the server can directly generate a data switching instruction according to the obtained related information of the data stream to be switched. And sends a data switching instruction to the network switching device.
The network switch can establish wired communication with a plurality of data acquisition devices. Therefore, different stream media data streams can have independent multicast addresses in the network switching device and are transmitted through IP (Internet Protocol) packets. For example, under the condition of satisfying SMPTE ST2110 protocol, IP data packet transmission of 4K signals in a non-compression form is carried out. Correspondingly, after receiving the data switching instruction, the network switching equipment responds to the data switching instruction and sends the data stream to be switched corresponding to the multicast address to the server, and the server receives the data stream to be switched and then carries out the next processing of the data stream to be switched. Wherein, a plurality of data transmission channels can be arranged in the server. And each data transmission channel transmits a data stream respectively, and the data stream transmitted by the fixed data transmission channel is output to a main output page for display. The source data stream and the data stream to be switched in the display state are transmitted in different data transmission channels, so that the output display of the source data stream is not influenced while the data stream to be switched is processed.
In one example, the Network switching device may be an SDN (Software Defined Network) Network switch, and an SDN controller adapted to the SDN Network switch may be run in the server. Therefore, the management and control separation of the streaming media data stream can be realized. And, based on the control page of the control terminal device, the visualized scheduling management of different IP data streams can be realized through an IP architecture. The IP architecture format has high compatibility and strong expandability, and compared with similar products, the cost of the whole system is greatly reduced. When the number of paths of data streams needs to be increased, management and control of the newly added stream media data streams can be realized by increasing communication connection between the network switching equipment and the corresponding data acquisition equipment and configuring relevant parameters and operation programs of the corresponding network switching equipment in the SDN controller.
The method can be applied to different video and audio scenes such as video and audio live broadcast, rebroadcast and the like. In one example, the method is applied to the live broadcasting or recorded broadcasting process of various types of programs of a broadcasting station, for example, when a studio broadcasts a variety of programs directly, a main output page on a main display terminal device is used for displaying pictures seen by a viewer. The plurality of data acquisition devices may be cameras dispersed throughout corners of the studio. Accordingly, switching of pictures shot by a plurality of shooting devices is required in the live program process. E.g. from a close-up view of one guest to a close-up view of another guest, etc. Therefore, the data stream to be switched can be a video data stream and an audio data stream collected by any shooting device. The playing picture of the main output page is controlled through the control page, so that the program can be more ornamental, and more audiences can be attracted to watch the program.
Considering the factors such as the program effect and the audience impression when the program is played, the data stream to be switched is pre-processed, and the processed data stream is determined as the target data stream that can be played to the audience. Therefore, in an optional embodiment of the present invention, the processing the data stream to be switched and determining the number of continuous multi-frame video frames from the first frame video frame corresponding to the processed data stream to be switched may include the following steps: step S204-step S207.
S204, dividing the type of the data stream to be switched, and determining the corresponding audio data stream and video data stream.
In the embodiment of the present invention, after the server acquires the data stream to be switched, the server may divide the type of the data stream to be switched, for example, perform de-embedding on the data stream to be switched through an IP card, where the de-embedding refers to separating an embedded audio from an acquired video, so that the data stream may be divided into an audio data stream and a video data stream, so that different types of data streams may be rendered at a later stage. The rendering operation may include steps of adjusting audio and packaging video.
S205, adjusting the audio data stream, and determining a corresponding target audio data stream.
In the embodiment of the present invention, the server may further include an audio mixer, and the audio mixer adjusts the audio data stream. The adjustment processing comprises operations such as audio clips and sound effects addition in the audio data stream. Therefore, the acquired audio data stream is adjusted to obtain a target audio data stream suitable for playing in the program.
In an alternative embodiment, the audio card may also be used to monitor the target audio data stream, so that when the target audio data stream meets the audio output condition, the target audio data stream is divided into the first format and the second format for output respectively.
S206, packaging the video data streams, and determining corresponding target video data streams.
In the embodiment of the present invention, the server may further include a video pool, and the video data stream is packaged in the video pool. The packing processing comprises operations such as video clipping and special effect packing in a video data stream. For example, the special effects wrapper may be a transition special effect between multiple windows, a video windowing, and the like. Therefore, the collected video data stream can be packaged to obtain a target video data stream suitable for playing in a program, wherein the target video data stream is divided into a first format and a second format to be output respectively.
In addition, a display page can be provided, and each video data stream in the video pool can be presented through the display page. Based on the display page, the video data streams in the video pool can be analyzed, managed, scheduled, presented, pushed and the like in a unified manner.
S207, determining the frame number of continuous multi-frame video frames from the first frame video frame of the target video data stream.
And S208, when the frame number of continuous multi-frame video frames accords with a preset conversion condition, determining a target data stream according to the target video data stream and the target audio data stream.
In the embodiment of the present invention, after the target video data stream is obtained, the obtained video frames may be counted from a first frame of video frame of the obtained target video data stream, and when the number of counted continuous multi-frame video frames meets a preset conversion condition, for example, the number of frames is greater than or equal to a preset number of frames, it is determined that the counted continuous multi-frame video frames meets the preset conversion condition, where the preset number of frames is dynamically set according to response time of different network switching devices for obtaining a data stream to be converted. For example, when the hardware performances of different network switching devices are different, the response time for transmitting the data stream to be switched to the server based on the data switching instruction and the transmission rate of the IP data packet corresponding to the data stream to be switched are different. Therefore, the preset frame number is determined in advance based on different network switching devices, and the data stream to be switched is ensured to be switched without spending frames. Referring to fig. 4, the term "flower frame" refers to a situation that when data streams of other data transmission channels are switched to a current data transmission channel for transmission, a data packet being transmitted may exist in the current data transmission channel, which may cause a frame to be sandwiched between transmission times of two frames of data packets, so that a short-time flower screen phenomenon occurs when the data stream is displayed on a main output page, which affects a user's perception.
After the preset conversion condition is determined to be met, in an example, the target video data stream and the target audio data stream after the corresponding frame number is removed may be subjected to data stream embedding, where the embedding refers to synthesizing an external audio data stream into the video data stream, so as to obtain the target data stream. Correspondingly, the target audio data stream in the first format and the target video data stream in the first format are embedded in a embedding manner, and the target audio data stream in the second format and the target video data stream in the second format are embedded in a embedding manner.
In an optional embodiment of the invention, before embedding the target video data stream and the target audio data stream from which the corresponding frame number is removed, the target video data stream may be further subjected to audio subtitle packaging according to the target audio data stream, so that video push with subtitles can be presented to viewers.
S209, outputting the target data stream according to the first format and the second format, and switching the source data stream in the display state into the target data stream output according to the first format.
In the embodiment of the present invention, the target data stream may also be transmitted to an SDN network switch, and the main display terminal device is in wired connection with the SDN network switch, so that the target data stream can be played back through a main output page of the main display terminal device. The target data stream may be output in two different display formats, so that the target data stream can be displayed in a main output page. The output format of the target data stream may include a first format and a second format, wherein the first format may be a main output Picture (PGM) and the second format may be a pre-monitor Picture (PVW). Conversion of the data stream from the second format to the first format may be accomplished based on the associated operations on the control page. And switching the source data stream displayed in the main output page into the target data stream output in the first format, thereby realizing the switching of the program pictures in the main output page.
The embodiment of the invention provides a streaming media data switching method, which comprises the steps of firstly generating a data switching instruction according to an acquired data switching request, and acquiring a data stream to be switched according to the data switching instruction. And then processing the data stream to be switched, determining whether the frame number of continuous multi-frame video frames from the first frame of video frame corresponding to the processed data stream to be switched meets a preset conversion condition, determining a target data stream according to the processed data stream to be switched under the condition of meeting the preset conversion condition, and finally switching the source data stream in a display state into the target data stream. Therefore, the acquired data stream can be processed in real time, the data stream can be switched without a frame, and the field manufacturing requirement is met.
Referring to fig. 5, a flowchart illustrating steps of another streaming media data switching method provided in an embodiment of the present invention is shown, where the method is applied in a server, and the method may include:
s501, acquiring a data switching request, and generating a data switching instruction based on the data switching request.
S502, according to the data switching instruction, inquiring the corresponding data stream to be switched in the local cache.
In the embodiment of the invention, a control page is provided in the corresponding control terminal equipment, the related information of various data streams is displayed in the control page, the related information of the data streams to be switched is obtained based on the triggering of the data stream operation in the control page, and a data switching request is generated and uploaded to a server.
And after acquiring the data switching request, the server generates a data switching instruction according to the obtained related information of the data stream to be switched. In one example, live broadcasting of a variety of programs at a studio may also involve broadcasting a prerecorded video to the viewer. Therefore, the data stream to be switched can be a data stream file pre-stored in a server, wherein the data stream file can be locally cached in a compressed file form. Thus, the information related to the data stream to be switched may comprise the stream identification and the attributes. And after the server acquires the data switching request, generating a data switching instruction according to the obtained related information of the data stream to be switched. For example, according to the stream identifier, the local storage address matched with the stream identifier is queried in the server, so that the data stream to be switched can be acquired from the local storage address.
S503, determining whether the data stream to be switched comprises a compressed mixed data stream.
If the data stream to be switched includes a compressed mixed data stream, executing step S504; otherwise, step S505 is executed.
S504, decoding the data stream to be switched.
And S505, dividing the type of the data stream to be switched, and determining the corresponding audio data stream and video data stream.
In the embodiment of the invention, after the data stream to be switched is obtained, whether the data stream to be switched is a compressed mixed data stream can be determined by inquiring the format of the file. And if the data stream to be switched comprises the compressed mixed data stream, inputting the data stream to be switched into a decoder in the server, and firstly executing the decoding operation of the data to be switched through the decoder so as to obtain the decoded data stream to be switched. And then according to the file format in the data stream to be switched, carrying out type division on the data stream to be switched, and respectively dividing an audio data stream and a video data stream. And the video data stream is sent to a video pool in the server for subsequent processing, and the audio data stream is sent to an audio mixer in the server for subsequent processing.
S506, adjusting the audio data streams, and determining corresponding target audio data streams.
S507, packaging the video data stream, and determining a corresponding target video data stream.
S508, determining the frame number of continuous multi-frame video frames from the first frame of video frame of the target video data stream.
S509, when the frame number of the continuous multi-frame video frame accords with a preset conversion condition, determining a target data stream according to the target audio data stream and the target video data stream.
And S510, switching the source data stream in the display state into the target data stream.
In the embodiment of the present invention, the description contents of steps S506 to S510 refer to the description contents of steps S205 to S209 described above.
To sum up, in the streaming media data switching method provided in the embodiment of the present invention, a data switching instruction is first generated according to an obtained data switching request, and a data stream to be switched is obtained according to the data switching instruction. And then processing the data stream to be switched, determining whether the frame number of continuous multi-frame video frames from the first frame video frame corresponding to the processed data stream to be switched meets a preset conversion condition, determining a target data stream according to the processed data stream to be switched under the condition of meeting the preset conversion condition, and finally switching the source data stream in a display state into the target data stream. Therefore, the acquired data stream can be processed in real time, the data stream can be switched without a frame, and the field manufacturing requirement is met.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those of skill in the art will recognize that the embodiments described in this specification are presently preferred embodiments and that no particular act is required to implement the embodiments of the disclosure.
Referring to fig. 6, a streaming media data switching apparatus provided in an embodiment of the present invention is shown, where the apparatus may include:
the instruction determining module 601 is configured to obtain a data switching request, and generate a data switching instruction based on the data switching request.
A data stream obtaining module 602, configured to obtain a data stream to be switched according to the data switching instruction, where the data stream to be switched at least includes: a video data stream.
And the data stream analyzing module 603 is configured to process the data stream to be switched, and determine the number of frames of consecutive multi-frame video frames from the first frame of video frame corresponding to the processed data stream to be switched.
And a data stream determining module 604, configured to determine a target data stream according to the processed data stream to be switched when the number of consecutive multi-frame video frames meets a preset switching condition.
A data stream switching module 605, configured to switch the source data stream in the display state to the target data stream.
In an optional embodiment of the present invention, the data handover request includes: a stream identification and an attribute; the instruction determination module may be further operable to:
and inquiring the multicast address corresponding to the flow identification.
And generating a data switching instruction according to the stream identification, the attribute and the multicast address.
In an optional embodiment of the invention, the data stream acquiring module may be further configured to:
and sending a data switching instruction to the network switching equipment.
And receiving a data stream to be switched returned by the network switching equipment, wherein the data stream to be switched is determined by responding to the data switching instruction.
In an alternative embodiment of the present invention, the preset switching condition includes: the frame number of continuous multi-frame video frames is more than a preset frame number, wherein the preset frame number is dynamically set according to the response time of different network switching equipment for acquiring the data stream to be switched.
In an optional embodiment of the invention, the data stream obtaining module may further be configured to:
and inquiring the corresponding data stream to be switched in the local cache according to the data switching instruction.
In an alternative embodiment of the present invention, the data flow analysis module may include:
and the type division submodule is used for dividing the type of the data stream to be switched and determining the corresponding audio data stream and video data stream.
And the data rendering submodule is used for respectively rendering the audio data stream and the video data stream and determining the frame number of continuous multi-frame video frames starting from the first frame video frame corresponding to the processed data stream to be switched.
In an optional embodiment of the invention, the data rendering sub-module may further include:
and the audio processing unit is used for adjusting the audio data streams and determining the corresponding target audio data streams.
And the video processing unit is used for packaging the video data stream and determining a corresponding target video data stream.
And the frame number determining unit is used for determining the frame number of continuous multi-frame video frames from the first frame video frame of the target video data stream.
In an optional embodiment of the invention, the type division sub-module may be further configured to:
and if the data stream to be switched comprises a compressed mixed data stream, decoding the compressed mixed data stream.
And performing type division on the decoded compressed mixed data stream to determine a corresponding audio data stream and a corresponding video data stream.
In an optional embodiment of the invention, the data flow determining module may be further configured to:
and embedding the target audio data stream and the target video data stream to generate a target data stream.
In an optional embodiment of the present invention, the data stream switching module may be further configured to:
and outputting the target data stream according to a first format and a second format, and switching the source data stream in a display state into the target data stream output in the first format.
To sum up, the streaming media data switching device provided in the embodiment of the present invention first generates a data switching instruction according to the obtained data switching request, and obtains a data stream to be switched according to the data switching instruction. And then processing the data stream to be switched, determining whether the frame number of continuous multi-frame video frames from the first frame video frame corresponding to the processed data stream to be switched meets a preset conversion condition, determining a target data stream according to the processed data stream to be switched under the condition of meeting the preset conversion condition, and finally switching the source data stream in a display state into the target data stream. Therefore, the acquired data stream can be processed in real time, the data stream can be switched without frames, and the field manufacturing requirement is met.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As is readily imaginable to the person skilled in the art: any combination of the above embodiments is possible, and thus any combination between the above embodiments is an embodiment of the present invention, but the present disclosure is not necessarily detailed herein for reasons of space.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the devices in an embodiment may be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
An electronic device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods of the embodiments described above.
A computer-readable storage medium storing a computer program for use in conjunction with an electronic device, the computer program being executable by a processor to perform the method of the above-described embodiments.
As will be appreciated by one of skill in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrases "comprising one of \ 8230; \8230;" does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The foregoing describes in detail a streaming media data switching method and a streaming media data switching device provided by the present invention, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the foregoing embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (11)
1. A method for switching streaming media data, comprising:
acquiring a data switching request, wherein the data switching request comprises: a stream identification and an attribute;
inquiring the multicast address corresponding to the stream identifier;
generating a data switching instruction according to the stream identification, the attribute and the multicast address;
obtaining a data stream to be switched according to the data switching instruction, wherein the data stream to be switched at least comprises: a video data stream;
processing the data stream to be switched, and determining the frame number of continuous multi-frame video frames starting from the first frame video frame corresponding to the processed data stream to be switched;
when the frame number of continuous multi-frame video frames accords with a preset conversion condition, determining a target data stream according to the processed data stream to be converted, wherein the target video data stream in the target data stream removes the corresponding frame number, and the preset conversion condition comprises the following steps: the frame number of continuous multi-frame video frames is more than a preset frame number, wherein the preset frame number is dynamically set according to the response time of different network switching equipment for acquiring a data stream to be switched, the response time is used for switching the idle frames of the data stream to be switched, a source data stream and the data stream to be switched in a display state are transmitted between a server and the network switching equipment through different data transmission channels, and the source data stream and the data stream to be switched are output to a main output page through the same data transmission channel for display;
and switching the source data stream in the display state into the target data stream.
2. The method for switching streaming media data according to claim 1, wherein the obtaining the data stream to be switched according to the data switching instruction comprises:
sending a data switching instruction to the network switching equipment;
and receiving a data stream to be switched returned by the network switching equipment, wherein the data stream to be switched is determined by responding to the data switching instruction.
3. The method for switching streaming media data according to claim 1, wherein the obtaining the data stream to be switched according to the data switching instruction comprises:
and inquiring the corresponding data stream to be switched in the local cache according to the data switching instruction.
4. The method for switching streaming media data according to claim 1, wherein the processing the data stream to be switched and determining the number of consecutive multi-frame video frames from a first frame video frame corresponding to the processed data stream to be switched comprises:
dividing the type of the data stream to be switched, and determining a corresponding audio data stream and a corresponding video data stream;
and respectively rendering the audio data stream and the video data stream, and determining the frame number of continuous multi-frame video frames starting from the first frame video frame corresponding to the processed data stream to be switched.
5. The method for switching streaming media data according to claim 4, wherein the rendering is performed on the audio data stream and the video data stream, and the frame number of the continuous multi-frame video frame from the first frame video frame corresponding to the processed data stream to be switched is determined, including:
adjusting the audio data streams, and determining corresponding target audio data streams;
packaging the video data streams, and determining corresponding target video data streams;
and determining the frame number of continuous multi-frame video frames from the first frame video frame of the target video data stream.
6. The method for switching streaming media data according to claim 4, wherein the dividing the type of the data stream to be switched and determining the corresponding audio data stream and video data stream comprises:
if the data stream to be switched comprises a compressed mixed data stream, decoding the data stream to be switched;
and carrying out type division on the decoded data stream to be switched to determine the corresponding audio data stream and video data stream.
7. The method for switching streaming media data according to claim 5, wherein the determining a target data stream according to the processed data stream to be switched comprises:
and generating a target data stream according to the target audio data stream and the target video data stream.
8. The method for switching streaming media data according to claim 1, wherein the switching the source data stream in the display state to the target data stream includes:
and outputting the target data stream according to a first format and a second format, and switching the source data stream in a display state into the target data stream output in the first format.
9. A streaming media data switching apparatus, comprising:
an instruction determining module, configured to obtain a data handover request, where the data handover request includes: a stream identification and an attribute;
the multicast address corresponding to the stream identifier is also used for inquiring;
the system is also used for generating a data switching instruction according to the stream identification, the attribute and the multicast address;
a data stream obtaining module, configured to obtain a data stream to be switched according to the data switching instruction, where the data stream to be switched at least includes: a video data stream;
the data stream analysis module is used for processing the data stream to be switched and determining the frame number of continuous multi-frame video frames starting from the first frame video frame corresponding to the processed data stream to be switched;
a data stream determining module, configured to determine a target data stream according to a processed data stream to be switched when frame numbers of consecutive multi-frame video frames meet a preset switching condition, where the target video data stream in the target data stream has corresponding frame numbers removed, and the preset switching condition includes: the frame number of continuous multi-frame video frames is more than a preset frame number, wherein the preset frame number is dynamically set according to the response time of different network switching equipment for acquiring a data stream to be switched, the response time is used for switching the idle frames of the data stream to be switched, a source data stream and the data stream to be switched in a display state are transmitted between a server and the network switching equipment through different data transmission channels, and the source data stream and the data stream to be switched are output to a main output page through the same data transmission channel for display;
and the data stream switching module is used for switching the source data stream in the display state into the target data stream.
10. An electronic device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-8.
11. A computer-readable storage medium storing a computer program for use in conjunction with an electronic device, the computer program being executable by a processor to perform the method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210751038.7A CN114827747B (en) | 2022-06-29 | 2022-06-29 | Streaming media data switching method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210751038.7A CN114827747B (en) | 2022-06-29 | 2022-06-29 | Streaming media data switching method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114827747A CN114827747A (en) | 2022-07-29 |
CN114827747B true CN114827747B (en) | 2023-01-10 |
Family
ID=82522234
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210751038.7A Active CN114827747B (en) | 2022-06-29 | 2022-06-29 | Streaming media data switching method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114827747B (en) |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103533437A (en) * | 2013-10-30 | 2014-01-22 | 乐视致新电子科技(天津)有限公司 | Method and device for switching channels of smart television |
CN109803151B (en) * | 2017-11-16 | 2022-02-08 | 腾讯科技(深圳)有限公司 | Multimedia data stream switching method and device, storage medium and electronic device |
CN109963188A (en) * | 2017-12-22 | 2019-07-02 | 杭州海康威视数字技术股份有限公司 | Switching method, device, electronic equipment and the storage medium of video pictures |
CN112738540B (en) * | 2020-12-25 | 2023-09-05 | 广州虎牙科技有限公司 | Multi-device live broadcast switching method, device, system, electronic device and readable storage medium |
CN113507639A (en) * | 2021-06-30 | 2021-10-15 | 深圳市华曦达科技股份有限公司 | Channel fast switching method, player and readable storage medium |
CN114339317A (en) * | 2022-01-11 | 2022-04-12 | 北京易智时代数字科技有限公司 | Video stream switching method based on live broadcast service |
-
2022
- 2022-06-29 CN CN202210751038.7A patent/CN114827747B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN114827747A (en) | 2022-07-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101594351B1 (en) | Streaming of multimedia data from multiple sources | |
US8767041B2 (en) | Method and apparatus for providing 3D still image service over digital broadcasting | |
TWI495331B (en) | Set-top-box, flash glasses and method of a plurality of users watching a plurality of tv programs at the same time | |
CN104902317A (en) | Audio video synchronization method and device | |
CN106303663B (en) | live broadcast processing method and device and live broadcast server | |
KR102499231B1 (en) | Receiving device, sending device and data processing method | |
KR101841313B1 (en) | Methods for processing multimedia flows and corresponding devices | |
US20190045156A1 (en) | Device for transmitting broadcast signal, device for receiving broadcast signal, method for transmitting broadcast signal, and method for receiving broadcast signal | |
US8675140B2 (en) | Playback apparatus for playing back hierarchically-encoded video image data, method for controlling the playback apparatus, and storage medium | |
US8769562B2 (en) | Digital broadcast method, data receiving device, and data transmitting device | |
US11523154B2 (en) | Transmission device, transmission method, reception device, and reception method | |
CN114827747B (en) | Streaming media data switching method, device, equipment and storage medium | |
US20130239137A1 (en) | Augmented broadcasting apparatus and method for advance metadata provision | |
US8839323B2 (en) | Random backoff apparatus and method for receiving augmented content | |
JP2002314960A (en) | Multi-view broadcasting service system and device or method or recording medium or its program related therewith | |
KR20150071505A (en) | Multi angle view processing apparatus | |
US10306298B2 (en) | Image processing apparatus and control method thereof | |
JP7462199B1 (en) | Program receiving and display device and program receiving and display control method | |
KR101999235B1 (en) | Method and system for providing hybrid broadcast broadband service based on mmtp | |
KR102184131B1 (en) | Multi channels transmitting system for dynamaic audio and controlling method | |
Thomas et al. | State‐of‐the‐Art and Challenges in Media Production, Broadcast and Delivery | |
EP3528505A1 (en) | Apparatus and method for operating a media device to select from plural instances of content for play back | |
CN115604523A (en) | Processing method of free visual angle video scene, client and server | |
CN116761006A (en) | Method, device, computer equipment and storage medium for realizing official channel rooms based on cloud broadcasting guide platform | |
KR20210085932A (en) | Method for processing additional data in digital broadcasting system and apparatus for the same |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |