CN111212329A - IP video/audio code stream switching method and device, equipment and storage medium - Google Patents
IP video/audio code stream switching method and device, equipment and storage medium Download PDFInfo
- Publication number
- CN111212329A CN111212329A CN202010038939.2A CN202010038939A CN111212329A CN 111212329 A CN111212329 A CN 111212329A CN 202010038939 A CN202010038939 A CN 202010038939A CN 111212329 A CN111212329 A CN 111212329A
- Authority
- CN
- China
- Prior art keywords
- code stream
- video
- data
- audio
- target
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 230000036541 health Effects 0.000 claims abstract description 27
- 238000001514 detection method Methods 0.000 claims description 23
- 238000009499 grossing Methods 0.000 claims description 22
- 238000012937 correction Methods 0.000 claims description 20
- 238000012545 processing Methods 0.000 claims description 16
- 230000011218 segmentation Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 239000011159 matrix material Substances 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005192 partition Methods 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/61—Network physical structure; Signal processing
- H04N21/6106—Network physical structure; Signal processing specially adapted to the downstream path of the transmission network
- H04N21/6125—Network physical structure; Signal processing specially adapted to the downstream path of the transmission network involving transmission via Internet
-
- 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/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
-
- 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/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/23418—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics
-
- 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
-
- 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
- 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
-
- 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/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/854—Content authoring
- H04N21/8547—Content authoring involving timestamps for synchronizing content
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The application discloses a method for switching IP video/audio code stream, which comprises, obtaining at least two paths of IP code stream, analyzing IP code stream data to obtain dividing point of each path of IP code stream, dividing the corresponding IP code stream by the dividing point to obtain data block, then when receiving reading instruction, reading the target IP code stream from the target data source according to the target data source appointed by the reading instruction, wherein, the target IP code stream can be set manually or switched automatically according to the health degree, the data block in the target IP code stream is smoothed and the smoothed data is output, can realize smooth switching (seamless switching) of the video and audio IP code streams, the code stream switching process is transparent to downstream equipment and terminal equipment, the code stream health degree can be analyzed in real time, and the optimal code stream is automatically switched to be output according to the analysis result.
Description
Technical Field
The present disclosure relates to the field of broadcast television, and in particular, to a method, an apparatus, a device, and a storage medium for switching IP video/audio code streams.
Background
In a conventional broadcast television front end, a Serial Digital Interface (SDI) is used for transmitting uncompressed signals of video and audio programs, or an Asynchronous Serial Interface (ASI) is used for transmitting compressed signals of video and audio programs. Scheduling and switching SDI signals requires the use of an SDI matrix and scheduling and switching ASI signals requires the use of an ASI matrix.
With the rapid development of the internet, the IPTV and the internet television are rapidly popularized, and the front-end systems of the broadcast television, the IPTV and the internet television are rapidly and fully IP-based. All the original SDI signals and all the original ASI signals are converted into IP signals for transmission and scheduling. Front-end IP has many advantages: larger bandwidth, more flexible wiring and routing, and more convenient signal control and scheduling.
After the IP processing, a device having a function corresponding to the SDI/ASI matrix is required to implement the functions of switching between main and standby signals, scheduling programs, and the like. The existing device directly replaces the data packet in the network transmission layer by using the basic function of the network switch, and although the basic switching function can be realized, smooth program switching (seamless switching) cannot be realized, so that video and audio jamming and mosaic appear in the switching process.
Disclosure of Invention
In view of this, the present disclosure provides a method for switching an IP video/audio code stream, including:
acquiring an IP code stream to be switched; wherein, the IP code stream has at least two paths;
performing video and audio analysis on the IP code stream, and obtaining a division point of the IP code stream based on a video and audio analysis result;
segmenting the IP code stream according to the obtained segmentation point to obtain a data block;
when a reading instruction is received, reading a target IP code stream from a target data source according to the target data source appointed in the reading instruction; the target data source is at least one of data blocks obtained by dividing the IP code stream;
and smoothing the data block in the target IP code stream, and outputting the smoothed data.
In one possible implementation manner, the method further includes:
and analyzing the health degree of each path of the IP code stream to obtain an analysis result.
In a possible implementation manner, performing video and audio analysis on the IP code stream, and obtaining a partition point of the IP code stream based on a video and audio analysis result includes:
if the IP code stream contains video data, taking the starting point of the video data as a dividing point;
if the IP code stream contains audio data, taking the starting point of the audio data as a dividing point;
and if the IP code stream does not contain audio data or video data, taking a set interval as a division point.
In one possible implementation, smoothing the data block includes:
at least one of PMT PID remapping, video PID remapping, audio PID remapping, PCR PID remapping, Service ID remapping, PCR time reference correction, PTS time reference correction, DTS time reference correction, and continuous count correction.
In one possible implementation, the health analysis includes:
carrying out score statistics according to the analysis items;
and the health degree of the IP code stream with high score statistics is high.
In one possible implementation, the analysis item includes:
and judging whether the IP code stream arrives within preset time, and at least one of code stream synchronization header 0x47 detection, PAT detection, PID detection, PMT detection, null packet rate detection and continuous counting detection.
In a possible implementation manner, the range of the set interval is: 1 second to 8 seconds.
According to an aspect of the present disclosure, an IP video/audio code stream switching apparatus is provided, which is characterized by comprising an IP code stream acquisition module, a division point setting module, a data block division module, an instruction receiving module, and a smoothing processing module;
the IP code stream acquisition module is configured to acquire an IP code stream to be switched; wherein, the IP code stream has at least two paths;
the division point setting module is configured to perform video and audio analysis on the IP code stream and obtain division points of the IP code stream based on a video and audio analysis result;
the data block segmentation module is configured to segment the IP code stream according to the obtained segmentation point to obtain a data block;
the instruction receiving module is configured to read a target IP code stream from a target data source according to the target data source specified in a reading instruction when the reading instruction is received; the target data source is at least one of data blocks obtained by dividing the IP code stream;
and the smoothing processing module is configured to smooth the data block in the target IP code stream and output the smoothed data.
According to another aspect of the present disclosure, an IP video/audio code stream switching device is provided, which includes:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute the executable instructions to implement any of the methods described above.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of the preceding.
The method comprises the steps of obtaining at least two paths of IP code streams, analyzing IP code stream data to obtain a division point of each path of IP code stream, dividing the corresponding IP code stream by the division point to obtain data blocks, and reading a target IP code stream from a target data source according to a target data source appointed in a reading instruction when receiving a reading instruction, wherein the target IP code stream can be manually set, or can be automatically switched according to the health degree, the data blocks in the target IP code stream are subjected to smoothing processing and the data after the smoothing processing are output, the smooth switching (seamless switching) of the video and audio IP code streams can be realized, the code stream switching process is transparent to downstream equipment and terminal equipment, the health degree of the code stream can be analyzed in real time, and the optimal code stream is automatically switched according to an analysis result to be output.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flowchart of an IP video/audio code stream switching method according to an embodiment of the present disclosure;
fig. 2 shows a general flowchart of an IP video/audio code stream switching method according to an embodiment of the present disclosure;
FIG. 3 illustrates a schematic diagram of a method for switching IP video and audio code streams according to an embodiment of the disclosure;
fig. 4 is a schematic diagram illustrating an IP video/audio code stream switching method according to an embodiment of the disclosure;
fig. 5 shows another schematic diagram of an IP video/audio code stream switching method according to an embodiment of the disclosure;
fig. 6 shows a block diagram of an IP video/audio code stream apparatus according to an embodiment of the present disclosure;
fig. 7 shows a block diagram of an IP video/audio code stream device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 shows a flowchart of an IP video/audio code stream switching method according to an embodiment of the present disclosure. As shown in fig. 1, the IP video/audio code stream switching method includes:
s100, acquiring an IP code stream to be switched; wherein, the IP code stream has at least two paths;
step S200, performing video and audio analysis on the IP code stream, and obtaining a division point of the IP code stream based on a video and audio analysis result;
step S300, dividing the IP code stream according to the obtained dividing points to obtain data blocks;
step S400, when a reading instruction is received, reading a target IP code stream from a target data source according to the target data source appointed in the reading instruction; the target data source is at least one of data blocks obtained by dividing the IP code stream;
step S500, smoothing the data block in the target IP code stream, and outputting the smoothed data.
The method comprises the steps of obtaining at least two paths of IP code streams, analyzing IP code stream data to obtain a division point of each path of IP code stream, dividing the corresponding IP code stream by the division point to obtain data blocks, and reading a target IP code stream from a target data source according to a target data source appointed in a reading instruction when receiving a reading instruction, wherein the target IP code stream can be manually set, or can be automatically switched according to the health degree, the data blocks in the target IP code stream are subjected to smoothing processing and the data after the smoothing processing are output, the smooth switching (seamless switching) of the video and audio IP code streams can be realized, the code stream switching process is transparent to downstream equipment and terminal equipment, the health degree of the code stream can be analyzed in real time, and the optimal code stream is automatically switched according to an analysis result to be output.
Specifically, referring to fig. 1, step S100 is executed to obtain an IP code stream to be switched; wherein, the IP code stream has at least two paths.
In a possible implementation, referring to fig. 2, step DS1 is executed, the connection is performed through ethernet, the transport protocol uses UDP, and the stream encapsulation format uses standard TS streams, where each UDP packet includes 7 TS packets. The input end of the IP code stream comprises at least two paths, for example: referring to fig. 3 and 4, fig. 3 is a schematic diagram of IP code stream switching, that is, it shows that multiple inputs and multiple outputs can be performed, and the IP code stream input end includes an engineering receiver, a video transcoder, a video encoder, a streaming media server and a broadcast server.
Further, referring to fig. 1, step S200 is executed to perform video and audio analysis on the IP code stream, and obtain a segmentation point of the IP code stream based on a video and audio analysis result.
In a possible implementation manner, first, whether a code stream contains video data is detected, if the code stream contains video data, a starting point of a video gop (group of picture) is continuously detected in the code stream data, the detected starting point is taken as a dividing point, no other analysis is performed, and then whether the code stream contains audio data is detected, if the code stream contains audio information, the starting point of an audio frame is continuously detected in the code stream data, the detected starting point is taken as the dividing point, no other analysis is performed, if the code stream containing no video data and no audio data is detected, the code stream is defined as private data, a fixed time interval is taken as the dividing point, and the interval duration range is 1-8 seconds, for example: receiving a first path of IP code stream from a streaming media server, receiving a second path of IP code stream from a broadcasting server, receiving a third path of IP code stream from a video encoder, detecting received video data in the first path of code stream, continuously detecting starting points of the video data in the received code stream data, taking all the detected video starting points as dividing points of the first path of IP code stream, detecting audio data in the second path of IP code stream, continuously detecting the starting points of the audio data in the received code stream data, taking the detected audio starting points as dividing points of the second path of IP code stream data, detecting that no video data and no audio data exist in the third path of IP code stream, dividing at intervals of 2 seconds in the example, and obtaining the dividing points of each path of IP code stream after the dividing points of the three paths of IP code stream data are determined.
It should be noted that, referring to fig. 2 and 5, while receiving the IP code stream and dividing it into data blocks, the health degree analysis is performed on the received IP code stream, that is, step DS6 is executed, where the health degree analysis includes performing health degree analysis on each path of IP code stream to obtain an analysis result, and selecting one path of IP code stream as the target IP code stream according to the analysis result. Wherein the health analysis comprises: and carrying out score statistics according to the analysis items, wherein the health degree of the IP code stream with high score statistics is high. Wherein, the analysis items include: judging whether the IP code stream arrives within the preset time, detecting a code stream synchronization head 0x47, continuously counting and detecting TR101-290 indexes. Judging that the corresponding score of the code stream arriving within the preset time is 64, the detection corresponding score of a code stream synchronization head 0x47 is 32, the detection corresponding score of continuous counting is 16, the detection corresponding score of a TR101-290 index is 8, if a certain detection item is unqualified, subtracting the corresponding score, and assuming that the health degree is full of 0, the code stream with less score has worse health degree.
Further, referring to fig. 1, step S300 may be executed to segment the IP code stream according to the obtained segmentation point to obtain a data block.
In a possible implementation manner, referring to fig. 2, step DS2 may be executed, based on the obtained dividing points, the data between adjacent dividing points in each IP code stream is divided, that is, the data between adjacent dividing points in each IP code stream is used as a data block, referring to fig. 2 and fig. 5, step DS3 is executed, and the data block is stored in a first-in first-out buffer, that is, a FIFO buffer, for example: and after the first path of IP code stream data is divided according to the corresponding dividing points, obtaining a plurality of data blocks, storing all the data blocks into a first FIFO, and after the second path of IP code stream data is divided according to the corresponding dividing points, obtaining a plurality of data blocks, and storing all the data blocks into a second FIFO.
It should be noted that each first-in first-out buffer (i.e., FIFO) corresponds to an input end and is used for storing code stream data, the code stream data is stored and read in units of blocks, each buffer can store n data blocks, and n is greater than or equal to 2; each buffer has only one writer (corresponding input end), each buffer can have 0, 1 or a plurality of readers (output ends), and the contents of the data block are synchronously protected by adopting a read-write lock.
Further, step S400 may be executed, and when receiving the reading instruction, according to the target data source specified in the reading instruction, the target IP code stream is read from the target data source; the target data source is at least one of data blocks obtained by dividing the IP code stream.
In a possible implementation manner, referring to fig. 2, firstly, instruction information is obtained, wherein the instruction information includes an address of a target data source, and is divided into an automatic mode CS1 and a manual mode CS2, if the automatic mode CS1 is selected, CS3 is executed, health degree analysis is performed on a current path IP code stream, 64 minutes is obtained when the current path IP code stream arrives within a preset time, 32 minutes is obtained when the code stream synchronization header 0x47 is qualified, continuous counting detection is qualified, 16 minutes is obtained, other TR101-290 indexes are qualified, 8 minutes is obtained, scores are added, a total score is 120 minutes, and the other path IP code stream is not reached in time, and is determined to be in an unlocked state, the code stream synchronization header 0x47 is qualified, 32 minutes is obtained, continuous counting detection is qualified, 16 minutes is obtained, other TR101-290 indexes are qualified, 8 minutes is obtained, and the total score is 56 minutes (wherein, other TR101-290 index detections include PAT detection, PID detection, PMT detection, and null packet rate detection), then the data block of the IP code stream divided into 120 points in total is selected as the data source, i.e., CS5 is executed without code stream switching. And if the mode is the manual mode, the set FIFO is used as a target data source, and the data block is read from the target data source.
Correspondingly, the control module has two working modes, one is an automatic switching mode, and the other is a manual switching mode; in the automatic mode, for each output module, S input code streams are preset as alternative data sources: the first is a main data source, the second is a backup data source 1, the third is an alternative data source 2, S is more than or equal to 2, the control module informs the output module to take a code stream with the highest health degree analysis score as a data source, and data blocks are obtained from the corresponding first-in first-out buffer, the specific process is that the control module obtains the health degree score of each code stream from the health degree analysis module in real time, the alternative data sources are sequenced from high to low, and if the health degree scores of a plurality of code streams are the same, an input code stream is selected according to the following priority order: the method comprises the steps that a main data source, a backup data source 1 and a backup data source 2 are adopted, if a current data source is a first alternative data source, an output module does not need to be informed, if the current data source is not the first alternative data source, the output module is informed, switching to a new data source is needed to be carried out for output, after the output module receives the notification, after all data of a current data block are output, the next data block is read from the new data source, in a manual switching mode, the health degree score of each code stream is provided for a user, and whether code stream switching is carried out or not and which code stream is switched to is determined through manual intervention of the user; in the manual switching mode, the user can also manually switch to a required code stream according to other external information, such as program scheduling information, so as to realize program content scheduling.
Further, step S500 may be executed to perform smoothing processing on the data block in the target IP code stream, and output the smoothed data.
In one possible implementation, referring to fig. 2, step DS4 may be performed, wherein the smoothing process includes: PMTPID remapping, video PID remapping, audio PID remapping, PCR PID remapping, Service ID remapping, PCR time reference correction, PTS time reference correction, DTS time reference correction, continuous count correction. The PID remapping means that if the PID after the code stream switching is different from the PID before the switching, PID data in the code stream after the switching and a corresponding PSI information table are modified, the PID is the same as the PID before the switching, and the Service ID remapping means that if the Service ID after the code stream switching is different from the Service ID before the switching, PAT, PMT and SDT tables in the code stream after the switching are modified, the Service ID is the same as the Service ID before the switching, time reference correction means that the difference between the first time stamp after the switching and the corresponding time stamp under the condition that the switching is not supposed to occur is calculated as correction offset, the correction offset is subtracted from all the time stamps, continuous counting correction means that the last continuous counting of each PID is recorded before the code stream switching, and after the code stream switching, each TS packet is sequentially added with 1 on the basis of the recorded continuous counting. Each output end outputs an IP code stream, the output end receives the instruction of the control module, a first-in first-out buffer corresponding to the appointed input end is selected as a data source, data is read from the first-in first-out buffer by taking a block as a unit, and after the data is subjected to smoothing processing, the step DS5 can be executed, and the data is output to an IP address and a port appointed by a user. For example: when the IP code stream is output, selecting one FIFO as a data block from which the IP code stream is read from the target IP code stream, and performing smoothing processing operation on each data block, namely performing PMT PID remapping, video PID remapping, audio PID remapping, PCR PID remapping, Service ID remapping, PCR time reference correction, PTS time reference correction, DTS time reference correction and continuous counting correction. And after the smoothing treatment is finished, the IP code stream data can be output.
It should be noted that, although the IP video/audio code stream switching method is described above by taking the above steps as an example, those skilled in the art can understand that the present disclosure should not be limited thereto. In fact, the user can flexibly set the IP video/audio code stream switching method according to personal preference and/or actual application scene as long as the required functions are achieved.
The method comprises the steps of obtaining at least two paths of IP code streams, analyzing IP code stream data to obtain a division point of each path of IP code stream, dividing the corresponding IP code stream by the division point to obtain data blocks, and reading a target IP code stream from a target data source according to a target data source appointed in a reading instruction when receiving a reading instruction, wherein the target IP code stream can be manually set, or can be automatically switched according to the health degree, the data blocks in the target IP code stream are subjected to smoothing processing and the data after the smoothing processing are output, smooth switching (seamless switching) of the video and audio IP code streams can be realized, the code stream switching process is transparent to downstream equipment and terminal equipment, the health degree of the code streams can be analyzed in real time, and the optimal code streams are automatically switched according to an analysis result to be output.
Further, according to another aspect of the present disclosure, an IP video/audio code stream switching apparatus 100 is also provided. Since the working principle of the IP video/audio code stream switching 100 according to the embodiment of the present disclosure is the same as or similar to the principle of the IP video/audio code stream switching method according to the embodiment of the present disclosure, repeated descriptions are omitted. Referring to fig. 6, the IP video/audio stream switching apparatus 100 according to the embodiment of the present disclosure includes an IP stream acquiring module 110, a dividing point setting module 120, a data block dividing module 130, an instruction receiving module 140, and a smoothing processing module 150.
An IP code stream obtaining module 110 configured to obtain an IP code stream to be switched; wherein, the IP code stream has at least two paths;
a division point setting module 120 configured to perform video and audio analysis on the IP code stream, and set a division point of each path of IP code stream based on a division point of the IP code stream obtained from a video and audio analysis result;
a data block segmentation module 130 configured to segment the IP code stream according to the obtained segmentation points to obtain data blocks;
the instruction receiving module 140 is configured to, when receiving the reading instruction, read a target IP code stream from a target data source according to the target data source specified in the reading instruction; the target data source is at least one of data blocks obtained by dividing the IP code stream;
and a smoothing module 150 configured to smooth the data block in the target IP code stream and output the smoothed data.
Still further, according to another aspect of the present disclosure, there is also provided an IP video/audio stream switching apparatus 200. Referring to fig. 7, the IP video/audio code stream switching apparatus 200 according to the embodiment of the disclosure includes a processor 210 and a memory 220 for storing instructions executable by the processor 210. Wherein, the processor 210 is configured to implement any of the foregoing IP video/audio code stream switching methods when executing the executable instructions.
Here, it should be noted that the number of the processors 210 may be one or more. Meanwhile, in the IP video/audio code stream switching apparatus 200 according to the embodiment of the present disclosure, an input device 230 and an output device 240 may be further included. The processor 210, the memory 220, the input device 230, and the output device 240 may be connected via a bus, or may be connected via other methods, which is not limited in detail herein.
The memory 220, which is a computer-readable storage medium, may be used to store software programs, computer-executable programs, and various modules, such as: the program or module corresponding to the IP video/audio code stream switching method of the embodiment of the disclosure. The processor 210 executes various functional applications and data processing of the IP audiovisual code stream switching apparatus 200 by running software programs or modules stored in the memory 220.
The input device 230 may be used to receive an input number or signal. Wherein the signal may be a key signal generated in connection with user settings and function control of the device/terminal/server. The output device 240 may include a display device such as a display screen.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium, on which computer program instructions are stored, the computer program instructions, when executed by the processor 210, implement the IP video/audio code stream switching method of any one of the foregoing.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Claims (10)
1. An IP video/audio code stream switching method is characterized by comprising the following steps:
acquiring an IP code stream to be switched; wherein, the IP code stream has at least two paths;
performing video and audio analysis on the IP code stream, and obtaining a division point of the IP code stream based on a video and audio analysis result;
segmenting the IP code stream according to the obtained segmentation point to obtain a data block;
when a reading instruction is received, reading a target IP code stream from a target data source according to the target data source appointed in the reading instruction; the target data source is at least one of data blocks obtained by dividing the IP code stream;
and smoothing the data block in the target IP code stream, and outputting the smoothed data.
2. The method of claim 1, further comprising:
and analyzing the health degree of each path of the IP code stream to obtain an analysis result.
3. The method of claim 1, wherein performing video/audio analysis on the IP code stream, and obtaining the segmentation point of the IP code stream based on the video/audio analysis result comprises:
if the IP code stream contains video data, taking the starting point of the video data as a dividing point;
if the IP code stream contains audio data, taking the starting point of the audio data as a dividing point;
and if the IP code stream does not contain audio data or video data, taking a set interval as a division point.
4. The method of claim 1, wherein smoothing the data block comprises:
at least one of PMT PID remapping, video PID remapping, audio PID remapping, PCR PID remapping, ServiceID remapping, PCR time reference correction, PTS time reference correction, DTS time reference correction, and continuity count correction.
5. The method of claim 2, wherein the health analysis comprises:
carrying out score statistics according to the analysis items;
and the health degree of the IP code stream with high score statistics is high.
6. The method of claim 5, wherein the analysis items comprise:
and judging whether the IP code stream arrives within preset time, and at least one of code stream synchronization header 0x47 detection, PAT detection, PID detection, PMT detection, null packet rate detection and continuous counting detection.
7. The method of claim 3, wherein the set interval is in a range of: 1 second to 8 seconds.
8. An IP video/audio code stream switching device is characterized by comprising an IP code stream acquisition module, a division point setting module, a data block division module, an instruction receiving module and a smoothing processing module;
the IP code stream acquisition module is configured to acquire an IP code stream to be switched; wherein, the IP code stream has at least two paths;
the division point setting module is configured to perform video and audio analysis on the IP code stream and obtain division points of the IP code stream based on a video and audio analysis result;
the data block segmentation module is configured to segment the IP code stream according to the obtained segmentation point to obtain a data block;
the instruction receiving module is configured to read a target IP code stream from a target data source according to the target data source specified in a reading instruction when the reading instruction is received; the target data source is at least one of data blocks obtained by dividing the IP code stream;
and the smoothing processing module is configured to smooth the data block in the target IP code stream and output the smoothed data.
9. An IP video/audio code stream switching apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to carry out the executable instructions when implementing the method of any one of claims 1 to 7.
10. A non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010038939.2A CN111212329B (en) | 2020-01-14 | 2020-01-14 | IP video/audio code stream switching method and device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010038939.2A CN111212329B (en) | 2020-01-14 | 2020-01-14 | IP video/audio code stream switching method and device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111212329A true CN111212329A (en) | 2020-05-29 |
CN111212329B CN111212329B (en) | 2021-03-19 |
Family
ID=70789026
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010038939.2A Active CN111212329B (en) | 2020-01-14 | 2020-01-14 | IP video/audio code stream switching method and device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111212329B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101631238A (en) * | 2009-07-21 | 2010-01-20 | 北京市博汇科技有限公司 | Code stream switching equipment for supporting PID replacement and programs on-demand broadcasting, method thereof and system thereof |
CN102572517A (en) * | 2011-12-21 | 2012-07-11 | 深圳市同洲视讯传媒有限公司 | Bit stream switching method, device, server and system |
US20150296228A1 (en) * | 2014-04-14 | 2015-10-15 | David Mo Chen | Systems and Methods for Performing Multi-Modal Video Datastream Segmentation |
CN109218827A (en) * | 2017-07-03 | 2019-01-15 | 北京市博汇科技股份有限公司 | IP bitstreams switching method and apparatus |
-
2020
- 2020-01-14 CN CN202010038939.2A patent/CN111212329B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101631238A (en) * | 2009-07-21 | 2010-01-20 | 北京市博汇科技有限公司 | Code stream switching equipment for supporting PID replacement and programs on-demand broadcasting, method thereof and system thereof |
CN102572517A (en) * | 2011-12-21 | 2012-07-11 | 深圳市同洲视讯传媒有限公司 | Bit stream switching method, device, server and system |
US20150296228A1 (en) * | 2014-04-14 | 2015-10-15 | David Mo Chen | Systems and Methods for Performing Multi-Modal Video Datastream Segmentation |
CN109218827A (en) * | 2017-07-03 | 2019-01-15 | 北京市博汇科技股份有限公司 | IP bitstreams switching method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN111212329B (en) | 2021-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8320747B2 (en) | Video quality estimation apparatus, video quality estimation method, frame type determination method, and recording medium | |
KR100226528B1 (en) | Decoder for compressed and multiplexed video and audio data | |
TWI595786B (en) | Timestamp-based audio and video processing method and system thereof | |
KR100640424B1 (en) | Apparatus and method for controlling channel change in digital multimedia broadcasting receiver | |
CN112383771A (en) | Audio and video monitoring method in IP video production and broadcasting system | |
KR100689474B1 (en) | Transport Stream Receiving Apparatus For Multi-Screen and Its Control Method | |
CN112640479A (en) | Method and apparatus for switching media service channel | |
US8514893B2 (en) | Digital video apparatus for multiplexing single program transport streams into a multiple program transport stream | |
CN101151902A (en) | Device and method for initializing decoder in digital broadcasting receiver | |
CN111866526A (en) | Live broadcast service processing method and device | |
CN111212329B (en) | IP video/audio code stream switching method and device, equipment and storage medium | |
CN110753259B (en) | Video data processing method and device, electronic equipment and computer readable medium | |
US6516376B1 (en) | Command and control architecture for a video decoder and a host | |
EP1605687B1 (en) | System for receiving packet streams | |
JP2011114490A (en) | Broadcast material transmitting apparatus and data transmitting method | |
KR102024437B1 (en) | System and method for transmitting a plurality of video image | |
JP5063944B2 (en) | Digital broadcast receiver with recording function | |
US7339958B2 (en) | System and method for performing signal synchronization of data streams | |
US7385996B2 (en) | Data distribution apparatus and method | |
Mughal et al. | Context-dependent software solutions to handle video synchronization and delay in collaborative live mobile video production | |
JP2005530376A (en) | Dynamic multiplexing method of digital stream | |
CN110798731A (en) | Video data processing method and device, electronic equipment and computer readable medium | |
KR100339660B1 (en) | Section filtering apparatus for use in a digital television receiver | |
JP2006023345A (en) | Automatic television image capture method and system | |
JP3579014B2 (en) | Data sorting storage device and data processing device using 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 |