CN105100876B - A kind of playback method and device of Streaming Media - Google Patents
A kind of playback method and device of Streaming Media Download PDFInfo
- Publication number
- CN105100876B CN105100876B CN201510543389.9A CN201510543389A CN105100876B CN 105100876 B CN105100876 B CN 105100876B CN 201510543389 A CN201510543389 A CN 201510543389A CN 105100876 B CN105100876 B CN 105100876B
- Authority
- CN
- China
- Prior art keywords
- video
- currently playing
- rate
- playing video
- playback
- 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
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/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/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
- H04N21/4331—Caching operations, e.g. of an advertisement for later insertion during playback
-
- 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/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/262—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
- H04N21/26208—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
- H04N21/26216—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints involving the channel capacity, e.g. network bandwidth
-
- 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/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/266—Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
- H04N21/2662—Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
Abstract
The embodiment of the invention discloses a kind of playback method of Streaming Media and device, method includes: the buffer data size for obtaining currently playing video.The buffer data size of currently playing video then reduces the frame per second of currently playing video, extends the play time of every frame picture lower than predetermined lower threshold value and when the downloading rate of currently playing video is less than video original code rate;If the buffer data size of currently playing video is greater than predetermined upper threshold value, detects the video code rate that total caching finishes or the downloading rate of currently playing video is original not less than video, the frame per second for restoring currently playing video is the original frame per second of video.Using the embodiment of the present invention, it is able to solve the problem of streaming media video plays Caton in the case where unstable networks, user is made to obtain better viewing experience.
Description
Technical field
The present invention relates to video broadcasting field, in particular to the playback method and device of a kind of Streaming Media.
Background technique
What Online Video typically played out in the streaming media, i.e., lasting data are provided in server end
Stream, terminal receive, cache the video flowing, and while caching by the video display to user.But data transmission network is usual
It is unstable, it, will if substantially very low without the downloading rate of network or video flowing in regular hour length
The reduction for leading to buffer data size in terminal, when such case maintains the long period, it will lead to the exhaustion of buffer data size.
In the case where terminal buffers data volume is exhausted, since no data can be broadcast, it will cause the card of entire playing process
, this can largely reduce the viewing experience of user.
Summary of the invention
The playback method and device for being designed to provide a kind of Streaming Media of the embodiment of the present invention, to solve network not
Streaming media video plays the problem of Caton in the case where stabilization.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of playback methods of Streaming Media, are applied to terminal, described
Method comprising steps of
The buffer data size for obtaining currently playing video, judges whether the buffer data size is less than preset lower threshold
D1;
If so, obtaining the downloading rate of currently playing video;
Judge whether the downloading rate of currently playing video is less than the original code rate of the video;
If so, reducing the playback rate of currently playing video.
Preferably, the playback rate for reducing currently playing video includes:
According to the original frame per second of the original code rate of the downloading rate of currently playing video, the video, the video, determining is reduced
The playback rate of currently playing video afterwards.
Preferably, before the playback rate for reducing currently playing video, further includes:
Judge whether currently playing video caches completion;
When currently playing video cache is completed, keep the playback rate of currently playing video constant.
Preferably, the method also includes:
The buffer data size for obtaining currently playing video, judges whether the buffer data size is greater than preset upper limit threshold
D2;
If it is, improving the playback rate of currently playing video.
Preferably, the method also includes:
Judge whether the downloading rate of currently playing video is less than the original code rate of the video;
If it is not, then improving the playback rate of currently playing video.
The embodiment of the invention also discloses a kind of playing devices of Streaming Media, are applied to terminal, and described device includes:
First acquisition judgment module judges that the buffer data size is for obtaining the buffer data size of currently playing video
It is no to be less than preset lower threshold D1;
Second obtains judgment module, for obtaining currently playing view when the first acquisition judgment module judging result is to be
The downloading rate of frequency;Judge whether the downloading rate of currently playing video is less than the original code rate of the video;
Module is adjusted, for reducing the broadcasting of currently playing video when the second acquisition judgment module judging result is to be
Rate.
Preferably, the adjustment module, specifically for the code original according to the downloading rate of currently playing video, the video
The original frame per second of rate, the video determines the playback rate of the currently playing video after reducing.
Preferably, described device further include:
Caching completes execution module, for judging whether currently playing video caches completion;
The adjustment module is also used to when caching completion execution module judges that currently playing video cache is completed,
Keep the playback rate of currently playing video constant.
Preferably, described first obtains judgment module, it is also used to obtain the buffer data size of currently playing video, judgement should
Whether buffer data size is greater than preset upper limit threshold D2;
The adjustment module is also used to judge that buffer data size is greater than the preset upper limit when the first acquisition judgment module
When threshold value D2, the playback rate of currently playing video is improved.
Preferably, described second obtains judgment module, it is also used to judge whether the downloading rate of currently playing video is less than
The original code rate of the video;
The adjustment module is also used to judge the downloading rate of currently playing video not when the second acquisition judgment module
When original less than video code rate, the playback rate of currently playing video is improved.
The embodiment of the invention provides a kind of playback method of Streaming Media and device, terminal is obtained currently playing in this method
The buffer data size of video, judges whether the buffer data size is less than preset lower threshold D1, if it is less than the lower threshold,
The downloading rate of currently playing video is then obtained, and it is original to judge whether the downloading rate of currently playing video is less than the video
Video code stream rate, if so, reducing the playback rate of currently playing video.It is currently playing due to being directed in the embodiment of the present invention
The buffer data size of the video acquisition currently playing video, and it is less than preset lower threshold in the buffer data size, and deserve
When the preceding downloading rate for playing video is less than the original code rate of the video, the playback rate of the currently playing video is reduced, from
And the buffer memory of the video can be increased to a certain extent, it avoids buffer memory from occurring exhausted, guarantees the continuity of video playing.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of the playback method for Streaming Media that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow diagram of the playback method of Streaming Media provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of flow diagram of the playback method for Streaming Media that the embodiment of the present invention three provides;
Fig. 4 is a kind of flow diagram of the playback method for Streaming Media that the embodiment of the present invention four provides;
Fig. 5 is a kind of structural schematic diagram of the playing device for Streaming Media that the embodiment of the present invention five provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of playback method of Streaming Media and device, terminal is obtained currently playing in this method
The buffer data size of video, judges whether the buffer data size is less than preset lower threshold D1, if it is less than the lower threshold,
The downloading rate of currently playing video is then obtained, and it is original to judge whether the downloading rate of currently playing video is less than the video
Video code stream rate, if so, reducing the playback rate of currently playing video.It is currently playing due to being directed in the embodiment of the present invention
The buffer data size of the video acquisition currently playing video, and it is less than preset lower threshold in the buffer data size, and deserve
When the preceding downloading rate for playing video is less than the original code rate of the video, the playback rate of the currently playing video is reduced, from
And the buffer memory of the video can be increased to a certain extent, it avoids buffer memory from occurring exhausted, guarantees the continuity of video playing.
Below by specific embodiment, the present invention is described in detail.
Fig. 1 is a kind of flow diagram of the playback method for Streaming Media that the embodiment of the present invention one provides, this method application
In terminal, include the following steps:
S101: the buffer data size of currently playing video is obtained.
The buffer data size of a current video can be obtained according to the time interval set every one section;If this sets
Fixed time interval is shorter, it is understood that obtains the buffer data size of current video in real time for terminal or whenever of the invention real
At the end of the process that the offer of example one is provided, the buffer data size of a current video is obtained.
The terminal can set in embodiments of the present invention for electronics such as smart phone, tablet computer, notebook/desktop computers
It is standby.
S102: judging whether the buffer data size of currently playing video is less than preset lower threshold D1, if so, executing
S103, if it is not, then keeping the playback rate of currently playing video constant.
The lower threshold can be pre-configured in the terminal, and can for different types of video configuration it is different under
Threshold value is limited, when carrying out streaming media playing, terminal can select corresponding lower threshold according to the type of video.
Terminal can also provide a D1 value set interface, make user according to the use habit self-setting D1 value of oneself.
Set interface can provide data input frame for user input D1 numerical value, can also provide data selectionbar provide the user with it is optional
The D1 value selected.
Alternatively, terminal can also obtain the preset lower threshold from server.Different type can be directed in server
Video identical lower threshold or different lower thresholds are set.When terminal carries out streaming media playing, obtained from server
Take the corresponding lower threshold of the Streaming Media;Server can also will be sent to for the lower threshold of different types of video setting
Terminal can carry out phase according to the preset lower threshold received from server so that terminal is when carrying out streaming media playing
The judgement answered.
For example, no matter different video types can be directed in terminal or server be arranged different D1 values, video
Type can be distinguished with video format.For example, determining that its preset lower threshold is for the video of MP4 format
1MB;For the video of MKV format, determine that its preset lower threshold is 10MB.
Different D1 values can be set for different terminal resources.For example, terminal to server request carries out video download
When, the bandwidth information of oneself accessed network is also sent to server;It, will be with this after server receives the bandwidth information of the terminal
The corresponding predetermined lower threshold value D1 of bandwidth information is sent to the terminal, is used with making the judgement of the subsequent terminal;Alternatively, when there is end
Hold to server request video download when, server to its transmit video resource before, first by the terminal of preset latest edition
The look-up table of the corresponding relationship of the network bandwidth and corresponding lower limit threshold value that locally save is sent to terminal, and terminal obtains the look-up table
Afterwards, corresponding lower threshold is voluntarily searched according to the network bandwidth accessed, is used as subsequent judgement.For example, server exists
The corresponding D1 value of the 100MB broadband network being arranged in the look-up table can be less than the corresponding D1 value of 20MB broadband network, to save
The memory space of data cached shared terminal.
S103: the downloading rate of currently playing video is obtained.
S104: judge whether the downloading rate of currently playing video is less than the original code rate of the video;If so, executing
S105, if it is not, then keeping the playback rate of currently playing video constant.
When the original code rate of video refers to that video normal frame rate plays, the video bits number of transmission per second.For example, for
For MPEG1 format video, when original code rate is 1150kbps, i.e. one section of MPEG1 format video of normal play, consumption per second
The data volume of 1150kb.
S105: the playback rate of currently playing video is reduced.
The playback rate for reducing currently playing video can be the frame per second for reducing currently playing video, that is, reduce displaying per second
The frame number of image extends the displaying time of every frame image.
In embodiments of the present invention when reducing the playback rate of the currently playing video, which can be reduced
For the arbitrary value low compared with current playing rate.
It includes: original according to the downloading rate of currently playing video, the video for reducing the playback rate of currently playing video
Code rate, the original frame per second of the video, determine the frame per second of the currently playing video after reducing.Wherein the original frame per second of video refers to this
Frame per second when video normal play.
For example, the original code rate of certain video is V1, the original frame per second of video is F, if measuring the downloading of currently playing video
Rate is V2 and V2 < V1, current video play frame rate can be determined as (V2/V1) * F, at this moment can guarantee currently playing video
Caching total amount there is not negative growth.For example, original code rate is 1150kbps for MPEG1 format video, video is former
The frame per second of beginning is 25fps, can be current video play frame rate if the downloading rate for measuring currently playing video is 920kbps
It is determined as (920kbps/1150kbps) * 25fps=20fps, at this moment can guarantee that the caching total amount of currently playing video does not occur
Negative growth.
The method for reducing the frame per second of currently playing video further include: according to the downloading rate of currently playing video, current slow
The original frame per second of the original code rate of the data volume in deposit data area, preset lower threshold D1, the video, the video, determining reduces
The frame per second of currently playing video afterwards.
For example, the original code rate of certain video is V1, the original frame per second of video is F, if measuring the downloading of currently playing video
Rate is V2 and V2 < V1, and current cache data volume is D0 and D0 < D1, preset lower threshold are D1, current video can be broadcast
It puts frame per second and is determined as (V2/V1) * (D0/D1) * F, then within period of the D0 less than D1, data cached total amount can be made to increase
State.For example, original code rate is 1150kbps for MPEG1 format video, the original frame per second of video is 25fps, if
The downloading rate for measuring currently playing video is 920kbps, and current cache data volume is 4MB, preset caching lower threshold is
5MB can then be determined as current video play frame rate (920kbps*/1150kbps) * (4MB/5MB) * 25fps=16fps,
At this moment it can make data cached total amount increase state.
Due to being directed to the buffer data size of the currently playing video acquisition video in the embodiment of the present invention, and this is data cached
Amount is less than preset lower threshold, and the downloading rate of the currently playing video is less than the original video code stream rate of the video
When, the frame per second of the video is reduced, so as to increase the buffer data size of the video to a certain extent, guarantees video playing
Continuity.
During streaming media playing, when the Streaming Media buffered completion, due to the broadcasting of the Streaming Media, caching
Data volume also can constantly reduce, when the buffer data size is less than preset lower threshold, since current cache is completed, the view
The downloading rate of frequency is 0, also meets and is less than the original code rate of the video, even if not reducing the broadcasting speed of currently playing video at this time
The problem of Caton will not occur in rate.Therefore it is played in embodiments of the present invention in order to when video cache is completed, reduce to reduce
The frequent operation of the playback rate of video, before the playback rate for reducing currently playing video, further includes:
Judge whether currently playing video caches completion;
When currently playing video cache is completed, keep the playback rate of currently playing video constant.
Judge that the step of whether currently playing video caches completion belongs to the prior art, it can be with are as follows: terminal judges its reception
Whether the interface of the currently playing video is sent to it downloading and finishes information, if so, determining that currently playing video cache is complete
At.Wherein, the data can be returned after the data for the currently playing video which sends to server, when the interface returns
When the data returned are 0, that is, it can determine whether that currently playing video cache is completed.Specifically, in order to avoid caused by due to other
The rate of data transmission causes to become the erroneous judgement that terminal completes caching for 0, and the terminal also can be according to currently playing video
Total amount of data and the currently playing video downloaded data volume, come judge caching whether complete.Implement in the present invention
To concrete implementation mode without repeating in example.
Fig. 2 is a kind of flow diagram of the playback method of Streaming Media provided by Embodiment 2 of the present invention, including is walked as follows
It is rapid:
S201: the buffer data size of currently playing video is obtained.
S202: judging whether currently playing video caches completion, if so, S204 is executed, if it is not, executing S203.
S203: judging whether the buffer data size of currently playing video is less than preset lower threshold D1, if so, executing
S205, if it is not, then executing S204.
S204: keep the playback rate of currently playing video constant.
The frame per second of currently playing video is judged, if being the original frame per second of video, without adjustment;If
The frame per second of currently playing video is then adjusted to the original frame per second of video by the frame per second original less than video.Sheet is no longer executed later
Other all steps in inventive embodiments.
S205: the downloading rate of currently playing video is obtained.
S206: judge whether the downloading rate of currently playing video is less than the original code rate of the video;If so, executing
S207, if it is not, then executing S204.
S207: the playback rate of currently playing video is reduced.
Wherein step S202 can any position between step S201 and step S207 execute, as long as can guarantee
Realize whether video caches the judgement of completion before reducing the playback rate of currently playing video.
Above embodiment through the embodiment of the present invention can increase the buffer data size of video to a certain extent.It obtains
The buffer data size of currently playing video is taken, if the buffer data size reaches a certain level, is illustrated even if raising current video
Playback rate, which buffer data size exhaustion will not occurs and the problem of Caton occur, therefore in embodiments of the present invention
The method also includes:
The buffer data size for obtaining currently playing video, judges whether the buffer data size is greater than preset upper limit threshold
D2;
If so, improving the playback rate of currently playing video.
The playback rate for improving currently playing video can be and the playback rate of the video is risen to more current broadcasting
The playback rate of the video is risen to its original playback rate preferably, can be, i.e., with original by the high any number of rate
The code rate of beginning plays out.
The upper limit threshold can be pre-configured in the terminal, and can be for different upper of different types of video configuration
Threshold value is limited, when carrying out streaming media playing, terminal can select corresponding upper limit threshold according to the type of video.
Terminal can also provide a D2 value set interface, make user can be according to oneself use habit self-setting D2
Value.Set interface can provide data input frame and input D2 numerical value for user, can also provide data selectionbar and provide the user with
Selectable D2 value.
Alternatively, terminal can also obtain the preset upper limit threshold from server.Different type can be directed in server
Video identical upper limit threshold or different upper limit thresholds are set.When terminal carries out streaming media playing, obtained from server
Take the corresponding upper limit threshold of the Streaming Media;Server can also will be sent to for the upper limit threshold of different types of video setting
Terminal can carry out phase according to the preset upper limit threshold received from server so that terminal is when carrying out streaming media playing
The judgement answered.
For example, no matter can be directed to different video format types in terminal or server be arranged different D2
Value, video type can be distinguished with video format.For example, determining its preset upper limit threshold for the video of MP4 format
Value is 10MB;For the video of MKV format, determine that its preset upper limit threshold is 100MB.
Different D2 values can be set for different terminal resources.For example, terminal to server request carries out video download
When, the bandwidth information of oneself accessed network is also sent to server;It, will be with this after server receives the bandwidth information of the terminal
The corresponding predetermined upper threshold value D2 of bandwidth information is sent to the terminal, is used with making the judgement of the subsequent terminal;Alternatively, when there is end
Hold to server request video download when, server to its transmit video resource before, first by the terminal of preset latest edition
The look-up table of the corresponding relationship of the network bandwidth and corresponding upper limit threshold value that locally save is sent to terminal, and terminal obtains the look-up table
Afterwards, corresponding upper limit threshold is voluntarily searched according to the network bandwidth accessed, is used as subsequent judgement.For example, server exists
The corresponding D2 value of the 100MB broadband network being arranged in the look-up table can be less than the corresponding D2 value of 20MB broadband network, to save
The memory space of data cached shared terminal.
Fig. 3 is a kind of flow diagram of the playback method for Streaming Media that the embodiment of the present invention three provides, including walks as follows
It is rapid:
S301: the buffer data size of currently playing video is obtained.
S302: judging whether the buffer data size of currently playing video is less than preset lower threshold D1, if so, executing
S303, if it is not, then keeping the playback rate of currently playing video constant.
S303: the downloading rate of currently playing video is obtained.
S304: judging whether the downloading rate of currently playing video is less than the original code rate of the video, if so, executing
S305, if it is not, then keeping the playback rate of currently playing video constant.
S305: the playback rate of currently playing video is reduced.
S306: judging whether the buffer data size of currently playing video is greater than preset upper limit threshold D2, if so, executing
S307, if it is not, then keeping the playback rate of currently playing video constant.
S307: the playback rate of currently playing video is improved.
Three above embodiment can increase the buffer data size of video to a certain extent through the embodiment of the present invention.
If the downloading rate of currently playing video increases, and increases to the original code rate not less than video, explanation is
Make the playback rate for improving current video, which buffer data size exhaustion will not occurs and the problem of Caton occur, therefore
Method described in the embodiment of the present invention further include: judge whether the downloading rate of currently playing video is less than the original view of the video
Frequency stream rate;
If not, improving the playback rate of currently playing video.
The playback rate for improving currently playing video can be and the playback rate of the video is risen to more current broadcasting
The playback rate of the video is risen to its original playback rate preferably, can be, i.e., with original by the high any number of rate
The code rate of beginning plays out.
Fig. 4 is a kind of flow diagram of the playback method for Streaming Media that the embodiment of the present invention four provides, including walks as follows
It is rapid:
S401: the buffer data size of currently playing video is obtained.
S402: judging whether the buffer data size of currently playing video is less than preset lower threshold D1, if so, executing
S403, if it is not, then keeping the playback rate of currently playing video constant.
S403: the downloading rate of currently playing video is obtained.
S404: judging whether the downloading rate of currently playing video is less than the original code rate of the video, if so, executing
S405, if it is not, then keeping the playback rate of currently playing video constant.
S405: the playback rate of currently playing video is reduced.
S406: judging whether the downloading rate of currently playing video is less than the original code rate of the video, if not, executing
S407, if so, keeping the playback rate of currently playing video constant.
S407: the playback rate of currently playing video is improved.
Due in the embodiment of the present invention after reducing the playback rate of currently playing video, in order to improve the viewing body of user
It tests, for the buffer data size downloading rate of the currently playing video acquisition video, and in downloading rate, the buffer data size is big
In the code rate preset lower threshold original less than the video, and the downloading rate of the currently playing video is less than the original of the video
When the video code stream rate of beginning, the playback rate frame per second for improving the currently playing video is reduced, so as to a certain extent
The buffer memory for increasing the video guarantees that the continuity of video playing improves user experience.
Fig. 5 is a kind of structural schematic diagram of the playing device of Streaming Media provided in an embodiment of the present invention, including first obtains
Judgment module 501, second obtains judgment module 502, adjustment module 504.
Wherein, the first acquisition judgment module 501 judges the caching for obtaining the buffer data size of currently playing video
Whether data volume is less than preset lower threshold D1;
Second obtains judgment module 502, for obtaining currently playing when the first acquisition judgment module judging result is to be
The downloading rate of video;Judge whether the downloading rate of currently playing video is less than the original code rate of the video;
Module 504 is adjusted, for reducing broadcasting for currently playing video when the second acquisition judgment module judging result is to be
Put rate.
Further, the adjustment module 504, specifically for former according to the downloading rate of currently playing video, the video
The original frame per second of the code rate of beginning, the video determines the playback rate of the currently playing video after reducing.
Described device further include:
Caching completes execution module 503, for judging whether currently playing video caches completion;
The adjustment module 504 is also used to complete execution module when the caching to judge that currently playing video cache is completed
When, keep the playback rate of currently playing video constant.
Described first obtains judgment module 501, is also used to obtain the buffer data size of currently playing video, judges the caching
Whether data volume is greater than preset upper limit threshold D2;
The adjustment module 504 is also used to judge buffer data size greater than preset when the first acquisition judgment module
When upper limit threshold D2, the playback rate of currently playing video is improved.
Described second obtains judgment module 502, is also used to judge whether the downloading rate of currently playing video is less than the view
Frequently original code rate;
The adjustment module 504 is also used to judge the downloading speed of currently playing video when the second acquisition judgment module
When rate is not less than the video original code rate, the playback rate of currently playing video is improved.
The embodiment of the invention provides a kind of playback method of Streaming Media and device, terminal is obtained currently playing in this method
The buffer data size of video, judges whether the buffer data size is less than preset lower threshold D1, if it is less than the lower threshold,
The downloading rate of currently playing video is then obtained, and it is original to judge whether the downloading rate of currently playing video is less than the video
Video code stream rate, if so, reducing the playback rate of currently playing video.It is currently playing due to being directed in the embodiment of the present invention
The buffer data size of the video acquisition currently playing video, and it is less than preset lower threshold in the buffer data size, and deserve
When the preceding downloading rate for playing video is less than the original code rate of the video, the playback rate of the currently playing video is reduced, from
And the buffer memory of the video can be increased to a certain extent, it avoids buffer memory from occurring exhausted, guarantees the continuity of video playing.
For device embodiment, since it is substantially similar to the method embodiment, related so being described relatively simple
Place illustrates referring to the part of embodiment of the method.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or the mobile device that include a series of elements not only include those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or shifting
The intrinsic element of dynamic equipment.In the absence of more restrictions, the element limited by sentence " including one ... ", and
It is not precluded in the process, method including the element, article or mobile device that there is also other identical elements.
Those of ordinary skill in the art will appreciate that all or part of the steps in realization above method embodiment is can
It is completed with instructing relevant hardware by program, the program can store in computer-readable storage medium,
The storage medium designated herein obtained, such as: ROM/RAM, magnetic disk, CD.
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 replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (8)
1. a kind of playback method of Streaming Media, which is characterized in that it is applied to terminal, the method includes the steps:
The buffer data size for obtaining currently playing video, judges whether the buffer data size is less than preset lower threshold D1;
If so, obtaining the downloading rate of currently playing video;
Judge whether the downloading rate of currently playing video is less than the original code rate of the video;
If so, reducing the playback rate of currently playing video;
The playback rate for reducing currently playing video includes:
According to the original frame per second of the original code rate of the downloading rate of currently playing video, the video, the video, determine after reducing
The playback rate of currently playing video;
The original frame per second of the code rate original according to the downloading rate of currently playing video, the video, the video, determining reduces
The playback rate of currently playing video afterwards, comprising:
Current video play frame rate is determined as (V2/V1) * F,
Alternatively, current video play frame rate is determined as (V2/V1) * (D0/D1) * F, wherein V2 is the downloading of currently playing video
Rate, V1 are the original code rate of the video, and D0 is current cache data volume, and D1 is preset lower threshold, and F is that the video is original
Frame per second.
2. the method according to claim 1, wherein the playback rate for reducing currently playing video it
Before, further includes:
Judge whether currently playing video caches completion;
When currently playing video cache is completed, keep the playback rate of currently playing video constant.
3. the method according to claim 1, wherein the method also includes:
The buffer data size for obtaining currently playing video, judges whether the buffer data size is greater than preset upper limit threshold D2;
If it is, improving the playback rate of currently playing video.
4. the method according to claim 1, wherein the method also includes:
Judge whether the downloading rate of currently playing video is less than the original code rate of the video;
If it is not, then improving the playback rate of currently playing video.
5. a kind of playing device of Streaming Media, which is characterized in that be applied to terminal, described device includes:
First acquisition judgment module judges whether the buffer data size is small for obtaining the buffer data size of currently playing video
In preset lower threshold D1;
Second obtains judgment module, for obtaining currently playing video when the first acquisition judgment module judging result is to be
Downloading rate;Judge whether the downloading rate of currently playing video is less than the original code rate of the video;
Module is adjusted, for reducing the playback rate of currently playing video when the second acquisition judgment module judging result is to be;
The adjustment module, specifically for former according to the original code rate of the downloading rate of currently playing video, the video, the video
The frame per second of beginning determines the playback rate of the currently playing video after reducing;
The original frame per second of the code rate original according to the downloading rate of currently playing video, the video, the video, determining reduces
The playback rate of currently playing video afterwards, comprising:
Current video play frame rate is determined as (V2/V1) * F,
Alternatively, current video play frame rate is determined as (V2/V1) * (D0/D1) * F, wherein V2 is the downloading of currently playing video
Rate, V1 are the original code rate of the video, and D0 is current cache data volume, and D1 is preset lower threshold, and F is that the video is original
Frame per second.
6. device as claimed in claim 5, which is characterized in that described device further include:
Caching completes execution module, for judging whether currently playing video caches completion;
The adjustment module is also used to keep when caching completion execution module judges that currently playing video cache is completed
The playback rate of currently playing video is constant.
7. device as claimed in claim 5, which is characterized in that described first obtains judgment module, is also used to obtain and currently broadcast
The buffer data size for putting video, judges whether the buffer data size is greater than preset upper limit threshold D2;
The adjustment module is also used to judge that buffer data size is greater than preset upper limit threshold when the first acquisition judgment module
When D2, the playback rate of currently playing video is improved.
8. device as claimed in claim 5, which is characterized in that described second obtains judgment module, is also used to judge currently to broadcast
Whether the downloading rate for putting video is less than the original code rate of the video;
The adjustment module is also used to judge that the downloading rate of currently playing video is not less than when the second acquisition judgment module
When the original code rate of the video, the playback rate of currently playing video is improved.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510543389.9A CN105100876B (en) | 2015-08-28 | 2015-08-28 | A kind of playback method and device of Streaming Media |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510543389.9A CN105100876B (en) | 2015-08-28 | 2015-08-28 | A kind of playback method and device of Streaming Media |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105100876A CN105100876A (en) | 2015-11-25 |
CN105100876B true CN105100876B (en) | 2019-04-12 |
Family
ID=54580268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510543389.9A Active CN105100876B (en) | 2015-08-28 | 2015-08-28 | A kind of playback method and device of Streaming Media |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105100876B (en) |
Families Citing this family (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105550523A (en) * | 2015-12-28 | 2016-05-04 | 上海携程商务有限公司 | Data processing method |
CN105812902B (en) * | 2016-03-17 | 2018-09-04 | 联发科技(新加坡)私人有限公司 | Method, equipment and the system of data playback |
CN105959734B (en) * | 2016-05-05 | 2019-04-26 | 广州珠江在线多媒体信息有限公司 | A kind of anti-sticking disconnected Online Video playback method |
CN106899863B (en) | 2016-06-28 | 2019-10-25 | 阿里巴巴集团控股有限公司 | A kind of data processing method and device |
CN106412664B (en) * | 2016-10-08 | 2019-08-13 | Oppo广东移动通信有限公司 | Multimedia synchronous plays method, apparatus, terminal and system |
CN106412676A (en) * | 2016-10-21 | 2017-02-15 | 乐视控股(北京)有限公司 | Video code stream switching method and device, and electronic device |
CN108668146B (en) * | 2017-03-27 | 2021-07-16 | 华为技术有限公司 | Method and equipment for adjusting streaming media code rate |
CN107087210B (en) * | 2017-03-30 | 2020-04-14 | 青岛海信电器股份有限公司 | Method and terminal for judging video playing state based on cache time |
CN107205160A (en) * | 2017-06-27 | 2017-09-26 | 青岛海信电器股份有限公司 | A kind of player method and device of the video issued for server |
CN107347065A (en) * | 2017-06-29 | 2017-11-14 | 上海鋆创信息技术有限公司 | A kind of data push method and device, a kind of terminal and storage medium |
CN107396171A (en) * | 2017-07-24 | 2017-11-24 | 广州酷狗计算机科技有限公司 | Live network broadcast method, device and storage medium |
CN107454458A (en) * | 2017-08-30 | 2017-12-08 | 努比亚技术有限公司 | A kind of video data caching method, equipment and storage medium |
CN109561347B (en) * | 2017-09-27 | 2022-01-25 | 中国移动通信集团山东有限公司 | Internet video playing quality judgment method and system |
CN110324710A (en) * | 2018-03-30 | 2019-10-11 | 深圳Tcl新技术有限公司 | A kind of method, apparatus and storage medium calculating video code rate |
CN108810656B (en) * | 2018-06-12 | 2021-10-26 | 深圳国微视安科技有限公司 | Real-time live broadcast TS (transport stream) jitter removal processing method and processing system |
CN110771173A (en) * | 2018-07-31 | 2020-02-07 | 深圳市大疆创新科技有限公司 | Video display control method, device, and computer-readable storage medium |
CN109194975B (en) * | 2018-11-02 | 2021-04-20 | 深圳市云威物联科技有限公司 | Audio and video live broadcast stream following method and device |
CN110062249A (en) * | 2019-05-13 | 2019-07-26 | 东莞康佳电子有限公司 | A method of promoting high-definition intelligent picture quality of television fluency |
CN110662109B (en) * | 2019-09-29 | 2022-10-18 | 咪咕动漫有限公司 | Video playing method, electronic equipment and computer readable storage medium |
CN111294634B (en) * | 2020-02-27 | 2022-02-18 | 腾讯科技(深圳)有限公司 | Live broadcast method, device, system, equipment and computer readable storage medium |
CN111372125B (en) * | 2020-03-18 | 2022-10-04 | 浩云科技股份有限公司 | Video cache processing method and device of decoder and storage medium |
CN113891155B (en) * | 2021-09-29 | 2024-04-05 | 百果园技术(新加坡)有限公司 | Video playing gear determining method, video playing method and related devices |
CN115022667A (en) * | 2022-06-28 | 2022-09-06 | 武汉斗鱼鱼乐网络科技有限公司 | Live broadcast control method and related equipment |
CN115361585B (en) * | 2022-08-19 | 2023-11-07 | 广州市百果园信息技术有限公司 | Video playing and clamping prediction method, device, equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6665751B1 (en) * | 1999-04-17 | 2003-12-16 | International Business Machines Corporation | Streaming media player varying a play speed from an original to a maximum allowable slowdown proportionally in accordance with a buffer state |
CN1937778A (en) * | 2005-09-20 | 2007-03-28 | 腾讯科技(深圳)有限公司 | Flow media playing method, system and device |
CN103051955A (en) * | 2012-12-21 | 2013-04-17 | 华为技术有限公司 | Method and device for playing streaming media |
CN103731720A (en) * | 2013-11-25 | 2014-04-16 | 乐视致新电子科技(天津)有限公司 | Method and device for caching multimedia data of smart television |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101146110B (en) * | 2007-09-25 | 2011-06-29 | 深圳市迅雷网络技术有限公司 | A method for playing stream media |
-
2015
- 2015-08-28 CN CN201510543389.9A patent/CN105100876B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6665751B1 (en) * | 1999-04-17 | 2003-12-16 | International Business Machines Corporation | Streaming media player varying a play speed from an original to a maximum allowable slowdown proportionally in accordance with a buffer state |
CN1937778A (en) * | 2005-09-20 | 2007-03-28 | 腾讯科技(深圳)有限公司 | Flow media playing method, system and device |
CN103051955A (en) * | 2012-12-21 | 2013-04-17 | 华为技术有限公司 | Method and device for playing streaming media |
CN103731720A (en) * | 2013-11-25 | 2014-04-16 | 乐视致新电子科技(天津)有限公司 | Method and device for caching multimedia data of smart television |
Also Published As
Publication number | Publication date |
---|---|
CN105100876A (en) | 2015-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105100876B (en) | A kind of playback method and device of Streaming Media | |
US8504774B2 (en) | Dynamic cache configuration using separate read and write caches | |
JP5302463B2 (en) | Adaptive streaming for digital content distribution | |
US8693840B2 (en) | Method and terminal for video processing | |
CN110636339B (en) | Scheduling method and device based on code rate and electronic equipment | |
KR102352679B1 (en) | Device supporting multipath tcp, and method of receiving video data of device by streaming | |
CN101001362A (en) | Method and terminal of on-line playing flow media | |
CN105872722A (en) | Online video start playing caching system and method | |
CN112333476B (en) | Video loading method and device | |
CN103974057B (en) | A kind of video quality user experience value assessment method, equipment and system | |
EP3135019B1 (en) | Method and system for bandwidth-dependent file transfer | |
CN107483401B (en) | Multimedia data transmission method and equipment, storage medium and server thereof | |
WO2023051350A1 (en) | Video playing grade determination method, video playing method, and related apparatuses | |
JP6695980B2 (en) | Using network-assisted protocols to improve network utilization | |
CN104219286A (en) | Method and device for processing stream media, client, CDN (content delivery network) node server and terminal | |
CN105142004B (en) | Multimedia file read method and device | |
CN106791930B (en) | Video processing method and device | |
CN103294782A (en) | Data display method and device | |
CN111225209A (en) | Video data plug flow method, device, terminal and storage medium | |
CN111107438A (en) | Video loading method and device and electronic equipment | |
CN108811055B (en) | Frame rate adjusting method and device, terminal equipment and storage medium | |
CN107333147B (en) | Video buffer control method, terminal and storage device | |
CN104065834A (en) | Method and device for reducing terminal power consumption and terminal | |
CN108693948B (en) | Frame rate adjusting method and device, terminal equipment and storage medium | |
CN107273310A (en) | A kind of read method of multi-medium data, device, medium and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |