CN111327896A - Video transmission method and device, electronic equipment and readable storage medium - Google Patents

Video transmission method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN111327896A
CN111327896A CN201811525787.8A CN201811525787A CN111327896A CN 111327896 A CN111327896 A CN 111327896A CN 201811525787 A CN201811525787 A CN 201811525787A CN 111327896 A CN111327896 A CN 111327896A
Authority
CN
China
Prior art keywords
video
code stream
data
random access
data code
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
CN201811525787.8A
Other languages
Chinese (zh)
Other versions
CN111327896B (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201811525787.8A priority Critical patent/CN111327896B/en
Publication of CN111327896A publication Critical patent/CN111327896A/en
Application granted granted Critical
Publication of CN111327896B publication Critical patent/CN111327896B/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/164Feedback from the receiver or from the transmission channel
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process

Abstract

The embodiment of the invention provides a video transmission method, a video transmission device, electronic equipment and a readable storage medium, by encoding the video source data in the video buffer queues, the corresponding random access frames in different video buffer queues are the collected image frames at the same moment, simultaneously adding parameter sets including code rate, spatial resolution, temporal resolution and random access frame time interval of data code stream obtained by encoding of each video encoder in a plurality of video encoders, so that under the condition of bandwidth fluctuation of a transmitting end, by receiving the packet loss information of the current video reconstruction data obtained by decoding and sent by a decoder and the network delay data of the current video reconstruction data reaching the decoder, the data code stream is switched in real time by combining the parameter set, so that the decoder decodes to obtain video reconstruction data, and the video reconstruction data displays clearer and smoother pictures.

Description

Video transmission method and device, electronic equipment and readable storage medium
Technical Field
The invention relates to the technical field of video source data coding transmission, in particular to a video transmission method, a video transmission device, electronic equipment and a readable storage medium.
Background
Conventional video surveillance systems are typically built into a private network. For example, the camera, the storage server and the client are all located in a special video monitoring local area network, and the client can watch the real-time video image of the camera through decoding a video code stream by a decoder or watch the historical video image in the storage server on demand. The closed video surveillance system is isolated from the internet and network bandwidth is guaranteed in the dedicated video surveillance lan where the video stream is typically transmitted using Real-time Transport Protocol (RTP).
However, with the development of video monitoring systems, the video monitoring systems are applied more deeply and more voluminous. There is a growing need for a complete video surveillance system that slowly extends from the video surveillance lan area to the internet area. The camera and the storage server are located in one video surveillance local area network, but the decoder is located in another video surveillance local area network; or the decoder is located directly in the internet. A security boundary is sometimes required to isolate between the video surveillance lan and the internet. In such a case, when video images are transmitted by using the conventional RTP, since the bandwidth of the internet cannot be guaranteed, the viewing quality of the video images at the client cannot be guaranteed due to the fluctuation of the network bandwidth of the internet in real-time video images transmitted to the decoder or video images in the on-demand storage server.
Disclosure of Invention
In view of the above, an object of the present application is to provide a video transmission method, apparatus, electronic device and readable storage medium to improve the above problem.
The embodiment of the application provides a video data transmission method, which is applied to image acquisition equipment, wherein the image acquisition equipment comprises a plurality of video encoders, each video encoder corresponds to a video cache queue and is used for caching video source data, and the video data transmission method comprises the following steps:
random access frame coding is carried out on video source data in each video cache queue, so that corresponding random access frames in different video cache queues are acquired image frames at the same moment, wherein the same video cache queue comprises a plurality of random access frames, and each random access frame in the plurality of random access frames corresponds to the acquired image frames at different moments;
encoding the video source data by utilizing each video encoder, and adding a parameter set in front of the random access frame to obtain a corresponding data code stream;
and determining whether to switch the current data code stream transmitted to a decoder according to video reconstruction data receiving information fed back by the decoder, and if the current data code stream is determined to need to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing the next random access frame so that the decoder decodes the target data code stream to obtain corresponding video reconstruction data.
Further, the step of performing random access frame coding on the video source data in each video buffer queue so that each random access frame in the video source data is an acquired image frame at the same time includes:
for the video source data in each video buffer queue, performing down-sampling on the video source data to obtain an image sequence to be coded, and dividing the image sequence to be coded into a preset number of image slices;
and carrying out video coding on the image slices in the corresponding image sequence by utilizing each video coder to obtain random access frames corresponding to the coded image slices, wherein each random access frame in the video source data is an acquired image frame at the same moment.
Further, the step of determining whether to switch the current data code stream transmitted to the decoder according to the video reconstruction data receiving information fed back by the decoder, and if it is determined that the current data code stream needs to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing a next random access frame includes:
receiving packet loss information of current video reconstruction data obtained by decoding and sent by a decoder and network delay data of the current video reconstruction data reaching the decoder;
judging whether a current data code stream which is transmitted to the decoder and corresponds to the current video reconstruction data needs to be switched or not according to the packet loss information and the network delay data;
and if the current data code stream needs to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing the next random access frame.
Further, the step of determining whether to switch the current data code stream corresponding to the current video reconstruction data transmitted to the decoder according to the packet loss information and the network delay data includes:
if the packet loss information indicates that packet loss occurs to the current video reconstruction data, determining that switching needs to be performed on a current data code stream which is transmitted to the decoder and corresponds to the current video reconstruction data;
and if the packet loss information indicates that no packet loss occurs in the current video reconstruction data, judging whether the current data code stream needs to be switched according to the network delay data.
Further, the step of determining whether to switch the current data code stream according to the network delay data includes:
if the network delay data is in a preset delay range, determining that the current data code stream does not need to be switched;
and if the network delay data is smaller than the minimum value in the preset delay range, determining that the current data code stream needs to be switched.
Further, the parameter set includes a code rate, a spatial resolution, a temporal resolution, and a random access frame time interval of a data code stream encoded by each of the plurality of video encoders, and when the packet loss information indicates that a packet loss occurs in the current video reconstruction data and the next random access frame is accessed, the step of switching the current data code stream to a target data code stream according to the parameter set includes:
when accessing the next random access frame, obtaining a target data code stream according to the code rate, the spatial resolution, the temporal resolution and the random access frame time interval of the data code stream coded by each video coder in the plurality of video coders in the parameter set, wherein the code rate of the target data code stream is smaller than the code rate of the current data code stream;
and switching the current data code stream to the target data code stream.
Further, the parameter set includes a code rate, a spatial resolution, a temporal resolution, and a random access frame time interval of a data code stream encoded by each of the plurality of video encoders, and when the network delay data is smaller than a minimum value in the preset delay range, the step of switching the current data code stream to a target data code stream according to the parameter set when accessing a next random access frame includes:
when accessing the next random access frame, obtaining a target data code stream according to the code rate, the spatial resolution, the temporal resolution and the random access frame time interval of the data code stream coded by each video coder in the plurality of video coders in the parameter set, wherein the code rate of the target data code stream is greater than the code rate of the current data code stream;
and switching the current data code stream to the target data code stream.
An embodiment of the present invention further provides a video data transmission device applied to an image capturing device, where the image capturing device includes a plurality of video encoders, each video encoder includes a video buffer queue for buffering video source data, and the video data transmission device includes:
the frame synchronization control module is used for carrying out random access frame coding on video source data in each video cache queue so that corresponding random access frames in different video cache queues are acquired image frames at the same moment, wherein the same video cache queue comprises a plurality of random access frames, and each random access frame in the plurality of random access frames corresponds to the acquired image frames at different moments; the data coding module is used for coding the video source data by utilizing each video coder and adding a parameter set in front of the random access frame to obtain a corresponding data code stream;
and the data code stream switching module is used for determining whether to switch the current data code stream transmitted to the decoder according to the video reconstruction data receiving information fed back by the decoder, and if the current data code stream is determined to need to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing the next random access frame so that the decoder decodes the target data code stream to obtain corresponding video reconstruction data.
An embodiment of the present invention further provides an electronic device, where the electronic device includes:
a storage medium;
a processor, said processor comprising a plurality of video encoders, each video encoder comprising a video buffer queue for buffering video data; and
a video data transmission apparatus stored in the storage medium and including software functional modules executed by the processor, the apparatus comprising:
the frame synchronization control module is used for carrying out random access frame coding on video source data in each video cache queue so that corresponding random access frames in different video cache queues are acquired image frames at the same moment, wherein the same video cache queue comprises a plurality of random access frames, and each random access frame in the plurality of random access frames corresponds to the acquired image frames at different moments; the data coding module is used for coding the video source data by utilizing each video coder and adding a parameter set in front of the random access frame to obtain a corresponding data code stream;
and the data code stream switching module is used for determining whether to switch the current data code stream transmitted to the decoder according to the video reconstruction data receiving information fed back by the decoder, and if the current data code stream is determined to need to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing the next random access frame so that the decoder decodes the target data code stream to obtain corresponding video reconstruction data.
An embodiment of the present invention further provides a readable storage medium, where a computer program is stored, and when the computer program is executed, the video data transmission method is implemented.
The embodiment of the invention provides a video transmission method, a video transmission device, electronic equipment and a readable storage medium, by encoding the video source data in the video buffer queues, the corresponding random access frames in different video buffer queues are the collected image frames at the same moment, simultaneously adding parameter sets including code rate, spatial resolution, temporal resolution and random access frame time interval of data code stream obtained by encoding of each video encoder in a plurality of video encoders, so that under the condition of bandwidth fluctuation of a transmitting end, by receiving the packet loss information of the current video reconstruction data obtained by decoding and sent by a decoder and the network delay data of the current video reconstruction data reaching the decoder, the data code stream is switched in real time by combining the parameter set, so that the decoder decodes to obtain video reconstruction data, and the video reconstruction data displays clearer and smoother pictures.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Fig. 2 is a flowchart of a video data transmission method according to an embodiment of the present application.
Fig. 3 is a flowchart of the sub-steps of step S1 in fig. 2.
Fig. 4 is a schematic diagram of a video data transmission method according to an embodiment of the present application.
Fig. 5 is a flowchart of the sub-steps of step S3 in fig. 3.
Fig. 6 is another flowchart of a video data transmission method according to an embodiment of the present application.
Fig. 7 is another schematic diagram of a video data transmission method according to an embodiment of the present application.
Fig. 8 is a functional block diagram of a video data transmission apparatus according to an embodiment of the present application.
Icon: 100-an electronic device; 110-video data transmission means; 111-frame synchronization control module; 112-a data encoding module; 113-data code stream switching module; 120-a processor; 130-storage medium.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
As shown in fig. 1, the embodiment of the present invention provides an electronic device 100 based on the above research findings, where the electronic device 100 includes a storage medium 130, a processor 120, and a video data transmission apparatus 110.
The storage medium 130 is electrically connected to the processor 120, directly or indirectly, to enable transmission or interaction of data. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The video data transmission apparatus 110 includes at least one software functional module that can be stored in the storage medium 130 in the form of software or firmware (firmware).
The processor 120 is configured to execute an executable computer program stored in the storage medium 130, for example, a software functional module and a computer program included in the video data transmission apparatus 110, so as to implement a video data transmission method.
The storage medium 130 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The storage medium 130 is used for storing a program, and the processor 120 executes the program after receiving the execution instruction.
The processor 120 may be an integrated circuit chip having signal processing capabilities. The Processor 120 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor 120 may be any conventional processor or the like.
It is to be understood that the configuration shown in fig. 1 is merely exemplary, and that the electronic device 100 may include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Alternatively, the specific type of the electronic device 100 is not limited, and may be, for example, but not limited to, a device having a processing function, such as a camera (IP camera), a forwarding server, a web server, and a data server.
With reference to fig. 2, an embodiment of the present invention further provides a video data transmission method applicable to the electronic device 100. In particular, the method provided by the present embodiment is described in detail in the present embodiment by taking the application to an image capture device, such as a camera (IP camera, IPC), as an example. Wherein the method steps defined by the method-related flow may be implemented by the processor 120. The specific process shown in fig. 2 will be described in detail below.
Referring to fig. 2, an embodiment of the present invention provides a video data transmission method applied to an image capturing device, where the image capturing device includes a plurality of video encoders, each of the video encoders corresponds to a video buffer queue for buffering video source data, and the video data transmission method includes step S1, step S2, and step S3.
Step S1, performing random access frame coding on the video source data in each video buffer queue, so that the corresponding random access frames in different video buffer queues are the collected image frames at the same time, where the same video buffer queue includes multiple random access frames, and each of the multiple random access frames corresponds to the collected image frames at different times.
Specifically, the embodiment of the present invention collects video monitoring information using a camera (IP camera, IPC), which is a new generation camera generated by combining a conventional camera with a network technology, and is formed by combining a video encoder and an analog camera. The video encoder encodes and compresses the analog video signal collected by the analog camera into a digital signal, so that the network switching routing equipment can be directly accessed. Each video encoder also corresponds to a video buffer queue for buffering video source data, namely, analog video signals collected by the analog cameras.
In the embodiment of the invention, the video source data is subjected to coding control, so that each random access frame in the video source data is an acquired image frame at the same moment.
Referring to fig. 3, the step S1 further includes a step S11 and a step S12.
Step S11, for the video source data in each video buffer queue, down-sampling the video source data to obtain an image sequence to be encoded, and dividing the image sequence to be encoded into a preset number of image slices.
The down-sampling comprises spatial resolution down-sampling and/or temporal resolution down-sampling.
Without loss of generality, in the embodiment of the invention, it is assumed that the image sequence to be encoded is divided into N image slices.
Step S12, performing video coding on the image slice in the corresponding image sequence by using each of the video encoders to obtain a random access frame corresponding to the encoded image slice, where the random access frames corresponding to different video buffer queues are acquired image frames at the same time, the same video buffer queue includes a plurality of random access frames, and each of the random access frames corresponds to an acquired image frame at a different time.
Meanwhile, it should be noted that, because the encoding frame rate and the down-sampling frequency of each video encoder are different, the frame interval lengths of the random access frames of each video encoder may be the same or different, but the time intervals of the random access frames are the same, that is, each random access frame is an acquired image frame at the same time, so as to prepare for the subsequent steps.
And step S2, coding the video source data by using each video coder, and adding a parameter set in front of the random access frame to obtain a corresponding data code stream.
Specifically, forward predictive coding or bidirectional coding is performed on the video source data to obtain a plurality of P frames or B frames, and a parameter set is added in front of the random access frame to obtain a corresponding data code stream.
The random access frame is an I-frame, which is also called an Intra-frame (Intra Picture) and is a basic frame in a Group of pictures (GOP), and each GOP only includes one I-frame. The P frame is also called a forward Predictive-coded frame (Predictive-frame), and represents a difference between a current frame and a previous I frame or P frame, and when decoding, a difference defined by the current frame needs to be superimposed on a previously buffered image, so as to generate a final image. The two encoding methods are the same as the conventional encoding method, and for the specific encoding method, reference is made to the prior art, which is not described herein again.
Step S3, determining whether to switch the current data code stream transmitted to the decoder according to the video reconstruction data receiving information fed back by the decoder, and if it is determined that the current data code stream needs to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing a next random access frame, so that the decoder decodes the target data code stream to obtain corresponding video reconstruction data.
Specifically, it is assumed that the frame rate of each encoder is the same, i.e., the gop (group picture) of each video encoder is the same. Referring to fig. 4, frames 1 and 7 of the three video encoders are all encoded as random access frames, and the GOP length is 6 frames, so the data stream frame switching module in the transmitting end must switch after 6 frames, for example, after the 1 st video encoder finishes transmitting the 6 th frame, the next frame is originally to be transmitted, and since the next frame is encoded as a random access frame, the next frame can be switched to transmit the 7 th frame of the 2 nd encoder. Similarly, after the 2 nd video encoder finishes transmitting the 6 th frame, the 2 nd video encoder can switch to the 7 th frame transmission of the 3 rd video encoder. Similarly, after the 6 th frame of the 3 rd video encoder is completely transmitted, the transmission can be switched to the 7 th frame of the 1 st or 2 nd video encoder. In short, since all frames 7 of the video encoder are encoded into random access frames, the data stream switching module can switch to random access frame transmission at the next moment of any video encoder after transmitting the frame immediately adjacent to the random access frame. For the decoder, after decoding and displaying the immediately adjacent previous frame of the random access frame, the random access frame at the next moment of any video encoder is displayed, so that the consistency of the motion content of the video image content can be ensured.
The following is a detailed description of how to control the data stream so as to switch the random access frame.
Specifically, referring to fig. 5, the step S3 further includes a step S31, a step S32 and a step S33.
Step S31, receiving packet loss information of the decoded current video reconstruction data sent by a decoder and network delay data of the current video reconstruction data reaching the decoder.
Step S32, according to the packet loss information and the network delay data, determining whether a current data code stream corresponding to the current video reconstruction data and transmitted to the decoder needs to be switched.
Referring to fig. 6, step S32 further includes step S321 and step S322.
Step S321, if the packet loss information indicates that packet loss occurs in the current video data, it is determined that switching needs to be performed on a current data code stream corresponding to the current video data and transmitted to the decoder.
Step S322, if the packet loss information indicates that packet loss does not occur in the current video data, determining whether to switch the current data code stream according to the network delay data.
The step S322 further includes steps S3221 and S3222.
Step S3221, if the network delay data is within a preset delay range, it is determined that switching of the current data code stream is not required.
Step S3222, if the network delay data is smaller than the minimum value in the preset delay range, it is determined that the current data code stream needs to be switched.
Within a preset time delay range, the network quality is good, the client can normally watch the decoded video reconstruction data sent to the decoder by the sending end, and the video picture has no delay or pause phenomenon.
When the network delay data is smaller than the minimum value in the preset delay range, the network bandwidth is sufficient, and the data code stream can be switched to the data code stream with a larger code rate, so that the client displays the decoded data to obtain high-quality impression.
Step S33, if it is determined that the current data code stream needs to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing the next random access frame.
Step S33 further includes step S331, step S332, step S333, and step S334.
Specifically, when the packet loss information indicates that packet loss occurs in the current video reconstruction data, the following steps S331 and S332 are performed.
Step S331, when accessing the next random access frame, obtaining a target data code stream according to the code rate, the spatial resolution, the temporal resolution and the random access frame time interval of the data code stream coded by each video coder in the parameter set, wherein the code rate of the target data code stream is smaller than the code rate of the current data code stream.
Step S332, switching the current data code stream to the target data code stream.
And when the packet loss information indicates that no packet loss occurs to the current video reconstruction data and the network delay data is smaller than the minimum value in the preset delay range, executing the following steps S333 and S334.
Step S333, when accessing the next random access frame, obtaining a target data code stream according to the code rate, the spatial resolution, the temporal resolution and the random access frame time interval of the data code stream coded by each video coder in the parameter set, wherein the code rate of the target data code stream is greater than that of the current data code stream.
Step S334, the current data code stream is switched to the target data code stream.
The parameter sets include, but are not limited to, a code rate, a spatial resolution, a temporal resolution, and a random access frame time interval of a data stream encoded by each of the plurality of video encoders.
And the sending end comprehensively judges and determines a target data code stream according to the steps and the information in the parameter set and switches the current data code stream to the target data code stream, so that the decoder receives the data code stream switched according to the network bandwidth fluctuation condition under the condition of no perception and no improvement, the video reconstructed data decoded by the decoder is enabled, the displayed monitoring picture is smoother, and the image quality is clearer.
Meanwhile, it should be noted that the client may also be configured at the client according to its own requirements, and the data code stream is changed by itself. For example, one implementation method is that, under the condition of abundant broadband, a user can select to use data of a lower data code stream at a client according to the actual needs of the user, so that a decoder obtains video reconstruction data after decoding, so as to obtain a video picture with a lower code rate and a clearer image quality.
Referring to fig. 7, in the embodiment of the present invention, through the above steps, for an image capturing device, the scenes of the video code streams generated by the video encoders are the same, so that a GOP video segment is extracted from multiple video code streams according to a GOP order, and then combined, a video code stream with complete temporal scenes and complete spatial scenes is still obtained.
It should be noted that, in the video data transmission method, a bidirectional communicator is used for the transmitting end and the decoder. For example, when a sending end sends data using a real-time transport Protocol (RTP), a real-time transport Control Protocol (RTCP) Protocol needs to be used for exchanging Control signaling between the front end and the back end.
Or when the sending end adopts a HyperText Transfer Protocol (HTTP) and is sent based on a preset network Protocol (RESTful), a WebSocket (a new network Protocol based on TCP) needs to be used.
Referring to fig. 8, an embodiment of the present invention further relates to a video data transmission apparatus 110, which is applied to an image capturing device, where the image capturing device includes a plurality of video encoders, each video encoder includes a video buffer queue for buffering video source data, and the video data transmission apparatus 110 includes:
the frame synchronization control module 111 is configured to perform random access frame coding on video source data in each video buffer queue, so that corresponding random access frames in different video buffer queues are acquired image frames at the same time, where the same video buffer queue includes multiple random access frames, and each random access frame in the multiple random access frames corresponds to an acquired image frame at a different time.
And a data encoding module 112, configured to encode the video source data by using each video encoder, and add a parameter set before the random access frame to obtain a corresponding data code stream.
And a data code stream switching module 113, configured to determine whether to switch a current data code stream transmitted to a decoder according to video reconstruction data receiving information fed back by the decoder, and if it is determined that the current data code stream needs to be switched, switch the current data code stream to a target data code stream according to the parameter set when accessing a next random access frame, so that the decoder decodes the target data code stream to obtain corresponding video reconstruction data.
It can be understood that, for the specific operation method of each functional module in this embodiment, reference may be made to the detailed description of the corresponding step in the foregoing method embodiment, and no repeated description is provided herein.
An embodiment of the present invention further provides a readable storage medium, where a computer program is stored, and the video data transmission method is described above when the computer program is executed.
In summary, embodiments of the present invention provide a video transmission method, an apparatus, an electronic device 100 and a readable storage medium, by encoding the video source data in the video buffer queues, the corresponding random access frames in different video buffer queues are the collected image frames at the same moment, simultaneously adding parameter sets including code rate, spatial resolution, temporal resolution and random access frame time interval of data code stream obtained by encoding of each video encoder in a plurality of video encoders, so that under the condition of bandwidth fluctuation of a transmitting end, by receiving the packet loss information of the current video reconstruction data obtained by decoding and sent by a decoder and the network delay data of the current video reconstruction data reaching the decoder, the data code stream is switched in real time by combining the parameter set, so that the decoder decodes to obtain video reconstruction data, and the video reconstruction data displays clearer and smoother pictures.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be noted that, in this document, 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 a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A video data transmission method is applied to image acquisition equipment, wherein the image acquisition equipment comprises a plurality of video encoders, each video encoder corresponds to a video buffer queue respectively and is used for buffering video source data, and the video data transmission method comprises the following steps:
random access frame coding is carried out on video source data in each video cache queue, so that corresponding random access frames in different video cache queues are acquired image frames at the same moment, wherein the same video cache queue comprises a plurality of random access frames, and each random access frame in the plurality of random access frames corresponds to the acquired image frames at different moments;
encoding the video source data by utilizing each video encoder, and adding a parameter set in front of the random access frame to obtain a corresponding data code stream;
and determining whether to switch the current data code stream transmitted to a decoder according to video reconstruction data receiving information fed back by the decoder, and if the current data code stream is determined to need to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing the next random access frame so that the decoder decodes the target data code stream to obtain corresponding video reconstruction data.
2. The video data transmission method according to claim 1, wherein the step of performing random access frame coding on the video source data in each video buffer queue so that corresponding random access frames in different video buffer queues are acquired image frames at the same time comprises:
for the video source data in each video buffer queue, performing down-sampling on the video source data to obtain an image sequence to be coded, and dividing the image sequence to be coded into a preset number of image slices;
and carrying out video coding on the image slices in the corresponding image sequence by utilizing each video coder to obtain random access frames corresponding to the coded image slices, wherein the corresponding random access frames in different video cache queues are the collected image frames at the same moment, the same video cache queue comprises a plurality of random access frames, and each random access frame in the plurality of random access frames corresponds to the collected image frames at different moments.
3. The method according to claim 1, wherein the step of determining whether to switch the current data code stream transmitted to the decoder according to the video reconstruction data reception information fed back by the decoder, and if it is determined that the current data code stream needs to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing a next random access frame comprises:
receiving packet loss information of current video reconstruction data obtained by decoding and sent by a decoder and network delay data of the current video reconstruction data reaching the decoder;
judging whether a current data code stream which is transmitted to the decoder and corresponds to the current video reconstruction data needs to be switched or not according to the packet loss information and the network delay data;
and if the current data code stream needs to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing the next random access frame.
4. The video data transmission method according to claim 3, wherein the step of determining whether or not switching of the current data code stream corresponding to the current video reconstruction data transmitted to the decoder is required according to the packet loss information and the network delay data comprises:
if the packet loss information indicates that packet loss occurs to the current video reconstruction data, determining that switching needs to be performed on a current data code stream which is transmitted to the decoder and corresponds to the current video reconstruction data;
and if the packet loss information indicates that no packet loss occurs in the current video reconstruction data, judging whether the current data code stream needs to be switched according to the network delay data.
5. The video data transmission method according to claim 4, wherein the step of determining whether the current data code stream needs to be switched according to the network delay data comprises:
if the network delay data is in a preset delay range, determining that the current data code stream does not need to be switched;
and if the network delay data is smaller than the minimum value in the preset delay range, determining that the current data code stream needs to be switched.
6. The method according to claim 4, wherein the parameter set includes a code rate, a spatial resolution, a temporal resolution, and a random access frame time interval of a data code stream encoded by each of the plurality of video encoders, and when the packet loss information indicates that packet loss occurs in the current video reconstruction data and the next random access frame is accessed, the step of switching the current data code stream to a target data code stream according to the parameter set includes:
when accessing the next random access frame, obtaining a target data code stream according to the code rate, the spatial resolution, the temporal resolution and the random access frame time interval of the data code stream coded by each video coder in the parameter set, wherein the code rate of the target data code stream is smaller than that of the current data code stream;
and switching the current data code stream to the target data code stream.
7. The method according to claim 5, wherein the parameter set includes a code rate, a spatial resolution, a temporal resolution, and a random access frame time interval of a data stream encoded by each of the plurality of video encoders, and when the network delay data is smaller than a minimum value in the preset delay range, the step of switching the current data stream to a target data stream according to the parameter set when accessing a next random access frame includes:
when accessing the next random access frame, obtaining a target data code stream according to the code rate, the spatial resolution, the temporal resolution and the random access frame time interval of the data code stream coded by each video coder in the parameter set, wherein the code rate of the target data code stream is greater than that of the current data code stream;
and switching the current data code stream to the target data code stream.
8. A video data transmission device is applied to an image acquisition device, wherein the image acquisition device comprises a plurality of video encoders, each video encoder comprises a video buffer queue for buffering video source data, and the video data transmission device comprises:
the frame synchronization control module is used for carrying out random access frame coding on video source data in each video cache queue so that corresponding random access frames in different video cache queues are acquired image frames at the same moment, wherein the same video cache queue comprises a plurality of random access frames, and each random access frame in the plurality of random access frames corresponds to the acquired image frames at different moments;
the data coding module is used for coding the video source data by utilizing each video coder and adding a parameter set in front of the random access frame to obtain a corresponding data code stream;
and the data code stream switching module is used for determining whether to switch the current data code stream transmitted to the decoder according to the video reconstruction data receiving information fed back by the decoder, and if the current data code stream is determined to need to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing the next random access frame so that the decoder decodes the target data code stream to obtain corresponding video reconstruction data.
9. An electronic device, characterized in that the electronic device comprises:
a storage medium;
a processor, said processor comprising a plurality of video encoders, each video encoder comprising a video buffer queue for buffering video data; and
a video data transmission apparatus stored in the storage medium and including software functional modules executed by the processor, the apparatus comprising:
the frame synchronization control module is used for carrying out random access frame coding on video source data in each video cache queue so that corresponding random access frames in different video cache queues are acquired image frames at the same moment, wherein the same video cache queue comprises a plurality of random access frames, and each random access frame in the plurality of random access frames corresponds to the acquired image frames at different moments;
the data coding module is used for coding the video source data by utilizing each video coder and adding a parameter set in front of the random access frame to obtain a corresponding data code stream;
and the data code stream switching module is used for determining whether to switch the current data code stream transmitted to the decoder according to the video reconstruction data receiving information fed back by the decoder, and if the current data code stream is determined to need to be switched, switching the current data code stream to a target data code stream according to the parameter set when accessing the next random access frame so that the decoder decodes the target data code stream to obtain corresponding video reconstruction data.
10. A readable storage medium, characterized in that a computer program is stored therein, which when executed implements the video data transmission method of any one of claims 1-7.
CN201811525787.8A 2018-12-13 2018-12-13 Video transmission method and device, electronic equipment and readable storage medium Active CN111327896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811525787.8A CN111327896B (en) 2018-12-13 2018-12-13 Video transmission method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811525787.8A CN111327896B (en) 2018-12-13 2018-12-13 Video transmission method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111327896A true CN111327896A (en) 2020-06-23
CN111327896B CN111327896B (en) 2022-08-23

Family

ID=71166520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811525787.8A Active CN111327896B (en) 2018-12-13 2018-12-13 Video transmission method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111327896B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111629234A (en) * 2020-06-24 2020-09-04 上海大因多媒体技术有限公司 Transmission method, device, equipment and storage medium for coexistence of different types of videos
CN112312135A (en) * 2020-10-23 2021-02-02 广州市百果园网络科技有限公司 Video publishing method and device, computer equipment and storage medium
CN112492345A (en) * 2020-11-25 2021-03-12 深圳创维数字技术有限公司 Audio and video storage method, system, terminal and computer readable storage medium
CN113163177A (en) * 2021-05-14 2021-07-23 广东魅视科技股份有限公司 Video isolation system and method
CN113784209A (en) * 2021-09-03 2021-12-10 上海哔哩哔哩科技有限公司 Multimedia data stream processing method and device
CN115103211A (en) * 2022-07-27 2022-09-23 广州迈聆信息科技有限公司 Data transmission method, electronic device, equipment and computer readable storage device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1349351A (en) * 2000-10-13 2002-05-15 北京算通数字技术研究中心有限公司 Method of generating data stream index file and using said file accessing frame and shearing lens
EP2117237A4 (en) * 2007-02-28 2012-12-26 Sony Corp Image information coding device and coding method
CN104954793A (en) * 2015-06-18 2015-09-30 电子科技大学 GOP-level QP-Offset setting method
CN105516729A (en) * 2014-09-23 2016-04-20 浙江大学 Video encoding and decoding method and apparatus, and generated video code stream

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1349351A (en) * 2000-10-13 2002-05-15 北京算通数字技术研究中心有限公司 Method of generating data stream index file and using said file accessing frame and shearing lens
EP2117237A4 (en) * 2007-02-28 2012-12-26 Sony Corp Image information coding device and coding method
CN105516729A (en) * 2014-09-23 2016-04-20 浙江大学 Video encoding and decoding method and apparatus, and generated video code stream
CN104954793A (en) * 2015-06-18 2015-09-30 电子科技大学 GOP-level QP-Offset setting method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111629234A (en) * 2020-06-24 2020-09-04 上海大因多媒体技术有限公司 Transmission method, device, equipment and storage medium for coexistence of different types of videos
CN112312135A (en) * 2020-10-23 2021-02-02 广州市百果园网络科技有限公司 Video publishing method and device, computer equipment and storage medium
CN112492345A (en) * 2020-11-25 2021-03-12 深圳创维数字技术有限公司 Audio and video storage method, system, terminal and computer readable storage medium
CN113163177A (en) * 2021-05-14 2021-07-23 广东魅视科技股份有限公司 Video isolation system and method
CN113784209A (en) * 2021-09-03 2021-12-10 上海哔哩哔哩科技有限公司 Multimedia data stream processing method and device
CN113784209B (en) * 2021-09-03 2023-11-21 上海哔哩哔哩科技有限公司 Multimedia data stream processing method and device
CN115103211A (en) * 2022-07-27 2022-09-23 广州迈聆信息科技有限公司 Data transmission method, electronic device, equipment and computer readable storage device
CN115103211B (en) * 2022-07-27 2023-01-10 广州迈聆信息科技有限公司 Data transmission method, electronic device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN111327896B (en) 2022-08-23

Similar Documents

Publication Publication Date Title
CN111327896B (en) Video transmission method and device, electronic equipment and readable storage medium
CN108810636B (en) Video playing method, virtual reality equipment, server, system and storage medium
US9813732B2 (en) System and method for encoding video content using virtual intra-frames
TR201809690T4 (en) Video signal encoding and decoding method.
KR20190004280A (en) Hybrid graphics and pixel domain architecture for 360-degree video
US20140119456A1 (en) Encoding video into lower resolution streams
CN105991976A (en) Method and system for generating event video sequence, and camera comprising the system
CN110740380A (en) Video processing method and device, storage medium and electronic device
CN112219403B (en) Rendering perspective metrics for immersive media
KR101680545B1 (en) Method and apparatus for providing panorama moving picture generation service
CN108810427B (en) Viewpoint-based panoramic video content representation method and apparatus
US20120219052A1 (en) Picture transmission device, picture transmission method, and program
CN105898358B (en) The sending method and device of video data
US9948903B2 (en) Method for configuration of video stream output from a digital video camera
EP3029942B1 (en) Method and device for inserting a graphical overlay in a video stream
US8208555B2 (en) Image capturing and transmission device and image receiving and reconstruction device
CN113497932B (en) Method, system and medium for measuring video transmission time delay
US20220224862A1 (en) Control system and method
WO2013017387A1 (en) Methods for compressing and decompressing animated images
US9479823B2 (en) Transmitting device and receiving device
JP4196085B2 (en) Video signal encoding apparatus and video conference system using the same
CN115348417A (en) Method for realizing code rate self-adaptive control in power video monitoring system
CN116980688A (en) Video processing method, apparatus, computer, readable storage medium, and program product
US20180262790A1 (en) Systems and methods for adaptive streaming using jpeg 2000
CN115914183A (en) Method, device and system for monitoring terminal playing content and terminal playing equipment

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