CN113949896A - 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
CN113949896A
CN113949896A CN202111158279.2A CN202111158279A CN113949896A CN 113949896 A CN113949896 A CN 113949896A CN 202111158279 A CN202111158279 A CN 202111158279A CN 113949896 A CN113949896 A CN 113949896A
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.)
Granted
Application number
CN202111158279.2A
Other languages
Chinese (zh)
Other versions
CN113949896B (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

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/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)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (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, and the method comprises the following steps: simultaneously caching the IP media stream to be processed through the first buffer and the second buffer; calling a corresponding shunting 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 then under the condition that the current system time reaches the reading time, reading the IP media stream to be processed from any buffer, writing the IP media stream into a memory, and sending the IP media stream to be processed 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 transmitted data and improve the stability of transmission, two buffers (buffers) are generally arranged to Buffer data at the same time, and then an effective data packet is read into a Memory, such as a DIMM (Dual-Inline-Memory-Modules) for storage, according to the video signal data reconstruction requirement, and the same data packet processing mode is that data read from the back automatically covers data read from the front, and the process is repeated until the data is successfully written. Although the scheme of reading two paths of data simultaneously can ensure the safety and reliability of the data, the scheme occupies double read-write bandwidth of the memory, not only can cause certain resource waste, but also can cause no response of the memory due to overlarge bandwidth, thereby further influencing the processing capacity and stable performance of the whole receiving equipment.
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 in communication connection with the memory, and 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 shunting 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, 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 into a memory;
under the condition that the IP media stream to be processed is read from the first buffer and written into the memory, if the reading fails, the IP media stream to be processed is read from the second buffer and written into the memory;
under the condition that the IP media stream to be processed is read from the second buffer and written into the memory, if the reading fails, the IP media stream to be processed is read from the first buffer and written into the memory;
and responding to the external transmission signal to send out the IP media stream to be processed in the memory.
In one possible implementation, a computer device is communicatively coupled to a source routing device, the source routing device configured to generate a pending IP media stream and buffer the pending IP media stream via a first buffer and a second buffer simultaneously, the method including:
acquiring a first multicast address of a first buffer and a second multicast address of a second buffer;
sending the first multicast address and the second multicast address to the source routing equipment;
receiving an IP media stream to be processed sent by source routing equipment according to the first multicast address, and caching the IP media stream to be processed to a first buffer; and the number of the first and second groups,
and receiving the IP media stream to be processed sent by the source routing equipment according to the second multicast address, and caching the IP media stream to be processed to a second buffer.
In a possible implementation manner, the type of the IP media stream to be processed includes progressive video and interlaced video, and the determining 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 numerical value corresponding to the load type is characterized as non-interlaced, judging that the type of the IP media stream to be processed is a progressive video;
and when the numerical value corresponding to the load type is characterized as interlaced, judging that the type of the IP media stream to be processed is an interlaced video.
In a possible implementation manner, invoking a corresponding splitting policy 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 includes:
under the condition that the type of the IP media stream to be processed is a progressive video, acquiring interval time and frame time between adjacent data packets of the media stream to be processed;
calling a first shunt strategy to calculate according to the interval time and the frame time between adjacent data packets to obtain the reading time of the IP media stream to be processed;
a first shunting strategy: TPRj=(j×TRS)+TVD(ii) a Wherein, TPRjFor the read time, T, of the data packet j of the IP media stream to be processedRSFor the interval between adjacent data packets, TVDIs the frame time, j is the packet number.
In a possible implementation manner, invoking a corresponding splitting policy 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 includes:
under the condition that the type of the IP media stream to be processed is an interlaced video, acquiring the interval time, the frame time, the number of frame packets and the time period between adjacent frames of the media stream to be processed;
calling 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 flow division strategy is as follows: j < (N) is more than or equal to 0PACKETSTPR under the condition of/2)j=(j×TRS)+TVDIn (N)PACKETS/2)≤j<NPACKETSUnder the condition of (1), TPRj=(TFRAME/2)+(j-(NPACKETS/2)×TRS)+TVD(ii) a Wherein, TPRjFor the read time, T, of the data packet j of the IP media stream to be processedRSFor the interval between adjacent data packets, TVDIs a frame time, NPACKETSIs the number of frame packets, TFRAMEJ is the packet number for the time period between adjacent frames.
In one possible embodiment, the method further comprises:
and in the case that the IP media stream to be processed is successfully read from any one of the first buffer and the second buffer and written into the memory, emptying the buffer data in the first buffer and the second buffer.
In one possible implementation, the computer device further includes an embedder for outgoing the to-be-processed IP media stream in the memory in response to the external transmission signal, including:
calling an embedding device 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;
the digital component serial interface signal is sent out.
In a second aspect, an embodiment of the present application provides an IP media stream processing apparatus, 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, and the apparatus includes:
the cache module is used for caching the IP media stream to be processed through the first buffer and the second buffer at the same time;
the judging module is used for judging the type of the IP media stream to be processed and calling a corresponding shunting 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 into the memory under the condition that the current system time reaches the reading time; under the condition that the IP media stream to be processed is read from the first buffer and written into the memory, if the reading fails, the IP media stream to be processed is read from the second buffer and written into the memory; under the condition that the IP media stream to be processed is read from the second buffer and written into the memory, if the reading fails, the IP media stream to be processed is read from the first buffer and written into the memory;
and the outward sending module is used for responding to the external transmission signal to outward send 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 non-volatile memory storing computer instructions, and when the computer instructions are executed by the processor, the computer device executes the 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, and the computer program controls, when running, a computer device in which the readable storage medium is located to perform the IP media stream processing method in at least one possible implementation manner of the first aspect.
By adopting the IP media stream processing method, the IP media stream processing device, the computer equipment and the readable storage medium provided by the embodiment of the application, the IP media stream to be processed is cached through the first buffer and the second buffer at the same time; calling a corresponding shunting 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 reading the IP media stream to be processed from any buffer and writing the IP media stream to be processed into a memory under the condition that the current system time reaches the reading time, and sending the IP media stream to be processed out. Compared with the prior art that data in two buffers needs to be synchronously written into a memory, the scheme can acquire the IP media stream to be processed from one buffer at the same time and switch to the other buffer to acquire the IP media stream to be processed when acquisition fails, and the scheme that efficient and stable acquisition of the IP media stream to be processed can be guaranteed only by one bandwidth is realized. Moreover, the method and the device can allocate the corresponding shunting strategy to the IP media stream through determining the type of the IP media stream to be processed, and further can accurately calculate the corresponding reading time, so that the IP media stream to be processed is written into the memory from the buffer more smoothly.
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 application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit 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 flowchart illustrating a step of an IP media stream processing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating another step of an IP media stream processing method according to an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating another step of an IP media stream processing method according to an embodiment of the present application;
fig. 5 is a block diagram schematically illustrating a structure of an IP media stream processing apparatus for executing the IP media stream processing method in fig. 2 according to an embodiment of the present disclosure.
Detailed Description
In the process of implementing the present application, the inventor finds that, in order to ensure stability of data transmission in an IP media system, two buffers are generally arranged to simultaneously buffer an IP media stream to be transmitted, and then simultaneously write the IP media stream into a memory for processing, which ensures safe and stable transmission of the IP media stream, but occupies double bandwidth, causes waste of resources, and even causes no response to a memory in the case of an excessively large amount of IP media stream data. For example, for a 4K ultra high definition IP media stream, the video data bandwidth is 9Gbps, and due to the occupation of the double read-write bandwidth, when processing multi-channel ultra high definition data, the high-speed data read-write concurrency may cause DDR no response, which affects the processing capability and performance stability of the whole receiving device.
In view of the above problems, embodiments of the present application provide an IP media stream processing method, an IP media stream processing apparatus, a computer device, and a readable storage medium, where on the basis of setting two buffers to receive 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 invoked according to the determined type to calculate a reading time of the IP media stream to be processed, and after the reading time is reached, data can be written into a memory from any one of the two buffers, so that a scheme for reading and writing the IP media stream to be processed by only occupying a bandwidth of one buffer for data transmission based on the reading time is implemented.
The scheme in the embodiment of the application can be implemented by adopting various computer languages, such as object-oriented programming language Java and transliterated scripting language JavaScript.
In order to make the technical solutions and advantages of the embodiments of the present application more apparent, the following further detailed description of the exemplary embodiments of the present application with reference to the accompanying drawings makes it clear that the described embodiments are only a part of the embodiments of the present application, and are not exhaustive of all embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Referring to fig. 1, 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, where 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 connected to the memory 400 in a communication manner. In other embodiments of the present application, the IP media stream processing system may be composed of more or less components.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating steps of an IP media stream processing method according to an embodiment of the present application, where the method can 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 to-be-processed IP media stream is buffered simultaneously by the first buffer 200 and the second buffer 300.
Step S202, judging the type of the IP media stream to be processed, and calling a corresponding shunting 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.
In step S203, when the current system time reaches the read time, the to-be-processed IP media stream is read from any one of the first buffer 200 and the second buffer 300 and written into the memory 400.
In step S204, when the pending IP media stream is read from the first buffer 200 and written 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, if the read fails, the pending IP media stream is read from the first buffer 200 and written into the memory in the case that the pending IP media stream is read from the second buffer 300 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 the embodiment of the present application, the Buffer (Buffer) and the memory 400(Double Data Rate, Double Data Rate synchronous dynamic random access memory) may be implemented by an FPGA (Field Programmable Gate Array) integrated chip installed in the computer device 100. The IP media stream to be processed may be temporarily stored in the first buffer 200 and the second buffer 300 at the same time, and the computer device 100 may determine the type of the IP media stream to be processed when starting to receive the IP media stream to be processed, and call a corresponding splitting policy according to the determination result. After the read time is determined according to the called streaming policy, data reading from any of the first buffer 200 and the second buffer 300 may be started after the current system time reaches the read time, and the data is written into the memory 400, and then the related processing of the to-be-processed IP media stream is performed in the memory 400, so as to finally achieve the purpose of sending out the to-be-processed IP media stream that is completed. It should be understood that, the first buffer 200 and the second buffer 300 may be arranged to ensure stable data transmission, but in order to not occupy excessive bandwidth, only one path of data in the buffers is selected to be written into the memory 400 at a time, and in order to determine the stability of data transmission, when a read failure occurs during the writing process of the to-be-processed IP media stream, data acquisition of the to-be-processed IP media stream is performed from the other path of buffers, so as to complete the scheme of writing the to-be-processed IP media stream into the memory 400.
Through the steps, the read-write related processing of the IP media stream can be realized without occupying twice bandwidth.
In a possible implementation, the computer device 100 is communicatively connected to a source routing device, the source routing device is configured to generate a pending IP media stream, and the foregoing step S201 may be implemented by the following steps.
In sub-step S201-1, a first multicast address of the first buffer 200 and a second multicast address of the second buffer 300 are obtained.
Substep S201-2, the first multicast address and the second multicast address are sent to the source routing device.
Substep S201-3 receives the to-be-processed IP media stream sent by the source routing device according to the first multicast address and caches the to-be-processed IP media stream to the first buffer 200, and receives the to-be-processed IP media stream sent by the source routing device according to the second multicast address and caches the to-be-processed IP media stream to the second buffer 300.
In this embodiment of the present application, the to-be-processed IP media streams received by the first buffer 200 and the second buffer 300 are completely the same, 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 to-be-processed IP media stream, and may also be a device that forwards the to-be-processed IP media stream. After the source routing device receives the first multicast address and the second multicast address, it may establish a communication connection with the corresponding first buffer 200 and second buffer 300, and further start to cache the to-be-processed IP media stream into the first buffer 200 and second buffer 300 at the same time. It should be understood that there is only a difference in multicast address and physical transmission path for the first buffer 200 and the second buffer 300 for the pending IP media stream.
In a possible implementation manner, the types of the IP media stream to be processed may include progressive video and interlaced video, and the foregoing step S202 may be implemented by the following steps.
And a substep S202-1, calling a session description protocol to analyze the IP media stream to be processed to obtain session description data.
Wherein the session description data comprises a payload type.
And a substep S202-2, when the numerical value corresponding to the load type is characterized as non-interlaced, judging that the type of the IP media stream to be processed is a progressive video.
And a substep S202-3, when the numerical value corresponding to the load type is characterized as interlaced, judging that the type of the IP media stream to be processed is an interlaced video.
The to-be-processed IP media stream may be a video stream, and in this embodiment of the present application, the to-be-processed IP media stream may be analyzed based on a Session Description Protocol (SDP), and then a type of the to-be-processed IP media stream is determined according to a load type included in Session Description data obtained through the analysis. The data content may be described with reference to the following sessions: 110profile-level-id 42801 f; packet-mode ═ 1; max-br 20010; sar ═ 13 "" packetization-mode denotes the payload type, ranging from 0 to 2 (0: single NAL 1: non-interlaced, progressive 2: interlaced, interlaced) ". It may be determined that, when the value corresponding to the payload type is 1 (characterized as interlaced), the type of the IP media stream to be processed is progressive video, and when the value corresponding to the payload type is 2 (characterized as non-interlaced), the type of the IP media stream to be processed is interlaced video, for example, "packet-mode ═ 1" in the above example may determine that the IP media stream is progressive video.
In a possible implementation manner, please refer to fig. 3 in combination, in case that the type of the IP media stream to be processed is progressive video, the foregoing step S203 can be implemented by the following detailed steps.
And a substep S203-1, acquiring interval time and frame time between adjacent data packets of the to-be-processed media stream under the condition that the type of the to-be-processed IP media stream is progressive video.
And a substep S203-2, calling a first shunt 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.
A first shunting strategy: TPRj=(j×TRS)+TVD
Wherein, TPRjFor the read time, T, of the data packet j of the IP media stream to be processedRSFor the interval between adjacent data packets, TVDIs the 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 protocolRSAnd a frame time TVDIn particular, TRS=(TFRAME×RACTIVE)/NPACKETSWherein N isPACKETSIs the number of frame packets, TFRAMEFor time periods between adjacent frames, RACTIVER can be taken as the effective row number ratioACTIVE=(1080/1125)。TVD=(N×RACTIVE)+TROFFSETWherein N is an integer and the time scale value is derived from the SMPTE Epoch, TR defined in SMPTE ST 2059-1OFFSETIs the nearest TFRAMEAnd TVDThe difference between the integer multiples is a positive number or 0.
When T is obtained by the above formulaRSAnd TVDThen, the TPR may be obtained according to the formulaj=(j×TRS)+TVDThe reading time of the IP media stream to be processed is calculated, and it should be understood that the formula can calculateThe reading time of the data packet j of each IP media stream to be processed, and the reading time required in this 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 00The numerical value of (c).
In a possible implementation manner, 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.
And a substep S203-3, acquiring the interval time, the frame time, the number of frame packets and the time period between adjacent frames of the to-be-processed media stream under the condition that the type of the to-be-processed IP media stream is an interlaced video.
And a substep S203-4, calling 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 flow division strategy is as follows: j < (N) is more than or equal to 0PACKETSTPR under the condition of/2)j=(j×TRS)+TVDIn (N)PACKETS/2)≤j<NPACKETSUnder the condition of (1), TPRj=(TFRAME/2)+(j-(NPACKETS/2)×TRS)+TVDAnd calculating to obtain the reading time of the IP media stream to be processed, wherein j is the number of the data packet.
Wherein, TPRjFor the read time, T, of the data packet j of the IP media stream to be processedRSFor the interval between adjacent data packets, TVDIs a frame time, NPACKETSIs the number of frame packets, TFRAMEIs the time period between adjacent frames.
In the case that the type of the to-be-processed IP media stream is interlaced video, the interval time T between adjacent data packets of the to-be-processed IP media stream can be acquired based on SMPTE ST 2110 protocolRSFrame time TVDNumber of frame packets NPACKETSAnd a period T between adjacent framesFRAMEWherein, TRS=(TFRAME×RACTIVE)/NPACKETS,TVD=(N×RACTIVE)+TROFFSET,RACTIVER can be taken as the effective row number ratioACTIVE=(1080/1125)。
In obtaining T by the above stepsFRAME、TRSAnd NPACKETSThen, according to the formula: 0 < j (N)PACKETSTPR under the condition of/2)j=(j×TRS)+TVDIn (N)PACKETS/2)≤j<NPACKETSUnder the condition of (1), TPRj=(TFRAME/2)+(j-(NPACKETS/2)×TRS)+TVDIt should be understood that the formula can calculate the reading time of the data packet j of each to-be-processed IP media stream, and the required reading time in this scheme is the reading time of the first data packet of the to-be-processed IP media stream, and the reading time TPR of the to-be-processed IP media stream can be calculated by taking j to 00The numerical value of (c).
In one possible implementation, the examples of the present application also provide the following implementation.
In step S207, in the case that the pending IP media stream is successfully read from any 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 inhales the data related to the IP media stream to be processed, the reading operation on the first buffer 200 and the second buffer 300 is stopped, the contents of the first buffer 200 and the second buffer 300 are emptied, and the next reading time is waited for to trigger the operation of the memory 400 to read the data from the first buffer 200 and the second buffer 300.
In a possible implementation, the computer device 100 further comprises an embedder, and the foregoing step S206 can be implemented by performing the following detailed steps.
And a substep S206-1, responding to the external transmission signal, calling an embedder to embed the IP media stream to be processed in the memory to obtain a digital component serial interface signal corresponding to the IP media stream to be processed.
And a substep S206-2 of transmitting the digital component serial interface signal.
In this embodiment, the computer device 100 may include a serial interface (SDI), which may embed, according to an external transmission signal, an IP media stream to be processed by the add-embedder to obtain a digital component serial interface signal, i.e., an SDI signal, corresponding to the IP media stream to be processed, where the external transmission signal may be an external synchronization signal or a PTP (Precision Time Protocol) clock signal, and besides using the SDI add-embedder, an IP sender (device that sends an IP media stream) may also perform an operation of sending the IP media stream to be processed.
In order to more clearly describe the scheme provided by the embodiment of the present application, the following describes an overall IP media stream processing method proposed by the present application.
First, the first buffer 200 and the second buffer 300 receive an IP media stream to be processed simultaneously, the IP media stream to be processed may be a 3G video stream, after the 3G video stream is received, the SDP protocol may be used to judge the category of the 3G video stream, and the type of the 3G video stream may be determined according to the load type of the 3G video stream, for example, it is determined that the type of the 3G video stream is a progressive video, the time of one frame of the 3G video stream may be 20ms, and N of the 3G video stream may be further obtainedPACKETSCharacterized by non-interlaced 920x1080x20/1280 (packet length, which may be different) x8bit/s 4050, i.e. 4050 packets in a frame of the 3G video stream, and TRSIs (20ms is multiplied by 1080/1125)/4050 is 4.74 microseconds, TROFFSETCharacterized by interleaving 0ms × 43 (with starting line of data)/1125 (total line) 747us, taking T of the first frameVDCharacterized by non-interlaced x20ms +747us 20727us, based on the above parameters, a first streaming strategy corresponding to progressive video is invoked: TPRj=(j×TRS)+TVDJ is 0, then the reading time TPR of the 3G video stream can be calculated0The value of (2) is 0 × 4.747+20747 ═ 20747 us. Therefore, if the 3G video stream is received at 08:00:00:00:00, the 3G video stream can be transmitted from any one of the first buffer 200 and the second buffer 300 at 08:00:00:00:20747And if a failure occurs in the writing process, the stream is read from another buffer, and the process is repeated until the 3G video stream is written into the memory 400, then the SDI embedder can be called to embed the 3G video stream to form an SDI signal corresponding to the 3G video stream and send the SDI signal out, and after the SDI signal is sent out to the destination device, the corresponding de-embedding operation can be performed to complete the transmission process of the 3G video stream.
An embodiment of the present application provides an IP media stream processing apparatus 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 to the memory 400 in a communication manner, please refer to fig. 5, and the IP media stream processing apparatus 110 includes:
the buffering module 1101 is configured to buffer the to-be-processed IP media stream through the first buffer and the second buffer at the same time.
The determining module 1102 is configured to determine the type of the to-be-processed IP media stream, and call a corresponding splitting policy 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.
A writing module 1103, configured to, when the current system time reaches the reading time, read the to-be-processed IP media stream from any one of the first buffer and the second buffer and write the to-be-processed IP media stream into the memory; under the condition that the IP media stream to be processed is read from the first buffer and written into the memory, if the reading fails, the IP media stream to be processed is read from the second buffer and written into the memory; and under the condition that the IP media stream to be processed is read from the second buffer and written into the memory, if the reading fails, reading the IP media stream to be processed from the first buffer and writing into the memory.
And 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, the source routing device is configured to generate an IP media stream to be processed, and the cache 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; sending the first multicast address and the second multicast address to the source routing equipment; receiving the IP media stream to be processed sent by the source routing device according to the first multicast address and caching the IP media stream to be processed to the first buffer 200, and receiving the IP media stream to be processed sent by the source routing device according to the second multicast address and caching the IP media stream to be processed to the second buffer 300.
In a possible implementation manner, the types of the IP media stream 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 numerical value corresponding to the load type is characterized as non-interlaced, judging that the type of the IP media stream to be processed is a progressive video; and when the numerical value corresponding to the load type is characterized as interlaced, judging that the type of the IP media stream to be processed is an interlaced video.
In a possible implementation manner, the determining module 1102 is specifically configured to:
under the condition that the type of the IP media stream to be processed is a progressive video, acquiring interval time and frame time between adjacent data packets of the media stream to be processed;
calling a first shunt strategy to calculate according to the interval time and the frame time between adjacent data packets to obtain the reading time of the IP media stream to be processed;
a first shunting strategy: TPRj=(j×TRS)+TVD(ii) a Wherein, TPRjFor the read time, T, of the data packet j of the IP media stream to be processedRSFor the interval between adjacent data packets, TVDIs the frame time, j is the packet number.
In a possible implementation manner, the determining module 1102 is specifically configured to:
under the condition that the type of the IP media stream to be processed is an interlaced video, acquiring the interval time, the frame time, the number of frame packets and the time period between adjacent frames of the media stream to be processed;
calling 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 flow division strategy is as follows: j < (N) is more than or equal to 0PACKETSTPR under the condition of/2)j=(j×TRS)+TVDIn (N)PACKETS/2)≤j<NPACKETSUnder the condition of (1), TPRj=(TFRAME/2)+(j-(NPACKETS/2)×TRS)+TVD(ii) a Wherein, TPRjFor the read time, T, of the data packet j of the IP media stream to be processedRSFor the interval between adjacent data packets, TVDIs a frame time, NPACKETSIs the number of frame packets, TFRAMEJ is the packet number for the time period between adjacent frames.
In a possible implementation manner, the determining module 1102 is further specifically configured to:
and in the case that the IP media stream to be processed is successfully read from any one of the first buffer and the second buffer and written into the memory, emptying the buffer data in the first buffer and the second buffer.
In a 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.
The digital component serial interface signal is sent out.
It should be noted that, for the implementation principle of the IP media stream processing apparatus 110, reference may be made to the implementation principle of the 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 only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the cache module 1101 may be a processing element separately set up, or may be implemented by being integrated into a chip of the apparatus, or may be stored in the memory 400 of the apparatus in the form of program code, and a processing element of the apparatus calls and executes the functions of the cache module 1101. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. 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 the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when some of the above modules are 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 (CPU) or other processor that can call program code. As another example, these modules may be integrated together, implemented in the form of a system-on-a-chip (SOC).
The embodiment of the present application provides a computer device 100, where the computer device 100 includes a processor and a non-volatile memory storing computer instructions, and when the computer instructions are executed by the processor, the computer device 100 executes the IP media stream processing apparatus 110.
To sum up, 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 first obtain a splitting policy based on ST 2110IP stream transmission characteristics, then obtain a corresponding data packet in a de-buffering Buffer (i.e. a Buffer) according to the splitting policy during a packet decapsulating process, and read data from another path of Buffer if the data packet is not obtained. The reading and writing of the group of effective data only occupies the original signal bandwidth, and does not additionally occupy the signal bandwidth, thereby greatly improving the utilization rate of DDR (namely the memory 400) and ensuring that receiving equipment can realize stable receiving and processing of multi-channel ultra-high-definition video and audio data.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 the 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. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. An IP media stream processing method applied to a computer device, wherein 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, 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 shunting 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;
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 be processed into the memory when the current system time reaches the reading time;
under the condition that the IP media stream to be processed is read from the first buffer and written into the memory, if the reading fails, the IP media stream to be processed is read from the second buffer and written into the memory;
under the condition that the IP media stream to be processed is read from the second buffer and written into the memory, if the reading fails, the IP media stream to be processed 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.
2. The method of claim 1, wherein the computer device is communicatively coupled to a source routing device, the source routing device configured to generate the pending IP media stream, and wherein concurrently 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;
sending the first multicast address and the second multicast address to the source routing device;
receiving the IP media stream to be processed sent by the source routing equipment according to the first multicast address, and caching the IP media stream to be processed to the first buffer; and the number of the first and second groups,
and receiving the IP media stream to be processed sent by the source routing equipment according to the second multicast address, and caching the IP media stream to be processed to the second buffer.
3. The method according to claim 1, wherein the types of the IP media stream to be processed include progressive video and interlaced video, and the determining 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 comprises a payload type;
when the numerical value corresponding to the load type is characterized as non-interlaced, judging that the type of the IP media stream to be processed is a progressive video;
and when the numerical value corresponding to the load type is characterized as interlaced, judging that the type of the IP media stream to be processed is an interlaced video.
4. The method according to claim 3, wherein the obtaining the read time of the to-be-processed IP media stream by invoking a corresponding streaming policy according to the type of the to-be-processed IP media stream comprises:
under the condition that the type of the IP media stream to be processed is the progressive video, acquiring interval time and frame time between adjacent data packets of the media stream to be processed;
calling a first 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 and the frame time;
the first offload policy: TPRj=(j×TRS)+TVD(ii) a Wherein, TPRjFor the read time, T, of the data packet j of the IP media stream to be processedRSIs the interval time between said adjacent data packets, TVDAnd j is the number of the data packet.
5. The method according to claim 3, wherein the obtaining the read time of the to-be-processed IP media stream by invoking a corresponding streaming policy according to the type of the to-be-processed IP media stream comprises:
under the condition that the type of the IP media stream to be processed is the interlaced video, acquiring the interval time, the frame time, the number of frame packets and the time period between adjacent frames of the media stream to be processed;
calling 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 frame packet number and the time period between the adjacent frames;
the second split strategy is as follows: j < (N) is more than or equal to 0PACKETSTPR under the condition of/2)j=(j×TRS)+TVDIn (N)PACKETS/2)≤j<NPACKETSUnder the condition of (1), TPRj=(TFRAME/2)+(j-(NPACKETS/2)×TRS)+TVD(ii) a Wherein, TPRjFor the read time, T, of the data packet j of the IP media stream to be processedRSIs the interval time between said adjacent data packets, TVDFor said frame time, NPACKETSIs the number of frame packets, TFRAMEJ is the time period between the adjacent frames and is the data packet number.
6. The method of claim 1, further comprising:
and in the case that the IP media stream to be processed is successfully read from any one of the first buffer and the second buffer and written into the memory, emptying the buffered data in the first buffer and the second buffer.
7. The method of claim 1, wherein the computer device further comprises an embedder, and wherein the outgoing of the to-be-processed IP media stream in the memory in response to an external transmission signal comprises:
responding to the external transmission signal, calling the embedder to embed the IP media stream to be processed in the memory to obtain a digital component serial interface signal corresponding to the IP media stream to be processed;
and sending out the digital component serial interface signal.
8. An IP media stream processing apparatus applied to a computer device, wherein 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, the apparatus comprising:
the cache module is used for caching the IP media stream to be processed through the first buffer and the second buffer at the same time;
the judging module is used for judging the type of the IP media stream to be processed and calling a corresponding shunting 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 to-be-processed IP media stream from any one of the first buffer and the second buffer and write the to-be-processed IP media stream into the memory when the current system time reaches the reading time; under the condition that the IP media stream to be processed is read from the first buffer and written into the memory, if the reading fails, the IP media stream to be processed is read from the second buffer and written into the memory; under the condition that the IP media stream to be processed is read from the second buffer and written into the memory, if the reading fails, the IP media stream to be processed is read from the first buffer and written into the memory;
and the outward sending module is used for responding to an external transmission signal to outward send the IP media stream to be processed in the memory.
9. A computer device comprising a processor and a non-volatile memory having computer instructions stored thereon, wherein the computer instructions, when executed by the processor, cause the computer device to perform the IP media stream processing method of any of claims 1-7.
10. A readable storage medium, comprising a computer program, which when executed controls a computer device on which the readable storage medium is located to perform the IP media stream processing method according to any one of claims 1 to 7.
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 true CN113949896A (en) 2022-01-18
CN113949896B 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 (7)

* 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
US20150026542A1 (en) * 2012-03-06 2015-01-22 Appear Tv As Method, Device and System For Packet Transmission Over IP Networks
US20170070772A1 (en) * 2015-09-09 2017-03-09 Media Global Links Co., Ltd. Video transmission system and video receiver
US20180070126A1 (en) * 2016-09-08 2018-03-08 Gvbb Holdings S.A.R.L. System and method for scalable physical layer flow of packetized media streams
CN108763109A (en) * 2018-06-13 2018-11-06 成都心吉康科技有限公司 Date storage method, device and its application
US20200162773A1 (en) * 2018-11-19 2020-05-21 Viacom International Inc. Transport Stream Automatic Change Over
US20200280749A1 (en) * 2017-09-14 2020-09-03 Media Links Co., Ltd. Video Switching System

Patent Citations (7)

* 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
US20150026542A1 (en) * 2012-03-06 2015-01-22 Appear Tv As Method, Device and System For Packet Transmission Over IP Networks
US20170070772A1 (en) * 2015-09-09 2017-03-09 Media Global Links Co., Ltd. Video transmission system and video receiver
US20180070126A1 (en) * 2016-09-08 2018-03-08 Gvbb Holdings S.A.R.L. System and method for scalable physical layer flow of packetized media streams
US20200280749A1 (en) * 2017-09-14 2020-09-03 Media Links Co., Ltd. Video Switching System
CN108763109A (en) * 2018-06-13 2018-11-06 成都心吉康科技有限公司 Date storage method, device and its application
US20200162773A1 (en) * 2018-11-19 2020-05-21 Viacom International Inc. Transport Stream Automatic Change Over

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZOE_FROM_MARS: "SDP详解" *
刘付仲伟: "IP化实时制作系统在流接收端实现视频净切换方案探析" *

Also Published As

Publication number Publication date
CN113949896B (en) 2023-11-17

Similar Documents

Publication Publication Date Title
US11489781B2 (en) Bandwidth management
US20240040435A1 (en) Bandwidth adjustment method, service transmission method, network device and readable storage medium
US7710973B2 (en) Error masking for data transmission using received data
US9271055B2 (en) System and method for variable video degradation counter-measures
KR102197974B1 (en) Method for adapting the downloading behavior of a client terminal configured to receive multimedia content, and corresponding terminal
US6744741B1 (en) System and method for maintaining a plurality of media conferences
US20170078354A1 (en) Network Video Playback Method and Apparatus
US11563992B2 (en) Video playback quality detection method and apparatus
CN110830460B (en) Connection establishing method and device, electronic equipment and storage medium
US11916798B2 (en) Estimating network bandwidth using probe packets
US9258834B2 (en) Method of mobile terminal internal communications
CN113573003B (en) Audio and video real-time communication method, device and equipment based on weak network
US10200433B2 (en) Client device, a method for receiving a streaming media data and a streaming media data transmission system
CN102223539A (en) Processing method for splash screen caused by picture coding frame loss
US12088482B2 (en) Optimized data streaming detection and prioritization
CN112383512B (en) RTP frame sequence error correction method, device, receiving end and computer readable storage medium
CN113949896A (en) IP media stream processing method, device, computer equipment and readable storage medium
WO2023231723A1 (en) Streaming media data processing method and system
US20210343304A1 (en) Method for Improving Voice Call Quality, Terminal, and System
CN107295667B (en) Access resource adjusting method and device
CN113452723A (en) Voice processing method, device and storage medium
US20170302598A1 (en) Managing a Jitter Buffer Size
CN112437124B (en) Method and device for processing flow mirror image request and load balancing server
US10772010B2 (en) Transmission apparatus, method for controlling transmission, and recording medium
CN113660530B (en) Program stream data grabbing method and device, computer equipment and readable storage medium

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