CN113949896B - IP media stream processing method, device, computer equipment and readable storage medium - Google Patents

IP media stream processing method, device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN113949896B
CN113949896B CN202111158279.2A CN202111158279A CN113949896B CN 113949896 B CN113949896 B CN 113949896B CN 202111158279 A CN202111158279 A CN 202111158279A CN 113949896 B CN113949896 B CN 113949896B
Authority
CN
China
Prior art keywords
media stream
processed
buffer
memory
time
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
Application number
CN202111158279.2A
Other languages
Chinese (zh)
Other versions
CN113949896A (en
Inventor
姜文波
葛涛
薛知行
鲍放
李栋成
赵蕾
李思炜
郭晓霞
程昕
周联群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING GEFEI TECHNOLOGY CO LTD
China Media Group
Original Assignee
BEIJING GEFEI TECHNOLOGY CO LTD
China Media Group
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING GEFEI TECHNOLOGY CO LTD, China Media Group filed Critical BEIJING GEFEI TECHNOLOGY CO LTD
Priority to CN202111158279.2A priority Critical patent/CN113949896B/en
Publication of CN113949896A publication Critical patent/CN113949896A/en
Application granted granted Critical
Publication of CN113949896B publication Critical patent/CN113949896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23106Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving caching operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0877Cache access modes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides an IP media stream processing method, an IP media stream processing device, computer equipment and a readable storage medium, which comprise the following steps: simultaneously caching the IP media stream to be processed through the first buffer and the second buffer; calling a corresponding shunt strategy according to the type of the IP media stream to be processed, and calculating to obtain the reading time of the IP media stream to be processed; and when the current system time reaches the reading time, the IP media stream to be processed is read from any buffer and written into the memory, and the IP media stream to be processed is sent out.

Description

IP media stream processing method, device, computer equipment and readable storage medium
Technical Field
The present application relates to broadcast television technology, and in particular, to an IP media stream processing method, apparatus, computer device, and readable storage medium.
Background
In an IP (Internet Protocol Address ) media system, in order to ensure the security of data transmission and improve the stability of data transmission, two buffers (buffers) are generally set to Buffer data at the same time, and then valid data packets are read into a Memory according to the data reconstruction requirement of video signals, for example, a Dual-Inline-Memory-Modules (DIMMs) for storage, and the same data packet processing mode is that the data read later automatically covers the data read earlier, so that the process is repeated until the writing is successful. The scheme for simultaneously reading two paths of data can ensure the safety and reliability of the data, but occupies double read-write bandwidth of the memory, so that not only can certain resource waste be caused, but also the memory is unresponsive due to overlarge bandwidth, and the processing capacity and the performance stability of the whole receiving equipment are further affected.
Disclosure of Invention
The embodiment of the application provides an IP media stream processing method, an IP media stream processing device, computer equipment and a readable storage medium.
In a first aspect, an embodiment of the present application provides an IP media stream processing method, which is applied to a computer device, where the computer device includes a first buffer, a second buffer, and a memory, and the first buffer and the second buffer are respectively connected to the memory in a communication manner, where the method includes:
caching the IP media stream to be processed through a first buffer and a second buffer;
judging the type of the IP media stream to be processed, and calling a corresponding shunt strategy according to the type of the IP media stream to be processed to calculate and obtain the reading time of the IP media stream to be processed;
under the condition that the current system time reaches the reading time, the IP media stream to be processed is read from any one buffer of the first buffer and the second buffer and written into the memory;
under the condition that the to-be-processed IP media stream is read from the first buffer and written into the memory, if the reading fails, the to-be-processed IP media stream is read from the second buffer and written into the memory;
under the condition that the to-be-processed IP media stream is read from the second buffer and written into the memory, if the reading fails, the to-be-processed IP media stream is read from the first buffer and written into the memory;
and responding to the external transmission signal and sending out the IP media stream to be processed in the memory.
In one possible implementation, a computer device is communicatively connected to a source routing device, the source routing device for generating a pending IP media stream, simultaneously buffering the pending IP media stream by a first buffer and a second buffer, comprising:
acquiring a first multicast address of a first buffer and a second multicast address of a second buffer;
transmitting the first multicast address and the second multicast address to the source routing device;
receiving an IP media stream to be processed, which is sent by source routing equipment according to a first multicast address, and caching the IP media stream to be processed into a first buffer; the method comprises the steps of,
and receiving the to-be-processed IP media stream sent by the source routing equipment according to the second multicast address, and caching the to-be-processed IP media stream into a second buffer.
In one possible implementation, the types of the IP media streams to be processed include progressive video and interlaced video, and determining the types of the IP media streams to be processed includes:
calling a session description protocol to analyze the IP media stream to be processed to obtain session description data; the session description data includes a payload type;
when the value corresponding to the load type is characterized as non-staggered, judging the type of the IP media stream to be processed as progressive video;
and when the value corresponding to the load type is characterized as interleaving, judging the type of the IP media stream to be processed as interlaced video.
In one possible implementation manner, the calculating the reading time of the IP media stream to be processed according to the type of the IP media stream to be processed by calling the corresponding splitting policy includes:
under the condition that the type of the IP media stream to be processed is progressive video, acquiring the interval time and the frame time between adjacent data packets of the media stream to be processed;
calling a first shunting strategy to calculate and obtain the reading time of the IP media stream to be processed according to the interval time and the frame time between the adjacent data packets;
first split strategy: TPR (thermoplastic polyurethane) j =(j×T RS )+T VD The method comprises the steps of carrying out a first treatment on the surface of the Wherein, TPR j For the read time of data packet j of the IP media stream to be processed, T RS T is the interval time between adjacent data packets VD For frame time, j is the packet number.
In one possible implementation manner, the calculating the reading time of the IP media stream to be processed according to the type of the IP media stream to be processed by calling the corresponding splitting policy includes:
under the condition that the type of the IP media stream to be processed is interlaced video, acquiring interval time, frame packet number and time period between adjacent data packets of the media stream to be processed;
invoking a second shunt strategy to calculate and obtain the reading time of the IP media stream to be processed according to the interval time, the frame time, the number of frame packets and the time period between adjacent frames;
second split strategy: j < (N) is 0.ltoreq.j PACKETS Under the condition of/2), TPR j =(j×T RS )+T VD At (N) PACKETS /2)≤j<N PACKETS Is a strip of (2)Under the part, TPR j =(T FRAME /2)+(j-(N PACKETS /2)×T RS )+T VD The method comprises the steps of carrying out a first treatment on the surface of the Wherein, TPR j For the read time of data packet j of the IP media stream to be processed, T RS T is the interval time between adjacent data packets VD For frame time, N PACKETS T is the number of frame packets FRAME J is the packet number for the period between adjacent frames.
In one possible embodiment, the method further comprises:
in case of successful reading of the pending IP media stream from either of the first buffer and the second buffer and writing of the stream into the memory, the buffered data in the first buffer and the second buffer are emptied.
In a possible implementation manner, the computer device further includes an embedder, and the method includes the steps of responding to an external transmission signal to send out an IP media stream to be processed in the memory, including:
calling an embedder to embed the IP media stream to be processed in the memory in response to an external transmission signal to obtain a digital component serial interface signal corresponding to the IP media stream to be processed;
and (5) outgoing the digital component serial interface signal.
In a second aspect, an embodiment of the present application provides an IP media stream processing apparatus, applied to a computer device, where the computer device includes a first buffer, a second buffer, and a memory, the first buffer and the second buffer are respectively communicatively connected to the memory, and the apparatus includes:
the buffer module is used for simultaneously buffering the IP media stream to be processed through the first buffer and the second buffer;
the judging module is used for judging the type of the IP media stream to be processed and calling a corresponding shunt strategy according to the type of the IP media stream to be processed to calculate and obtain the reading time of the IP media stream to be processed;
the writing module is used for reading the IP media stream to be processed from any one of the first buffer and the second buffer and writing the IP media stream to the memory under the condition that the current system time reaches the reading time; under the condition that the to-be-processed IP media stream is read from the first buffer and written into the memory, if the reading fails, the to-be-processed IP media stream is read from the second buffer and written into the memory; under the condition that the to-be-processed IP media stream is read from the second buffer and written into the memory, if the reading fails, the to-be-processed IP media stream is read from the first buffer and written into the memory;
and the outgoing module is used for responding to the external transmission signal and outgoing the IP media stream to be processed in the memory.
In a third aspect, an embodiment of the present application provides a computer device, where the computer device includes a processor and a nonvolatile memory storing computer instructions, and when the computer instructions are executed by the processor, the computer device performs an IP media stream processing method in at least one possible implementation manner of the first aspect.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, where the readable storage medium includes a computer program, where the computer program controls a computer device where the readable storage medium is located to execute an IP media stream processing method in at least one possible implementation manner of the first aspect.
By adopting the method, the device, the computer equipment and the readable storage medium for processing the IP media stream, which are provided by the embodiment of the application, the IP media stream to be processed is buffered simultaneously through the first buffer and the second buffer; calling a corresponding shunt strategy according to the type of the IP media stream to be processed, and calculating to obtain the reading time of the IP media stream to be processed; and further, under the condition that the current system time reaches the reading time, the IP media stream to be processed is read from any buffer and written into the memory, and the IP media stream to be processed is sent out. Compared with the prior art that data in two paths of buffers are required to be synchronously written into a memory, the scheme can acquire the to-be-processed IP media stream from one path of buffer at the same time and switch to the other path of buffer to acquire the to-be-processed IP media stream when the acquisition fails, so that the scheme that the to-be-processed IP media stream can be ensured to be acquired efficiently and stably by only one path of bandwidth is realized. Furthermore, the application also distributes corresponding shunt strategies for the IP media streams to be processed through determining the types of the IP media streams to be processed, so that the corresponding reading time can be accurately calculated, and the IP media streams to be processed can be more smoothly written into the memory from the buffer.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1 is a schematic view of a scene interaction of an IP media stream processing system according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a step of an IP media stream processing method according to an embodiment of the present application;
fig. 3 is a flowchart illustrating another step of the IP media stream processing method according to the embodiment of the present application;
fig. 4 is a flowchart illustrating another step of the IP media stream processing method according to the embodiment of the present application;
fig. 5 is a schematic block diagram of an IP media stream processing apparatus for performing the IP media stream processing method of fig. 2 according to an embodiment of the present application.
Detailed Description
In the process of realizing the application, the inventor finds that in order to ensure the stability of data transmission in an IP media system, two buffers are generally arranged to buffer the IP media stream to be transmitted simultaneously, and then the IP media stream is written into a memory simultaneously for processing, which ensures the safe and stable transmission of the IP media stream, but occupies double bandwidth, causes resource waste, and even causes no response of a memory under the condition of overlarge data volume of the IP media stream. For example, for a 4K ultra-high definition IP media stream, the video data bandwidth is 9Gbps, and this occupation of double read-write bandwidth may cause DDR unresponsiveness due to high-speed data read-write concurrency when processing multi-channel ultra-high definition data, which affects the processing capability and performance stability of the entire receiving device.
In view of the above problems, in the embodiments of the present application, an IP media stream processing method, apparatus, computer device, and readable storage medium are provided, where, on the basis of setting two buffers and receiving an IP media stream to be processed at the same time, the type of the IP media stream to be processed is determined, and then a corresponding splitting policy is called according to the determined type to calculate a reading time of the IP media stream to be processed, after the reading time is reached, one path of data may be optionally written into a memory from the two paths of buffers, so as to implement a scheme of reading and writing the IP media stream to be processed by using only a bandwidth of one path of buffer to transmit data based on the reading time.
The scheme in the embodiment of the application can be realized by adopting various computer languages, such as object-oriented programming language Java, an transliteration script language JavaScript and the like.
In order to make the technical solutions and advantages of the embodiments of the present application more apparent, the following detailed description of exemplary embodiments of the present application is provided in conjunction with the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present application and not exhaustive of all embodiments. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other.
Referring to fig. 1 in combination, fig. 1 is a schematic view of a scenario interaction of an IP media stream processing system according to an embodiment of the present application, the IP media stream processing system may include a computer device 100, and the computer device 100 may include a first buffer 200, a second buffer 300, and a memory 400, where the first buffer 200 and the second buffer 300 are respectively communicatively connected to the memory 400. In other implementations of embodiments of the application, the IP media stream processing system may be comprised of more or fewer components.
Referring to fig. 2 in combination, fig. 2 is a schematic flow chart of steps of an IP media stream processing method according to an embodiment of the present application, where the method may be implemented by the computer device 100 in fig. 1 as an execution body, and the IP media stream processing method is described in detail below.
In step S201, the IP media streams to be processed are buffered simultaneously by the first buffer 200 and the second buffer 300.
Step S202, judging the type of the to-be-processed IP media stream, and calling a corresponding shunt strategy according to the type of the to-be-processed IP media stream to calculate and obtain the reading time of the to-be-processed IP media stream.
In step S203, in the case where the current system time reaches the read time, the IP media stream to be processed is read from any one of the first buffer 200 and the second buffer 300 and written into the memory 400.
In step S204, in the case of reading the pending IP media stream from the first buffer 200 and writing it into the memory, if the reading fails, the pending IP media stream is read from the second buffer 300 and written into the memory.
In step S205, in the case of reading the pending IP media stream from the second buffer 300 and writing it into the memory, if the reading fails, the pending IP media stream is read from the first buffer 200 and written into the memory.
In step S206, the IP media stream to be processed in the memory 400 is sent out in response to the external transmission signal.
In an embodiment of the present application, the Buffer (Buffer) and the memory 400 (Double Data Rate synchronous dynamic random access memory) may be integrated with an FPGA (Field Programmable Gate Array ) chip installed in the computer device 100 to implement corresponding functions. The IP media stream to be processed may be buffered by the first buffer 200 and the second buffer 300 at the same time, and when the computer device 100 starts to receive the IP media stream to be processed, the type of the IP media stream to be processed may be determined, and according to the determination result, a corresponding splitting policy may be invoked. After determining the reading time according to the called splitting strategy, after the current system time reaches the reading time, data can be optionally read from the first buffer 200 and the second buffer 300, written into the memory 400, then the relevant processing of the to-be-processed IP media stream is performed in the memory 400, and finally the purpose of sending out the to-be-processed IP media stream after the processing is completed is achieved. It should be understood that the first buffer 200 and the second buffer 300 may be configured to ensure stability of data transmission, but in order to not occupy too much bandwidth, only one path of data in the buffer is selected to be written into the memory 400 at a time, and in order to determine stability of data transmission, when a read failure occurs during writing of the IP media stream to be processed, data acquisition of the IP media stream to be processed is performed from the other path of buffer, so as to complete the scheme of writing the IP media stream to be processed into the memory 400.
Through the steps, the read-write related processing of the IP media stream can be realized without occupying twice the bandwidth.
In a possible implementation, the computer device 100 is communicatively connected to a source routing device, which is configured to generate an IP media stream to be processed, and the foregoing step S201 may be implemented by performing the following steps.
In a substep S201-1, a first multicast address of the first buffer 200 and a second multicast address of the second buffer 300 are acquired.
Substep S201-2, the first multicast address and the second multicast address are sent to the source routing device.
In a substep S201-3, the source routing device receives the IP media stream to be processed sent by the first multicast address and buffers the IP media stream to be processed in the first buffer 200, and the source routing device receives the IP media stream to be processed sent by the second multicast address and buffers the IP media stream to be processed in the second buffer 300.
In the embodiment of the present application, the IP media streams to be processed received by the first buffer 200 and the second buffer 300 are identical, and the first multicast address of the first buffer 200 and the second multicast address of the second buffer 300 may belong to the same multicast packet, and the multicast packet may be sent to a source routing device, where the source routing device may be a device that generates the IP media stream to be processed, or may be a device that forwards the IP media stream to be processed. After the source routing device receives the first multicast address and the second multicast address, a communication connection can be established with the corresponding first buffer 200 and second buffer 300, so that the IP media stream to be processed starts to be buffered in the first buffer 200 and the second buffer 300 at the same time. It should be appreciated that for the IP media stream to be processed, the first buffer 200 and the second buffer 300 only have a multicast address and a physical transmission path that are different.
In a possible implementation, the types of IP media streams to be processed may include progressive video and interlaced video, and the aforementioned step S202 may be performed by the following steps.
And step S202-1, calling a session description protocol to analyze the to-be-processed IP media stream to obtain session description data.
Wherein the session description data includes a payload type.
In the substep S202-2, when the value corresponding to the payload type is characterized as non-interlaced, it is determined that the type of the IP media stream to be processed is progressive video.
In the substep S202-3, when the value corresponding to the payload type is characterized as being interlaced, it is determined that the type of the IP media stream to be processed is interlaced video.
The IP media stream to be processed may refer to a video stream, in the embodiment of the present application, the IP media stream to be processed may be parsed based on a session description protocol (Session Description Protocol, SDP), and then the type of the IP media stream to be processed may be determined according to the type of the payload included in the session description data obtained by the parsing. The data content may be described with reference to the following session: "a=fmtp: 110 profile-level-id= 42801f; grouping-mode=1; max-br=20010; sar=13 "" grouping-mode "represents the payload type, ranging from 0-2 (0: single NAL 1: non-interlaced, progressive 2: interlaced, interlaced)". It may be determined that the type of the IP media stream to be processed is progressive video when the value corresponding to the payload type is 1 (characterized as interlaced), and that the type of the IP media stream to be processed is interlaced video when the value corresponding to the payload type is 2 (characterized as non-interlaced), for example, "packet-mode=1" in the above example may be determined.
In a possible implementation, referring to fig. 3, in case that the type of the IP media stream to be processed is progressive video, the step S203 may be implemented by the following detailed steps.
In the substep S203-1, in the case that the type of the IP media stream to be processed is progressive video, the interval time and the frame time between adjacent data packets of the media stream to be processed are obtained.
And step S203-2, calling a first shunting strategy to calculate the reading time of the to-be-processed IP media stream according to the interval time and the frame time between the adjacent data packets.
First split strategy: TPR (thermoplastic polyurethane) j =(j×T RS )+T VD
Wherein, TPR j For the read time of data packet j of the IP media stream to be processed, T RS T is the interval time between adjacent data packets VD For frame time, j is the packet number.
In the case that the type of the IP media stream to be processed is progressive video, the interval time T between adjacent data packets of the IP media stream to be processed can be acquired based on SMPTE ST 2110 protocol RS And frame time T VD Specifically T RS =(T FRAME ×R ACTIVE )/N PACKETS Wherein N is PACKETS T is the number of frame packets FRAME R is the time period between adjacent frames ACTIVE R can be taken as the effective line number ratio ACTIVE =(1080/1125)。T VD =(N×R ACTIVE )+TR OFFSET Wherein N is an integer and the time scale value is derived from SMPTE Epoch, TR defined in SMPTE ST 2059-1 OFFSET Is the nearest T FRAME And T VD The difference between the integer multiples is either a positive number or 0.
After T is obtained by the above formula RS And T VD Thereafter, the formula TPR can be used j =(j×T RS )+T VD The reading time of the IP media stream to be processed is calculated, and it should be understood that the formula can calculate the reading time of the data packet j of each IP media stream to be processed, and the required reading time in the scheme is the reading time of the first data packet of the IP media stream to be processed, and the reading time TPR of the IP media stream to be processed can be calculated by taking j to 0 0 Is a numerical value of (2).
In a possible implementation, referring to fig. 4 in combination, in the case that the type of the IP media stream to be processed is interlaced video, the foregoing step S203 may be implemented by the following detailed steps.
In the sub-step S203-3, in the case where the type of the IP media stream to be processed is interlaced video, the interval time, frame time, number of frame packets, and time period between adjacent frames of the media stream to be processed are acquired.
And step S203-4, calling a second shunt strategy to calculate the reading time of the IP media stream to be processed according to the interval time, the frame time, the number of the frame packets and the time period between the adjacent frames between the adjacent data packets.
Second split strategy: j < (N) is 0.ltoreq.j PACKETS Under the condition of/2), TPR j =(j×T RS )+T VD At (N) PACKETS /2)≤j<N PACKETS Under the condition of (1) TPR j =(T FRAME /2)+(j-(N PACKETS /2)×T RS )+T VD And calculating the reading time of the IP media stream to be processed, and numbering j as a data packet.
Wherein, TPR j For the read time of data packet j of the IP media stream to be processed, T RS T is the interval time between adjacent data packets VD For frame time, N PACKETS T is the number of frame packets FRAME For the time period between adjacent frames.
In the case where the type of the IP media stream to be processed is interlaced video, the interval time T between adjacent data packets of the IP media stream to be processed can be acquired based on SMPTE ST 2110 protocol RS Frame time T VD Number of frame packets N PACKETS And a time period T between adjacent frames FRAME Wherein T is RS =(T FRAME ×R ACTIVE )/N PACKETS ,T VD =(N×R ACTIVE )+TR OFFSET ,R ACTIVE R can be taken as the effective line number ratio ACTIVE =(1080/1125)。
After T is obtained by the above steps FRAME 、T RS And N PACKETS Thereafter, the formula can be calculated: j is more than or equal to 0 and less than or equal to (N) PACKETS Under the condition of/2), TPR j =(j×T RS )+T VD At (N) PACKETS /2)≤j<N PACKETS Under the condition of (1) TPR j =(T FRAME /2)+(j-(N PACKETS /2)×T RS )+T VD Calculating the reading time of the IP media stream to be processed,it should be understood that the formula can calculate the reading time of the data packet j of each IP media stream to be processed, and the required reading time in the scheme is the reading time of the first data packet of the IP media stream to be processed, and the reading time TPR of the IP media stream to be processed can be calculated by taking j to 0 0 Is a numerical value of (2).
In one possible implementation, the present embodiment also provides the following implementation.
In step S207, in the case where the pending IP media stream is successfully read from any one of the first buffer 200 and the second buffer 300 and written into the memory 400, the buffered data in the first buffer 200 and the second buffer 300 is emptied.
In the embodiment of the present application, once the memory 400 successfully completely suctions the relevant data of the IP media stream to be processed, the read operation of the first buffer 200 and the second buffer 300 is stopped, and the contents of the first buffer 200 and the second buffer 300 are emptied, and the next read time is waited for to be acquired to trigger the operation of the memory 400 to read the data from the first buffer 200 and the second buffer 300.
In one possible implementation, the computer device 100 further includes an embedder, and the foregoing step S206 may be implemented by performing the following detailed steps.
In the substep S206-1, the embedder is called in response to the external transmission signal to embed the IP media stream to be processed in the memory, so as to obtain a digital component serial interface signal corresponding to the IP media stream to be processed.
In a substep S206-2, the digital component serial interface signal is sent out.
In the embodiment of the present application, the computer device 100 may include an embedder (serial digital interface, SDI), and the embedder may embeds the IP media stream to be processed according to an external transmission signal to obtain a digital component serial interface signal corresponding to the IP media stream to be processed, that is, an SDI signal, where the external transmission signal may be an external synchronization signal or a PTP (Precision Time Protocol, precision clock synchronization protocol) clock signal, and may also perform an operation of transmitting the IP media stream to be processed by an IP sender (device for transmitting the IP media stream) in addition to using the SDI embedder.
In order to more clearly describe the scheme provided by the embodiment of the application, the method for processing the IP media stream provided by the application is described in the following.
Firstly, the first buffer 200 and the second buffer 300 simultaneously receive an IP media stream to be processed, which may be a 3G video stream, after receiving the 3G video stream, the 3G video stream may be determined by using SDP protocol to determine the type of the 3G video stream, which may be determined according to the payload type of the 3G video stream, for example, it is determined that the type of the 3G video stream is progressive video, the time of one frame may be 20ms, and N of the 3G video stream may be further acquired PACKETS Characterized by non-interleaved 920x1080x20/1280 (packet length of transmitted packets, which may be different) x8 bit/s=4050, i.e. 4050 packets in a frame of the 3G video stream, T RS For (20 ms×1080/1125)/4050=4.74 microseconds, TR OFFSET Characterized by interleaving 0ms×43 (with data start line number)/1125 (total line number) =747us, taking T of the first frame VD Characterized by non-interlaced x20 ms+747us=20727 us, based on the above parameters, invoking a first splitting strategy corresponding to progressive video: TPR (thermoplastic polyurethane) j =(j×T RS )+T VD J is taken to be 0, and the reading time TPR of the 3G video stream can be calculated 0 Is 0x 4.747+20747=20747 us. Therefore, if the 3G video stream is received at 08:00:00:00:00:00, the operation of writing the 3G video stream into the memory 400 can be started from any one of the first buffer 200 and the second buffer 300 at 08:00:00:00:20747, if a failure occurs during the writing process, the 3G video stream is read from the other buffer, and the process is repeated until the 3G video stream is written into the memory 400, and then the SDI embedder can be invoked to embed the 3G video stream to form an SDI signal corresponding to the 3G video stream and send the SDI signal to the destination device, and then the corresponding deblocking operation can be performed after the SDI signal is sent to the destination device to complete the transmission process of the 3G video stream.
The embodiment of the application provides an IP media stream processing device 110, which is applied to a computer device 100, wherein the computer device 100 includes a first buffer 200, a second buffer 300 and a memory 400, the first buffer 200 and the second buffer 300 are respectively connected with the memory 400 in a communication manner, and referring to fig. 5, the IP media stream processing device 110 includes:
the buffer module 1101 is configured to buffer the IP media stream to be processed through the first buffer and the second buffer at the same time.
The judging module 1102 is configured to judge a type of the IP media stream to be processed, and invoke a corresponding splitting policy according to the type of the IP media stream to be processed to calculate and obtain a reading time of the IP media stream to be processed.
A writing module 1103, configured to read the IP media stream to be processed from any one of the first buffer and the second buffer and write the IP media stream to the memory when the current system time reaches the reading time; under the condition that the to-be-processed IP media stream is read from the first buffer and written into the memory, if the reading fails, the to-be-processed IP media stream is read from the second buffer and written into the memory; in the case of reading the to-be-processed IP media stream from the second buffer and writing it into the memory, if the reading fails, the to-be-processed IP media stream is read from the first buffer and written into the memory.
An outgoing module 1104, configured to send out the IP media stream to be processed in the memory in response to the external transmission signal.
In a possible implementation, the computer device 100 is communicatively connected to a source routing device, where the source routing device is configured to generate an IP media stream to be processed, and the buffering module 1101 is specifically configured to:
acquiring a first multicast address of the first buffer 200 and a second multicast address of the second buffer 300; transmitting the first multicast address and the second multicast address to the source routing device; the receiving source routing device caches the to-be-processed IP media stream according to the first multicast address in the first buffer 200, and the receiving source routing device caches the to-be-processed IP media stream according to the second multicast address in the second buffer 300.
In one possible implementation, the types of the IP media streams to be processed include progressive video and interlaced video, and the determining module 1102 is specifically configured to:
calling a session description protocol to analyze the IP media stream to be processed to obtain session description data; the session description data includes a payload type; when the value corresponding to the load type is characterized as non-staggered, judging the type of the IP media stream to be processed as progressive video; and when the value corresponding to the load type is characterized as interleaving, judging the type of the IP media stream to be processed as interlaced video.
In one possible implementation, the determining module 1102 is specifically configured to:
under the condition that the type of the IP media stream to be processed is progressive video, acquiring the interval time and the frame time between adjacent data packets of the media stream to be processed;
calling a first shunting strategy to calculate and obtain the reading time of the IP media stream to be processed according to the interval time and the frame time between the adjacent data packets;
first split strategy: TPR (thermoplastic polyurethane) j =(j×T RS )+T VD The method comprises the steps of carrying out a first treatment on the surface of the Wherein, TPR j For the read time of data packet j of the IP media stream to be processed, T RS T is the interval time between adjacent data packets VD For frame time, j is the packet number.
In one possible implementation, the determining module 1102 is specifically configured to:
under the condition that the type of the IP media stream to be processed is interlaced video, acquiring interval time, frame packet number and time period between adjacent data packets of the media stream to be processed;
invoking a second shunt strategy to calculate and obtain the reading time of the IP media stream to be processed according to the interval time, the frame time, the number of frame packets and the time period between adjacent frames;
second split strategy: j < (N) is 0.ltoreq.j PACKETS Under the condition of/2), TPR j =(j×T RS )+T VD At (N) PACKETS /2)≤j<N PACKETS Under the condition of (1) TPR j =(T FRAME /2)+(j-(N PACKETS /2)×T RS )+T VD The method comprises the steps of carrying out a first treatment on the surface of the Wherein, TPR j For the read time of data packet j of the IP media stream to be processed, T RS For the space between adjacent data packetsTime interval, T VD For frame time, N PACKETS T is the number of frame packets FRAME J is the packet number for the period between adjacent frames.
In one possible implementation, the determining module 1102 is specifically further configured to:
in case of successful reading of the pending IP media stream from either of the first buffer and the second buffer and writing of the stream into the memory, the buffered data in the first buffer and the second buffer are emptied.
In one possible implementation, the computer device further includes an embedder, and the outgoing module 1104 is specifically configured to:
and calling an embedder to embed the IP media stream to be processed in the memory in response to the external transmission signal to obtain a digital component serial interface signal corresponding to the IP media stream to be processed.
And (5) outgoing the digital component serial interface signal.
It should be noted that, the implementation principle of the foregoing IP media stream processing apparatus 110 may refer to the implementation principle of the foregoing IP media stream processing method, which is not described herein again. It should be understood that the division of the modules of the above apparatus is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated when actually implemented. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; the method can also be realized in a form of calling software by a processing element, and the method can be realized in a form of hardware by a part of modules. For example, the buffer module 1101 may be a processing element that is set up separately, may be implemented as integrated in a chip of the above-described apparatus, or may be stored in the memory 400 of the above-described apparatus in the form of program codes, and the functions of the buffer module 1101 may be called and executed by a processing element of the above-described apparatus. The implementation of the other modules is similar. In addition, all or part of the modules can be integrated together or can be independently implemented. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
For example, the modules above may be one or more integrated circuits configured to implement the methods above, such as: one or more specific integrated circuits (application specific integrated circuit, ASIC), or one or more microprocessors (digital signal processor, DSP), or one or more field programmable gate arrays (field programmable gate array, FPGA), or the like. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general purpose processor, such as a central processing unit (central processing unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
An embodiment of the present application provides a computer device 100, where the computer device 100 includes a processor and a nonvolatile memory storing computer instructions, and when the computer instructions are executed by the processor, the computer device 100 executes the aforementioned IP media stream processing apparatus 110.
In summary, the embodiments of the present application provide a method, an apparatus, a computer device, and a readable storage medium for processing an IP media stream, which can firstly obtain a splitting policy based on the IP streaming characteristics of ST 2110, then obtain a corresponding data packet in an on-chip Buffer (i.e. a Buffer) omitted according to the splitting policy during the decapsulation process, and read data in another Buffer if the data packet is not obtained. The reading and writing of the group of effective data only occupies the original signal bandwidth, does not occupy the signal bandwidth additionally, greatly improves the utilization rate of DDR (that is, the memory 400), and ensures that the receiving equipment can realize stable receiving and processing of multichannel ultra-high definition video and audio data.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. 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 apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, 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 apparatus 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 apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus 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 application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (8)

1. An IP media stream processing method, applied to a computer device, the computer device including a first buffer, a second buffer, and a memory, the first buffer and the second buffer being communicatively connected to the memory, respectively, the method comprising:
caching the IP media stream to be processed through the first buffer and the second buffer;
judging the type of the IP media stream to be processed, and calling a corresponding shunt strategy according to the type of the IP media stream to be processed to calculate the reading time of the IP media stream to be processed;
reading the to-be-processed IP media stream from any one of the first buffer and the second buffer and writing the to-be-processed IP media stream into the memory under the condition that the current system time reaches the reading time;
under the condition that the to-be-processed IP media stream is read from the first buffer and written into the memory, if the reading fails, the to-be-processed IP media stream is read from the second buffer and written into the memory;
under the condition that the to-be-processed IP media stream is read from the second buffer and written into the memory, if the reading fails, the to-be-processed IP media stream is read from the first buffer and written into the memory;
the IP media stream to be processed in the memory is sent out in response to an external transmission signal;
the type of the IP media stream to be processed includes progressive video and interlaced video, and the judging the type of the IP media stream to be processed includes:
calling a session description protocol to analyze the IP media stream to be processed to obtain session description data; the session description data includes a payload type;
when the value corresponding to the load type is characterized as non-staggered, judging the type of the IP media stream to be processed as progressive video;
when the value corresponding to the load type is characterized as being staggered, judging that the type of the IP media stream to be processed is an interlaced video;
the step of calling the corresponding shunt strategy according to the type of the to-be-processed IP media stream to calculate the reading time of the to-be-processed IP media stream comprises the following steps:
acquiring interval time and frame time between adjacent data packets of the IP media stream to be processed under the condition that the type of the IP media stream to be processed is the progressive video;
according to the interval time between the adjacent data packets and the frame time, a first shunting strategy is called to calculate and obtain the reading time of the IP media stream to be processed;
the first split strategy: TPR (thermoplastic polyurethane) j =(j×T RS )+T VD The method comprises the steps of carrying out a first treatment on the surface of the Wherein, TPR j T is the reading time of the data packet j of the IP media stream to be processed RS T is the interval time between the adjacent data packets VD For the frame time, j is the packet number.
2. The method of claim 1, wherein the computer device is communicatively coupled to a source routing device, wherein the source routing device is configured to generate the pending IP media stream, wherein simultaneously buffering the pending IP media stream via the first buffer and the second buffer comprises:
acquiring a first multicast address of the first buffer and a second multicast address of the second buffer;
transmitting the first multicast address and the second multicast address to the source routing device;
receiving the to-be-processed IP media stream sent by the source routing equipment according to the first multicast address, and caching the to-be-processed IP media stream into the first buffer; the method comprises the steps of,
and receiving the to-be-processed IP media stream sent by the source routing equipment according to the second multicast address, and caching the to-be-processed IP media stream to the second buffer.
3. The method according to claim 1, wherein the calculating the read time of the IP media stream to be processed according to the type of the IP media stream to be processed by calling the corresponding splitting policy includes:
acquiring interval time, frame packet number and time period between adjacent frames of the IP media stream to be processed under the condition that the type of the IP media stream to be processed is the interlaced video;
invoking a second shunt strategy to calculate and obtain the reading time of the IP media stream to be processed according to the interval time between the adjacent data packets, the frame time, the number of the frame packets and the time period between the adjacent frames;
the second split strategy: j < (N) is 0.ltoreq.j PACKETS Under the condition of/2), TPR j =(j×T RS )+T VD At (N) PACKETS /2)≤j<N PACKETS Under the condition of (1) TPR j =(T FRAME /2)+(j-(N PACKETS /2)×T RS )+T VD The method comprises the steps of carrying out a first treatment on the surface of the Wherein, TPR j T is the reading time of the data packet j of the IP media stream to be processed RS T is the interval time between the adjacent data packets VD For the frame time, N PACKETS For the number of frame packets, T FRAME J is the packet number for the period of time between the adjacent frames.
4. The method according to claim 1, wherein the method further comprises:
and in the case that the to-be-processed IP media stream is successfully read from any one of the first buffer and the second buffer and written into the memory, the buffer data in the first buffer and the second buffer are emptied.
5. The method of claim 1, wherein the computer device further comprises an embedder, the outgoing of the pending IP media stream in the memory in response to an external transmission signal comprising:
calling the embedder to embed the IP media stream to be processed in the memory in response to the external transmission signal to obtain a digital component serial interface signal corresponding to the IP media stream to be processed;
and transmitting the digital component serial interface signal.
6. An IP media stream processing apparatus, applied to a computer device, the computer device including a first buffer, a second buffer, and a memory, the first buffer and the second buffer being communicatively connected to the memory, respectively, the apparatus comprising:
the buffer module is used for simultaneously buffering the IP media stream to be processed through the first buffer and the second buffer;
the judging module is used for judging the type of the IP media stream to be processed and calling a corresponding shunt strategy according to the type of the IP media stream to be processed to calculate and obtain the reading time of the IP media stream to be processed;
a writing module, configured to read the IP media stream to be processed from any one of the first buffer and the second buffer and write the IP media stream to the memory when the current system time reaches the reading time; under the condition that the to-be-processed IP media stream is read from the first buffer and written into the memory, if the reading fails, the to-be-processed IP media stream is read from the second buffer and written into the memory; under the condition that the to-be-processed IP media stream is read from the second buffer and written into the memory, if the reading fails, the to-be-processed IP media stream is read from the first buffer and written into the memory;
the outgoing module is used for responding to an external transmission signal and outgoing the IP media stream to be processed in the memory;
the type of the IP media stream to be processed comprises progressive video and interlaced video, and the judging module is specifically used for: calling a session description protocol to analyze the IP media stream to be processed to obtain session description data; the session description data includes a payload type; when the value corresponding to the load type is characterized as non-staggered, judging the type of the IP media stream to be processed as progressive video; when the value corresponding to the load type is characterized as being staggered, judging that the type of the IP media stream to be processed is an interlaced video;
the judging module is specifically further configured to:
acquiring interval time and frame time between adjacent data packets of the IP media stream to be processed under the condition that the type of the IP media stream to be processed is the progressive video; according to the interval time between the adjacent data packets and the frame time, a first shunting strategy is called to calculate and obtain the reading time of the IP media stream to be processed; the first split strategy: TPR (thermoplastic polyurethane) j =(j×T RS )+T VD The method comprises the steps of carrying out a first treatment on the surface of the Wherein, TPR j T is the reading time of the data packet j of the IP media stream to be processed RS T is the interval time between the adjacent data packets VD For the frame time, j is the packet number.
7. A computer device comprising a processor and a non-volatile memory storing computer instructions which, when executed by the processor, perform the IP media stream processing method of any of claims 1-5.
8. A readable storage medium, characterized in that the readable storage medium comprises a computer program, and when the computer program runs, the computer program controls a computer device where the readable storage medium is located to execute the IP media stream processing method according to any one of claims 1 to 5.
CN202111158279.2A 2021-09-30 2021-09-30 IP media stream processing method, device, computer equipment and readable storage medium Active CN113949896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111158279.2A CN113949896B (en) 2021-09-30 2021-09-30 IP media stream processing method, device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111158279.2A CN113949896B (en) 2021-09-30 2021-09-30 IP media stream processing method, device, computer equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113949896A CN113949896A (en) 2022-01-18
CN113949896B true CN113949896B (en) 2023-11-17

Family

ID=79329088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111158279.2A Active CN113949896B (en) 2021-09-30 2021-09-30 IP media stream processing method, device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113949896B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012053834A2 (en) * 2010-10-20 2012-04-26 한국전자통신연구원 Streaming service transmitting/receiving device and method
CN108763109A (en) * 2018-06-13 2018-11-06 成都心吉康科技有限公司 Date storage method, device and its application

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DK2823616T3 (en) * 2012-03-06 2021-01-11 Appear Tv As METHOD, DEVICE AND SYSTEM FOR PACKET TRANSMISSION OVER IP NETWORKS
JP6178370B2 (en) * 2015-09-09 2017-08-09 株式会社メディアリンクス Video transmission system and video receiver
US10419808B2 (en) * 2016-09-08 2019-09-17 Gvbb Holdings S.A.R.L. System and method for scalable physical layer flow of packetized media streams
WO2019053853A1 (en) * 2017-09-14 2019-03-21 株式会社メディアリンクス Video switching system
US11076182B2 (en) * 2018-11-19 2021-07-27 Viacom International Inc. Transport stream automatic change over

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012053834A2 (en) * 2010-10-20 2012-04-26 한국전자통신연구원 Streaming service transmitting/receiving device and method
CN108763109A (en) * 2018-06-13 2018-11-06 成都心吉康科技有限公司 Date storage method, device and its application

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
zoe_from_mars.SDP详解.《CSDN博客》.2018,全文. *
刘付仲伟.IP化实时制作系统在流接收端实现视频净切换方案探析.《西部广播电视》.2020,全文. *

Also Published As

Publication number Publication date
CN113949896A (en) 2022-01-18

Similar Documents

Publication Publication Date Title
US10651976B2 (en) Method and apparatus for removing jitter in audio data transmission
CN103338386B (en) Based on the audio and video synchronization method simplifying timestamp
TWI357243B (en) Buffer level signaling for rate adaptation in mult
US7710973B2 (en) Error masking for data transmission using received data
TWI364988B (en) Error filter to differentiate between reverse link and forward link video data errors
US6744741B1 (en) System and method for maintaining a plurality of media conferences
US9271055B2 (en) System and method for variable video degradation counter-measures
US8098727B2 (en) Method and decoding device for decoding coded user data
US11553022B2 (en) Signaling of a request to adapt a voice-over-IP communication session
TWI435583B (en) Method of and apparatus for decoding audio content and associated computer program product
US9729903B2 (en) Data transmitting device and method
CN102223539A (en) Processing method for splash screen caused by picture coding frame loss
CN113573003B (en) Audio and video real-time communication method, device and equipment based on weak network
CN113949896B (en) IP media stream processing method, device, computer equipment and readable storage medium
US8605599B2 (en) Method and apparatus for processing asynchronous audio stream
KR20150026405A (en) Method for transmitting and receiving voice packet and electronic device implementing the same
CN113452723A (en) Voice processing method, device and storage medium
JP7192244B2 (en) repeater
JP2006319463A (en) Packet transmitting method and packet receiving device
CN107682716B (en) Code rate control method and device
US20120144443A1 (en) System and method for executing source buffering for multiple independent group transmission of real-time encoded scalabe video contents
KR100847168B1 (en) Apparatus and method for rearranging packet sequence for processing jitter in network based on udp/rtp
EP2854413B1 (en) Internet protocol television and operating method thereof
CN112911365B (en) Audio synchronous playing method and device
US11671976B2 (en) Early notification for transmission of encoded video data

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