CN107801049A - A kind of real-time video transmission, player method and device - Google Patents
A kind of real-time video transmission, player method and device Download PDFInfo
- Publication number
- CN107801049A CN107801049A CN201610808192.8A CN201610808192A CN107801049A CN 107801049 A CN107801049 A CN 107801049A CN 201610808192 A CN201610808192 A CN 201610808192A CN 107801049 A CN107801049 A CN 107801049A
- Authority
- CN
- China
- Prior art keywords
- client
- frames
- data stream
- video data
- current
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 230000005540 biological transmission Effects 0.000 title claims abstract description 24
- 238000006243 chemical reaction Methods 0.000 claims description 11
- 238000012546 transfer Methods 0.000 claims description 7
- 238000013459 approach Methods 0.000 claims description 6
- 230000001960 triggered effect Effects 0.000 claims description 4
- 230000008569 process Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 2
- 230000011664 signaling Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/23406—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving management of server-side video buffer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/231—Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
- H04N21/23113—Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving housekeeping operations for stored content, e.g. prioritizing content for deletion because of storage space restrictions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/232—Content retrieval operation locally within server, e.g. reading video streams from disk arrays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The embodiment of the invention discloses a kind of transmission of real-time video, player method and device, after server receives the video request of client transmission, the current video data stream of the current I frames of caching and acquisition is sent to client;Client carries out decoding broadcasting according to the current I frames to the data frame before first I frame in the current video data stream, is not in blank screen phenomenon.That is, the video data of an I frame is only cached in server, it is not necessary to cache GOP video data, reduce the memory source occupancy of server.
Description
Technical field
The present invention relates to video technique field, more particularly to a kind of real-time video transmission, player method and device.
Background technology
In the case where some obtain the scene of video data in real time, such as live or monitoring etc., server is set from video acquisition
Video data stream is obtained in standby in real time.User can watch real-time video by clients such as mobile phone, tablet personal computer, computers.
Detailed process can include:User end to server sends URL (Uniform Resource Locator, unification
URLs) request, after server authentication client is legal, establish the connection with client.Establish after connection, server
Can with to client send client request real time video data stream.
Video data is typically made up of multiple GOP (Group Of Picture, image sets), and a GOP includes an I
Other data frames of I frame decodings are relied on after frame (Intra pictures frame) and I frames.Therefore, server sends to client and regarded in real time
, it is necessary to just proceed by data transfer until occurring an I frame in video data stream during frequency data stream, this so just can guarantee that
Other data frames after I frames can normally decode broadcasting.
In such scheme, if after just having flowed through an I frame in the video data stream that server obtains, server receives
The video request sent to client, in this case, server need to wait longer period of time to wait until video data
Occurs an I frame in stream again, that is to say, that client is after video request has been sent, it is necessary to wait longer period of time ability
The feedback of server is obtained, blank screen phenomenon occurs in client.
In order to solve the above-mentioned technical problem, it is common practice to, in the server cache a GOP video data.When
After server receives the video request of client transmission, the video data of own cache is first sent to client, Ran Houzai
Send the current video data stream got.But using this scheme, need regarding for one GOP of additional buffered in server
Frequency evidence, improve the memory source occupancy of server.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of real-time video transmission, player method and device, reduction server
Memory source occupancy.
To reach above-mentioned purpose, the embodiment of the invention discloses a kind of real-time video transfer approach, applied to server, institute
The method of stating includes:
Receive the video request that client is sent;
The current internal picture I frames of caching are sent to the client;
The current video data stream of acquisition is sent to the client, so that the client is according to the current I frames
Decoding broadcasting is carried out to the data frame before first I frame in the current video data stream.
Optionally, methods described can also include:
Obtain the first video data stream;
Cache the current I frames in first video data stream;
It is when occurring next I frames of the current I frames in first video data stream, next I frames is true
It is set to current I frames;
Cached I frames are deleted, and return to the step for performing the current I frames in caching first video data stream
Suddenly.
Optionally, after the video request that the reception client is sent, can also include:
Judge whether the very first time interval in the second video data stream of the client request between adjacent I frames is more than
First predetermined threshold value, wherein, the very first time is at intervals of the interval between at the time of getting adjacent I frames;
If it is, perform the described the step of current internal picture I frames of caching are sent to the client;
If not, when there are I frames in second video data stream, by second video data stream to described
Client.
Optionally, between the very first time in the second video data stream for judge the client request between adjacent I frames
In the case of more than the first predetermined threshold value, it can also include:
Judge second between first I frame after present frame and the present frame in second video data stream
Whether time interval is more than the second predetermined threshold value, wherein, second time interval at the time of getting the present frame with
Interval between at the time of getting first I frame after the present frame;
If it is, perform the described the step of current internal picture I frames of caching are sent to the client;
If not, when there are I frames in second video data stream, by second video data stream to described
Client.
Optionally, after the video request that the reception client is sent, can also include:
Whether the data in the current video data stream for judging to obtain are coded data;
If not, the data in the current video data stream are encoded;
It is described that the current internal picture I frames of caching are sent to the client, including:
Current internal picture I frames after the coding of caching are sent to the client;
It is described that the current video data stream of acquisition is sent to the client, including:
Current video data stream after coding is sent to the client.
Optionally, methods described can also include:
Video quality information is sent to the client, the video quality information includes a variety of of server offer
Video quality;
The selection instruction that the client is sent is received, the first video matter of client selection is carried in the selection instruction
Amount;
According to the selection instruction, the image sets GOP after current data frame is converted under first video quality
Video data stream;
Give the video data stream after conversion to the client.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of real-time video player method, applied to client,
Methods described includes:
Video request is sent to server;
Receive current I frames and the current video data stream that the server is sent;
Decoding is carried out according to the current I frames to the data frame before first I frame in the current video data stream to broadcast
Put.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of real-time video conveyer, applied to server,
Described device includes:
Receiving module, for receiving the video request of client transmission;
First sending module, for the current internal picture I frames of caching to be sent into the client;
Second sending module, for the current video data stream of acquisition to be sent into the client, so that the client
End carries out decoding broadcasting according to the current I frames to the data frame before first I frame in the current video data stream.
Optionally, described device can also include:
Acquisition module, for obtaining the first video data stream;
Cache module, for caching the current I frames in first video data stream;
Determining module, for when occurring next I frames of the current I frames in first video flowing, under described
One I frame is defined as current I frames;
Removing module, for deleting cached I frames, and trigger the cache module.
Optionally, described device can also include:
First judge module, in the second video data stream for judging the client request between adjacent I frames
Whether one time interval is more than the first predetermined threshold value, wherein, the very first time is at intervals of between at the time of getting adjacent I frames
Interval;If it is, the cache module is triggered, if not, the 3rd sending module of triggering;
3rd sending module, for when there are I frames in second video data stream, by second video data stream
It is sent to the client.
Optionally, described device can also include:
Second judge module, for judging the after the present frame in second video data stream and the present frame
Whether the second time interval between one I frame is more than the second predetermined threshold value, wherein second time interval is gets
Interval between at the time of at the time of stating present frame and getting first I frame after the present frame;If it is, triggering institute
Cache module is stated, if not, triggering the 3rd sending module.
Optionally, described device can also include:
3rd judge module, whether the data in current video data stream for judging acquisition are coded data;
Coding module, for when the 3rd judge module judged result for it is no when, in the current video data stream
Data encoded;
The cache module, is specifically used for:
Current internal picture I frames after the coding of caching are sent to the client;
Second sending module, is specifically used for:
Current video data stream after coding is sent to the client.
Optionally, described device can also include:
4th sending module, for sending video quality information to the client, the video quality information includes institute
The various video quality of server offer is provided;
First receiving module, for receiving the selection instruction of the client transmission, client is carried in the selection instruction
Hold the first video quality of selection;
Conversion module, for according to the selection instruction, the image sets GOP after current data frame to be converted into described
Video data stream under one video quality;
5th sending module, for giving the video data stream after conversion to the client.
To reach above-mentioned purpose, the embodiment of the invention also discloses a kind of real-time video playing device, applied to client,
Described device includes:
6th sending module, for sending video request to server;
Second receiving module, for receiving current I frames and the current video data stream that the server is sent;
Playing module, for according to the current I frames to the data before first I frame in the current video data stream
Frame carries out decoding broadcasting.
Using the embodiment of the present invention, after server receives the video request of client transmission, by the current I frames of caching and
The current video data stream of acquisition is sent to client;Client is according to the current I frames in the current video data stream first
Data frame before individual I frames carries out decoding broadcasting, is not in blank screen phenomenon.That is, an I frame is only cached in server
Video data, it is not necessary to cache GOP video data, reduce the memory source occupancy of server.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is that a kind of flow of real-time video transfer approach applied to server provided in an embodiment of the present invention is illustrated
Figure;
Fig. 2 is that a kind of flow of real-time video player method applied to client provided in an embodiment of the present invention is illustrated
Figure;
Fig. 3 is a kind of structural representation of real-time video conveyer applied to server provided in an embodiment of the present invention
Figure;
Fig. 4 is a kind of structural representation of real-time video playing device applied to client provided in an embodiment of the present invention
Figure.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
In order to solve the above-mentioned technical problem, the embodiments of the invention provide a kind of real-time video transmission applied to server
Method and device and a kind of real-time video player method and device applied to client.
The real-time video transfer approach provided in an embodiment of the present invention applied to server is carried out specifically first below
It is bright.
Fig. 1 is that a kind of flow of real-time video transfer approach applied to server provided in an embodiment of the present invention is illustrated
Figure, including:
S101:Receive the video request that client is sent.
Before the video request that server receives that client is sent, it can also include shaking hands, establishing connection, establish network
The process of the Signalling exchanges such as stream.Can simply it be interpreted as, client first sends URL request, the form of the URL request to server
Can be " rtmp://serverIP:Port/StreamName ", wherein, rtmp represents to pass through between server and client
RTMP (Real Time Messaging Protocol, real-time messages host-host protocol) is communicated to connect, and can also pass through it certainly
Its protocol communication connects, and is not limited herein;serverIP:Port represents the port-mark of the server of client connection;
StreamName represents the mark of the video data stream of the client request.Server authentication is established with client and connected by rear
Connect, it is allowed to which client obtains the video data stream of its request from the port.
After said process, server can just receive the video request of client transmission, can be wrapped in the video request
The identification information of video data stream containing client request.
S102:The current internal picture I frames of caching are sent to the client.
In the present embodiment, server obtains video data stream in real time from video capture device.As its name suggests, video counts
The video data that can be understood as flowing in real time according to stream.It should be noted that under normal circumstances, server does not store the video
Data flow, simply after video request of the client for the video data stream is received, the video data stream is forwarded in real time
To client.
But in the present embodiment, server is directed to each video data stream got, caches each video data stream
Current I frames.I frames are Intra pictures frame, and video data is made up of multiple GOP, a GOP include an I frame and I frames it
Other data frames of I frame decodings are relied on afterwards.
In order to facilitate description, illustrated below for the first video data stream, the first video data stream obtains for server
Any video data stream got.
Current I frames in the video data stream of server buffer first, current I frames be in the first video data stream it is newest go out
Existing I frames, the I frames are being since when it occurs, into the first video data stream and when there are next I frames of the I frames
It is current I frames in period only.
When occurring next I frames of the current I frames in first video flowing, next I frames are defined as
Current I frames.Now, cached I frames are deleted, and cache the current I frames newly determined.Circulation performs this process, ensures service
The newest I frames flowed through in video data stream are cached with device always.
After the video request of client transmission is received, the video data stream that client is asked is determined, by caching
The current I frames of the video data stream are sent to client, then perform S103.In addition, if please in the absence of client in server
The video data stream asked, server can send to client and not find the similar prompt message such as resource.
S103:The current video data stream of acquisition is sent to the client.
The video data stream that client is asked is sent to the client in real time, that is to say, that acquisition is worked as into forward sight
Frequency data stream is sent to client.If what is flowed through in the current video data stream is other that need to be decoded by I frames
Data frame, such as P (forward prediction) frames or B (two-way interpolation) frame, are illustrated, client is receiving by taking P frames as an example below
After the P frames, decoding broadcasting is carried out to the P frames by the current I frames of reception.If flowed through in the current video data stream multiple
Occur first I frame after P frames, then for this multiple P frame, the current I frames that client depends on reception are carried out to this multiple P frame
Decoding plays.And the first I frame occurred below and the video data stream that flows through afterwards can normally decode broadcasting.
Using embodiment illustrated in fig. 1 of the present invention, after server receives the video request of client transmission, by working as caching
Preceding I frames and the current video data stream of acquisition are sent to client;Client is according to the current I frames to the current video data stream
In data frame before first I frame carry out decoding broadcasting, be not in blank screen phenomenon.That is, only cached in server
The video data of one I frame, it is not necessary to cache GOP video data, reduce the memory source occupancy of server.
As one embodiment of the present invention, after the video request that the reception client is sent, can first sentence
Whether the very first time interval in the second video data stream of the client request of breaking between adjacent I frames is more than the first default threshold
Value, wherein, the very first time is at intervals of the interval between at the time of getting adjacent I frames;If it is, again by the current of caching
Intra pictures I frames are sent to the client;If not, when there are I frames in second video data stream, by described second
Video data stream gives the client.
It is understood that the time interval in different video data streams between adjacent I frames may be different.If this when
Between interval very little itself, then in the prior art, server when in video data stream occur an I frame when just proceed by data
Transmission, also it is the very short time, client is not in blank screen even if waiting the time interval between a whole adjacent I frames
Phenomenon.In this case, server can no longer cache current I frames, or the current I frames of caching no longer are sent into client
End, but until occurring I frames in video data stream, by the video data stream to client.
It should be noted that the upper limit for the duration that above-mentioned first predetermined threshold value be able to can wait according to client is come really
It is fixed.
As one embodiment of the present invention, the adjacent I in the second video data stream for judge the client request
In the case that very first time interval between frame is more than the first predetermined threshold value, second video data can also be determined whether
Whether the second time interval between first I frame after present frame and the present frame in stream is more than the second default threshold
Value, wherein, second time interval is with getting first after the present frame at the time of getting the present frame
Interval between at the time of individual I frames;
If it is, the current internal picture I frames of caching are sent to the client;
If not, when there are I frames in second video data stream, by second video data stream to described
Client.
It is understood that if the present frame flowed through in video data stream is P frames, between the P frames and next I frames
Time interval is very small, then in the prior art, server just proceeds by data until occurring an I frame in video data stream
Transmission, simply waits for the very short time, client is not in the phenomenon of blank screen.In this case, server can no longer by
The current I frames of caching are sent to client, but until occurring I frames in video data stream, the video data stream is given
Client.
It should be noted that the upper limit for the duration that above-mentioned second predetermined threshold value be able to can wait according to client is come really
It is fixed.
In illustrated embodiment of the present invention, the video data stream that server obtains from video capture device is probably coding
Data, it is also possible to uncoded data.If uncoded data, then server first flows into the video data of acquisition
Row coding.Therefore, the current I frames of caching should be the I frames after coding, and the current video data stream for being sent to client also should
For the data after coding.
In illustrated embodiment of the present invention, server can also send video quality information, the video quality to client
Various code rate, the information such as resolution ratio that server can be provided can be included in information.Client is according to the video received
Quality information, and combine and be also conceivable to self electric quantity information etc. under own actual situation, such as network condition, mobile context,
Select suitable video quality (suitable code check and resolution ratio etc.).Client refers to the selection for carrying selected video quality
Order is sent to server.Server is after the selection instruction is received, by the video matter of each GOP after current data frame
Amount is converted into the video quality of client selection, and by the video data stream after conversion to client.
Certainly, during client carries out decoding broadcasting to video data stream, if the network condition hair of client
Change has been given birth to, or other situations for needing to adjust video quality has occurred, client can also send adjustment to server and regard
The request of frequency quality.Server is then forwarded to client after video data stream to be converted into the video quality of client request.
It should be noted that server typically enters when the video quality to video data converts to whole GOP
Row conversion, if server receives selection instruction or adjusts the request of video quality, a GOP does not flow also completely
Cross, then after waiting the GOP to flow completely through, since the next GOP flowed through, video data stream is adjusted.
Corresponding with above-mentioned transfer approach, the present invention also provides a kind of real-time video player method applied to client,
As shown in Fig. 2 including:
S201:Video request is sent to server.
Before user end to server sends video request, it can also include shaking hands, establishing connection, establish network flow etc.
The process of Signalling exchange.Can simply it be interpreted as, client first sends URL request to server, and the form of the URL request can be with
For " rtmp://serverIP:Port/StreamName ", wherein, rtmp represents to pass through RTMP between server and client
(Real Time Messaging Protocol, real-time messages host-host protocol) communicates to connect, serverIP:Port represents the visitor
The port-mark of the server of family end connection, StreamName represent the mark of the video data stream of the client request.Service
After device is verified, establishes and connect with client, it is allowed to which client obtains the video data stream of its request from the port.
After said process, user end to server sends video request, and regarding for request can be included in the video request
The identification information of frequency data stream.
S202:Receive current I frames and the current video data stream that the server is sent.
In the present embodiment, server obtains video data stream in real time from video capture device.As its name suggests, video counts
The video data that can be understood as flowing in real time according to stream.It should be noted that under normal circumstances, server does not store the video
Data flow, simply after video request of the client for the video data stream is received, the video data stream is forwarded in real time
To client.
But in the present embodiment, server is directed to each video data stream got, caches each video data stream
Current I frames.I frames are Intra pictures frame, and video data is made up of multiple GOP, a GOP include an I frame and I frames it
Other data frames of I frame decodings are relied on afterwards.
Server determines the video data stream of client request after the video request of client transmission is received, will be slow
The current I frames for the video data stream deposited are sent to client, and the video data stream is then sent into the client in real time,
That is the current video data stream of acquisition is sent to client.Client receives the I frames and the current video data stream.
S203:The data frame before first I frame in the current video data stream is solved according to the current I frames
Code plays.
If what is flowed through in the current video data stream is other data frames for needing to be decoded by I frames, such as P
(forward prediction) frame or B (two-way interpolation) frame, are illustrated by taking P frames as an example below, and client relies on after the P frames are received
The current I frames received carry out decoding broadcasting to the P frames.If occur after multiple P frames have been flowed through in the current video data stream
First I frame, then for this multiple P frame, the current I frames that client depends on reception carry out decoding broadcasting to this multiple P frame.And
The first I frame occurred below and the video data stream flowed through afterwards can normally decode broadcasting.
Using embodiment illustrated in fig. 2 of the present invention, after server receives the video request of client transmission, by working as caching
Preceding I frames and the current video data stream of acquisition are sent to client;Client is according to the current I frames to the current video data stream
In data frame before first I frame carry out decoding broadcasting, be not in blank screen phenomenon.That is, only cached in server
The video data of one I frame, it is not necessary to cache GOP video data, reduce the memory source occupancy of server.
It is corresponding with above-mentioned embodiment of the method, the embodiment of the present invention also provide a kind of real-time video conveyer and in real time
Video play device.
Fig. 3 is the real-time video conveyer provided in an embodiment of the present invention applied to server, including:
Receiving module 301, for receiving the video request of client transmission;
First sending module 302, for the current internal picture I frames of caching to be sent into the client;
Second sending module 303, for the current video data stream of acquisition to be sent into the client, so that the visitor
Family end carries out decoding broadcasting according to the current I frames to the data frame before first I frame in the current video data stream.
In the present embodiment, can also include:Acquisition module, cache module, determining module and removing module (do not show in figure
Go out), wherein,
Acquisition module, for obtaining the first video data stream;
Cache module, for caching the current I frames in first video data stream;
Determining module, for when occurring next I frames of the current I frames in first video flowing, under described
One I frame is defined as current I frames;
Removing module, for deleting cached I frames, and trigger the cache module.
In the present embodiment, can also include:First judge module and the 3rd sending module (not shown), wherein,
First judge module, in the second video data stream for judging the client request between adjacent I frames
Whether one time interval is more than the first predetermined threshold value, wherein, the very first time is at intervals of between at the time of getting adjacent I frames
Interval;If it is, the cache module is triggered, if not, the 3rd sending module of triggering;
3rd sending module, for when there are I frames in second video data stream, by second video data stream
It is sent to the client.
In the present embodiment, can also include:Second judge module (not shown), for judging second video
It is default whether the second time interval between first I frame after present frame and the present frame in data flow is more than second
Threshold value, wherein second time interval is with getting first after the present frame at the time of getting the present frame
Interval between at the time of individual I frames;If it is, the cache module is triggered, if not, triggering the 3rd sending module.
In the present embodiment, can also include:3rd judge module and coding module (not shown), wherein,
3rd judge module, whether the data in current video data stream for judging acquisition are coded data;
Coding module, for when the 3rd judge module judged result for it is no when, in the current video data stream
Data encoded;
The cache module, specifically can be used for:Current internal picture I frames after the coding of caching are sent to the visitor
Family end;
Second sending module, specifically can be used for:Current video data stream after coding is sent to the visitor
Family end.
In the present embodiment, can also include:4th sending module, the first receiving module, conversion module and the 5th send
Module (not shown), wherein,
4th sending module, for sending video quality information to the client, the video quality information includes institute
The various video quality of server offer is provided;
First receiving module, for receiving the selection instruction of the client transmission, client is carried in the selection instruction
Hold the first video quality of selection;
Conversion module, for according to the selection instruction, the image sets GOP after current data frame to be converted into described
Video data stream under one video quality;
5th sending module, for giving the video data stream after conversion to the client.
Using embodiment illustrated in fig. 3 of the present invention, after server receives the video request of client transmission, by working as caching
Preceding I frames and the current video data stream of acquisition are sent to client;Client is according to the current I frames to the current video data stream
In data frame before first I frame carry out decoding broadcasting, be not in blank screen phenomenon.That is, only cached in server
The video data of one I frame, it is not necessary to cache GOP video data, reduce the memory source occupancy of server.
Fig. 4 is the real-time video playing device provided in an embodiment of the present invention applied to client, including:
6th sending module 401, for sending video request to server;
Second receiving module 402, for receiving current I frames and the current video data stream that the server is sent;
Playing module 403, before according to the current I frames to first I frame in the current video data stream
Data frame carries out decoding broadcasting.
Using embodiment illustrated in fig. 4 of the present invention, after server receives the video request of client transmission, by working as caching
Preceding I frames and the current video data stream of acquisition are sent to client;Client is according to the current I frames to the current video data stream
In data frame before first I frame carry out decoding broadcasting, be not in blank screen phenomenon.That is, only cached in server
The video data of one I frame, it is not necessary to cache GOP video data, reduce the memory source occupancy of server.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality
Body or operation make a distinction with another entity or operation, and not necessarily require or imply and deposited between these entities or operation
In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to
Nonexcludability includes, so that process, method, article or equipment including a series of elements not only will including those
Element, but also the other element including being not expressly set out, or it is this process, method, article or equipment also to include
Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Other identical element also be present in process, method, article or equipment including the key element.
Each embodiment in this specification is described by the way of related, identical similar portion between each embodiment
Divide mutually referring to what each embodiment stressed is the difference with other embodiment.It is real especially for device
For applying example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method
Part explanation.
Can one of ordinary skill in the art will appreciate that realizing that all or part of step in above method embodiment is
To instruct the hardware of correlation to complete by program, described program can be stored in computer read/write memory medium,
The storage medium designated herein obtained, such as:ROM/RAM, magnetic disc, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention
It is interior.
Claims (14)
1. a kind of real-time video transfer approach, it is characterised in that applied to server, methods described includes:
Receive the video request that client is sent;
The current internal picture I frames of caching are sent to the client;
The current video data stream of acquisition is sent to the client so that the client according to the current I frames to institute
State the data frame in current video data stream before first I frame and carry out decoding broadcasting.
2. according to the method for claim 1, it is characterised in that methods described also includes:
Obtain the first video data stream;
Cache the current I frames in first video data stream;
When occurring next I frames of the current I frames in first video data stream, next I frames are defined as
Current I frames;
Cached I frames are deleted, and return to the step of performing the current I frames in caching first video data stream.
3. according to the method for claim 2, it is characterised in that after the video request that the reception client is sent,
Also include:
Judge whether the very first time interval in the second video data stream of the client request between adjacent I frames is more than first
Predetermined threshold value, wherein, the very first time is at intervals of the interval between at the time of getting adjacent I frames;
If it is, perform the described the step of current internal picture I frames of caching are sent to the client;
If not, when there are I frames in second video data stream, second video data stream is given to the client
End.
4. according to the method for claim 3, it is characterised in that judging the second video data stream of the client request
In in the case that very first time interval between adjacent I frames is more than the first predetermined threshold value, in addition to:
Judge the second time between first I frame after present frame and the present frame in second video data stream
Whether interval is more than the second predetermined threshold value, wherein, with obtaining at the time of second time interval is gets the present frame
Interval between at the time of first I frame after to the present frame;
If it is, perform the described the step of current internal picture I frames of caching are sent to the client;
If not, when there are I frames in second video data stream, second video data stream is given to the client
End.
5. according to the method for claim 1, it is characterised in that after the video request that the reception client is sent,
Also include:
Whether the data in the current video data stream for judging to obtain are coded data;
If not, the data in the current video data stream are encoded;
It is described that the current internal picture I frames of caching are sent to the client, including:
Current internal picture I frames after the coding of caching are sent to the client;
It is described that the current video data stream of acquisition is sent to the client, including:
Current video data stream after coding is sent to the client.
6. according to the method for claim 1, it is characterised in that methods described also includes:
Video quality information is sent to the client, the video quality information includes the various video that the server provides
Quality;
The selection instruction that the client is sent is received, the first video quality of client selection is carried in the selection instruction;
According to the selection instruction, the image sets GOP after current data frame is converted into regarding under first video quality
Frequency data stream;
Give the video data stream after conversion to the client.
7. a kind of real-time video player method, it is characterised in that applied to client, methods described includes:
Video request is sent to server;
Receive current I frames and the current video data stream that the server is sent;
Decoding broadcasting is carried out to the data frame before first I frame in the current video data stream according to the current I frames.
8. a kind of real-time video conveyer, it is characterised in that applied to server, described device includes:
Receiving module, for receiving the video request of client transmission;
First sending module, for the current internal picture I frames of caching to be sent into the client;
Second sending module, for the current video data stream of acquisition to be sent into the client, so that the client root
Decoding broadcasting is carried out to the data frame before first I frame in the current video data stream according to the current I frames.
9. device according to claim 8, it is characterised in that described device also includes:
Acquisition module, for obtaining the first video data stream;
Cache module, for caching the current I frames in first video data stream;
Determining module, for when occurring next I frames of the current I frames in first video flowing, by next I
Frame is defined as current I frames;
Removing module, for deleting cached I frames, and trigger the cache module.
10. device according to claim 9, it is characterised in that described device also includes:
First judge module, in the second video data stream for judging the client request between adjacent I frames first when
Between be spaced whether be more than the first predetermined threshold value, wherein, the very first time is at intervals of between at the time of getting adjacent I frames
Every;If it is, the cache module is triggered, if not, the 3rd sending module of triggering;
3rd sending module, for when there are I frames in second video data stream, by second video data stream
To the client.
11. device according to claim 10, it is characterised in that described device also includes:
Second judge module, for judging the present frame in second video data stream and first after the present frame
Whether the second time interval between I frames is more than the second predetermined threshold value, wherein second time interval is to get described work as
Interval between at the time of at the time of previous frame and getting first I frame after the present frame;If it is, triggering is described slow
Storing module, if not, triggering the 3rd sending module.
12. device according to claim 8, it is characterised in that described device also includes:
3rd judge module, whether the data in current video data stream for judging acquisition are coded data;
Coding module, for when the 3rd judge module judged result for it is no when, to the number in the current video data stream
According to being encoded;
The cache module, is specifically used for:
Current internal picture I frames after the coding of caching are sent to the client;
Second sending module, is specifically used for:
Current video data stream after coding is sent to the client.
13. device according to claim 8, it is characterised in that described device also includes:
4th sending module, for sending video quality information to the client, the video quality information includes the clothes
The various video quality that business device provides;
First receiving module, for receiving the selection instruction of the client transmission, client choosing is carried in the selection instruction
The first video quality selected;
Conversion module, for according to the selection instruction, the image sets GOP after current data frame being converted into described first and regarded
Video data stream under frequency quality;
5th sending module, for giving the video data stream after conversion to the client.
14. a kind of real-time video playing device, it is characterised in that applied to client, described device includes:
6th sending module, for sending video request to server;
Second receiving module, for receiving current I frames and the current video data stream that the server is sent;
Playing module, for being entered according to the current I frames to the data frame before first I frame in the current video data stream
Row decoding plays.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610808192.8A CN107801049B (en) | 2016-09-05 | 2016-09-05 | Real-time video transmission and playing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610808192.8A CN107801049B (en) | 2016-09-05 | 2016-09-05 | Real-time video transmission and playing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107801049A true CN107801049A (en) | 2018-03-13 |
CN107801049B CN107801049B (en) | 2020-01-17 |
Family
ID=61530887
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610808192.8A Active CN107801049B (en) | 2016-09-05 | 2016-09-05 | Real-time video transmission and playing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107801049B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108989859A (en) * | 2018-08-24 | 2018-12-11 | 广东盛利医疗科技有限公司 | A kind of surgery demonstration system and method |
CN110784740A (en) * | 2019-11-25 | 2020-02-11 | 北京三体云时代科技有限公司 | Video processing method, device, server and readable storage medium |
CN111010603A (en) * | 2019-12-18 | 2020-04-14 | 浙江大华技术股份有限公司 | Video caching and forwarding processing method and device |
CN111064698A (en) * | 2019-06-26 | 2020-04-24 | 三星电子(中国)研发中心 | Method and device for playing multimedia stream data |
CN111726657A (en) * | 2019-03-18 | 2020-09-29 | 北京奇虎科技有限公司 | Live video playing processing method and device and server |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070195892A1 (en) * | 2006-02-17 | 2007-08-23 | Kwang-Pyo Choi | Data receiving device and method for shortening channel switching time in digital multimedia broadcasting system |
CN101316357A (en) * | 2008-06-30 | 2008-12-03 | 华为技术有限公司 | Channel switching method, terminal and medium service apparatus |
CN101370139A (en) * | 2007-08-17 | 2009-02-18 | 华为技术有限公司 | Method and device for switching channels |
CN101686391A (en) * | 2008-09-22 | 2010-03-31 | 华为技术有限公司 | Video coding/decoding method and device as well as video playing method, device and system |
CN102223539A (en) * | 2011-06-24 | 2011-10-19 | 武汉长江通信产业集团股份有限公司 | Processing method for splash screen caused by picture coding frame loss |
-
2016
- 2016-09-05 CN CN201610808192.8A patent/CN107801049B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070195892A1 (en) * | 2006-02-17 | 2007-08-23 | Kwang-Pyo Choi | Data receiving device and method for shortening channel switching time in digital multimedia broadcasting system |
CN101370139A (en) * | 2007-08-17 | 2009-02-18 | 华为技术有限公司 | Method and device for switching channels |
CN101316357A (en) * | 2008-06-30 | 2008-12-03 | 华为技术有限公司 | Channel switching method, terminal and medium service apparatus |
CN101686391A (en) * | 2008-09-22 | 2010-03-31 | 华为技术有限公司 | Video coding/decoding method and device as well as video playing method, device and system |
CN102223539A (en) * | 2011-06-24 | 2011-10-19 | 武汉长江通信产业集团股份有限公司 | Processing method for splash screen caused by picture coding frame loss |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108989859A (en) * | 2018-08-24 | 2018-12-11 | 广东盛利医疗科技有限公司 | A kind of surgery demonstration system and method |
CN111726657A (en) * | 2019-03-18 | 2020-09-29 | 北京奇虎科技有限公司 | Live video playing processing method and device and server |
CN111064698A (en) * | 2019-06-26 | 2020-04-24 | 三星电子(中国)研发中心 | Method and device for playing multimedia stream data |
CN111064698B (en) * | 2019-06-26 | 2022-02-08 | 三星电子(中国)研发中心 | Method and device for playing multimedia stream data |
US11870831B2 (en) | 2019-06-26 | 2024-01-09 | Samsung Electronics Co., Ltd. | Method and apparatus for playing multimedia streaming data |
CN110784740A (en) * | 2019-11-25 | 2020-02-11 | 北京三体云时代科技有限公司 | Video processing method, device, server and readable storage medium |
CN111010603A (en) * | 2019-12-18 | 2020-04-14 | 浙江大华技术股份有限公司 | Video caching and forwarding processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN107801049B (en) | 2020-01-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109587510B (en) | Live broadcast method, device, equipment and storage medium | |
CN107801049A (en) | A kind of real-time video transmission, player method and device | |
WO2016131223A1 (en) | Frame loss method for video frame and video sending apparatus | |
CN1209924C (en) | Videoconference recording | |
CN101273637B (en) | Media manager, media contents management method and system and communication unit containing media manager | |
EP3311586A1 (en) | Signaling cached segments for broadcast | |
CN102202210B (en) | Method for mobile phone to play real-time monitoring video and mobile phone to play real-time monitoring video | |
CN101707686A (en) | Method and system for sharing video between mobile terminals | |
EP3047627B1 (en) | Dash representations adaptations in network | |
CN110996103A (en) | Method for adjusting video coding rate according to network condition | |
CN109618170B (en) | D2D real-time video streaming transmission method based on network coding | |
CN110740380A (en) | Video processing method and device, storage medium and electronic device | |
CN102325181A (en) | Instant audio/video interactive communication method based on sharing service and instant audio/video interactive communication system based on sharing service | |
CN102131114A (en) | Method and system for providing playlist | |
CN102752670A (en) | Method, device and system for reducing phenomena of mosaics in network video transmission | |
CN104320716A (en) | A video uplink transmission method based on collaborative multiple terminals | |
US20210409738A1 (en) | Video decoding method and apparatus, video encoding method and apparatus, storage medium, and electronic device | |
CN110113306A (en) | Distribute the method and the network equipment of data | |
CN111263192A (en) | Video processing method and related equipment | |
WO2021057477A1 (en) | Video encoding and decoding method and related device | |
CN110519640A (en) | Method for processing video frequency, encoder, CDN server, decoder, equipment and medium | |
CN115484240A (en) | Decoding method, decoding device, data transmission method, data transmission device, terminal and server | |
CN100459695C (en) | Method of transmitting video data, and transmission system | |
CN103929682B (en) | Method and device for setting key frames in video live broadcast system | |
US20120023541A1 (en) | Systems, methods, and media for controlling a presentation of data images in a video stream |
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 |