CN114697301A - Video stream transmission method and device - Google Patents

Video stream transmission method and device Download PDF

Info

Publication number
CN114697301A
CN114697301A CN202210375718.3A CN202210375718A CN114697301A CN 114697301 A CN114697301 A CN 114697301A CN 202210375718 A CN202210375718 A CN 202210375718A CN 114697301 A CN114697301 A CN 114697301A
Authority
CN
China
Prior art keywords
video stream
stream data
preset
transmitted
target video
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
CN202210375718.3A
Other languages
Chinese (zh)
Other versions
CN114697301B (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.)
Bnc Technologies Co ltd
Original Assignee
Bnc Technologies Co 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 Bnc Technologies Co ltd filed Critical Bnc Technologies Co ltd
Priority to CN202210375718.3A priority Critical patent/CN114697301B/en
Publication of CN114697301A publication Critical patent/CN114697301A/en
Application granted granted Critical
Publication of CN114697301B publication Critical patent/CN114697301B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter

Abstract

The invention discloses a video stream transmission method and a video stream transmission device, relates to the technical field of video transmission, and mainly aims to reduce the time delay of video stream transmission so as to ensure the real-time performance of video display. The main technical scheme of the invention is as follows: acquiring corresponding target video stream data based on a query request sent by a client; coding the target video stream data according to a preset coding mode; processing the coded target video stream data into video stream data to be transmitted by using a preset rule, wherein the preset rule is a processing rule set for ensuring the lowest delay of the coded target video stream data; and sending the video stream data to be transmitted to the client so that the client can analyze the video stream data to be transmitted in a decoding mode corresponding to the preset encoding mode. The invention is used for transmitting the video stream.

Description

Video stream transmission method and device
Technical Field
The present invention relates to the field of video transmission technologies, and in particular, to a video stream transmission method and apparatus.
Background
The intelligent port has more and more applications, and a remote control system of a port machine is one of important applications of port intelligent and automatic development. In the remote control system of the port machine, a video picture of a sling camera is a key picture for assisting a port machine remote control driver to execute the operation, so that the low-delay sling camera picture display can ensure the safety of the operation of controlling the sling by the driver in the port machine remote control system.
At present, the hoist camera adopts conventional high definition network camera core to customize, and 200 ten thousand pixel high definition network camera video display time delay are 250ms ~ 300ms, superpose again and transmit time delay and video display time delay to driver's visual interface network, and total time delay can be greater than 300ms, however, higher time delay can influence the real-time of customer end video display, and then reduces driver remote control's security.
Disclosure of Invention
In view of the foregoing, the present invention provides a video streaming method and apparatus, and mainly aims to reduce the delay of video streaming so as to ensure the real-time performance of video display at a client.
In order to solve the technical problem, the invention provides the following scheme:
in a first aspect, the present invention provides a video streaming method, comprising:
acquiring corresponding target video stream data based on a query request sent by a client;
coding the target video stream data according to a preset coding mode;
processing the coded target video stream data into video stream data to be transmitted by using a preset rule, wherein the preset rule is a processing rule set for ensuring the lowest delay of the coded target video stream data;
sending the video stream data to be transmitted to the client so that the client can analyze the video stream data to be transmitted in a decoding mode corresponding to the preset coding mode
In a second aspect, the present invention provides a video streaming apparatus, the apparatus comprising:
the acquisition unit is used for acquiring corresponding target video stream data based on a query request sent by a client;
the conversion unit is used for coding the target video stream data according to a preset coding mode;
the processing unit is used for processing the coded target video stream data obtained by the conversion unit into video stream data to be transmitted by using a preset rule, wherein the preset rule is a processing rule set for ensuring that the delay of the coded target video stream data is the lowest; and the sending unit is used for sending the video stream data to be transmitted, which is obtained by the processing unit, to the client so that the client can analyze the video stream data to be transmitted in a decoding mode corresponding to the preset encoding mode.
In order to achieve the above object, according to a third aspect of the present invention, there is provided a storage medium including a stored program, wherein the program, when executed, controls an apparatus on which the storage medium is located to perform the video streaming method of the first aspect.
To achieve the above object, according to a fourth aspect of the present invention, there is provided a processor for executing a program, wherein the program executes to perform the video streaming method of the first aspect.
By means of the technical scheme, when the video stream needs to be transmitted, the corresponding target video stream data is obtained based on a query request sent by a client, then the target video stream data is coded according to a preset coding mode, the coded target video stream data is processed into the video stream data to be transmitted by using a preset rule, the preset rule is a processing rule set for ensuring the minimum delay of the coded target video stream data, and finally the video stream data to be transmitted is sent to the client so that the client can analyze the video stream data to be transmitted in a decoding mode corresponding to the preset coding mode. By the video stream transmission scheme provided by the invention, the time delay of transmitting the video stream data to the client by the server can be reduced, so that the real-time performance of video display of the client is improved, the total time delay from the acquisition of the video stream data by the server to the video display of the video stream data by the client can be controlled within 180ms, a real-time video is provided for a user (driver) to remotely control the lifting appliance, the delay of the driver due to overlarge time delay is avoided, safety accidents are avoided, and the safety of remote control of the driver is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 shows a flow chart of a video streaming method provided by an embodiment of the present invention;
fig. 2 is a flow chart of another video streaming method provided by the embodiment of the invention;
fig. 3 is a block diagram illustrating a video streaming apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram illustrating another video streaming apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The intelligent port has more and more applications, and a remote control system of a port machine is one of important applications of port intelligent and automatic development. In the remote control system of the port machine, a video picture of a sling camera is a key picture for assisting a port machine remote control driver to execute the operation, so that the low-delay sling camera picture display can ensure the safety of the operation of controlling the sling by the driver in the port machine remote control system. However, the conventional high-definition network camera core is adopted for the current lifting appliance camera to be customized, the video display delay of the 200-ten-thousand-pixel high-definition network camera is 250-300 ms, the video display delay and the network transmission delay to the visual interface of a driver are superposed, and the total delay is larger than 300ms, so that the real-time performance of the video display of the client side is influenced by the higher delay, and the safety of the remote control of the driver is further reduced. To this end, an embodiment of the present invention provides a video streaming method, which can reduce a delay of video streaming transmission to ensure real-time performance of video display at a client, and the specific implementation steps of the method are as shown in fig. 1, and include:
101. and acquiring corresponding target video stream data based on the query request sent by the client.
In the step, the client specifically refers to central control video software in the port machine remote control system, a user (driver) can control the central control video software through a touch interface or a key to obtain a video query instruction, the client generates a query request through the video query instruction, the query request comprises query content of target video stream data, after receiving the query request sent by the client, the query request can be analyzed to obtain the query content, corresponding target video stream data is obtained according to the query content, the target video stream data is specifically collected by deploying a plurality of PAL analog cameras on a port machine lifting appliance, the analog cameras do not need to change IP addresses relative to high-definition cameras, only simple patch cord connection is needed, and the situation that port machine maintenance workers do not have professional knowledge for configuring the cameras is avoided, leading to a situation where the video picture of the camera cannot be displayed.
102. And coding the target video stream data according to a preset coding mode.
In this step, as shown in step 101, the target video stream data is collected by the PAL analog camera, so the file format of the collected video stream is a PAL video stream, and the preset encoding mode is to encode the PAL video stream into an h.264 protocol video stream, that is, the file format of the encoded target video stream data is an h.264 protocol video stream, specifically, the PAL video stream may be accessed to a haisi Hi3531D chip for encoding before encoding, so that the transmission process is optimized under the RTSP and RTP standard protocol framework, and the video encoding and decoding display delay can be reduced by performing subsequent transmission on the h.264 protocol video stream.
103. And processing the coded target video stream data into video stream data to be transmitted by using a preset rule.
The preset rule is a processing rule set for ensuring the minimum delay of the coded target video stream data. Since the present embodiment uses the haisi Hi3511D chip for encoding, and the frame types of the target video stream data encoded by the haisi platform hardware include I frame, P frame, SPS frame, SEI frame, and PPS frame, the frame type and frame length of the encoded target video stream data can be obtained first, the frame type can extract the preset frame length from the encoded target video stream data to create the RTP packet header corresponding to the frame type, then the length of the remaining frame except the preset frame length in the encoded target video stream data is detected, if the length of the remaining frame exceeds the optimal packing critical frame length, the length of the remaining frame can be packed based on the optimal packing critical frame length, if the length of the remaining frame except the preset frame length in the target video stream data does not exceed the optimal packing critical frame length, a plurality of RTP packets are obtained, and finally the RTP packets are packed with the RTP packet header respectively, the video stream data to be transmitted is obtained, encoded target video stream data of each frame type is packaged and transmitted separately, and the frame length of each RTP data packet is not greater than the optimal packaging critical frame length, so that the video stream delay can be reduced to the minimum, exemplarily, the frame length of the package is selected to be 1500 bytes, and the RTP packet header is generally created to be 12 bytes, so that the frame length corresponding to the payload data corresponding to the RTP data packet packaged by the RTP packet header is 1488 bytes, that is, 1488 bytes are the optimal packaging critical length, and the encoded target video stream data can be packaged and packaged as the video stream data to be transmitted in the lowest delay mode through the processing mode, so as to be transmitted in the subsequent step 104.
104. And sending the video stream data to be transmitted to the client so that the client can analyze the video stream data to be transmitted in a decoding mode corresponding to the preset encoding mode.
In this step, as can be seen from step 101, the client refers to the central control video software in the port machine remote control system, so that when the video stream data to be transmitted is sent to the client, the video stream data to be transmitted is encoded in a preset encoding manner, and therefore the client needs to decode the video stream data to be transmitted to display the video picture in the visual interface of the client, and in order to further reduce the delay, the video stream data to be transmitted can be decoded in a decoding manner corresponding to the preset encoding manner, so that the video picture of the video stream data to be transmitted can be displayed on the visual interface of the client, and further a user (driver) can control the lifting appliance through the visual picture transmitted in real time, and the encoding and decoding display delay can be reduced by the above manner, so that the total delay can be controlled within 180ms, and then the long-range manual control hoist of driver provides real-time video, avoids because of the time delay is too big, leads to driver's control delay, arouses the incident.
Based on the implementation manner shown in fig. 1, it can be seen that in the video stream transmission method provided in the embodiment of the present invention, when a video stream needs to be transmitted, first, corresponding target video stream data is obtained based on a query request sent by a client, then, the target video stream data is encoded according to a preset encoding manner, the encoded target video stream data is processed into video stream data to be transmitted by using a preset rule, where the preset rule is a processing rule set to ensure that delay of the encoded target video stream data is minimum, and finally, the video stream data to be transmitted is sent to the client, so that the client analyzes the video stream data to be transmitted in a decoding manner corresponding to the preset encoding manner. By the video stream transmission scheme provided by the invention, the time delay of transmitting the video stream data from the server to the client can be reduced, so that the real-time performance of video display of the client is improved, the total time delay from the acquisition of the video stream data from the server to the video display of the video stream data by the client can be controlled within 180ms, a real-time video is provided for a user (driver) to remotely control the lifting appliance, the phenomenon that the driver is slowly controlled due to overlarge time delay is avoided, safety accidents are avoided, and the remote control safety of the driver is improved.
Further, a preferred embodiment of the present invention is a detailed description of a process of video streaming based on the foregoing fig. 1, and its specific steps are shown in fig. 2, including:
201. and receiving a query request sent by a client.
In this step, since the client specifically refers to the central control video software in the port machine remote control system, a user (driver) can obtain a video query instruction by operating a touch interface or a key of the central control video software, the client generates a query request through the video query instruction, and an execution main body of the scheme is a video server, so that the subsequent step 202 can be executed by receiving the query request sent by the client.
202. And analyzing the query request to obtain corresponding query content.
In this step, since the query request includes information for acquiring video stream data, the query request may be analyzed to obtain corresponding query content, where the query content includes parameter information, such as camera identity information, channel information, and time information, of the video stream data, and the query content may be set by user-defined in an earlier stage, or may be updated in real time according to a use requirement, which is not limited in this embodiment.
203. And acquiring corresponding specified video stream data based on the query content.
In this step, as can be seen from step 202, the query content includes parameter information that requires to acquire video stream data, and therefore, specified video stream data acquired by a plurality of PAL analog cameras can be acquired through the query content, where the specified video stream data specifically refers to video stream data acquired by a plurality of PAL analog cameras respectively.
According to the method of step 201 and 203, the query request sent by the client can be analyzed as the query content, and the corresponding specified video stream data is obtained based on the query content, so that the accuracy of obtaining the video stream data can be improved.
204. And splicing the appointed video stream data according to a preset mode to obtain target video stream data.
In this step, the preset mode represents a picture display mode of splicing the video stream data respectively acquired by the plurality of PAL analog cameras according to preset positions in step 203, and since each PAL analog camera in this embodiment can respectively establish a corresponding number of channels according to the number of PAL analog cameras after accessing the haisi Hi3531D chip, and in order to have a better visual effect in the subsequent picture display process, exemplarily, assuming that the number of PAL analog cameras is 4, the number of channels corresponding to PAL analog cameras after accessing the haisi Hi3531D chip is 4, therefore, the designated video stream data corresponding to the PAL analog cameras can be spliced according to the positions of the PAL analog cameras on the hanger to achieve the effect of displaying the video pictures corresponding to the plurality of designated video stream data in one visual interface, specifically, the identification information corresponding to the designated video stream data can be obtained first, the method comprises the steps of adjusting appointed video stream data to a preset position based on identification information, splicing the appointed video stream data adjusted to the preset position, wherein the identification information comprises identity information of a PAL analog camera and position information arranged on a lifting appliance, and adjusting the preset positions of a plurality of appointed video stream data through the identity information of the PAL analog camera and the position information arranged on the lifting appliance, so that a video picture corresponding to target video stream data formed after subsequent splicing can be presented as a preset picture display effect.
According to the method in the step, the appointed video stream data can be spliced according to the preset position, so that the video picture corresponding to the target video stream data formed after subsequent splicing can be presented as the preset picture display effect.
Further, the target video stream data can be stored in real time.
Specifically, since the target video stream data is a multiple-in-one video display picture formed by splicing a plurality of designated video stream data, by storing the target video stream data, it is convenient for maintenance/security personnel to simultaneously view multiple-in-one picture videos without separately viewing the video videos, thereby improving the subsequent maintenance convenience of the maintenance/security personnel.
205. And encoding the target video stream data according to a preset encoding mode.
This step is combined with the description of step 102 in the above method, and the same contents are not described herein again. It should be noted that, as shown in step 203, after the multiple PAL analog cameras are connected to the haisi Hi3531D chip, multiple channels corresponding to the number of PAL analog cameras may be established, specifically, an N channel of the V1 device may be established, and a V0 device and a coding channel may be virtualized, the N channel of the V1 device is bound to the N channel of the V0 device, and then the V0 device is bound to the coding channel, so that common coding of multiple paths of specified video stream data is implemented, and thus, multiple paths of PAL system video streams are coded into one path of h.264 protocol video stream, and delay in video stream data transmission is further reduced.
According to the method of the step, the target video stream data is coded according to the preset coding mode, so that the video coding and decoding display delay can be reduced by carrying out subsequent transmission.
206. And acquiring the frame type and the frame length of the encoded target video stream data.
In this step, the frame type and frame length of the encoded target video stream data may be directly known, since this embodiment is based on the haisi Hi3531D chip for encoding, that is, the transmission process is optimized under the RTSP and RTP standard protocol framework, the frame type of the encoded target video stream data is more, and includes I frame, P frame, SPS frame, SEI frame, and PPS frame, whereas since the RTP packet needs to be assembled before the video stream data is transmitted to the client under the RTSP and RTP standard protocol framework, if the encoding target video stream data of different frame types is assembled, the delay of the video stream data may be increased, therefore, the frame type and frame length of the encoded target video stream data may be obtained first, and the subsequent step 207 is avoided.
207. And extracting the length of a preset frame from the encoded target video stream data based on the frame type to create an RTP packet header.
In this step, since the group RTP packet needs to be created first, after the frame type of the encoded target video stream data is obtained, a preset frame length may be extracted from the encoded target video stream data to create the RTP of the type, and the created RTP packet header is generally 12 bytes, so that the preset frame length corresponding to 12 bytes may be extracted from the frame length of the target video stream data to create the RTP packet header.
208. And detecting whether the length of the residual frame excluding the preset frame length in the encoded target video stream data is greater than the specified length in real time.
In this step, the specified length indicates the length of the payload data of the RTP packet excluding the header portion of the RTP packet, which specifically indicates a frame length corresponding to 1488 bytes, while since the length of a frame in the encoded target video stream data is uncertain, and the span of the number of bytes corresponding to the frame length is large, it is necessary to perform real-time detection on the remaining frame length excluding the preset frame length extracted from the RTP packet header, if the frame length is greater than the specified length, step 209a is performed, and if the frame length is not greater than the specified length, step 209b is performed, so as to ensure that the length of the frame corresponding to the RTP packet obtained in step 209 is within the length range of the payload data.
209a, packing the residual frame length except the preset frame length in the encoded target video stream data according to the specified length to obtain an RTP data packet.
In this step, the length of the remaining frame excluding the preset frame length in the encoded target video stream data is uncertain, and therefore, in order to ensure that the transmission delay of the RTP packet is the lowest, the length of the remaining frame in the target video stream data may be packed according to the specified length corresponding to 1488 bytes, so as to perform step 210.
209b, directly packaging the residual frame length except the preset frame length in the target video stream data to be coded to obtain an RTP data packet.
In this step, since the remaining frame length excluding the preset frame length in the target video stream data to be encoded is gradually reduced along with the packing according to the specified length, when the remaining frame length in the target video stream data is reduced to be not greater than the specified length or is not greater than the specified length after the first detection, the remaining frame length may be directly packed so as to execute step 210, and in order to stop the packing process at the right time, an end flag may be created after the remaining frame length is detected to be not greater than the specified length, so as to avoid the continuous operation of the packing process.
210. And encapsulating each RTP data packet with an RTP packet header respectively according to the sequence to obtain video stream data to be transmitted.
In this step, the data packets and the RTP packet headers need to be packaged and then sent to the client, and since the number of the RTP packets may be one or more, when there are a plurality of RTP packets, each RTP packet needs to be sequentially and respectively packaged with the RTP packet headers one by one to obtain video stream data to be transmitted, specifically, generation information of the RTP packets may be obtained first, an order identifier of the RTP packets is determined based on a time parameter in the generation information, each RTP packet and the RTP packet headers are respectively packaged according to the order identifier to obtain video stream data to be transmitted, wherein the generation information includes the time parameter, the length parameter, and the like of the RTP packet, so that each RTP packet can be given a corresponding order identifier by the time parameter, and then each RTP packet and the RTP packet headers are respectively packaged according to the order identifier, a plurality of video stream data to be transmitted arranged as needed is formed so as to perform step 211.
According to the method of step 206-210, the encoded target video stream data of each frame type is packaged and sent separately, and the frame length of each RTP data is not greater than the specified length, so that the corresponding frame length of the obtained RTP packet is within the length range of the payload data, and the delay of the video stream data to be transmitted formed by the RTP packet header packaging packet can be minimized.
211. And sending the video stream data to be transmitted to the client so that the client can analyze the video stream data to be transmitted in a decoding mode corresponding to the preset encoding mode.
This step is combined with the description of step 104 in the above method, and the same contents are not described herein again.
As can be seen from the implementation manner of fig. 2, in the video stream transmission method provided in the embodiment of the present invention, when a video stream needs to be transmitted, the query request may be analyzed by receiving the query request sent by the client to obtain the corresponding query content, then the corresponding specified video stream data is obtained based on the query content, which can improve the accuracy of obtaining the video stream data, then the specified video stream data is spliced according to the preset manner to obtain the target video stream data, the specified video stream data is spliced according to the preset position, so that a video picture corresponding to the target video stream data formed after subsequent splicing can be presented with a preset picture display effect, the target video stream data is encoded according to the preset encoding manner, so that the subsequent transmission can reduce the video encoding and decoding display delay, and obtain the frame type and the frame length of the encoded target video stream data, extracting a preset frame length from encoded target video stream data to create an RTP packet header based on the frame type, detecting whether the length of a residual frame in the encoded target video stream data after the preset frame length is removed is larger than a specified length in real time, if so, packaging the length of the residual frame in the encoded target video stream data after the preset frame length is removed according to the specified length to obtain RTP data packets, if not, directly packaging the length of the residual frame in the encoded target video stream data after the preset frame length is removed to obtain RTP data packets, sequentially and respectively packaging each RTP data packet with the RTP packet header to obtain video stream data to be transmitted, and independently packaging and transmitting the encoded target video stream data of each frame type, wherein the frame length of each RTP data is not larger than the specified length, so that the lengths of the obtained RTP data packets corresponding to frames are all within the range of effective load data length, the delay of the video stream data to be transmitted formed by the video stream data to be transmitted and the RTP packet header packaging packet can be reduced to the minimum, the video stream data to be transmitted is sent to the client, so that the client can analyze the video stream data to be transmitted in a decoding mode corresponding to a preset coding mode, the client can display a video picture in a visual interface of the client only by decoding the video stream data to be transmitted, and in order to further reduce the delay, the video stream data to be transmitted can be decoded in a decoding mode corresponding to the preset coding mode, so that the video picture of the video stream data to be transmitted can be displayed on the visual interface of the client, a user (a driver) can control a lifting appliance through the visual picture transmitted in real time, the coding and decoding display delay can be reduced through the mode, and the total delay can be controlled within 180ms, and then the long-range manual control hoist of driver provides real-time video, avoids because of the time delay is too big, leads to driver's control delay, arouses the incident.
Further, as an implementation of the method embodiment shown in fig. 1-2, an embodiment of the present invention provides a video streaming apparatus, where the apparatus is configured to reduce a delay of video streaming, so as to ensure real-time performance of video display at a client. The embodiment of the apparatus corresponds to the foregoing method embodiment, and details in the foregoing method embodiment are not repeated in this embodiment for convenience of reading, but it should be clear that the apparatus in this embodiment can correspondingly implement all the contents in the foregoing method embodiment. As shown in fig. 3 in detail, the apparatus includes:
an obtaining unit 31, configured to obtain corresponding target video stream data based on a query request issued by a client;
a conversion unit 32, configured to encode the target video stream data obtained by the obtaining unit 31 according to a preset encoding manner;
a processing unit 33, configured to process the encoded target video stream data obtained by the converting unit 32 into video stream data to be transmitted by using a preset rule, where the preset rule is a processing rule set to ensure that the delay of the encoded target video stream data is the lowest;
a sending unit 34, configured to send the video stream data to be transmitted obtained by the processing unit 33 to the client, so that the client analyzes the video stream data to be transmitted in a decoding manner corresponding to the preset encoding manner.
Further, as can be seen from fig. 4, the acquiring unit 31 includes:
a receiving module 311, configured to receive the query request sent by the client;
the parsing module 312 is configured to parse the query request obtained by the receiving module 311 to obtain corresponding query contents:
a first obtaining module 313, configured to obtain corresponding specified video stream data based on the query content obtained by the parsing module 312;
the splicing module 314 is configured to splice the specified video stream data obtained by the first obtaining module 313 according to a preset manner, so as to obtain the target video stream data.
Further, as shown in fig. 4, the splicing module 314 includes:
a first obtaining submodule 3141, configured to obtain identification information corresponding to the specified video stream data;
an adjusting sub-module 3142, configured to adjust the specified video stream data to a preset position based on the identification information obtained by the first obtaining sub-module 3141;
a splicing submodule 3143, splicing the specified video stream data adjusted to the preset position by the adjusting submodule 3142.
Further, as can be seen from fig. 4, the processing unit 33 includes:
a second obtaining module 331, configured to obtain a frame type and a frame length of the encoded target video stream data;
a creating module 332, configured to extract a preset frame length from the encoded target video stream data based on the frame type obtained by the second obtaining module 331 to create an RTP packet header;
a detecting module 333, configured to detect, in real time, whether the length of a remaining frame excluding the preset frame length extracted by the creating module 332 in the encoded target video stream data is greater than a specified length;
a packing module 334, configured to, if the detecting module 333 detects that the length of a remaining frame in the encoded target video stream data is greater than a specified length, pack the length of the remaining frame in the encoded target video stream data according to the specified length to obtain an RTP packet;
the packetizing module 334 is further configured to, if the detecting module 333 detects that the length of the remaining frame in the encoded target video stream data is not greater than a specified length, directly packetize the length of the remaining frame in the encoded target video stream data to obtain the RTP packet;
an encapsulating module 335, configured to encapsulate, in sequence, each RTP data packet obtained by the encapsulating module 334 and the RTP packet header obtained by the creating module 332 respectively, so as to obtain the video stream data to be transmitted.
Further, as shown in fig. 4, the encapsulation module 335 includes:
a second obtaining sub-module 3351, configured to obtain generation information of the RTP data packet;
a determining sub-module 3352, configured to determine an order identifier of the RTP packet based on the time parameter in the generation information obtained by the second obtaining sub-module 3351;
and an encapsulating submodule 3353, configured to encapsulate, according to the sequence identifier obtained by the determining submodule 3352, each RTP data packet and the RTP packet header respectively, so as to obtain the video stream data to be transmitted.
Further, as can be seen from fig. 4, the apparatus further includes:
a storage unit 35 for storing the target video stream data obtained by the obtaining unit 31 in real time.
Further, an embodiment of the present invention further provides a storage medium, where the storage medium is used to store a computer program, where the computer program is run to control a device in which the storage medium is located to execute the video streaming method described in fig. 1-2 above.
Further, an embodiment of the present invention further provides a processor, where the processor is configured to execute a program, where the program executes to perform the video streaming method described in fig. 1-2 above.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method and apparatus described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are used to distinguish the embodiments, and do not represent merits of the embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In addition, the memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
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.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
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 so forth) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A video streaming method, comprising:
acquiring corresponding target video stream data based on a query request sent by a client;
coding the target video stream data according to a preset coding mode;
processing the coded target video stream data into video stream data to be transmitted by using a preset rule, wherein the preset rule is a processing rule set for ensuring the lowest delay of the coded target video stream data;
and sending the video stream data to be transmitted to the client so that the client can analyze the video stream data to be transmitted in a decoding mode corresponding to the preset encoding mode.
2. The method of claim 1, wherein obtaining the corresponding target video stream data based on the query request issued by the client comprises:
receiving the query request sent by the client;
analyzing the query request to obtain corresponding query content:
acquiring corresponding specified video stream data based on the query content;
and splicing the specified video stream data according to a preset mode to obtain the target video stream data.
3. The method of claim 2, wherein splicing the specified video stream data according to a preset manner comprises:
acquiring identification information corresponding to the specified video stream data;
adjusting the specified video stream data to a preset position based on the identification information;
and splicing the appointed video stream data adjusted to the preset position.
4. The method according to claim 1, wherein processing the encoded target video stream data into the video stream data to be transmitted by using a preset rule comprises:
acquiring the frame type and the frame length of the encoded target video stream data;
extracting a preset frame length from the encoded target video stream data based on the frame type to create an RTP packet header;
detecting whether the length of the residual frame excluding the preset frame length in the coded target video stream data is larger than a specified length in real time;
if so, packing the length of the residual frame in the video stream data to be transmitted according to the specified length to obtain an RTP data packet;
if not, directly packaging the residual frame length in the video stream data to be transmitted to obtain the RTP data packet;
and encapsulating each RTP data packet with the RTP packet header respectively according to the sequence to obtain the video stream data to be transmitted.
5. The method according to claim 4, wherein encapsulating each RTP packet with an RTP packet header in sequence to obtain the video stream data to be transmitted comprises:
acquiring generation information of the RTP data packet;
determining an order identifier of the RTP data packet based on a time parameter in the generation information;
and respectively encapsulating each RTP data packet and the RTP packet header according to the sequence identifier so as to obtain the video stream data to be transmitted.
6. The method of claim 1, further comprising:
and storing the target video stream data in real time.
7. A video streaming apparatus, comprising:
the acquisition unit is used for acquiring corresponding target video stream data based on a query request sent by a client;
the conversion unit is used for coding the target video stream data according to a preset coding mode;
the processing unit is used for processing the coded target video stream data obtained by the conversion unit into video stream data to be transmitted by using a preset rule, wherein the preset rule is a processing rule set for ensuring that the delay of the coded target video stream data is the lowest;
and the sending unit is used for sending the video stream data to be transmitted, which is obtained by the processing unit, to the client so that the client can analyze the video stream data to be transmitted in a decoding mode corresponding to the preset encoding mode.
8. The apparatus of claim 7, wherein the obtaining unit comprises:
the receiving module is used for receiving the query request sent by the client;
the analysis module is used for analyzing the query request to obtain query contents:
the first acquisition module is used for acquiring corresponding specified video stream data based on the query content acquired by the analysis module;
and the splicing module is used for splicing the appointed video stream data obtained by the first obtaining module according to a preset mode so as to obtain the target video stream data.
9. A storage medium characterized by comprising a stored program, wherein a device on which the storage medium is located is controlled to execute the video streaming method according to any one of claims 1 to 6 when the program is executed.
10. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to execute the video streaming method according to any one of claims 1 to 6 when running.
CN202210375718.3A 2022-04-11 2022-04-11 Video streaming transmission method and device Active CN114697301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210375718.3A CN114697301B (en) 2022-04-11 2022-04-11 Video streaming transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210375718.3A CN114697301B (en) 2022-04-11 2022-04-11 Video streaming transmission method and device

Publications (2)

Publication Number Publication Date
CN114697301A true CN114697301A (en) 2022-07-01
CN114697301B CN114697301B (en) 2023-10-20

Family

ID=82142662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210375718.3A Active CN114697301B (en) 2022-04-11 2022-04-11 Video streaming transmission method and device

Country Status (1)

Country Link
CN (1) CN114697301B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150208103A1 (en) * 2012-08-08 2015-07-23 National University Of Singapore System and Method for Enabling User Control of Live Video Stream(s)
CN109792544A (en) * 2016-06-02 2019-05-21 彗星科技有限责任公司 Method and apparatus for spreading defeated panoramic video
CN110401820A (en) * 2019-08-15 2019-11-01 北京迈格威科技有限公司 Multipath video processing method, device, medium and electronic equipment
CN113259715A (en) * 2021-05-07 2021-08-13 广州小鹏汽车科技有限公司 Method and device for processing multi-channel video data, electronic equipment and medium
CN113473165A (en) * 2021-06-30 2021-10-01 中国电信股份有限公司 Live broadcast control system, live broadcast control method, device, medium and equipment
CN113766317A (en) * 2021-03-08 2021-12-07 京东城市(北京)数字科技有限公司 Video transmission method, video transmission device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150208103A1 (en) * 2012-08-08 2015-07-23 National University Of Singapore System and Method for Enabling User Control of Live Video Stream(s)
CN109792544A (en) * 2016-06-02 2019-05-21 彗星科技有限责任公司 Method and apparatus for spreading defeated panoramic video
CN110401820A (en) * 2019-08-15 2019-11-01 北京迈格威科技有限公司 Multipath video processing method, device, medium and electronic equipment
CN113766317A (en) * 2021-03-08 2021-12-07 京东城市(北京)数字科技有限公司 Video transmission method, video transmission device, electronic equipment and storage medium
CN113259715A (en) * 2021-05-07 2021-08-13 广州小鹏汽车科技有限公司 Method and device for processing multi-channel video data, electronic equipment and medium
CN113473165A (en) * 2021-06-30 2021-10-01 中国电信股份有限公司 Live broadcast control system, live broadcast control method, device, medium and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘志忠;朱秀昌;: "基于i.MX27的无线视频监控系统的设计与实现", 电视技术, no. 12 *

Also Published As

Publication number Publication date
CN114697301B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
US20230104968A1 (en) Transmitting device, transmitting method, receiving device, and receiving method
RU2015102812A (en) VIDEO DATA CONCEPT
EP3873098A1 (en) Transmission device, transmission method, reception device, and reception method
US20230043987A1 (en) Image processing apparatus and method
EP3888375A1 (en) Method, device, and computer program for encapsulating media data into a media file
WO2019184822A1 (en) Multi-media file processing method and device, storage medium and electronic device
WO2022062860A1 (en) Data processing method, apparatus and device for point cloud media, and storage medium
CN114079781B (en) Data processing method, device and equipment of point cloud media and storage medium
WO2023207119A1 (en) Immersive media processing method and apparatus, device, and storage medium
CN115668937A (en) Methods, apparatus and articles of manufacture to generate packed video frames for volumetric and immersive video bitstreams
CN114697301B (en) Video streaming transmission method and device
CN110570614B (en) Video monitoring system and intelligent camera
CN104904170B (en) The method and apparatus being effectively prioritized to the key element in the video flowing that is transmitted for low bandwidth
CN111107282B (en) Video switching method, video switcher, electronic device and storage medium
EP3029940B1 (en) Method and device for post processing of a video stream
CN111064717B (en) Data encoding method, data decoding method, related terminal and device
CN109743627B (en) Playing method of digital movie package based on AVS + video coding
CN114554243B (en) Data processing method, device and equipment of point cloud media and storage medium
WO2020135527A1 (en) Multimedia data processing
CN103916671A (en) OSD dynamic overlaying method and device
CN109246434B (en) Video encoding method, video decoding method and electronic equipment
CN116781973B (en) Video encoding and decoding method and device, storage medium and electronic equipment
WO2023029689A1 (en) Multimedia data sharing method, media sharing server, terminal, electronic device, and computer-readable storage medium
CN116962370A (en) Data stream encapsulation method, device, equipment, storage medium and program product
GB2620583A (en) Method, device, and computer program for optimizing dynamic encapsulation and parsing of content data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant