CN106331766B - The playing method and device of video file - Google Patents

The playing method and device of video file Download PDF

Info

Publication number
CN106331766B
CN106331766B CN201610791427.7A CN201610791427A CN106331766B CN 106331766 B CN106331766 B CN 106331766B CN 201610791427 A CN201610791427 A CN 201610791427A CN 106331766 B CN106331766 B CN 106331766B
Authority
CN
China
Prior art keywords
video file
value
player
video player
video
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610791427.7A
Other languages
Chinese (zh)
Other versions
CN106331766A (en
Inventor
洪珂
姜宇鹏
李俊明
林新建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201610791427.7A priority Critical patent/CN106331766B/en
Publication of CN106331766A publication Critical patent/CN106331766A/en
Application granted granted Critical
Publication of CN106331766B publication Critical patent/CN106331766B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2401Monitoring of the client buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/23805Controlling the feeding rate to the network, e.g. by controlling the video pump
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management 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/266Channel 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/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer

Abstract

The invention discloses a kind of playing method and devices of video file.Wherein, this method comprises: during video player playing video file, the Current buffer value of scan video player;Judge whether Current buffer value is greater than preset buffer threshold;If judging, Current buffer value is greater than buffer threshold, and acquisition jumps duration, wherein jumps duration and is obtained according to Current buffer value and the first play buffering value;Duration is jumped from the Caton moment to continue playing video file, wherein at the time of the Caton moment is data in the buffer area for play video player.The present invention solves the technical issues of accumulation is delayed as caused by network congestion and Caton.

Description

The playing method and device of video file
Technical field
The present invention relates to video broadcasting fields, in particular to a kind of playing method and device of video file.
Background technique
Flash Player (a kind of player) is now widely used for the video playing of page end, it is short and pithy, energy Enough to use in various browsers, operating system and mobile device, powerful, compatibility is high.Connection more than 1,300,000,000 because Adobe Flash Player (a Multimedia Program player) is assembled on the desktop computer and mobile device of spy's net.
The existing web player realized based on Flash technology is to video file or data flow in the way of playing frame by frame Processing, the processing mode are applied under live broadcast service scene, can bring following problems:
In live streaming watching process, congestion occurs for network, and will lead to player end can not obtain newest live data streams, After so player buffering (buffer) finishes, Caton occurs for live streaming;After subsequent network situation is restored, player is from Caton Point continues to play, and the Caton time by Yanzhong when being persistently added to live streaming, causes continuing to increase for live streaming time delay.
For above-mentioned problem, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of playing method and devices of video file, at least to solve due to network congestion With the technical issues of the accumulating that be delayed caused by Caton.
According to an aspect of an embodiment of the present invention, a kind of playback method of video file is provided, comprising: broadcast in video During putting device playing video file, the Current buffer value of the video player is scanned;Judging the Current buffer value is It is no to be greater than preset buffer threshold;If judging, the Current buffer value is greater than the buffer threshold, when acquisition jumps It is long, wherein the duration that jumps is obtained according to the Current buffer value and the first play buffering value;It is jumped from the Caton moment described Duration is jumped to continue to play the video file, wherein the Caton moment is the buffering for playing the video player In area at the time of data.
Further, it includes: to obtain the pre-set first play buffering value that the acquisition, which jumps duration, wherein The first play buffering value can change with the change of current network state;The Current buffer value and described first are played The difference of buffer value jumps duration described in being used as.
Further, during the video player playing video file, working as the video player is scanned Preceding buffer value includes: the Current buffer value of video player described in periodic scanning, video player described in period incremental scan The Current buffer value of video player described in Current buffer value or adaptive intermittent scanning.
Further, the Current buffer value of video player described in the adaptive intermittent scanning include: detection repeatedly by According to predetermined period scan the Current buffer value of the video player as a result, obtaining multiple scanning results;It detects the multiple Whether scanning result is stable in a certain range;If it is detected that the multiple scanning result is stablized in a certain range, increase The predetermined period;If it is detected that the multiple scanning result fluctuates outside described a certain range, reduce the predetermined period.
Further, it is described from the Caton moment jump it is described jump duration continue to play the video file include: from The Caton moment starts to jump video file corresponding to duration described in discarding to continue to play the video file;Or from The Caton moment starts to accelerate to jump video file corresponding to duration described in broadcasting.
Further, before the video player playing video file, the method also includes: receive the video File;Whether the length for detecting the video file received meets pre-set second play buffering value;If it is detected that receiving To the length of the video file meet the second play buffering value, then start to play the video file;If it is detected that The length of the video file received is unsatisfactory for the second play buffering value, then continue to the video file until The length of the video file received meets the second play buffering value.
According to another aspect of an embodiment of the present invention, a kind of playing device of video file is additionally provided, comprising: scanning is single Member, for scanning the Current buffer value of the video player during video player playing video file;Judgement is single Member, for judging whether the Current buffer value is greater than preset buffer threshold;Acquiring unit, for judge it is described When Current buffer value is greater than the buffer threshold, acquisition jumps duration, wherein the duration that jumps is according to the Current buffer value It is obtained with the first play buffering value;First broadcast unit described jump duration and continues to play institute for jumping from the Caton moment State video file, wherein at the time of the Caton moment is data in the buffer area for play the video player.
Further, the acquiring unit includes: acquisition module, for obtaining pre-set first play buffering Value, wherein the first play buffering value can change with the change of current network state;Computing module, for working as by described in The difference of preceding buffer value and the first play buffering value jumps duration described in being used as.
Further, the scanning element includes: the first scan module, for working as video player described in periodic scanning Preceding buffer value, the second scan module, Current buffer value or third for video player described in period incremental scan scan Module, the Current buffer value for video player described in adaptive intermittent scanning.
Further, the third scan module includes: the first detection sub-module, for detecting repeatedly according to predetermined period Scan the Current buffer value of the video player as a result, obtaining multiple scanning results;Second detection sub-module, described in detection Whether multiple scanning results are stable in a certain range;Increase submodule, for detecting that the multiple scanning result is stable When in a certain range, increase the predetermined period;Reduce submodule, for detecting the multiple scanning result described Fluctuating outside a certain range is to reduce the predetermined period.
Further, first broadcast unit includes: the first playing module, for abandoning since the Caton moment It is described to jump video file corresponding to duration to continue to play the video file;Or second playing module, for from institute State the Caton moment start accelerate play described in jump video file corresponding to duration.
Further, described device further include: the first receiving unit, in the video player playing video file Before, the video file is received;Whether third detection unit, the length for detecting the video file received meet in advance The second play buffering value being arranged;Second broadcast unit, for the length satisfaction in the video file for detecting to receive When the second play buffering value, then start to play the video file;Second receiving unit, for detecting to receive When the length of the video file is unsatisfactory for the second play buffering value, the video file is continued to until receiving The length of the video file meets the second play buffering value.
To achieve the goals above, according to another aspect of the present invention, a kind of storage medium, the storage medium are provided Program including storage, wherein equipment where controlling the storage medium in described program operation executes view described above The playback method of frequency file.
To achieve the goals above, according to another aspect of the present invention, a kind of processor is provided, the processor is used for Run program, wherein described program executes the playback method of video file described above when running.
In embodiments of the present invention, it is broadcast using during video player playing video file, scanning the video The mode for putting the Current buffer value of device, by judging whether the Current buffer value is greater than preset buffer threshold, if sentencing The disconnected Current buffer value out is greater than the buffer threshold, then obtains and jump duration, reached from the Caton moment and jumped the jump Turn duration to continue to play the purpose of the video file, to realize the technical effect for reducing live streaming delay, and then solves Be delayed as caused by the network congestion and Caton accumulation the technical issues of.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of flow chart of the playback method of optional video file according to an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of the playing device of optional video file according to an embodiment of the present invention;
Fig. 3 is a kind of playing device operational flow diagram of optional video file according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product Or other step or units that equipment is intrinsic.
According to embodiments of the present invention, a kind of embodiment of the method for the broadcasting of optional video file is provided, needs to illustrate , step shown in the flowchart of the accompanying drawings can hold in a computer system such as a set of computer executable instructions Row, although also, logical order is shown in flow charts, and it in some cases, can be to be different from sequence herein Execute shown or described step.
Fig. 1 is a kind of flow chart of the playback method of optional video file according to an embodiment of the present invention, such as Fig. 1 institute Show, this method comprises the following steps:
Step S102, during video player playing video file, the Current buffer value of scan video player;
Step S104, judges whether Current buffer value is greater than preset buffer threshold;
Step S106, if judging, Current buffer value is greater than buffer threshold, and acquisition jumps duration, wherein jumps duration It is obtained according to Current buffer value and the first play buffering value;
Step S108 jumps duration from the Caton moment to continue playing video file, wherein the Caton moment is to play In the buffer area of complete video player at the time of data.
In embodiments of the present invention, using during video player playing video file, scan video player Current buffer value mode, by judging whether Current buffer value is greater than preset buffer threshold, if judging current Buffer value is greater than buffer threshold, then obtains and jump duration, has reached and has jumped duration from the Caton moment to continue to play video The purpose of file to realize the technical effect for reducing live streaming delay, and then is solved since network congestion and Caton cause Delay accumulation the technical issues of.
Optionally, obtaining and jumping duration includes: to obtain pre-set first play buffering value, wherein the first broadcasting is slow Punching value can change with the change of current network state;When using the difference of Current buffer value and the first play buffering value as jumping It is long.
During player carries out network direct broadcasting, player can dynamically be arranged one according to the state of current network The play buffering value of a player makes player have a caching appropriate, to guarantee the smoothness of network direct broadcasting, while subtracting as far as possible The delay of small player, such as: when network state is preferable, the play buffering value of player is smaller;When network state is bad, broadcast The play buffering value for putting device is larger.When player needs to carry out redirect broadcasting, broadcasting is subtracted by player Current buffer value The duration that jumps of player is calculated in the play buffering of device, i.e., the buffer value after player jumps is equal to broadcasting for player Slow down punching, network direct broadcasting can be normally carried out.
Optionally, during video player playing video file, the Current buffer value packet of scan video player It includes: Current buffer value, the Current buffer value or adaptive of period incremental scan video player of periodic scanning video player Answer the Current buffer value of intermittent scanning video player.
Various ways can be used to the scanning of player Current buffer value, it is common there are three types of: periodic scanning, i.e., it is default One scan period carries out single pass to the buffer value of player every a cycle;Period incremental scan, i.e., default one A preliminary sweep period, and be arranged the scan period according to certain rule be incremented by, each scan period, to the buffering of player Value carries out single pass;Adaptive intermittent scanning, i.e. scan period adaptive change delay player every a cycle Punching value carries out single pass.
Optionally, the Current buffer value of adaptive intermittent scanning video player includes: detection repeatedly according to predetermined period The Current buffer value of scan video player as a result, obtaining multiple scanning results;Detect multiple scanning results it is whether stable In a certain range;If it is detected that multiple scanning results are stablized in a certain range, increase predetermined period;If it is detected that multiple sweep It retouches result to fluctuate outside a certain range, then reduces predetermined period.
Adaptive intermittent scanning is root after taking multiple scan according to Current buffer value of the preset period to player According to the situation of change for the buffer value that Multiple-Scan obtains, the scan period is adjusted, such as: Multiple-Scan result is stablized certain In range, variation less, then increases the scan period;Multiple-Scan result fluctuates outside a certain range, changes greatly, then reduces and sweep Retouch the period.
Optionally, duration is jumped from the Caton moment come to continue playing video file include: to lose since the Caton moment Abandoning jumps video file corresponding to duration to continue playing video file;Or accelerate to play when jumping since the Caton moment Long corresponding video file.
Work as network recovery, player will carry out redirect broadcasting, can use two kinds of differences when reducing broadcast time-delay Mode: mode one jumps duration according to above-mentioned according to player, at the time of Caton, appearance when discarding and jumping The video file answered then proceedes to play, and the delay of player at this time is the broadcast time-delay of player;Mode two, player Accelerate broadcasting speed, according to the size of Current buffer, 2 times, 4 times, 8 times and 16 times that broadcasting speed is normal speed can be set Deng, until the Current buffer value of player is equal with the play buffering of player value, the normal broadcasting speed of player recovery.
Optionally, before video player playing video file, method further include: receive video file;Detection receives To the length of video file whether meet pre-set second play buffering value;If it is detected that the video file received Length meets the second play buffering value, then starts playing video file;If it is detected that the length of the video file received is discontented The second play buffering value of foot then continues to video file until the length of the video file received meets the second play buffering Value.
Network direct broadcasting whether smoothness be fundamentally to be determined by network state, and in order to make network direct broadcasting smooth It carries out, a play buffering can be preset in player, when starting to carry out network direct broadcasting, player first receives video text Part wouldn't play, and whether the video file that real-time detection receives meets preset player plays buffer value, when detecting When the video file lengths received are greater than the play buffering value of player, start to carry out network direct broadcasting;The video text received Part length is less than the play buffering value of player, then continues to receive video file, although making network direct broadcasting in this manner With certain delay, but it in the case where low delay, can guarantee the process degree of network direct broadcasting.
To achieve the goals above, according to another aspect of the present invention, the embodiment of the invention also provides a kind of storage Jie Matter, the storage medium include the program of storage, wherein equipment where controlling the storage medium in described program operation is held The playback method of row video file described above.
To achieve the goals above, according to another aspect of the present invention, the embodiment of the invention also provides a kind of processor, The processor is for running program, wherein described program executes the playback method of video file described above when running.
Fig. 2 is a kind of schematic diagram of the playing device of optional video file according to an embodiment of the present invention, such as Fig. 2 institute Show, which includes:
Scanning element 10, for during video player playing video file, scan video player it is current Buffer value;
Judging unit 20, for judging whether Current buffer value is greater than preset buffer threshold;
Acquiring unit 30, for when judging that Current buffer value is greater than buffer threshold, acquisition to jump duration, wherein jump Turn duration to be obtained according to Current buffer value and the first play buffering value
First broadcast unit 40 continues playing video file for jumping duration from the Caton moment, wherein Caton At the time of moment is data in the buffer area for play video player.
In embodiments of the present invention, using during video player playing video file, scan video player Current buffer value mode, by judging whether Current buffer value is greater than preset buffer threshold, if judging current Buffer value is greater than buffer threshold, then obtains and jump duration, has reached and has jumped duration from the Caton moment to continue to play video The purpose of file to realize the technical effect for reducing live streaming delay, and then is solved since network congestion and Caton cause Delay accumulation the technical issues of.
Optionally, acquiring unit includes: acquisition module, for obtaining pre-set first play buffering value, wherein the One play buffering value can change with the change of current network state;Computing module, for playing Current buffer value and first The difference of buffer value is used as and jumps duration.
During player carries out network direct broadcasting, player can dynamically be arranged one according to the state of current network The play buffering value of a player makes player have a caching appropriate, to guarantee the smoothness of network direct broadcasting, while subtracting as far as possible The delay of small player, such as: when network state is preferable, the play buffering value of player is smaller;When network state is bad, broadcast The play buffering value for putting device is larger.When player needs to carry out redirect broadcasting, broadcasting is subtracted by player Current buffer value The duration that jumps of player is calculated in the play buffering of device, i.e., the buffer value after player jumps is equal to broadcasting for player Slow down punching, network direct broadcasting can be normally carried out.
Optionally, scanning element includes: the first scan module, for periodic scanning video player Current buffer value, Second scan module, for the Current buffer value or third scan module of period incremental scan video player, for adaptive Answer the Current buffer value of intermittent scanning video player.
Various ways can be used to the scanning of player Current buffer value, it is common there are three types of: periodic scanning, i.e., it is default One scan period carries out single pass to the buffer value of player every a cycle;Period incremental scan, i.e., default one A preliminary sweep period, and be arranged the scan period according to certain rule be incremented by, each scan period, to the buffering of player Value carries out single pass;Adaptive intermittent scanning, i.e. scan period adaptive change delay player every a cycle Punching value carries out single pass.
Optionally, third scan module includes: the first detection sub-module, is regarded for detecting repeatedly to scan according to predetermined period The Current buffer value of frequency player as a result, obtaining multiple scanning results;Second detection sub-module, detecting multiple scanning results is No stabilization is in a certain range;Increase submodule, for increasing when detecting that multiple scanning results are stablized in a certain range Predetermined period;Reduce submodule, for being to reduce predetermined period detecting that multiple scanning results fluctuate outside a certain range.
Adaptive intermittent scanning is root after taking multiple scan according to Current buffer value of the preset period to player According to the situation of change for the buffer value that Multiple-Scan obtains, the scan period is adjusted, such as: Multiple-Scan result is stablized certain In range, variation less, then increases the scan period;Multiple-Scan result fluctuates outside a certain range, changes greatly, then reduces and sweep Retouch the period.
Optionally, the first broadcast unit includes: the first playing module, jumps duration institute for abandoning since the Caton moment Corresponding video file continues playing video file;Or second playing module, it is played for accelerating since the Caton moment Jump video file corresponding to duration.
Work as network recovery, player will carry out redirect broadcasting, can use two kinds of differences when reducing broadcast time-delay Mode: mode one jumps duration according to above-mentioned according to player, at the time of Caton, appearance when discarding and jumping The video file answered then proceedes to play, and the delay of player at this time is the broadcast time-delay of player;Mode two, player Accelerate broadcasting speed, according to the size of Current buffer, 2 times, 4 times, 8 times and 16 times that broadcasting speed is normal speed can be set Deng, until the Current buffer value of player is equal with the play buffering of player value, the normal broadcasting speed of player recovery.
Optionally, device further include: the first receiving unit, for receiving before video player playing video file Video file;Third detection unit, whether the length for detecting the video file received, which meets pre-set second, is broadcast Put buffer value;Second broadcast unit, for the video file for detecting to receive length meet the second play buffering value when, Then start playing video file;Second receiving unit, for detecting that the length of the video file received is unsatisfactory for second When play buffering value, video file is continued to until the length of the video file received meets the second play buffering value.
Network direct broadcasting whether smoothness be fundamentally to be determined by network state, and in order to make network direct broadcasting smooth It carries out, a play buffering can be preset in player, when starting to carry out network direct broadcasting, player first receives player Video screen file wouldn't play, while whether the video file that simultaneously real-time detection receives meets preset broadcast as buffering Device play buffering value is put, when detecting that the video file lengths received are greater than the play buffering value of player, starts to carry out Network direct broadcasting;The video file lengths received are less than the play buffering value of player, then continue to receive video screen file, use Although such mode makes network direct broadcasting have certain delay, but can guarantee network direct broadcasting in the case where low delay Process degree.
Fig. 3 is a kind of playing device operational flow diagram of optional video file according to an embodiment of the present invention, such as Fig. 3 institute Show, be described in detail below with reference to workflow of the specific embodiment to the video file playing device:
1. request plays.Player is opened, player is connected to the network and requests network direct broadcasting.
2. parameter initial setting up.After network connection, player carries out the initial setting up of parameter, wherein the broadcasting of player Buffer length 3 seconds, player buffered threshold values 10 seconds, and player buffers 500 milliseconds of detection cycle.
3. starting to receive live stream.After the completion of 10:00:00 player parameter setting, player starts to receive live streaming fluxion According to starting the video file for receiving network direct broadcasting, at this point, player only receives video file, carrying out caching wouldn't be played.
4. whether filling up player plays buffer value.During player receives video file, player is to current Whether the buffer value of video file, which is greater than player plays buffer value, is judged.
5. starting to play.If the buffer value of current video file is greater than player plays buffer value, player starts It plays, otherwise continues to video file, until whether the buffer value of video file is greater than player plays buffer value, player Start to play.
6. detecting Current buffer value.In playing process, player is broadcast according to player buffering detection cycle timing probe Put device Current buffer value.
7. whether Current buffer is greater than buffer threshold.After player detects Current buffer value, judge that player currently delays Whether punching value is greater than player buffer threshold, if player Current buffer value is less than player buffer threshold, then continues according to spy The survey period is detected;If whether player Current buffer value is greater than player buffer threshold, then player is jumped.
8. executing functional jump strategy.In 10:01:00, network state is deteriorated, and Caton occurs, at this time player plays Buffer culture, buffer culture finish, and Caton occurs in live streaming, and when 10:02:00, network state improves, and player moment receives Video file to during network Caton, i.e. 10:01:00 are to the video file between 10:02:00, the video file lengths It is 1 minute, the player greater than player initial setting up buffers threshold values 10 seconds, at this point, player judges that Current buffer value is big In player buffer threshold, player execution is jumped;Since network state is deteriorated before, the play buffering length of player is by 3 Second becomes 5 seconds, and therefore, jumping value is the play buffering that Current buffer value subtracts player, i.e., subtracts 5 seconds within 1 minute, jumping value is 55 seconds, player jumped 55 seconds, played since 10:01:55.
9. finding key frame broadcasting forward from the place of jumping.So far, player was by jumping, by 1 minute of script generation Delay, shorten to 5 seconds.During subsequent network direct broadcasting, player continues detecting periodically current player buffering, if full Foot jumps condition, then executes jump strategy, until live streaming terminates or close player.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, Ke Yiwei A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (13)

1. a kind of playback method of video file characterized by comprising
During video player playing video file, the Current buffer value of the video player is scanned;
Judge whether the Current buffer value is greater than preset buffer threshold;
If judging, the Current buffer value is greater than the buffer threshold, and acquisition jumps duration, wherein described to jump duration root It is obtained according to the Current buffer value and the first play buffering value;Duration is jumped described in jumping from the Caton moment to continue described in broadcasting Video file, wherein at the time of the Caton moment is data in the buffer area for play the video player;
Wherein, key frame broadcasting is found forward from the place of jumping, wherein the video player generates script by jumping Delay is shortened, during subsequent network direct broadcasting, Current buffer value described in the video player detecting periodically, if Satisfaction jumps condition, then executes jump strategy, until live streaming terminates or close the video player, the place that jumps is works as After stating the generation of Caton moment, at the time of data restart to play in the buffer area;
The first play buffering value, for making the video player have a caching appropriate, to guarantee network direct broadcasting Smoothness, while reducing the delay of the video player.
2. the method according to claim 1, wherein the acquisition jumps duration and includes:
Obtain the pre-set first play buffering value, wherein the first play buffering value can be with current network state Change and change;
The difference of the Current buffer value and the first play buffering value is jumped into duration as described in;
Wherein, when network state is preferable, the first play buffering value of the video player setting is smaller;
When network state is bad, first play buffering value of the video player setting is larger.
3. the method according to claim 1, wherein in the process of the video player playing video file In, the Current buffer value for scanning the video player includes:
The Current buffer value of video player described in the Current buffer value of video player described in periodic scanning, period incremental scan Or the Current buffer value of video player described in adaptive intermittent scanning.
4. according to the method described in claim 3, it is characterized in that, video player described in the adaptive intermittent scanning is worked as Preceding buffer value includes:
Detection repeatedly scans tying as a result, obtaining multiple scannings for the Current buffer value of the video player according to predetermined period Fruit;
It is whether stable in a certain range to detect the multiple scanning result;
If it is detected that the multiple scanning result is stablized in a certain range, increase the predetermined period;
If it is detected that the multiple scanning result fluctuates outside described a certain range, reduce the predetermined period.
5. the method according to claim 1, wherein described jump from the Caton moment described jump duration and continues Playing the video file includes:
Video file corresponding to duration is jumped described in abandoning since the Caton moment to continue to play the video file; Or
Accelerate to jump video file corresponding to duration described in broadcasting since the Caton moment.
6. the method according to claim 1, wherein before the video player playing video file, institute State method further include:
Receive the video file;
Whether the length for detecting the video file received meets pre-set second play buffering value;If it is detected that receiving The length of the video file meet the second play buffering value, then start to play the video file;
If it is detected that the length of the video file received is unsatisfactory for the second play buffering value, continue to described Video file is until the length of the video file received meets the second play buffering value.
7. a kind of playing device of video file characterized by comprising
Scanning element, for during video player playing video file, scanning the current slow of the video player Punching value;
Judging unit, for judging whether the Current buffer value is greater than preset buffer threshold;
Acquiring unit, for when judging that the Current buffer value is greater than the buffer threshold, acquisition to jump duration, wherein The duration that jumps is obtained according to the Current buffer value and the first play buffering value;
First broadcast unit described jump duration and continues to play the video file, wherein institute for jumping from the Caton moment At the time of to state the Caton moment be data in the buffer area for play the video player;
Wherein, key frame broadcasting is found forward from the place of jumping, wherein the video player generates script by jumping Delay is shortened, during subsequent network direct broadcasting, Current buffer value described in the video player detecting periodically, if Satisfaction jumps condition, then executes jump strategy, until live streaming terminates or close the video player, the place that jumps is works as After stating the generation of Caton moment, at the time of data restart to play in the buffer area;
The first play buffering value, for making the video player have a caching appropriate, to guarantee network direct broadcasting Smoothness, while reducing the delay of the video player.
8. device according to claim 7, which is characterized in that the acquiring unit includes:
Module is obtained, for obtaining the pre-set first play buffering value, wherein the first play buffering value can be with The change of current network state and change;
Computing module, for the difference of the Current buffer value and the first play buffering value to be jumped duration as described in;
Wherein, when network state is preferable, the first play buffering value of the video player setting is smaller;
When network state is bad, first play buffering value of the video player setting is larger.
9. device according to claim 7, which is characterized in that the scanning element includes:
First scan module, the Current buffer value for video player described in periodic scanning;
Second scan module, for the Current buffer value or third scan module of video player described in period incremental scan, Current buffer value for video player described in adaptive intermittent scanning.
10. device according to claim 9, which is characterized in that the third scan module includes:
First detection sub-module, for detecting the knot for repeatedly scanning the Current buffer value of the video player according to predetermined period Fruit obtains multiple scanning results;
It is whether stable in a certain range to detect the multiple scanning result for second detection sub-module;
Increase submodule, for increasing the default week when detecting that the multiple scanning result is stablized in a certain range Phase;
Reduce submodule, for reducing described pre- when detecting that the multiple scanning result fluctuates outside described a certain range If the period.
11. device according to claim 7, which is characterized in that first broadcast unit includes:
First playing module continues for jumping video file corresponding to duration described in the discarding since the Caton moment Play the video file;Or
Second playing module jumps video file corresponding to duration described in broadcasting for accelerating since the Caton moment.
12. device according to claim 7, which is characterized in that described device further include:
First receiving unit, for receiving the video file before the video player playing video file;
Whether third detection unit, the length for detecting the video file received meet pre-set second play buffering Value;
Second broadcast unit, for detecting that the length of the video file received meets the second play buffering value When, then start to play the video file;
Second receiving unit, for detecting that the length of the video file received is unsatisfactory for second play buffering When value, the video file is continued to until the length of the video file received meets second play buffering Value.
13. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein run in described program When control the storage medium where equipment perform claim require 1 to the video file described in any one of claim 6 Playback method.
CN201610791427.7A 2016-08-31 2016-08-31 The playing method and device of video file Active CN106331766B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610791427.7A CN106331766B (en) 2016-08-31 2016-08-31 The playing method and device of video file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610791427.7A CN106331766B (en) 2016-08-31 2016-08-31 The playing method and device of video file

Publications (2)

Publication Number Publication Date
CN106331766A CN106331766A (en) 2017-01-11
CN106331766B true CN106331766B (en) 2019-08-13

Family

ID=57789371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610791427.7A Active CN106331766B (en) 2016-08-31 2016-08-31 The playing method and device of video file

Country Status (1)

Country Link
CN (1) CN106331766B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107135405B (en) * 2017-04-28 2020-02-07 武汉斗鱼网络科技有限公司 Online video playing method and device
CN109327662B (en) * 2017-07-31 2021-02-05 阿里巴巴(中国)有限公司 Video splicing method and device
CN107592567A (en) * 2017-08-25 2018-01-16 触景无限科技(北京)有限公司 Eliminate the method and device of video cardton
CN107846621A (en) * 2017-09-28 2018-03-27 北京京东尚科信息技术有限公司 Delay process method, system and electronic equipment
CN112752109B (en) 2019-10-30 2022-05-17 上海哔哩哔哩科技有限公司 Video playing control method and system
CN112887795B (en) * 2021-01-26 2023-04-21 脸萌有限公司 Video playing method, device, equipment and medium
CN114885209B (en) * 2022-04-08 2023-06-16 车智互联(北京)科技有限公司 Live broadcast data processing method, computing device and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7133362B2 (en) * 2001-11-14 2006-11-07 Microsoft Corporation Intelligent buffering process for network conference video
CN104363411A (en) * 2014-10-20 2015-02-18 福建星网锐捷安防科技有限公司 Video playing method and video playing device in video monitoring system
CN105072480A (en) * 2015-07-29 2015-11-18 无锡天脉聚源传媒科技有限公司 Video live broadcast method and device
CN105430475A (en) * 2015-11-04 2016-03-23 北京奇虎科技有限公司 Buffering method and device of video data
CN105872576A (en) * 2016-04-25 2016-08-17 乐视控股(北京)有限公司 Video playing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140010517A1 (en) * 2012-07-09 2014-01-09 Sensr.Net, Inc. Reduced Latency Video Streaming

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7133362B2 (en) * 2001-11-14 2006-11-07 Microsoft Corporation Intelligent buffering process for network conference video
CN104363411A (en) * 2014-10-20 2015-02-18 福建星网锐捷安防科技有限公司 Video playing method and video playing device in video monitoring system
CN105072480A (en) * 2015-07-29 2015-11-18 无锡天脉聚源传媒科技有限公司 Video live broadcast method and device
CN105430475A (en) * 2015-11-04 2016-03-23 北京奇虎科技有限公司 Buffering method and device of video data
CN105872576A (en) * 2016-04-25 2016-08-17 乐视控股(北京)有限公司 Video playing method and device

Also Published As

Publication number Publication date
CN106331766A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
CN106331766B (en) The playing method and device of video file
US11895342B2 (en) Video analysis method and system
CN105263037B (en) A kind of adaptive fluidizing method based on client-cache
CN107071502B (en) Video playing method and device
CN103024456A (en) Online video playing method and video playing server
CN110178377A (en) Initial bit rate selection for video transmission session
CN103475932A (en) Seamless on-line playing method and device of network video and network television system
JP2020523871A (en) Interactive video content display detection and response to display
CN105469381B (en) Information processing method and terminal
US9971892B2 (en) Method, apparatus and computer device for scanning information to be scanned
CN105933776B (en) The playing method and device of patch media file
WO2014187108A1 (en) Server, client and video processing method
CN106791994B (en) Low-delay quick broadcasting method and device
CN106658113B (en) Multimedia data processing method and device
CN106412630B (en) Video list switching control method and device
WO2022028592A1 (en) Target detection and tracking method and apparatus, electronic device, and storage medium
CN111277867A (en) Video downloading method, device, server and storage medium
CN104881214A (en) Reader and page turning method thereof
CN113766261A (en) Method and device for determining pre-pulling duration, electronic equipment and storage medium
CN107948703B (en) Method and device for synchronizing playing progress
CN109729380A (en) Audio and video playing method and apparatus
CN105357568B (en) A kind of control method and device of broadcast source switching
CN109144613B (en) Android definition switching method and device, terminal and readable medium
US11451879B2 (en) Controlling playout of advertisement content during video-on-demand video streaming on an end-user terminal
CN111182316A (en) Stream switching method and device of media resource, storage medium and electronic device

Legal Events

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