CN111478916B - Data transmission method, device and storage medium based on video stream - Google Patents
Data transmission method, device and storage medium based on video stream Download PDFInfo
- Publication number
- CN111478916B CN111478916B CN202010296928.4A CN202010296928A CN111478916B CN 111478916 B CN111478916 B CN 111478916B CN 202010296928 A CN202010296928 A CN 202010296928A CN 111478916 B CN111478916 B CN 111478916B
- Authority
- CN
- China
- Prior art keywords
- video stream
- new user
- server side
- key frame
- server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/75—Media network packet handling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/70—Media network packetisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/80—Responding to QoS
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention provides a data transmission method, equipment and a computer readable storage medium based on video stream, wherein a server end encodes the video stream to obtain key frames and non-key frames: the server side monitors the connection of a new user to the video stream; when the server side monitors the connection of a new user, first frame data is generated and can be directly displayed by the new user side; the new client receives the first frame data and the subsequent frame data, and processes and displays the received frame data. The data transmission method, the data transmission equipment and the computer readable storage medium based on the video stream can realize the instant display of pictures when a user accesses the video stream.
Description
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a data transmission method and device based on a video stream, and a computer-readable storage medium.
Background
The description of the background of the invention pertaining to the related art to which this invention pertains is given for the purpose of illustration and understanding only of the summary of the invention and is not to be construed as an admission that the applicant is explicitly or implicitly admitted to be prior art to the date of filing this application as first filed with this invention.
In a standard RTSP (real time streaming protocol) live stream, video frames are encoded to generate frame data, the frame data are pushed to a user, the frame data generated in the encoding process are divided into key frames and non-key frames, the key frames contain all information of the video frames and can be directly displayed, but the data volume of the key frames is large, in order to reduce the data volume after encoding, a large number of non-key frames with small data volume can be generated in the encoding process, the non-key frames only contain difference information with the key frames and can be displayed only under the matching of the key frames, and direct display is not achieved.
In the prior art, when a user connects to a video stream, a previous key frame may be generated just, and the user misses a chance of acquiring the previous key frame, according to a common coding setting of the current stream, an interval of 1 to 10 seconds is provided between two key frames, during which the newly connected user cannot acquire the key frame and cannot normally display a picture, and the user can normally display the picture only by waiting for the next key frame, and a middle blank period is unfriendly to the user.
Disclosure of Invention
In order to solve the problem that the picture cannot be normally displayed when the user accesses the video stream, the data transmission method, the data transmission equipment and the storage medium based on the video stream can realize real-time display of the picture when the user accesses the video stream.
A first aspect of the present invention provides a data transmission method based on a video stream, in which a server encodes the video stream to obtain a key frame and a non-key frame, and the method further includes the following steps:
the server side monitors the connection of a new user to the video stream;
when monitoring the connection of a new user, the server side generates first frame data which can be directly displayed by the new user side;
the new user side receives the first frame data and the subsequent frame data;
the new client processes and displays the received frame data.
According to some embodiments of the present invention, the first frame data is frame data obtained by the server side performing key frame coding on a current video frame of the video stream when the server side monitors connection of a new user.
According to some embodiments of the invention, the server side is at tkThe video stream is key frame coded at time tk=t0+kT1(ii) a Wherein, t0Moment of first key frame encoding of video stream, T, for server side1A period for encoding key frames of the video stream by the server side; k is a positive integer.
According to some embodiments of the present invention, the time when the server end performs ith key frame encoding on the video stream is tiThe period of key frame coding of the video stream by the server side is T2;
If at tiAnd (t)i+T2) When the server end does not monitor the connection of a new user between moments, the server end performs (i +1) th key frame coding on the video stream at moment ti+1The following conditions are satisfied: t is ti+1=T2+ti;
If at tiAnd (t)i+T2) The server side monitors the connection of the new user between the moments, and at tiAnd (t)i+T2) The moment q when the last new user is connected into the video stream between moments1At q is1Then, the time when the server side performs the first key frame encoding on the video stream is r, if r is q1+T2。
A second aspect of the present invention provides a data transmission method based on a video stream, in which a server encodes the video stream to obtain a key frame and a non-key frame, and the method further includes the following steps:
the server side monitors the connection of a new user to the video stream;
when the server side monitors the connection of a new user, first frame data is generated, and the first frame data can be directly displayed by the new user side.
According to some embodiments of the present invention, the first frame data is frame data obtained by the server side performing key frame coding on a current video frame of the video stream when the server side monitors connection of a new user.
According to some embodiments of the invention, the server side is at tkThe video stream is key frame coded at time tk=t0+kT1(ii) a Wherein, t0Moment of first key frame encoding of video stream, T, for server side1A period for encoding key frames of the video stream by the server side; k is a positive integer.
According to some embodiments of the present invention, the time when the server end performs ith key frame encoding on the video stream is tiThe period of key frame coding of the video stream by the server side is T2;
If at tiAnd (t)i+T2) When the server end does not monitor the connection of a new user between moments, the server end performs (i +1) th key frame coding on the video stream at moment ti+1The following conditions are satisfied: t is ti+1=T2+ti;
If at tiAnd (t)i+T2) The server side monitors the connection of the new user between the moments, and at tiAnd (t)i+T2) The moment q when the last new user is connected into the video stream between moments1At q is1Then, the time when the server side performs the first key frame encoding on the video stream is r, if r is q1+T2。
A third aspect of the invention provides a data display device based on a video stream, the data display device comprising a memory and a processor; wherein the memory is to store executable program code; the processor is used for reading the executable program codes stored in the memory to execute the video stream-based data transmission method.
A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the video-stream-based data transmission method.
The data transmission method, the data transmission equipment and the computer-readable storage medium based on the video stream provided by the invention monitor whether a new user accesses the video stream, when the new user is monitored to access the video stream, first frame data which can be directly displayed by the new user side is generated, and the new user side processes and displays the received first frame data and frame data after the first frame data, so that the situation that the new user accessed between two key frames cannot acquire the key frames in time is avoided, and the picture is ensured to be displayed in time.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 shows a flow chart of a video stream based data transmission method according to a first embodiment of the present invention;
fig. 2 shows a process block diagram of a video stream-based data transmission method according to a first embodiment of the present invention;
fig. 3 illustrates a flowchart of a data transmission method based on a video stream according to still another embodiment of the present invention;
FIG. 4 illustrates a block diagram of one embodiment of a video stream based data display device, in accordance with one embodiment of the present invention;
fig. 5 is a diagram illustrating a structure of a computer-readable storage medium of a video stream-based data transmission method according to an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
The following discussion provides multiple embodiments of the invention. While each embodiment represents a single combination of the inventions, the various embodiments of the inventions can be combined in alternate, or combined, and thus the inventions can be considered to include all possible combinations of the same and/or different embodiments described. Thus, if one embodiment comprises A, B, C and another embodiment comprises a combination of B and D, then the invention should also be construed as comprising an embodiment that comprises A, B, C, D in all other possible combinations, although this embodiment may not be explicitly recited in the following text.
Fig. 1 shows a flowchart of a data transmission method based on a video stream according to a first embodiment of the present invention. As shown in fig. 1, the method comprises the steps of: step S01, the server monitors the connection of the new user to the video stream; step S02, when the server side monitors the connection of the new user, generating first frame data, which can be directly displayed by the new user side; step S03, the new client receives the first frame data and the subsequent frame data; the new client processes and displays the received frame data.
Fig. 2 illustrates a process block diagram of a data transmission method based on a video stream according to a first embodiment of the present invention. As shown in fig. 2, the server encodes the video stream to obtain frame data. The frame data is transmitted to the client side through the data service module of the server side, and the client side includes the client side of the new user and the client side of the playing user (i.e. the client side connected to the video stream before the new user accesses the video stream). When the user side of the new user accesses the video stream, the user side of the new user sends a play request to the server side, the connection control service module of the server side receives the play request, and the server side generates a first data frame, where the first frame data may be obtained, for example, by directly encoding the received video stream into a key frame (as described below with reference to fig. 3), or may be generated by a calculation method (as described further below), so that the first frame data may be directly displayed by the new user side. The data service module provides the first frame data and the subsequent frame data for the new connected user terminal. And the new user side receives and displays the first frame data and the subsequent frame data.
In the embodiment of the invention, by monitoring the action of the new user accessing the video stream, when the new user accessing the video stream is monitored, the first frame data which can be directly displayed by the user side of the new user is generated, and the user side of the new user processes the received first frame data and the frame data after the first frame data and displays the first frame data, so that the problem that the new user accessing between two key frames has to wait for the arrival of the next key frame to cause the delay of the picture is avoided, and the picture is ensured to be displayed in time.
Fig. 3 illustrates a flowchart of a data transmission method based on a video stream according to still another embodiment of the present invention. As shown in fig. 3, the method comprises the steps of:
and S001, monitoring the connection of the new user terminal to the video stream by the server terminal, and performing accumulation timing by the server terminal. The server carries out accumulation timing from the moment of carrying out key frame coding on the video stream for the first time.
Step S002, when the server side monitors that the new user side accesses the video stream, the server side performs key frame coding on the video frame of the video stream; and when the accumulated timing of the server side meets the requirement, the server side carries out key frame coding on the video frames of the video stream. The time length of the server side accumulated timing is a fixed value.
In step S003, the user side receives frame data. The user side comprises a user side of a new user and a user side of an original playing user; for the user side of the new user, the received frame data comprises key frames generated when the new user side accesses the video stream and frame data obtained by encoding the video stream by the server side after the moment when the new user side accesses the video stream until the user side finishes playing; for the client of the original playing user, the frame data received by the client is the frame data obtained by encoding the video stream by the server from the moment when the client is accessed to the video stream, and for the key frame generated at the moment when the new client is accessed to the video stream, the server can be sent to the client of the original playing user or not.
To facilitate understanding, further description will be given below of this embodiment from another point of view. Before the new client is not monitored to access the video stream, the server end is at tkThe video stream is key frame coded at time tk=t0+kT1(ii) a Wherein, t0Moment of first key frame encoding of video stream, T, for server side1A period for encoding key frames of the video stream by the server side; k is a positive integer. On the basis, the moment when the server end carries out ith key frame coding on the video frame of the video stream is set as tiIf at tiAnd (t)i+T1) When the new user end is not monitored to access the video stream between the moments, the server end carries out (i +1) th time key frame coding on the video frame of the video stream at the moment ti+1The following conditions are satisfied: t is ti+1= T1+ti(ii) a If at tiAnd (t)i+T1) Monitoring the access of new user terminal to video stream between moments, and at tiAnd (t)i+T1) The moment Q when the user end of the last new user is connected to the video stream between the moments1At Q1Then, the time when the server side carries out key frame coding on the video frame of the video stream is tnThen there is tn=ti+nT1And n is an integer. In other words, the key frame encoding of the video frames of the video stream by the server side includes the following two cases: (1) when the server side monitors that a new user is connected to the video stream; (2) when t is reachedhAt time, in the second case, th=t0+hT1Wherein, t0Moment of first key frame encoding of video stream, T, for server side1And h is a positive integer, and the period is a period for the server to perform key frame coding on the video stream.
In the above embodiment, by monitoring the action of the new user accessing the video stream, when it is monitored that the new user accesses the video stream, the first frame data that can be directly displayed by the user side of the new user is generated, and the user side of the new user processes the received first frame data and the frame data after the first frame data and displays the first frame data, so that the real-time performance of the image display after the new user accesses the new user is ensured, the image delay is avoided, and the user side access of the new user does not change the time of the original key frame coding performed on the frame data of the video stream, thereby ensuring the stable and smooth display of the original playing user.
In another embodiment of the data transmission method based on video stream of the present invention, the time when the server performs the ith key frame encoding on the video stream is set as tiThe period of key frame coding of the video stream by the server side is T2(ii) a If at tiAnd (t)i+T2) When the server end does not monitor the connection of a new user between moments, the server end performs (i +1) th key frame coding on the video stream at moment ti+1The following conditions are satisfied: t is ti+1=T2+ti(ii) a If at tiAnd (t)i+T2) The server side monitors the connection of the new user between the moments, and at tiAnd (t)i+T2) The moment q when the last new user is connected into the video stream between moments1At q is1Then, the time when the server side performs the first key frame encoding on the video stream is r, if r is q1+T2. This embodiment differs from the previous embodiment in that, in addition, what was previously done with reference to figures 1 and 2Other descriptions are also applicable to this embodiment and are not repeated here for the sake of simplicity.
In this embodiment, the server monitors the action of accessing the video stream of the new user, and when it is monitored that the new user accesses the video stream, generates first frame data (key frame data) that can be directly displayed by the user side of the new user, and the user side of the new user processes and displays the received first frame data and frame data subsequent to the first frame data. And when the user end of a new user accesses the video stream, the original time for encoding the key frame of the frame data of the video stream is changed, the access experience of the new user is ensured, and the situations that the new user is blocked or the playing is too fast in the initial access stage are avoided.
In another embodiment of the data transmission method based on video stream of the present invention, the time when the user terminal of the new user is monitored to access the video stream is set as a first time; if the encoding of the current video frame of the video stream by the server side is key frame encoding at the first moment, the frame data obtained by encoding is first frame data; if the video stream is coded into the non-key frame at the first moment, the server side codes the current video frame of the video stream into the non-key frame; the frame data obtained by the first time coding is a first non-key frame, the key frame displayed in cooperation with the first non-key frame is a first key frame, and the first frame data is the frame data obtained by calculating all frame data from the first key frame to the first non-key frame. In order to implement the operation on all frame data from the first key frame to the first non-key frame at the first time, some embodiments of the data transmission method based on video stream in the present specification may include a storage end, where the storage end stores all frame data from the first key frame to the first non-key frame, so as to facilitate the later-stage call calculation. In the embodiment, the server monitors the action of accessing the video stream of the new user, when the action of accessing the video stream of the new user is monitored, the first frame data is generated by calculating all frame data from the first key frame to the first non-key frame, and the user side of the new user processes the received first frame data and the frame data after the first frame data and displays the first frame data, so that the situation that the new user accessing between two key frames cannot acquire the key frames in time is avoided, and the picture is ensured to be displayed in time.
The present application also provides a data display device based on video stream, including: a connection control service module configured to monitor a connection of a new user terminal; the video acquisition and coding module is configured to generate first frame data when a new user side is monitored to access the video stream, and the first frame data can be directly displayed by the user side; and the data service module is configured to send the first frame data and the frame data after the first frame data to the user side of the new user. By monitoring the action of the new user for accessing the video stream, when the new user side is monitored to access the video stream, first frame data which can be directly displayed by the user side of the new user is generated, and the user side of the new user processes the received first frame data and frame data after the first frame data and displays the first frame data, so that the situation that the new user side accessed between two key frames cannot acquire the key frames in time is avoided, and the picture is ensured to be displayed in time.
In some embodiments according to the present invention, the connection control service module is configured to receive a connection request initiated by a user side of the new user, and send streaming data to the user side of the new user according to the connection request; the data service module is configured to add data connection between the user side of the new user and the video stream according to the stream data; the connection control service module is configured to receive and process a playing request sent by the user side of the new user when the user side of the new user establishes connection with the video stream.
In some embodiments according to the present invention, the connection control service module is configured to receive a request for ending the playing initiated by the user end and perform processing, where the processing includes notifying the user end of ending the playing and notifying the data service module of reducing the connection; the data service module is configured to reduce the connection and transmit a reduced connection response to the connection control service module according to the notification of the connection control service module; the connection control service module is configured to receive the decrease connection response and send an end play response to the user terminal.
FIG. 4 is a block diagram of one embodiment of a video stream based data display device of the present application; referring now to FIG. 4, a schematic diagram of a video stream-based data display device suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the electronic device may include a processing device (e.g., a central processing unit, a graphic processor, etc.) 301, which may perform the video stream-based data transmission method in the foregoing embodiments according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage device 308 into a Random Access Memory (RAM) 303. The processing device 301, the ROM 302, and the RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While the figures illustrate an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
FIG. 5 is a block diagram of one embodiment of a computer readable storage medium of the video stream-based data transmission method of the present application; as shown in fig. 5, a computer-readable storage medium 40, having non-transitory computer-readable instructions 41 stored thereon, in accordance with an embodiment of the present disclosure. The non-transitory computer readable instructions 41, when executed by a processor, perform all or part of the steps of the video stream based data transmission method of the embodiments of the present disclosure as described above.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. 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.
The units described in the embodiments of the present disclosure may be implemented by software or hardware.
The data transmission method, the data transmission equipment and the computer-readable storage medium based on the video stream provided by the invention monitor whether a new user accesses the video stream, when the new user is monitored to access the video stream, first frame data which can be directly displayed by the new user side is generated, and the new user side processes and displays the received first frame data and frame data after the first frame data, so that the situation that the new user accessed between two key frames cannot acquire the key frames in time is avoided, and the picture is ensured to be displayed in time.
In the description herein, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this application, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The present invention is not limited to the above embodiments, but 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.
Claims (4)
1. A data transmission method based on video stream, the server end encodes the video stream to get the key frame and non-key frame, characterized by that, also include the following steps:
the server side monitors the connection of a new user to the video stream; the server side carries out accumulation timing; the server side carries out accumulated timing from the moment of carrying out key frame coding on the video stream for the first time;
when monitoring the connection of a new user, the server side generates first frame data which can be directly displayed by the new user side; when the server side accumulation timing meets the requirement, the server side encodes the key frame of the video stream; the time length of the server side accumulated timing is a fixed value, wherein the fixed value is the period of key frame coding;
the new user side receives the first frame data and the subsequent frame data;
the new user end processes and displays the received frame data;
the first frame data is obtained by performing key frame coding on a current video frame of the video stream by the server side when the server side monitors the connection of a new user;
the moment when the server end carries out ith key frame coding on the video stream is tiThe period of key frame coding of the video stream by the server side is T2(ii) a If at tiAnd (t)i+T2) When the server end does not monitor the connection of a new user between moments, the server end performs (i +1) th key frame coding on the video stream at moment ti+1The following conditions are satisfied: t is ti+1=T2+ti;
If at tiAnd (t)i+T2) The server side monitors the connection of the new user between the moments, and at tiAnd (t)i+T2) The moment q when the last new user is connected into the video stream between moments1At q is1Then, the time when the server side performs the first key frame encoding on the video stream is r, if r is q1+T2。
2. A data transmission method based on video stream, the server end encodes the video stream to get the key frame and non-key frame, characterized by that, also include the following steps:
the server side monitors the connection of a new user to the video stream; the server side carries out accumulation timing; the server side carries out accumulated timing from the moment of carrying out key frame coding on the video stream for the first time;
when monitoring the connection of a new user, the server side generates first frame data which can be directly displayed by the new user side; when the server side accumulation timing meets the requirement, the server side encodes the key frame of the video stream; the time length of the server side accumulated timing is a fixed value, wherein the fixed value is the period of key frame coding;
the first frame data is obtained by performing key frame coding on a current video frame of the video stream by the server side when the server side monitors the connection of a new user;
the moment when the server end carries out ith key frame coding on the video stream is tiThe period of key frame coding of the video stream by the server side is T2(ii) a If at tiAnd (t)i+T2) When the server end does not monitor the connection of a new user between moments, the server end performs (i +1) th key frame coding on the video stream at moment ti+1The following conditions are satisfied: t is ti+1=T2+ti;
If at tiAnd (t)i+T2) The server side monitors the connection of the new user between the moments, and at tiAnd (t)i+T2) The moment q when the last new user is connected into the video stream between moments1At q is1Then, the time when the server side performs the first key frame encoding on the video stream is r, if r is q1+T2。
3. A video stream based data display apparatus comprising a memory and a processor; wherein the memory is to store executable program code; the processor is configured to read executable program code stored in the memory to perform the video stream-based data transmission method according to claim 2.
4. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the video-stream-based data transmission method according to claim 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010296928.4A CN111478916B (en) | 2020-04-15 | 2020-04-15 | Data transmission method, device and storage medium based on video stream |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010296928.4A CN111478916B (en) | 2020-04-15 | 2020-04-15 | Data transmission method, device and storage medium based on video stream |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111478916A CN111478916A (en) | 2020-07-31 |
CN111478916B true CN111478916B (en) | 2021-09-21 |
Family
ID=71754253
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010296928.4A Active CN111478916B (en) | 2020-04-15 | 2020-04-15 | Data transmission method, device and storage medium based on video stream |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111478916B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112866736A (en) * | 2021-01-15 | 2021-05-28 | 北京乐学帮网络技术有限公司 | Key frame sending method, processing server and live broadcast system |
CN115086780A (en) * | 2022-07-07 | 2022-09-20 | 北斗星通智联科技有限责任公司 | Video stream transmission method, system, device and terminal equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103929682A (en) * | 2014-03-27 | 2014-07-16 | 广州华多网络科技有限公司 | Method and device for setting key frames in video live broadcast system |
US20160360219A1 (en) * | 2015-06-05 | 2016-12-08 | Apple Inc. | Preventing i-frame popping in video encoding and decoding |
CN110225362A (en) * | 2019-06-04 | 2019-09-10 | 浙江大华技术股份有限公司 | A kind of live broadcasting method, direct broadcast server and storage device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104735463A (en) * | 2015-03-26 | 2015-06-24 | 南京传唱软件科技有限公司 | Streaming media transmission method and system |
-
2020
- 2020-04-15 CN CN202010296928.4A patent/CN111478916B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103929682A (en) * | 2014-03-27 | 2014-07-16 | 广州华多网络科技有限公司 | Method and device for setting key frames in video live broadcast system |
US20160360219A1 (en) * | 2015-06-05 | 2016-12-08 | Apple Inc. | Preventing i-frame popping in video encoding and decoding |
CN110225362A (en) * | 2019-06-04 | 2019-09-10 | 浙江大华技术股份有限公司 | A kind of live broadcasting method, direct broadcast server and storage device |
Also Published As
Publication number | Publication date |
---|---|
CN111478916A (en) | 2020-07-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112135169B (en) | Media content loading method, device, equipment and medium | |
CN112954354B (en) | Video transcoding method, device, equipment and medium | |
CN111246228B (en) | Method, device, medium and electronic equipment for updating gift resources of live broadcast room | |
CN111459364B (en) | Icon updating method and device and electronic equipment | |
CN112199174A (en) | Message sending control method and device, electronic equipment and computer readable storage medium | |
CN109582274B (en) | Volume adjusting method and device, electronic equipment and computer readable storage medium | |
CN111478916B (en) | Data transmission method, device and storage medium based on video stream | |
CN109618216B (en) | Method, device and equipment for displaying video loading state identification and storage medium | |
CN110768861B (en) | Method, device, medium and electronic equipment for obtaining overtime threshold | |
CN110856004B (en) | Message processing method and device, readable storage medium and electronic equipment | |
CN113542856B (en) | Method, device, equipment and computer readable medium for reverse playing of online video | |
AU2018403361B2 (en) | Data transmission | |
CN114257870A (en) | Short video playing method, device, equipment and storage medium | |
CN111225255B (en) | Target video push playing method and device, electronic equipment and storage medium | |
CN116760992B (en) | Video encoding, authentication, encryption and transmission methods, devices, equipment and media | |
CN110996164A (en) | Video distribution method and device, electronic equipment and computer readable medium | |
CN115834918B (en) | Video live broadcast method and device, electronic equipment and readable storage medium | |
CN112203103B (en) | Message processing method, device, electronic equipment and computer readable storage medium | |
CN112040328B (en) | Data interaction method and device and electronic equipment | |
CN111212296B (en) | Live broadcast room gift list configuration method, device, medium and electronic equipment | |
CN111444457B (en) | Data release method and device, storage medium and electronic equipment | |
CN114979762A (en) | Video downloading and transmission method, device, terminal equipment, server and medium | |
CN111367592B (en) | Information processing method and device | |
CN115134641B (en) | Screen projection method and device and electronic equipment | |
CN116361254B (en) | Image storage method, apparatus, electronic device, and computer-readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |