Summary of the invention
Main purpose of the present invention is to provide a kind of processing method and device of video playback, to solve user's long problem of stand-by period when watching time shift live in the prior art.
To achieve these goals, according to an aspect of the present invention, a kind of processing method of video playback is provided, has comprised: receive the playing request instruction of user for video flowing, wherein, the playing request instruction comprises the zero-time that the request video flowing begins to play; From server, search in the video flowing corresponding to the video flowing fragment of zero-time, wherein, video flowing is divided into a plurality of video flowing fragments, and a plurality of video flowing fragments store are in server; And play the video flowing fragment find from zero-time.
Further, video flowing is divided into a plurality of video flowing fragments in such a way: wait duration to divide video flowing, obtain a plurality of video flowing fragments that wait duration.
Further, search from server that the video flowing fragment corresponding to zero-time comprises in the video flowing: confirm the reproduction time scope that each video flowing fragment is corresponding; Search the reproduction time scope that zero-time is positioned at; And the video flowing fragment corresponding with the reproduction time scope that finds confirmed as the video flowing fragment corresponding to zero-time.
Further, search from server that the video flowing fragment corresponding to zero-time comprises in the video flowing: from server, search the first video flowing fragment, wherein, zero-time is positioned at the corresponding reproduction time scope of the first video flowing fragment; Obtain first duration, wherein, first duration is the duration of zero-time to the very first time, and the very first time is the end of playing moment of the first video flowing fragment; Judge that whether first duration is less than preset duration; And when judging first duration less than preset duration; From server, search the second video flowing fragment; Wherein, The initial moment of the broadcast of the second video flowing fragment is the very first time, plays the video flowing fragment that finds from zero-time and comprises: play the first video flowing fragment and the second video flowing fragment successively from zero-time.
To achieve these goals, according to a further aspect in the invention, a kind of processing unit of video playback is provided, this processing unit is used to carry out the processing method of any video playback that the invention described above provides.
To achieve these goals, according to a further aspect in the invention, a kind of processing unit of video playback is provided; Comprise: receiver module; Be used to receive the playing request instruction of user for video flowing, wherein, the playing request instruction comprises the zero-time that the request video flowing begins to play; Processing module is connected with receiver module, is used for searching the video flowing corresponding to the video flowing fragment of zero-time from server, and wherein, video flowing is divided into a plurality of video flowing fragments, and a plurality of video flowing fragments store are in server; And playing module, be connected with processing module, be used for playing the video flowing fragment that finds from zero-time.
Further, processing module comprises: first processing sub is used for the reproduction time scope of confirming that each video flowing fragment is corresponding; Second processing sub is connected between the receiver module and first processing sub, is used to search the reproduction time scope that zero-time is positioned at; And the 3rd processing sub, be connected between second processing sub and the playing module, be used for the video flowing fragment corresponding with the reproduction time scope that finds confirmed as the video flowing fragment corresponding to zero-time.
Further, processing module comprises: the manages submodule everywhere, is connected with receiver module, is used for from server searching the first video flowing fragment, and wherein, zero-time is positioned at the corresponding reproduction time scope of the first video flowing fragment; The 5th processing sub is managed submodule everywhere and is connected with the, is used to obtain first duration, and wherein, first duration is the duration of zero-time to the very first time, the very first time be the first video flowing fragment end of playing constantly; The 6th processing sub is connected with the 5th processing sub, is used to judge that whether first duration is less than preset duration; And the 7th processing sub; Be connected with the 6th processing sub, be used for when judging first duration, from server, searching the second video flowing fragment less than preset duration; Wherein, The initial moment of the broadcast of the second video flowing fragment is the very first time, and playing module comprises: play submodule, be used for playing the first video flowing fragment and the second video flowing fragment successively from zero-time.
Through the present invention; Employing is divided into a plurality of video flowing fragments in advance with a video flowing, receive comprise the request video flowing zero-time that begins to play after, from server, search in the video flowing video flowing fragment corresponding to zero-time; Play the video flowing fragment that finds from zero-time then; Divide through video flowing being carried out the multi-disc section, when the user need watch the time shift live video, only need be written into user's request and play one section corresponding video flowing fragment of zero-time; Correspondingly reduced the index file that the user need download; Stand-by period when having shortened the user's download index file has solved user's long problem of stand-by period when watching time shift live in the prior art, and then has reached the effect of the stand-by period when the shortening user watches time shift live.
Embodiment
Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.Below with reference to accompanying drawing and combine embodiment to specify the present invention.
The embodiment of the invention provides a kind of processing unit of video playback, below the processing unit of the video playback that the embodiment of the invention provided is introduced.
Fig. 1 is the sketch map according to the processing unit of the video playback of the embodiment of the invention, and is as shown in Figure 1, and the processing unit of this embodiment comprises receiver module 10, processing module 20 and playing module 30.
Receiver module 10 is used to receive the playing request instruction of user for video flowing, comprises the concrete zero-time that the request video flowing begins to play in the playing request instruction that the user issues; Processing module 20 is connected with receiver module 10, after the request that receives the user, from server, searches in the video flowing corresponding to the video flowing fragment of zero-time, and the video flowing in the server has been divided into a plurality of video flowing fragments in advance; Playing module 30 is connected with processing module 20, is used for the concrete video flowing fragment that finds from zero-time play processing module 20.
The processing unit of this embodiment is through be divided into a plurality of video flowing fragments with a video flowing in advance; Receiver module 10 receive comprise the request video flowing zero-time that begins to play after; From server, search in the video flowing video flowing fragment by processing module 20 corresponding to zero-time; Play the video flowing fragment that finds by playing module 30 from zero-time then, divide through video flowing being carried out the multi-disc section, when the user need watch the time shift live video; Only need be written into user's request and play one section corresponding video flowing fragment of zero-time; Correspondingly reduced the index file that the user need download, index file has been controlled in the smaller scope, the stand-by period when having shortened the user's download index file; Solve user's long problem of stand-by period when watching time shift live in the prior art, and then reached the effect of the stand-by period when the shortening user watches time shift live.
Wherein, video flowing is divided into a plurality of video flowing fragments in such a way:
Divide according to the time; Wait duration to divide video flowing, obtain a plurality of video flowing fragments that wait duration, promptly; Video flowing is cut apart with less time granularity; Each section file is only preserved the data of set time section, and above-mentioned less time granularity can be waited for the reference frame of duration when video flowing is divided with user's acceptable, and duration that in embodiments of the present invention can each video flowing fragment is set to 6 hours.
Fig. 2 is the sketch map according to the processing unit of first preferred embodiment of the invention; As shown in Figure 2; The processing unit of first preferred embodiment of the invention is compared with the processing unit shown in Fig. 1; The two difference is, the processing module 20 of the processing unit of first preferred embodiment of the invention comprises first processing sub 21, second processing sub 22 and the 3rd processing module 23.
First processing sub 21 is used for confirming that the scope of reproduction time separately of each video flowing fragment of server is interval; Second processing sub 22 all is connected with receiver module 10 with first processing sub 21, is used for searching the reproduction time scope that zero-time was positioned at of user's request instruction; The 3rd processing sub 23 is connected with second processing sub 22; Be used for the video flowing fragment corresponding with the reproduction time scope that second processing sub 22 finds confirmed as the video flowing fragment corresponding to the zero-time of user's request instruction, to be used for the broadcast of playing module 30.
Through searching the reproduction time scope that zero-time is positioned at, and then confirm that the corresponding video flowing fragment of reproduction time scope that finds is the target video flow section of required broadcast, reached the effect of accurately confirming target video flow section.
Fig. 3 is the sketch map according to the processing unit of second preferred embodiment of the invention; As shown in Figure 3; The processing unit of second preferred embodiment of the invention is compared with the processing unit shown in Fig. 1; The two difference is, the processing module 20 of the processing unit of second preferred embodiment of the invention comprises that manages submodule 24, the 5th processing sub 25, the 6th processing module 26 and the 7th processing module 27 everywhere.
Manages submodule 24 everywhere is connected with receiver module 10; Receive user's request play instruction when receiver module 10 after; The manages submodule 24 everywhere searches the first video flowing fragment from server, wherein, zero-time is positioned at the corresponding reproduction time scope of the first video flowing fragment; After finding the first video flowing fragment, by managing the 5th processing sub 25 that submodule 24 is connected everywhere and obtain from the end of playing of zero-time to the first video flowing fragment duration between constantly, as first duration with the; The 6th processing sub 26 is connected with the 5th processing sub 25; Whether first duration that gets access to judgement is less than preset duration; Should can specifically set according to practical experience by preset duration, if first duration less than preset duration, but explain that then the holding time of displaying video that the first video flowing fragment is left generally can't satisfy user's demand; At this moment; The 7th processing sub 27 by being connected with the 6th processing sub 26 is searched the second video flowing fragment from server, wherein, the initial moment of the broadcast of the second video flowing fragment is the very first time; Play the first video flowing fragment and the second video flowing fragment by the broadcast submodule 31 in the playing module 30 successively from zero-time then.
Length and set point through to first duration compare assessment, more in time are written into the adjacent video that is about to broadcast with the residue reproduction time in the first video flowing fragment, avoid video playback to watch the user and occur in the process obviously interrupting.
Need to prove; The characteristic of each embodiment that foregoing provided can mutually combine; And a plurality of processing sub of each embodiment both can independently be provided with, and also can unify to be same processing module, play the function of submodule and also can be carried out by playing module.
The embodiment of the invention also provides the processing method of video playback, below the processing method of the video playback that the embodiment of the invention provided is introduced.Need to prove; Processing method in the video playback of the embodiment of the invention can be carried out through the processing unit of the video playback that the embodiment of the invention provided, and the processing unit of the video playback of the embodiment of the invention also can be used to carry out the processing method of the video playback that the embodiment of the invention provides.
Fig. 4 is the flow chart according to the processing method of the video playback of the embodiment of the invention, and is as shown in Figure 4, and this method comprises that following step S402 is to step S406:
S402: receive the playing request instruction of user, comprise the concrete zero-time that the request video flowing begins to play in this playing request instruction for video flowing.
For example, the user plays video flowing A through the playing request instruction request, and request is play video flowing A from T constantly.
S404: after the request that receives the user, from server, search in the video flowing video flowing fragment corresponding to zero-time.
In the server of the embodiment of the invention, video stream stored is divided, video flowing is divided into a plurality of video flowing fragments.Be different from the prior art and the whole video stream of user's request searched according to user's request, in embodiments of the present invention, according to searching corresponding to the video flowing fragment of zero-time in the video flowing of user's request to user's request.
For example; Website of Microsoft server I IS has been installed on the server; And install smooth streaming expansion module with the access point through smooth streaming module creation video source with the receiver, video flow data; And in the process that receives, video flowing is divided, realize the video flowing in the server has been divided into a plurality of video flowing fragments in advance;
S406: play the video flowing fragment that finds from zero-time.
As stated; When searching according to the method for step S404, only need find out in the video flowing video flowing fragment corresponding to zero-time, thereby; When the video of searching is play; Only need load the video flowing fragment that finds and get final product, than loading whole video flowing, speed is faster.
The processing method of this embodiment is through be divided into a plurality of video flowing fragments with a video flowing in advance; Receive comprise the request video flowing zero-time that begins to play after; From server, search in the video flowing video flowing fragment corresponding to zero-time; Play the video flowing fragment that finds from zero-time then, divide through video flowing being carried out the multi-disc section, when the user need watch the time shift live video; Only need be written into user's request and play one section corresponding video flowing fragment of zero-time; Correspondingly reduced the index file that the user need download, index file has been controlled in the smaller scope, the stand-by period when having shortened the user's download index file; Solve user's long problem of stand-by period when watching time shift live in the prior art, and then reached the effect of the stand-by period when the shortening user watches time shift live.
In embodiments of the present invention, can divide according to any-mode, preferably; Can video flowing be divided into a plurality of video flowing fragments according to the time; For example, wait duration to divide video flowing, obtain a plurality of video flowing fragments that wait duration; Through video flowing is cut apart with less time granularity; Each section file is only preserved the data of set time section, and above-mentioned less time granularity can be waited for the reference frame of duration when video flowing is divided with user's acceptable, and duration that in embodiments of the present invention can each video flowing fragment is set to 6 hours.In this enforcement,, can easily video stream file be managed through video flowing being divided into a plurality of video flowing fragments that wait duration; And; Can realize that the user when playing according to different broadcast zero-times, all can wait for the identical load time, user experience is better.
Confirm the video flowing fragment (that is, target video flow section) that need search for accurate, preferably, in step S404, can from server, search in the video flowing video flowing fragment in the following manner corresponding to zero-time:
At first, confirm the corresponding reproduction time scope interval of each video flowing fragment in the server;
Secondly, search the reproduction time scope that zero-time was positioned in user's request instruction;
At last, the video flowing fragment corresponding with the reproduction time scope that finds confirmed as the video flowing fragment corresponding to the zero-time in user's request instruction.
Through searching the reproduction time scope that zero-time is positioned at, and then confirm that the corresponding video flowing fragment of reproduction time scope that finds is the target video flow section of required broadcast, reached the effect of accurately confirming target video flow section.
Preferably, step S404 searches in the video flowing video flowing fragment corresponding to zero-time from server, and step S406 plays the concrete video flowing fragment that finds from zero-time and can realize through following concrete steps:
After receiving user's request play instruction, from server, search the first video flowing fragment, wherein, zero-time is positioned at the corresponding reproduction time scope of the first video flowing fragment; The first video flowing fragment is the corresponding video flowing fragment of zero-time with user's request.
After finding the first video flowing fragment, obtain the duration of end of playing between the moment, as first duration from zero-time to the first video flowing fragment;
Judge that whether first duration that gets access to is less than preset duration; Should can specifically set according to practical experience by preset duration, if first duration less than preset duration, but explain that then the holding time of displaying video that the first video flowing fragment is left generally can't satisfy user's demand; At this moment; From server, search the second video flowing fragment, wherein, the initial moment of the broadcast of the second video flowing fragment is the very first time;
At last, play the first video flowing fragment and the second video flowing fragment successively from zero-time.
The video flowing that the embodiment of the invention is mentioned can be the video flowing of live video, also can be the video flowing of other Online Video, when video flowing is the video flowing of online live video, can make the user obtain the video of playback apace, has improved user experience.
Length and set point through to first duration compare assessment, more in time are written into the adjacent video that is about to broadcast with the residue reproduction time in the first video flowing fragment, avoid video playback to watch the user and occur in the process obviously interrupting.
Obviously, it is apparent to those skilled in the art that above-mentioned each module of the present invention or each step can realize with the general calculation device; They can concentrate on the single calculation element; Perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element; Thereby; Can they be stored in the storage device and carry out, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize by calculation element.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.