CN113596580A - Streaming media data processing method and device based on SRT protocol and electronic equipment - Google Patents

Streaming media data processing method and device based on SRT protocol and electronic equipment Download PDF

Info

Publication number
CN113596580A
CN113596580A CN202110867709.1A CN202110867709A CN113596580A CN 113596580 A CN113596580 A CN 113596580A CN 202110867709 A CN202110867709 A CN 202110867709A CN 113596580 A CN113596580 A CN 113596580A
Authority
CN
China
Prior art keywords
srt
packet
protocol
packets
streaming media
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110867709.1A
Other languages
Chinese (zh)
Inventor
林加前
邹伟华
李伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WELLAV TECHNOLOGIES Ltd
Original Assignee
WELLAV TECHNOLOGIES Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WELLAV TECHNOLOGIES Ltd filed Critical WELLAV TECHNOLOGIES Ltd
Priority to CN202110867709.1A priority Critical patent/CN113596580A/en
Publication of CN113596580A publication Critical patent/CN113596580A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application discloses a streaming media data processing method, a device and electronic equipment based on SRT protocol, wherein the method is applied to the electronic equipment, and the method comprises the following steps: acquiring an SRT stream data packet; slicing and analyzing the SRT stream data packets according to TS standard to obtain a plurality of corresponding TS packets; acquiring a local time value, and converting the local time value into a time stamp associated with the TS packet according to a TS standard; and carrying out packet processing on the TS packet based on a preset protocol, and transmitting the TS packet and the corresponding timestamp. The method and the device transmit the television programs by utilizing the SRT stream data packet and output the signals after data conversion, and can reduce the delay value of the output signals of the electronic equipment, so that the delay value of the television programs played by the playing equipment is greatly reduced.

Description

Streaming media data processing method and device based on SRT protocol and electronic equipment
Technical Field
The present disclosure relates to the field of signal processing, and in particular, to a method and an apparatus for processing streaming media data based on an SRT protocol, and an electronic device.
Background
In recent years, network set-top boxes are rapidly emerging, and most families deploy one network set-top box to realize diversified digital applications such as real-time IPTV, on-demand, games, home theater and the like.
The traditional network set-top box receives an input signal of an RTMP protocol, decodes the input signal and then sends the decoded signal to a playing device such as a television for playing. Although the input signal of the RTMP protocol has the advantages of stability, reliability, etc., and is suitable for network transmission, its delay value is high, and its timeliness is much worse than that of the cable digital television signal adopted by the traditional set-top box. The network input signal delay value of the general RTMP protocol is at the level of second, so that the delay value of the network set-top box output signal is generally higher. If the network set top box is applied to playing contents with high timeliness, such as programs of sports live broadcast events and the like, the high delay value of the output signal of the network set top box can affect the normal watching of a user, so that the traditional network set top box is more and more difficult to meet the advanced requirements of the user on high definition and low delay of the programs played by the system.
Disclosure of Invention
The application provides a streaming media data processing method and device based on an SRT protocol and electronic equipment, which can reduce the delay value of an output signal of the equipment.
The application discloses a streaming media data processing method based on an SRT protocol, which is applied to electronic equipment and comprises the following steps:
acquiring an SRT stream data packet;
slicing and analyzing the SRT stream data packets according to TS standard to obtain a plurality of corresponding TS packets;
acquiring a local time value, and converting the local time value into a time stamp associated with the TS packet according to a TS standard;
and carrying out packet processing on the TS packet based on a preset protocol, and transmitting the TS packet and the corresponding timestamp.
In an embodiment, the acquiring the SRT stream packet includes:
acquiring a first handshake access mode of a remote server;
adjusting a second handshake access mode of the current system according to the first handshake access mode;
creating a socket link with the remote server according to an SRT protocol;
and acquiring the SRT streaming data packet through the socket link.
In an embodiment, slicing and parsing the SRT stream packets according to the TS standard includes:
the SRT stream packets are sliced according to the size of the TS packets and the header sync byte.
In an embodiment, after said converting the local time value into the time stamp associated with the TS packet according to the TS standard, further comprises:
taking a plurality of TS packets as a data packet based on the transmission specification;
and associating the timestamp with the data packet and storing the timestamp and the data packet in a collector for obtaining.
In one embodiment, the collector sets a subscription interface providing a subscription service to subscribe to send the data packets and associated timestamps.
In an embodiment, the packetizing the TS packets based on a predetermined protocol and transmitting the TS packets with the corresponding timestamps further includes:
and setting a subscription interface, and providing subscription service to subscribe and send the packaged data.
In an embodiment, the predetermined protocol includes a TCP protocol or a UDP protocol.
The application also provides a streaming media data processing device based on the SRT protocol, and the device comprises:
the input module is used for acquiring an SRT stream data packet;
the analysis module is used for carrying out slice analysis on the SRT stream data packets according to TS standards to obtain a plurality of corresponding TS packets;
the time conversion module is used for acquiring a local time value and converting the local time value into a time stamp associated with the TS packet according to a TS standard;
and the packaging module is used for packaging the TS packet based on a preset protocol and transmitting the TS packet and the corresponding timestamp.
In an embodiment, the parsing module and the packaging module receive and transmit data through a subscription service.
The present application further provides an electronic device, which includes:
a processor; and
a memory, in which a computer program is stored, and the processor is configured to execute the streaming media data processing method based on the SRT protocol by calling the computer program stored in the memory.
As can be seen from the above, according to the streaming media data processing method and apparatus based on the SRT protocol and the electronic device, by obtaining the SRT stream data packet, slicing and analyzing the SRT stream data packet and performing packet processing with the timestamp obtained by local time conversion, streaming media data that can be normally played by a conventional playing device is obtained. The SRT stream data packet is used for transmitting the television program and outputting the signal after data conversion, so that the delay value of the output signal of the electronic equipment can be reduced, and the delay value of the television program played by the playing equipment is greatly reduced.
Drawings
Fig. 1 is a flowchart illustrating an implementation of a streaming media data processing method based on an SRT protocol according to an embodiment of the present application.
Fig. 2 is a flowchart of an implementation of acquiring an SRT stream packet according to an embodiment of the present application.
Fig. 3 is an interaction diagram of a streaming media data processing method based on an SRT protocol according to an embodiment of the present application.
Fig. 4 is a schematic functional block diagram of a streaming media data processing apparatus based on an SRT protocol according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following detailed description of the preferred embodiments of the present application, taken in conjunction with the accompanying drawings, will make the advantages and features of the present application more readily appreciated by those skilled in the art, and thus will more clearly define the scope of the invention.
In the description of the present application, it is to be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; may be mechanically connected, may be electrically connected or may be in communication with each other; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
The stream media data processing method based on the SRT protocol is applied to electronic equipment, and the electronic equipment can be decoding equipment for SRT stream data packet conversion, such as a television set top box or a computer, a video decoder and the like, or relay equipment, and can also be playing equipment with an SRT stream data packet receiving function, such as a television and the like. It is to be understood that the present application is not limited to the particular type of electronic device.
Referring to fig. 1, an implementation flow of a streaming media data processing method based on an SRT protocol according to an embodiment of the present application is shown.
As shown in fig. 1, the streaming media data processing method based on the SRT protocol includes:
101. and acquiring an SRT stream data packet.
Among them, SRT (Secure Reliable Transport) is an open source protocol developed by Haivision, which allows users to deliver high-quality, low-latency (1s or less) streams over the public internet. The SRT stream data packet may be obtained from a remote server, that is, a real-time streaming media server, and the SRT stream data packet may be a signal carrier of network television or other video content obtained from a network, and has characteristics of low delay and the like.
In one embodiment, upon receiving the SRT stream packets, they may be sent to an SRT buffer container for subsequent retrieval.
102. And slicing and analyzing the SRT stream data packets according to the TS standard to obtain a plurality of corresponding TS packets.
Wherein the TS slicer may be enabled to slice received SRT stream packets.
In one implementation, slicing the SRT stream packets according to the TS standard may include: the SRT stream packets are sliced according to the size of the TS packets and the header sync byte. Specifically, when slicing, a plurality of TS packets may be obtained by slicing the TS according to the TS header sync byte 0x47 and the TS fixed size 188 bytes.
Of course, in addition to the slicing method described above, the SRT stream packet may be sliced and analyzed according to the actual TS standard and hardware conditions.
103. And acquiring a local time value, and converting the local time value into a time stamp associated with the TS packet according to the TS standard.
For facilitating transmission and analysis of subsequent TS packets, the local time value corresponding to the TS packet sliced in step 102 may be obtained, and the local time value is converted according to the TS standard, so as to obtain the timestamp corresponding to the TS packet. Specifically, the local time value may be converted according to the 27M time base of the TS standard, so that the time stamp obtained by conversion conforms to the TS standard to determine the input code rate of the TS stream during transmission.
In one embodiment, after converting the local time value into the time stamp associated with the TS packet according to the TS standard, the method further includes: taking a plurality of TS packets as a data packet based on the transmission specification; the timestamp is associated with the packet and stored in the collector for retrieval.
The number of the TS packets may be determined according to a carrying capacity of each IP data packet of socket communication, for example, the number of the TS packets is determined to be 7 according to 188 bytes of a fixed size of each TS packet and a protocol requirement, and then the 7 TS packets may be packed and the corresponding timestamps may be bound, so that the timestamps may be uniformly sent every time 7 TS packets are transmitted.
In this embodiment, the 7 TS packets and the time stamp may be placed in a collector for uniform transmission or extraction to other devices or processes.
In one embodiment, the collector may set a subscription interface that provides a subscription service to subscribe to send the data packets and associated timestamps. The subscription interface may be a message subscription mechanism adopting C + +, and provides a subscription interface to the outside. As long as the collector obtains the TS packet obtained by analyzing the SRT stream data packet and the corresponding timestamp, and reaches a certain pushing condition, the TS packet in the collector and the corresponding timestamp can be pushed, and the lower node, such as a module for performing packet processing, can obtain corresponding data without requesting the analyzing module, thereby being beneficial to further reducing delay.
104. And performing packet processing on the TS packet based on a preset protocol, and transmitting the TS packet and the corresponding timestamp.
The TS packets in the collector can be collected through a TS packet input module, the SRT stream data packets are analyzed to obtain the TS packets and the corresponding timestamps, data packets of corresponding protocols are generated and transmitted with the timestamps, and therefore the protocol format requirements of the TS packets generated by the SRT stream data packets by the subordinate nodes are met, and subsequent decoding is facilitated.
Furthermore, the TS packet input module may obtain the corresponding TS packet by means of a subscription collector, thereby reducing the delay in the transmission process. It can be understood that, except between the TS packet input module and the collector, other functional modules with data transceiving functions may all adopt a subscription interface for subscription connection, so that the effect of reducing transmission delay can be obtained in the whole system of the electronic device.
In one embodiment, the predetermined protocol includes a TCP protocol or a UDP protocol. Taking UDP protocol as an example, a TS collector may be subscribed through the TS packet input module, and 7 TS packets are indirectly acquired from the collector each time. And then, the TS packets are packaged according to the format requirement of a UDP protocol to obtain a plurality of UDP packets, and the UDP packets are sent to the next-stage node.
Specifically, in the ethernet, the maximum transmission unit MTU is 1500 bytes, and in one IP packet, 20 bytes of the IP packet header are removed, and the maximum data length that can be transmitted is 1480 bytes.
In the TCP packet, 20 TCP headers are removed, and the maximum data segment bit that can be transmitted is 1460 bytes; in the UDP packet, 8 UDP headers are removed, and the maximum data segment bit 1472 bytes that can be transmitted. No matter TCP packets or UDP packets, the maximum number of TS packets can be loaded is 7, namely: 188 x 7 — 1316 bytes.
It will be understood that how many TS packets are specifically packetized as data packets depends on the input source. Ideally, there are 7 TS packets per IP packet, where we parse the IP packet to get several TS packets, and the converted timestamp for the next layer subscription to take.
In an embodiment, the UDP packet may be sent in a multicast manner, and if the local device has a decoding module, the UDP packet and the corresponding timestamp may be sent to a local loopback address, and the decoding module may obtain the UDP packet in a multicast manner and perform decoding processing, so as to obtain low-delay video content.
In addition, in order to obtain the TS stream input code rate of the TS packet, the associated timestamp may be converted into the current system time in microseconds, and then the current TS stream input code rate may be easily obtained through the built-in code rate calculator. In order to reduce the delay, the input code rate of the TS stream may be obtained by providing an outward subscription interface for other nodes.
Specifically, in order to obtain the TS stream code rate of the SRT input source, the current system time value is obtained when the input source obtains a plurality of TS packets, and is used to calculate the code rate of the source input (i.e., "built-in code rate calculator"), and the code rate (unit: bps) calculation formula is the number of TS packets received each time multiplied by 188Byte multiplied by 8 bit/time s spent each time (the difference between the system time values obtained and analyzed at the previous and subsequent times).
It can be understood that the method for acquiring the TS stream input code rate may be performed by an acquisition method commonly used in the art, and the method for acquiring the TS stream input code rate is not limited in this application.
The conventional SRT protocol is generally used for long-distance transmission of data or for data forwarding, and because of the characteristics of the protocol and the limitations of application scenarios, the existing decoder or playback device cannot support data decoding and playback of the SRT protocol, so that the use of data packets of the SRT protocol on the decoder or playback device is limited. According to the technical scheme, the data packets of the SRT stream can be processed to obtain TS packets of other protocols for transmission or decoding, so that the TS packets converted from the SRT stream can be played by a traditional decoder or playing equipment.
As can be seen from the above, in the streaming media data processing method based on the SRT protocol, the SRT stream data packet is obtained, and the SRT stream data packet is subjected to slice analysis and is subjected to packet processing with the timestamp obtained by local time conversion, so that streaming media data that can be normally played by a conventional playing device is obtained. The SRT stream data packet is used for transmitting the television program and outputting the signal during data conversion, so that the delay value of the output signal of the electronic equipment can be reduced, and the delay value of the television program played by the playing equipment is greatly reduced. A user can watch a high-definition and low-delay television program through the electronic equipment applying the method, and the development trend of subsequent network high-definition videos can be better met.
Referring to fig. 2, an implementation flow for acquiring an SRT stream packet according to an embodiment of the present application is shown in the figure.
As shown in fig. 2, acquiring an SRT stream packet may specifically include:
201. a first handshake access mode of a remote server is obtained.
The SRT protocol, as a protocol using point-to-point connections, supports three handshake modes: listener, caller, and rendervous, by obtaining a first handshake access pattern of a remote server, an access pattern of a current server may be determined.
202. And adjusting a second handshake access mode of the current system according to the first handshake access mode.
To make a point-to-point connection, it is necessary to adjust to a mode corresponding to the first handshake access mode of the server. For example, if the remote server is in listener mode, the current system may adjust to a caller mode to handshake connection with, and so on.
203. A socket link is created with a remote server according to the SRT protocol.
Based on the socket link, the contact between the electronic equipment and the remote server can be established, so that the SRT stream of the remote server can be acquired more reliably.
204. And acquiring the SRT streaming data packet through the socket link.
In one embodiment, the packet of the SRT flow may be received by binding the local address, and the received data is directly sent to the SRT buffer container.
The electronic equipment can establish an SRT connection mode with the remote server through the SRT acquisition mode between the electronic equipment and the remote server, so that more stable and reliable SRT stream data can be acquired.
Referring to fig. 3, an interaction manner of the streaming media data processing method based on the SRT protocol according to the embodiment of the present application is shown in the drawing.
As shown in fig. 3, the streaming media data processing method based on the SRT protocol includes:
301. the remote server and the electronic equipment establish connection through a handshake access mode.
The remote server may establish a socket link with the electronic device.
302. The remote server sends SRT stream packets to the electronic device.
The electronic device obtains the SRT stream data packet from the remote server through the socket link and stores the SRT stream data packet in a local SRT buffer container.
303. The electronic equipment converts and packages the SRT flow.
Each IP data packet based on socket communication generally carries 7 TS packets, a TS slicer (parsing function, slicing according to TS standard) is enabled, slicing is performed from the SRT buffer received above according to TS header sync byte 0x47 and TS fixed size 188 bytes to obtain TS packets, local system time is obtained and converted according to TS 27M time base to obtain current corresponding time stamps, which are used as uniform sending time stamps of each 7 TS packets and stored in a TS collector together with TS data packets. Then, a C + + message subscription mechanism is adopted, and the TS collector provides a subscription interface for the next level subscription to take.
Through setting a TS packet input module and subscribing a TS collector, 7 TS packets are indirectly acquired from the TS collector each time, and the time stamp of the TS packets is converted into the current system time in microseconds. Then, the current TS input code rate can be easily obtained by adding a code rate calculator. And provides an outbound subscription interface.
The TS packet input module can subscribe the TS packet input module and package the TS packets in the TS packet input module according to a UDP protocol.
304. The electronic device sends the UDP packet to the decoding device.
In one embodiment, if the decoding device and the electronic device are the same device, the decoding device sends the UDP packets obtained from the above to the local loopback address in a multicast manner according to the same timestamp for every 7 TS packets.
305. The decoding apparatus decodes the UDP packet.
And acquiring the UDP multicast packet from the local loopback address, and decoding.
306. The decoding device plays or outputs the decoded data.
By adopting the scheme, the characteristic of low delay of the SRT can be fully utilized, the electronic equipment seamlessly sends the received real-time 4K stream to the decoding equipment for decoding output or playing, and a user can watch ultra-high definition video content with low delay.
Meanwhile, the UDP packet obtained after the SRT packet can adapt to the format requirements of most existing decoding equipment, so that the existing decoding equipment can be compatible with signals generated by SRT stream data, low-delay signal output can be realized through a low-cost scheme, hardware of the decoding equipment does not need to be replaced, and the application range of the technology is improved.
In addition, the decoding device can be integrated with the electronic device, or can be separated from the electronic device, and the specific combination mode can be determined according to requirements so as to adapt to different application scenarios.
Referring to fig. 4, functional modules of a streaming media data processing apparatus based on SRT protocol according to an embodiment of the present application are shown.
As shown in fig. 4, the streaming media data processing apparatus 100 based on the SRT protocol includes an input module 110, a parsing module 120, and a packetizing module 130.
The input module 110 is configured to obtain an SRT stream packet.
The SRT stream packet may be a signal carrier of a network television or other video content acquired from a network, and has characteristics of low delay and the like.
In one embodiment, upon receiving the SRT stream packets, they may be sent to an SRT buffer container for subsequent retrieval.
The parsing module 120 is configured to perform slicing parsing on the SRT stream packets according to a TS standard to obtain a plurality of corresponding TS packets; and acquiring a local time value, and converting the local time value into a time stamp associated with the TS packet according to the TS standard.
Wherein the TS slicer may be enabled to slice received SRT stream packets.
In one implementation, slicing the SRT stream packets according to the TS standard may include: the SRT stream packets are sliced according to the size of the TS packets and the header sync byte. Specifically, when slicing, a plurality of TS packets may be obtained by slicing the TS according to the TS header sync byte 0x47 and the TS fixed size 188 bytes.
Of course, in addition to the slicing method described above, the SRT stream packet may be sliced and analyzed according to the actual TS standard and hardware conditions.
For facilitating transmission and analysis of subsequent TS packets, the local time value corresponding to the TS packet sliced in step 102 may be obtained, and the local time value is converted according to the TS standard, so as to obtain the timestamp corresponding to the TS packet. Specifically, the local time value may be converted according to a 27M time base of the TS standard, so that the time stamp obtained by conversion conforms to the TS standard and is conveniently provided to the external output interface.
In one embodiment, after converting the local time value into the time stamp associated with the TS packet according to the TS standard, the method further includes: taking a plurality of TS packets as a data packet based on the transmission specification; the timestamp is associated with the packet and stored in the collector for retrieval.
The number of the TS packets may be determined according to a carrying capacity of each IP data packet of socket communication, for example, the number of the TS packets is determined to be 7 according to 188 bytes of a fixed size of each TS packet and a protocol requirement, and then the 7 TS packets may be packed and the corresponding timestamps may be bound, so that the timestamps may be uniformly sent every time 7 TS packets are transmitted.
In this embodiment, the 7 TS packets and the time stamp may be placed in a collector for uniform transmission or extraction to other devices or processes. It will be understood that how many TS packets are specifically packetized as data packets depends on the input source. Ideally, there are 7 TS packets per IP packet, where we parse the IP packet to get several TS packets, and the converted timestamp for the next layer subscription to take.
In one embodiment, the collector may set a subscription interface that provides a subscription service to subscribe to send the data packets and associated timestamps. The subscription interface may be a message subscription mechanism adopting C + +, and provides a subscription interface to the outside. As long as the collector obtains the TS packet obtained by analyzing the SRT stream data packet and the corresponding timestamp, and reaches a certain pushing condition, the TS packet in the collector and the corresponding timestamp can be pushed, and the lower node, such as a module for performing packet processing, can obtain corresponding data without requesting the analyzing module, thereby being beneficial to further reducing delay.
The packetizing module 130 is configured to perform packetizing processing on the TS packets and the corresponding timestamps based on a preset protocol.
The TS packets in the collector can be collected through a TS packet input module, and the TS packets and the corresponding timestamps obtained after the SRT stream data packets are analyzed are generated to data packets of a corresponding protocol for transmission and transmission, so that the protocol format requirements of the TS packets generated by the SRT stream data packets by the lower node are met, and the subsequent decoding is facilitated.
Furthermore, the TS packet input module may obtain the corresponding TS packet by means of a subscription collector, thereby reducing the delay in the transmission process. It can be understood that, except between the TS packet input module and the collector, other functional modules with data transceiving functions may all adopt a subscription interface for subscription connection, so that the effect of reducing transmission delay can be obtained in the whole system of the electronic device. In one embodiment, the predetermined protocol includes a TCP protocol or a UDP protocol. Taking UDP protocol as an example, a TS collector may be subscribed through the TS packet input module, and 7 TS packets are indirectly acquired from the collector each time. And then, the TS packets are packaged according to the format requirement of a UDP protocol to obtain a plurality of UDP packets, and the UDP packets are sent to the next-stage node.
In an embodiment, the UDP packet may be sent in a multicast manner, and if the local device has a decoding module, the UDP packet and the corresponding timestamp may be sent to a local loopback address, and the decoding module may obtain the UDP packet in a multicast manner and perform decoding processing, so as to obtain low-delay video content.
It is understood that the specific implementation functions of the modules may refer to the implementation manner of the streaming media data processing device based on the SRT protocol as described in any one of the embodiments in fig. 1 to 3.
As can be seen from the above, the streaming media data processing apparatus based on the SRT protocol according to the present application obtains the SRT stream data packet, performs slice analysis on the SRT stream data packet, and performs packet processing with the timestamp obtained by local time conversion, so as to obtain streaming media data that can be normally played by a conventional playing device. The SRT stream data packet is used for transmitting the television program and outputting the signal after data conversion, so that the delay value of the output signal of the electronic equipment can be reduced, and the delay value of the television program played by the playing equipment is greatly reduced. A user can watch a high-definition and low-delay television program through the electronic equipment applying the method, and the development trend of subsequent network high-definition videos can be better met.
Referring to fig. 5, a structure of an electronic device according to an embodiment of the present application is shown.
The electronic device 200 may be a decoding device for SRT stream packet conversion, such as a television set-top box or a computer, a video decoder, or the like, or a relay device, or may be a playing device with SRT stream packet receiving function, such as a television, or the like. It is to be understood that the present application is not limited to the particular type of electronic device 200.
As shown in fig. 5, the electronic device 200 includes a processor 210 and a memory 220, and the processor 210 is electrically connected to the memory 220;
the memory 220 stores a computer program, and the processor 210 executes the following steps by calling the computer program stored in the memory 220:
acquiring an SRT stream data packet;
slicing and analyzing the SRT stream data packets according to TS standard to obtain a plurality of corresponding TS packets;
acquiring a local time value, and converting the local time value into a time stamp associated with the TS packet according to a TS standard;
and carrying out packet processing on the TS packet based on a preset protocol, and transmitting the TS packet and the corresponding timestamp.
It is understood that the type of the components of the processor 210 and the memory 220 may be any type according to the requirement, and the present application is not limited thereto.
In an embodiment, the processor 210 is further configured to:
acquiring a first handshake access mode of a remote server; adjusting a second handshake access mode of the current system according to the first handshake access mode; creating a socket link with the remote server according to an SRT protocol; and acquiring the SRT streaming data packet through the socket link.
In an embodiment, the processor 210 is further configured to:
the SRT stream packets are sliced according to the size of the TS packets and the header sync byte.
In an embodiment, the processor 210 is further configured to:
taking a plurality of TS packets as a data packet based on the transmission specification; and associating the timestamp with the data packet and storing the timestamp and the data packet in a collector for obtaining.
In an embodiment, the processor 210 is further configured to:
and the collector is provided with a subscription interface and provides subscription service to subscribe and send the data packet and the associated timestamp.
In an embodiment, the processor 210 is further configured to:
and setting a subscription interface, and providing subscription service to subscribe and send the packaged data.
For the implementation of the above steps, reference may be made to multiple embodiments of the SRT protocol-based streaming media data processing method shown in fig. 1-2, which are not described herein again.
In this embodiment, the electronic device and the SRT protocol-based streaming media data processing apparatus belong to the same concept as the SRT protocol-based streaming media data processing method in the above embodiments, and any method step provided in the SRT protocol-based streaming media data processing method embodiment may be run on the electronic device and the SRT protocol-based streaming media data processing apparatus.
The embodiments of the present application have been described in detail with reference to the drawings, but the present application is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present application within the knowledge of those skilled in the art.

Claims (10)

1. A streaming media data processing method based on SRT protocol is applied to electronic equipment, and is characterized in that the method comprises the following steps:
acquiring an SRT stream data packet;
slicing and analyzing the SRT stream data packets according to TS standard to obtain a plurality of corresponding TS packets;
acquiring a local time value, and converting the local time value into a time stamp associated with the TS packet according to a TS standard;
and carrying out packet processing on the TS packet based on a preset protocol, and transmitting the TS packet and the corresponding timestamp.
2. The streaming media data processing method based on the SRT protocol according to claim 1, wherein the acquiring the SRT streaming data packet comprises:
acquiring a first handshake access mode of a remote server;
adjusting a second handshake access mode of the current system according to the first handshake access mode;
creating a socket link with the remote server according to an SRT protocol;
and acquiring the SRT streaming data packet through the socket link.
3. The method for processing streaming media data based on the SRT protocol according to claim 1, wherein the parsing the SRT stream packet according to the TS standard comprises:
the SRT stream packets are sliced according to the size of the TS packets and the header sync byte.
4. The streaming media data processing method based on the SRT protocol as claimed in claim 1, wherein after the converting the local time value into the time stamp associated with the TS packet according to the TS standard, further comprising:
taking a plurality of TS packets as a data packet based on the transmission specification;
and associating the timestamp with the data packet and storing the timestamp and the data packet in a collector for obtaining.
5. The streaming media data processing method based on the SRT protocol as claimed in claim 4, wherein the collector sets a subscription interface, and provides a subscription service to subscribe and send the data packet and the associated timestamp.
6. The method of claim 1, wherein the TS packets are packetized based on a predetermined protocol and transmitted with the corresponding timestamps, further comprising:
and setting a subscription interface, and providing subscription service to subscribe and send the packaged data.
7. The SRT protocol-based streaming media data processing method according to any one of claims 1 to 7, wherein the preset protocol comprises a TCP protocol or a UDP protocol.
8. A streaming media data processing apparatus based on SRT protocol, the apparatus comprising:
the input module is used for acquiring an SRT stream data packet;
the analysis module is used for carrying out slice analysis on the SRT stream data packets according to TS standards to obtain a plurality of corresponding TS packets; acquiring a local time value, and converting the local time value into a time stamp associated with the TS packet according to a TS standard;
and the packaging module is used for packaging the TS packet based on a preset protocol and transmitting the TS packet and the corresponding timestamp.
9. The streaming media data processing device based on SRT protocol as claimed in claim 8, wherein the parsing module and the packaging module send and receive data through a subscription service.
10. An electronic device, characterized in that the electronic device comprises:
a processor; and
a memory, in which a computer program is stored, and the processor is configured to execute the streaming media data processing method based on the SRT protocol according to any one of claims 1 to 8by calling the computer program stored in the memory.
CN202110867709.1A 2021-07-28 2021-07-28 Streaming media data processing method and device based on SRT protocol and electronic equipment Pending CN113596580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110867709.1A CN113596580A (en) 2021-07-28 2021-07-28 Streaming media data processing method and device based on SRT protocol and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110867709.1A CN113596580A (en) 2021-07-28 2021-07-28 Streaming media data processing method and device based on SRT protocol and electronic equipment

Publications (1)

Publication Number Publication Date
CN113596580A true CN113596580A (en) 2021-11-02

Family

ID=78252134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110867709.1A Pending CN113596580A (en) 2021-07-28 2021-07-28 Streaming media data processing method and device based on SRT protocol and electronic equipment

Country Status (1)

Country Link
CN (1) CN113596580A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107277081A (en) * 2016-04-06 2017-10-20 北京优朋普乐科技有限公司 Section method for down loading and device, the stream media system of stream medium data
CN108391176A (en) * 2018-04-09 2018-08-10 四川百视通科技有限公司 The real time conversion system and its working method of a kind of RTMP agreements to HLS protocol
WO2020086452A1 (en) * 2018-10-22 2020-04-30 Radiant Communications Corporation Low-latency video internet streaming for management and transmission of multiple data streams
CN111193686A (en) * 2018-11-14 2020-05-22 北京开广信息技术有限公司 Media stream delivery method and server
CN111901688A (en) * 2020-09-03 2020-11-06 北京金数信数码科技有限公司 Unidirectional security data transmission structure and method for internal and external network isolation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107277081A (en) * 2016-04-06 2017-10-20 北京优朋普乐科技有限公司 Section method for down loading and device, the stream media system of stream medium data
CN108391176A (en) * 2018-04-09 2018-08-10 四川百视通科技有限公司 The real time conversion system and its working method of a kind of RTMP agreements to HLS protocol
WO2020086452A1 (en) * 2018-10-22 2020-04-30 Radiant Communications Corporation Low-latency video internet streaming for management and transmission of multiple data streams
CN111193686A (en) * 2018-11-14 2020-05-22 北京开广信息技术有限公司 Media stream delivery method and server
CN111901688A (en) * 2020-09-03 2020-11-06 北京金数信数码科技有限公司 Unidirectional security data transmission structure and method for internal and external network isolation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邸慧军 等: "《无人驾驶车辆目标检测与运动跟踪》", 北京理工大学出版社, pages: 10 *

Similar Documents

Publication Publication Date Title
US11196786B2 (en) Interface apparatus and method for transmitting and receiving media data
US10123079B2 (en) Method and apparatus for transmitting/receiving broadcast signal in hybrid broadcasting system
EP3273661B1 (en) Method for transmitting multimedia data in hybrid network
US8819714B2 (en) Ratings and quality measurements for digital broadcast viewers
US20140139735A1 (en) Online Media Data Conversion Method, Online Video Playing Method and Corresponding Device
JP5738865B2 (en) Distribution of MPEG-2TS multiplexed multimedia stream by selecting elementary packets of MPEG-2TS multiplexed multimedia stream
WO2018019239A1 (en) Program resource sharing processing set top box, system and method therefor
EP1847073A1 (en) High speed ethernet mac and phy apparatus with a filter based ethernet packet router with priority queuing and single or multiple transport stream interfaces
CN110337004B (en) Television program transmission method and system
US10477282B2 (en) Method and system for monitoring video with single path of video and multiple paths of audio
US9032453B2 (en) Method and system for multiplexed transport interface between demodulators (DEMODs) and set-top box (STB) system-on-chips (SoCs)
EP3643032B1 (en) Apparatuses and methods for live uplink adaptive streaming
CN104581205A (en) Sending end, receiving end and video transmission method and system
US20200021867A1 (en) Broadcast signal transmitting and receiving method and device
WO2009006811A1 (en) A digital tv voting method, server and system
CN108494792A (en) A kind of flash player plays the converting system and its working method of hls video flowings
CA2625025A1 (en) Ip broadcast system, and multiplexer, receiving apparatus and method used in ip broadcast system
JP7400875B2 (en) receiving device
EP1459540A1 (en) Method and apparatus for dynamic provisioning of ip-based services in a dvb network
KR101947111B1 (en) Method configuring and transmitting mmt transport packet
CN110602065A (en) Live broadcast stream pushing method and device
CN113596580A (en) Streaming media data processing method and device based on SRT protocol and electronic equipment
JP7188510B2 (en) Transmitting method and receiving device
Gatimu et al. Experimental study of low-latency HD VoD streaming using flexible dual TCP-UDP streaming protocol
JP2019087958A (en) Broadcast retransmission device, broadcast retransmission method, and monitor method

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