CN105323653B - A kind of method and apparatus playing segment video - Google Patents

A kind of method and apparatus playing segment video Download PDF

Info

Publication number
CN105323653B
CN105323653B CN201410384598.9A CN201410384598A CN105323653B CN 105323653 B CN105323653 B CN 105323653B CN 201410384598 A CN201410384598 A CN 201410384598A CN 105323653 B CN105323653 B CN 105323653B
Authority
CN
China
Prior art keywords
video
frame
segment
initial position
compensation
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.)
Expired - Fee Related
Application number
CN201410384598.9A
Other languages
Chinese (zh)
Other versions
CN105323653A (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.)
Founder International Co Ltd
Founder International Beijing Co Ltd
Original Assignee
Founder International Co Ltd
Founder International Beijing 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 Founder International Co Ltd, Founder International Beijing Co Ltd filed Critical Founder International Co Ltd
Priority to CN201410384598.9A priority Critical patent/CN105323653B/en
Publication of CN105323653A publication Critical patent/CN105323653A/en
Application granted granted Critical
Publication of CN105323653B publication Critical patent/CN105323653B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present embodiments relate to stream media technology field more particularly to a kind of method and apparatus for playing segment video, can play since accurate designated position to solve the problems, such as that the broadcast mode that video clip exists in the prior art not can guarantee video.The method of the embodiment of the present invention includes: corresponding relationship of the playback equipment according to segment video and compensation video, the compensation video from whole section of video to video stream server and particular video frequency data of the segment video for requesting to need to play in;According to the compensation video and particular video frequency received, the length for playing compensation video is determined;After playing the compensation video for determining length, particular video frequency is played.Since the embodiment of the present invention compensates the broadcast mode that video and particular video frequency combine using segment video accordingly, to solve the problems, such as in the prior art can not accurately play the segment video in whole section of video since the position of specified initial position frame with generic video streaming media server and video player.

Description

A kind of method and apparatus playing segment video
Technical field
The present invention relates to stream media technology field more particularly to a kind of method and apparatus for playing segment video.
Background technique
With the high speed development of internet with the fast lifting of bandwidth, online network video of watching is as important consumer Formula.In the mode of online viewing network video, the important mode of existing one kind: one whole section of complete video program is from the beginning to the end Complete broadcasting and program fragment therein are played out in the form of fragmentation.It is illustrated with news program, 30 minutes news Radio hookup is a complete program video, and each of these news becomes program fragment again, and consumer can watch complete section Mesh only watches wherein single news.
In order to realize the above process, mesh former approach is: carrying out getting notation methods ready on whole section of video to identify it In program fragment method, using get ready notation methods mark segment, allow player to open from the specified place for getting mark ready Begin to play, the method solves the problems, such as that backstage real data needs to repeat to store.But since there are i, b, p for video compress storage The feature of different type frame, wherein i frame is whole frame, also known as key frame, can be reproduced with independent completion, and b frame and p frame are all Variance data frame only records the difference section data of the frame and previous frame, therefore the reproduction of b frame and p frame depends on the number of previous frame According to cannot independently reproduce.When playing video clip, player can only directly use the data of i frame in starting point, cannot be direct Using the data of b frame or p frame, and it is i frame that this mode for getting mark broadcasting ready, which not can guarantee specified starting point, if getting mark ready To b frame or p frame, the data for getting position ready cannot be read, nearest i frame can only be read forward or backward, lead to the view played Frequency segment occurs replaying or the phenomenon that broadcast leakage, therefore also can not just play since accurate designated position, can only be big from one General initial position starts to play.
In conclusion the broadcast mode of current video clip not can guarantee video and can broadcast since accurate designated position It puts.
Summary of the invention
The present invention provides a kind of method and apparatus for playing segment video, and video clip exists in the prior art to solve Broadcast mode not can guarantee the problem of video can be played since accurate designated position.
The embodiment of the invention provides a kind of methods for playing segment video, comprising:
Playback equipment requests whole section of view to video stream server according to the corresponding relationship of segment video and compensation video The compensation video and particular video frequency data for the segment video for needing to play in frequency, wherein particular video frequency data are whole section of videos In one section of segment video, and the initial position frame of the particular video frequency is one needed after the segment initial position frame that plays I frame, the end position frame of the particular video frequency are the end position frames for needing the segment video played;
The playback equipment determines according to the compensation video received and the particular video frequency and plays the compensation video Length;
The playback equipment plays the particular video frequency after playing the compensation video for determining length;
Wherein, the initial position frame of the corresponding compensation video of the segment video is the start bit according to the segment video The corresponding i frame generated of frame is set, and the video after the initial position frame of the compensation video is to be located at described in whole section of video After the initial position frame of section video, and the one section video adjacent with the initial position frame of the segment video.
Since the embodiment of the present invention compensates the broadcast mode that video and particular video frequency combine using segment video accordingly, It in the prior art can not be by the piece in whole section of video with generic video streaming media server and video player to solve The problem of section video is accurately played since the position of specified initial position frame, and improve exploitativeness.
Preferably, this method further include:
The playback equipment is determining the segment video for needing to play according to the corresponding relationship of segment video and compensation video After not having corresponding compensation video, Xiang Suoshu video stream server requests the segment video for needing to play;
The playback equipment plays the segment video received.
Since playback equipment is according to the corresponding relationship of segment video and compensation video, in the segment video for determining that needs play After not compensating video, in the step of carrying out corresponding operation, reducing operation, the time of operation is saved.
Preferably, the length of the compensation video is not less than N* (the maximum spacing of i frame);
Wherein, N >=2.
Preferably, if the initial position frame of the segment video is p frame or b frame, the corresponding compensation of the segment video The initial position frame of video is the i frame generated according to the whole section of video position frame data.
This is because video stream server cannot be obtained using b frame or p frame as the video of initial position, it is therefore desirable to right Initial position frame compensates for the data of b frame or p frame and generates corresponding i frame.
Preferably, if on the position of [the maximum spacing of the initial position frame+i frame for the segment video for needing to play] Frame is i frame, then the initial position frame of the particular video frequency is i frame in this position;
If the frame on the position of [the maximum spacing of the initial position frame+i frame for the segment video for needing to play] is p frame Or b frame, then first i frame before or after the initial position frame of the particular video frequency is the p frame or b frame.
This is because video stream server cannot be obtained using b frame or p frame as the video of initial position, therefore obtaining When particular video frequency, if the frame on the position of [the maximum spacing of the initial position frame+i frame for the segment video for needing to play] is P frame or b frame, then first i frame before or after the initial position frame of the particular video frequency is just the p frame or b frame.
Preferably, the playback equipment determines described in playing according to the compensation video received and the particular video frequency Compensate the length of video, comprising:
The playback equipment by it is described compensation video initial position frame position and the particular video frequency initial position Duration between the position of frame, as the length for playing the compensation video.
This is because only when the playout length of compensation video is the position for compensating the initial position frame of video and specific view It when duration between the position of the initial position frame of frequency, could that the segment video played realization is needed completely continuously to broadcast It puts, without the phenomenon that broadcasting of replaying or break.
The embodiment of the invention provides a kind of equipment for playing segment video to include:
Request module is requested for the corresponding relationship according to segment video and compensation video to video stream server The compensation video and particular video frequency data for the segment video for needing to play in whole section of video, wherein particular video frequency data are whole One section of segment video in section video, and the initial position frame of the particular video frequency is after needing the segment initial position frame that plays An i frame, the end position frame of the particular video frequency is the end position frame of segment video for needing to play;
Determining module plays the compensation view for determining according to the compensation video and the particular video frequency received The length of frequency;
Playing module, for playing the particular video frequency after playing the compensation video for determining length;
Wherein, the initial position frame of the corresponding compensation video of the segment video is the start bit according to the segment video The corresponding i frame generated of frame is set, and the video after the initial position frame of the compensation video is to be located at described in whole section of video After the initial position frame of section video, and the one section video adjacent with the initial position frame of the segment video.
Preferably, the equipment further include:
Processing module, for the corresponding relationship according to segment video and compensation video, in the segment view for determining that needs play Frequency is without the segment video that after corresponding compensation video, the request of Xiang Suoshu video stream server needs to play;Broadcasting receives Segment video.
Preferably, the length of the compensation video is not less than N* (the maximum spacing of i frame);
Wherein, N >=2.
Preferably, if the initial position frame of the segment video is p frame or b frame, the corresponding compensation of the segment video The initial position frame of video is the i frame generated according to the whole section of video position frame data.
Preferably, if on the position of [the maximum spacing of the initial position frame+i frame for the segment video for needing to play] Frame is i frame, then the initial position frame of the particular video frequency is i frame in this position;
If the frame on the position of [the maximum spacing of the initial position frame+i frame for the segment video for needing to play] is p frame Or b frame, then first i frame before or after the initial position frame of the particular video frequency is the p frame or b frame.
Preferably, the playback equipment determines described in playing according to the compensation video received and the particular video frequency Compensate the length of video, comprising:
The playback equipment by it is described compensation video initial position frame position and the particular video frequency initial position Duration between the position of frame, as the length for playing the compensation video.
Detailed description of the invention
Fig. 1 is the flow diagram for the method that the embodiment of the present invention one plays segment video;
Compensation video when Fig. 2 is N=1.5 generates situation schematic diagram;
Fig. 3 is the specific position schematic diagram of segment video;
Fig. 4 is that specific position is [position+2* (the maximum spacing of i frame) of the initial position frame of the segment video] Shi Shengcheng Corresponding compensation video situation schematic diagram;
The case where corresponding compensation video is generated when Fig. 5 is N=2 schematic diagram;
Fig. 6 is the flow diagram for the method that the embodiment of the present invention two generates compensation video;
Fig. 7 is the flow diagram for the method that the embodiment of the present invention three plays segment video;
Fig. 8 is the equipment schematic diagram that the embodiment of the present invention four plays segment video.
Specific embodiment
The embodiment provides a kind of methods for playing segment video, and playback equipment is according to segment video and compensation The corresponding relationship of video, the compensation video for the segment video for requesting to need to play in whole section of video to video stream server, And whole section of video of request is from nearest with [the maximum spacing of the position+i frame of the initial position frame of the segment video] positional distance I frame (i.e. if i frame on [the maximum spacing of the position+i frame of the initial position frame of the segment video] position, then with the [segment The maximum spacing of the position+i frame of the initial position frame of video] the nearest i frame of positional distance is itself;Otherwise, with [the piece Section video initial position frame position+i frame maximum spacing] the nearest i frame of positional distance be the [start bit of the segment video Set the maximum spacing of the position+i frame of frame] first i frame before or after position) after the particular video frequency data that start, play Equipment first plays the compensation video for determining length, then plays particular video frequency, wherein the length for playing compensation video is compensation video Initial position frame position and particular video frequency initial position frame position between duration.This technical solution considers piece When the initial position frame of section video is b frame or p frame, video stream server can not be obtained using the frame as the piece of initial position frame Section video, can only obtain the segment video using i frame as initial position frame, enable to video flowing matchmaker by way of compensating video Body server obtains the segment video when initial position frame is b frame or p frame, to realize accurately, from initial position, frame is opened Begin to play segment video, and improves exploitativeness.
The embodiment of the present invention is described in further detail with reference to the accompanying drawings of the specification.
As shown in Figure 1, the method that the embodiment of the present invention one plays segment video, comprising:
Step 100, playback equipment is asked according to the corresponding relationship of segment video and compensation video to video stream server The compensation video and particular video frequency data of the segment video for needing to play in whole section of video are asked, wherein particular video frequency data are One section of segment video in whole section of video, and the initial position frame of the particular video frequency is the segment initial position frame for needing to play An i frame afterwards, the end position frame of the particular video frequency are the end position frames for needing the segment video played;
Step 101, the playback equipment determines described in playing according to the compensation video received and the particular video frequency Compensate the length of video;
Step 102, the playback equipment plays the particular video frequency after playing the compensation video for determining length;
Wherein, the initial position frame of the corresponding compensation video of the segment video is the start bit according to the segment video The corresponding i frame generated of frame is set, and the video after the initial position frame of the compensation video is to be located at described in whole section of video After the initial position frame of section video, and the one section video adjacent with the initial position frame of the segment video.
The method of the broadcasting piece frequency range video of embodiment according to the present invention, can be divided into two kinds of situations, situation one: by sentencing Whether the initial position frame of the segment video played needed for disconnected is i frame, then generates corresponding compensation video if b frame or p frame, if Compensation video is not generated then for i frame;
Situation two: regardless of the initial position frame of segment video is that b frame, p frame or i frame all generate corresponding compensation video.
Wherein, the method for playing segment video is situation a period of time:
Preferably, if the initial position frame of the segment video is b frame or p frame, the corresponding compensation of the segment video The initial position frame of video is the i frame generated according to the data of the whole section of video position frame.
This is because video stream server can not obtain the broadcasting segment view that initial position frame is b frame or p frame position Frequently, the segment video using i frame as initial position frame can only be obtained, so needing when initial position frame is b frame or p frame according to b Frame or p frame generate corresponding i frame, and video stream server could be made to obtain the segment video since the frame of initial position.
Generating the mode of i frame with specific reference to b frame or p frame is determined by disclosed MPEG video data Compression Standard 's.
Preferably, the length of the compensation video is not less than N* (the maximum spacing of i frame);
Wherein, N >=2.
It is illustrated below with value range of the specific example to N.
As shown in Figure 2, wherein A point represents initial position frame b frame or the position of p frame of segment video, and B point represents segment The position of the end position frame of video, line segment AB represent one section of segment video, A' represent segment video initial position frame b frame or P frame generates the position of corresponding i frame, and C' represents the position of the end position frame of compensation video, and C is video stream media request [the maximum spacing of the position+i frame of the initial position frame of the segment video] position, D are first i before or after location of C The position of frame.
As N=1.5, if position D is the position of first i frame before location of C, broadcast after playing compensation video Particular video frequency is put, segment video is enabled to realize complete play;If position D is the position of first i frame after location of C, And when having exceeded 0.5 times of i frame maximum spacing, after playing compensation video, particular video frequency is played, just will appear segment view Frequency plays discontinuous phenomenon, this is because not reaching spy also after being played to the position C of end position frame of compensation video Determine the initial position D of video playing, so that the video between CD can not play, segment video playing is discontinuous so as to cause occurring The phenomenon that.That is, the minimum value of N is 2.
[the initial position of the segment video that position and video stream media as where particular video frequency originates i frame are requested The maximum spacing of the position+i frame of frame] the maximum spacing between the C of position is no more than one [the maximum spacing of i frame], so working as N= When 2, no matter position D is that the position of first i frame or the position of first i frame later can to regard before location of C Frequency can play continuous wholely.
According to analysis above: 2 be the minimum value of N, and N takes 2 when under the premise of can reach same effect Occupied data volume is minimum.
[i frame maximum spacing] is the parameter characteristic of transcoding device, between the two i frames of video for indicating transcoding device generation Largest interval frame number or the time.[the maximum spacing of i frame] can be according to the performance of the transcoding device for generating video data Or user needs to set.For example transcoder support sets [the maximum spacing of i frame] as 2s or other times.
Specifically, generate compensation video equipment by segment video initial position b frame or p frame completion data generate i Frame, and through transcoder since the initial position frame of segment video, copy the video counts of one section of N* (the maximum spacing of i frame) According to, make the segment data become can independent play-out compensation video.
In step 100, playback equipment requests the segment video for needing to play in whole section of video to video stream server Compensation video and when particular video frequency data, the identification notification for the segment video that play can will be needed to video stream media Server, and notify the specific position for the initial position that one is used to determine particular video frequency data to give video stream media service Device.
In an implementation, playback equipment can also only take the identification notification for the segment video for needing to play to video stream media Business device, and specific position can be set in advance, as long as such video stream server receives the mark of segment video The initial position of particular video frequency data can be determined according to preset specific position.
The mark of segment video can be each segment video distribution one mark when generating segment video.
Preferably, specific position can be [the maximum spacing of the position+i frame of the initial position frame of the segment video].
By taking Fig. 3 as an example, wherein A indicates the initial position frame position of segment video, and B indicates the end position frame of segment video Position, line segment AB indicate one section of segment video, and video stream server is after receiving specific position C, if on specific position C Frame is i frame, then starts to play with the initial position that the i framing bit is set to particular video frequency;
If the frame on specific position C is not i frame, video stream server obtains one and certain bits forward or backward The frame pitch on C is set from nearest i frame, i.e., the i frame is first i frame before or after specific position C, and with the position of the i frame Setting D is that initial position starts to play.
Based on this, when specific position is [the maximum spacing of the position+i frame of the initial position frame of the segment video], N is taken not Any value less than 2 is all met the requirements.If specific position is not that [position+i frame of the initial position frame of the segment video is most Big spacing], then the value of N can be increase accordingly according to specific position.
When specific position is not [the maximum spacing of the position+i frame of the initial position frame of the segment video], below with It is illustrated for [position+2* (the maximum spacing of i frame) of the initial position frame of the segment video], then specific position is [to be somebody's turn to do Position+the M* (the maximum spacing of i frame) of the initial position frame of segment video], M is any multiple and M=2 of i frame maximum spacing When it is similar, details are not described herein.
As shown in figure 4, when specific position is that [position+2* of the initial position frame of the segment video is (between the maximum of i frame Away from)] when generate corresponding compensation video the case where.
Wherein, A point represents initial position frame b frame or the position of p frame of segment video, and B point represents the end of segment video The position of position frame, line segment AB represent one section of segment video, and A' represents initial position frame b frame or the generation pair of p frame of segment video The position for the i frame answered, C' represent the position of the end position frame of compensation video, and C is [segment video of video stream media request Initial position frame position+2* (the maximum spacing of i frame)] position, D is position with the immediate i frame of location of C, the i.e. position D For the position of first i frame before or after location of C.
Due to [position+2* (the i frame of the initial position frame of the segment video for the request that video stream server obtains Maximum spacing)] position and the requested position [position+2* (the maximum spacing of i frame) of the initial position frame of the segment video] The maximum spacing of the position where first i frame before or after setting is no more than the maximum spacing of an i frame, and from A' generation The position that the initial position frame b frame or p frame of table segment video generate corresponding i frame starts to play, therefore N value minimum takes 3.
When specific position is [the maximum spacing of the position+i frame of the initial position frame of the segment video], N is taken not less than 2 Any value all meet the requirements.
It is illustrated by taking N=2 as an example below, N is similar with N=2 not less than 2 other values, and details are not described herein.
As shown in figure 5, the case where generating corresponding compensation video as N=2.
Wherein, A point represents initial position frame b frame or the position of p frame of segment video, and B point represents the end of segment video The position of position frame, line segment AB represent one section of segment video, and A' represents the initial position frame b frame or p frame completion number of segment video According to the position of the i frame of generation, C' represents the position of the end position frame of compensation video, and C is [segment of video stream media request The maximum spacing of the position+i frame of the initial position frame of video] position, D is the position with the immediate i frame of location of C, the i.e. position D For the position of first i frame before or after location of C.
When [the maximum spacing of the position+i frame of the initial position frame of the segment video] of video stream server request When frame on position is not i frame, it will the video data that the i frame on the immediate position D therewith starts is obtained forward or backward, Namely obtain first i before or after [the maximum spacing of the position+i frame of the initial position frame of the segment video] position The video data that the position D of frame starts, compensation video be then played to the position D from the position A', then play the position segment video D it Video afterwards, when on [the maximum spacing of the position+i frame of the initial position frame of the segment video] position of video stream media request Frame when being i frame, then D is overlapped with location of C, and compensation video is then played to the position C or D from the position A', then plays segment video C Or the video after the position D, it also may be implemented as N > 2, but corresponding required memory space increases, therefore is as N=2 Optimal situation.
Preferably, if the position of [the maximum spacing of the position+i frame of the initial position frame for the segment video for needing to play] The frame set is i frame, then the initial position frame of the particular video frequency is i frame in this position;
On the position of [if the maximum spacing of the position+i frame of the initial position frame for the segment video for needing to play] Frame is p frame or b frame, then first i frame before or after the initial position frame of the particular video frequency is the p frame or b frame.
This is because it is that b frame or p frame start segment video that video stream server, which can not obtain initial position frame, it can only Obtain the segment video started with i frame.
Preferably, the playback equipment determines described in playing according to the compensation video received and the particular video frequency Compensate the length of video, comprising:
The playback equipment by it is described compensation video initial position frame position and the particular video frequency initial position Duration between the position of frame, as the length for playing the compensation video.
From figure 5 it can be seen that when video stream media request [position+i frame of the initial position frame of the segment video Maximum spacing] when being i frame, C is overlapped the frame on the C of position with D, then the length for playing compensation video is the initial position of segment video Length between the position A' and C or D of the i frame that frame b frame or p frame completion data generate;When [segment of video stream media request The maximum spacing of the position+i frame of the initial position frame of video] frame on the C of position when not being i frame, plays the length of compensation video For the length between the position A' and D of the i frame of initial position frame b frame or p frame completion the data generation of segment video.
Preferably, not generating compensation video if the initial position frame of the segment video is i frame.The playback equipment According to the corresponding relationship of segment video and compensation video, there is no corresponding compensation video in the segment video for determining that needs play Afterwards, the segment video that the request of Xiang Suoshu video stream server needs to play;
The playback equipment plays the segment video received.
When the initial position frame of segment video is i frame, video stream server can obtain the piece since the frame Disconnected video, there is no need to compensate video also to play out from the position of initial position frame.
When the method for playing segment video is situation two:
Preferably, if the initial position frame of the segment video is b frame or p frame, the corresponding compensation of the segment video The initial position frame of video is the i frame generated according to the data of the whole section of video position frame.
Situation two is with the difference with situation one: the equipment that compensation video is generated in situation one need to be to segment video Initial position frame is judged that, when the initial position frame of segment video is i frame, which does not mend then accordingly accordingly Video is repaid, only when the initial position frame of segment video is b frame or p frame, which just has corresponding compensation video; In situation two, regardless of the initial position frame of segment video is that i frame, b frame or p frame have corresponding compensation video, therefore nothing Need to the initial position frame to segment video judge.
Situation one is compared with situation two, the step of increasing judgement, so that the time of operation increases, but reduces used Memory space;Corresponding situation two is compared with situation one, then the step of reducing judgement, runing time has corresponding reduction, but Increase memory space.
Therefore, user can therefrom select for itself preferably scheme according to demand, such as work as limited storage space, and It is more appropriate using the scheme in situation two when there is no time restriction;And when memory space is limited, time not urgent situation again Under, the scheme using situation one kind is relatively reasonable.
As shown in fig. 6, the method that the embodiment of the present invention two generates compensation video includes:
Step 600 generates the equipment of compensation video from whole section of video of editing and multiple segments in the same original video stream Video records whole section of video and sets and the first final position and each segment video relative to the first start bit of original video stream First start bit relative to original video stream is set and the first final position.
Step 601, the equipment for generating compensation video are set according to whole section of video relative to the first start bit of original video stream It is set and the first final position, determination with the first final position and segment video relative to the first start bit of original video stream Second initial position and second final position of each segment video relative to whole section of video.
Step 602 generates second start bit of the equipment of compensation video according to each segment video relative to whole section of video Set with the second final position, the second initial position of each segment video is marked on whole section of video by way of getting mark ready With the second final position.
Step 603 is directed to a segment video, and the equipment for generating compensation video judges the second start bit of the segment video Whether set is i frame;If the second initial position of the segment video is b frame or p frame, 604 are thened follow the steps;If the segment video Second initial position is i frame, thens follow the steps 606.
Step 604 generates the equipment for compensating video through transcoder since the second initial position of whole section of video, duplication One section of shortest length is the video data of 2* (the maximum spacing of i frame) out, and by the b frame or p frame completion data on start position Generate i frame, make the segment data become can independent play-out compensation video.(wherein i frame maximum spacing is that the parameter of transcoding device is special Property, indicate the largest interval frame number or time between two i frames of video of transcoding device generation)
Step 605 generates the equipment of compensation video for whole section of video, the corresponding compensation video of segment video, segment video The second initial position and the second final position be supplied to video stream server, and terminate this process.
Step 606, the equipment for generating compensation video terminate whole section of video, the second initial position of segment video and second Position is supplied to video stream server, and terminates this process.
As shown in fig. 7, the method that the embodiment of the present invention three plays segment video includes:
Step 700, playback equipment judge the segment for needing to play view according to the corresponding relationship of segment video and compensation video Whether frequency has corresponding compensation video, if so, thening follow the steps 701;Otherwise, step 705 is executed.
The corresponding compensation view of the segment video that step 701, playback equipment need to play to video stream server request Frequently, and whole section of video of request is opened from [the maximum spacing of the second initial position+i frame of the segment] nearest i frame of positional distance The particular video frequency data of beginning.
Wherein, [the maximum spacing of the second initial position+i frame of the segment] nearest i frame of positional distance starts specific First i frame before or after video data is [the maximum spacing of the second initial position+i frame of the segment] position starts Particular video frequency data.
It is corresponding that step 702, video stream server according to the request received return to the segment video to playback equipment Compensate video and particular video frequency data.
Step 703, playback equipment determine the segment relative to the second initial position of whole section of video and video stream media clothes The alternate position spike of the second initial position relative to whole section of video for the particular video frequency data that business device returns.As broadcasting for compensation video Degree of lengthening.
After the length that step 704, playback equipment play compensation video is equal to alternate position spike, continue to play particular video frequency data, And terminate this process.
Step 705, playback equipment request whole section of video to be opened from second initial position of segment to video stream server The particular video frequency data of beginning.
Step 706, video stream server return to whole section of video from the segment to playback equipment according to the request received The video data that second initial position starts.
Step 707, playback equipment play the segment video for needing to play, and terminate this process.
Based on the same inventive concept, a kind of equipment for playing segment video is additionally provided in the embodiment of the present invention, due to this The corresponding method of function that inventive embodiments play the processing module of segment video equipment is the method for generating compensation video, Fig. 8 The corresponding method of equipment of broadcasting segment video of the embodiment of the present invention be the method for playing segment video, therefore the present invention is real The implementation for applying equipment may refer to the implementation of method, and overlaps will not be repeated.
As shown in figure 8, the equipment that the embodiment of the present invention four plays segment video includes:
Request module 800 is asked for the corresponding relationship according to segment video and compensation video to video stream server The compensation video and particular video frequency data of the segment video for needing to play in whole section of video are asked, wherein particular video frequency data are One section of segment video in whole section of video, and the initial position frame of the particular video frequency is the segment initial position frame for needing to play An i frame afterwards, the end position frame of the particular video frequency are the end position frames for needing the segment video played;
Determining module 801, for determining and playing the compensation according to the compensation video and the particular video frequency received The length of video;
Playing module 802, for playing the particular video frequency after playing the compensation video for determining length;
Wherein, the initial position frame of the corresponding compensation video of the segment video is the start bit according to the segment video The corresponding i frame generated of frame is set, and the video after the initial position frame of the compensation video is to be located at described in whole section of video After the initial position frame of section video, and the one section video adjacent with the initial position frame of the segment video.
Preferably, the equipment further include:
Processing module 803, for the corresponding relationship according to segment video and compensation video, in the segment for determining that needs play After video does not have corresponding compensation video, Xiang Suoshu video stream server requests the segment video for needing to play;It plays and receives The segment video arrived.
Preferably, the length of the compensation video is not less than N* (the maximum spacing of i frame);
Wherein, N >=2.
Preferably, if the initial position frame of the segment video is p frame or b frame, the corresponding compensation of the segment video The initial position frame of video is the i frame generated according to the whole section of video position frame data.
Preferably, if on the position of [the maximum spacing of the initial position frame+i frame for the segment video for needing to play] Frame is i frame, then the initial position frame of the particular video frequency is i frame in this position;
If the frame on the position of [the maximum spacing of the initial position frame+i frame for the segment video for needing to play] is p frame Or b frame, then first i frame before or after the initial position frame of the particular video frequency is the p frame or b frame.
Preferably, the playback equipment determines described in playing according to the compensation video received and the particular video frequency Compensate the length of video, comprising:
The playback equipment by it is described compensation video initial position frame position and the particular video frequency initial position Duration between the position of frame, as the length for playing the compensation video.
In addition, request module 800 can also will need the identification notification of the segment video played to give video stream media service Device, and the specific position for the initial position that one is used to determine particular video frequency data is notified to video stream server;
Processing module 803 can also generate compensation video.
It can be seen from the above: the side of the broadcasting segment video of embodiment according to the present invention of the embodiment of the present invention Method is regarded using playback equipment according to the corresponding relationship of segment video and compensation video to video stream server request fragments The corresponding compensation video of frequency, and whole section of video of request from [the maximum of the position+i frame of the initial position frame of the segment video Spacing] (i.e. [the maximum spacing of the position+i frame of the initial position frame of the segment video] is if on position for the nearest i frame of positional distance It is then it with [the maximum spacing of the position+i frame of the initial position frame of the segment video] nearest i frame of positional distance for i frame Itself;Otherwise, it is with [the maximum spacing of the position+i frame of the initial position frame of the segment video] nearest i frame of positional distance First i frame before or after [the maximum spacing of the position+i frame of the initial position frame of the segment video] position) start After particular video frequency data, playback equipment first plays compensation video, to compensate position and the particular video frequency of the initial position frame of video Initial position frame position between when a length of compensation video playing length, play particular video frequency later.This kind of technical solution It is realized by way of compensating video and accurately plays segment video since the frame of initial position, and improved implementable Property, it solves the problems, such as accurately play from designated position in segment video playing.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications can be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of method for playing segment video, which is characterized in that this method comprises:
Playback equipment is requested in whole section of video according to the corresponding relationship of segment video and compensation video to video stream server The compensation video and particular video frequency data for the segment video for needing to play, wherein particular video frequency data are in whole section of video One section of segment video, and the initial position frame of the particular video frequency is an i frame after the segment initial position frame for needing to play, The end position frame of the particular video frequency is the end position frame for needing the segment video played;
The playback equipment is by the initial position frame of the position of the initial position frame of the compensation video and the particular video frequency Duration between position, as the length for playing the compensation video;
The playback equipment plays the particular video frequency after playing the compensation video for determining length;
Wherein, the initial position frame of the corresponding compensation video of the segment video is the initial position frame according to the segment video The corresponding i frame generated, and the video after the initial position frame of the compensation video is to be located at the segment in whole section of video to regard After the initial position frame of frequency, and the one section video adjacent with the initial position frame of the segment video.
2. the method as described in claim 1, which is characterized in that this method further include:
The playback equipment does not have according to the corresponding relationship of segment video and compensation video in the segment video for determining that needs play After corresponding compensation video, Xiang Suoshu video stream server requests the segment video for needing to play;
The playback equipment plays the segment video received.
3. the method as described in claim 1, which is characterized in that the length of the compensation video is not less than N* (between the maximum of i frame Away from);
Wherein, N >=2.
4. the method as described in claim 1, which is characterized in that if the initial position frame of the segment video be p frame or b frame, Then the initial position frame of the corresponding compensation video of the segment video is the i frame generated according to the whole section of video position frame data.
5. the method as described in claim 1, which is characterized in that the initial position frame of the segment video if desired played it The frame set on the position of length afterwards is i frame, then the initial position frame of the particular video frequency is i frame in this position;
If desired it is p frame or b frame that the frame on the position of length is set after the initial position frame of the segment video played, then The initial position frame of the particular video frequency is first i frame before or after the p frame or b frame;Wherein, the setting length For the maximum spacing of i frame.
6. a kind of equipment for playing segment video, which is characterized in that the equipment includes:
Request module requests whole section to video stream server for the corresponding relationship according to segment video and compensation video The compensation video and particular video frequency data for the segment video for needing to play in video, wherein particular video frequency data are whole section of views One section of segment video in frequency, and the initial position frame of the particular video frequency is one after the segment initial position frame for needing to play A i frame, the end position frame of the particular video frequency are the end position frames for needing the segment video played;
Determining module, for by the initial position frame of the position of the initial position frame of the compensation video and the particular video frequency Duration between position, as the length for playing the compensation video;
Playing module, for playing the particular video frequency after playing the compensation video for determining length;
Wherein, the initial position frame of the corresponding compensation video of the segment video is the initial position frame according to the segment video The corresponding i frame generated, and the video after the initial position frame of the compensation video is to be located at the segment in whole section of video to regard After the initial position frame of frequency, and the one section video adjacent with the initial position frame of the segment video.
7. equipment as claimed in claim 6, which is characterized in that the equipment further include:
Processing module does not have for the corresponding relationship according to segment video and compensation video in the segment video for determining that needs play After having corresponding compensation video, Xiang Suoshu video stream server requests the segment video for needing to play;Play the piece received Section video.
8. equipment as claimed in claim 6, which is characterized in that the length of the compensation video is not less than N* (between the maximum of i frame Away from);
Wherein, N >=2.
9. equipment as claimed in claim 6, which is characterized in that if the initial position frame of the segment video be p frame or b frame, Then the initial position frame of the corresponding compensation video of the segment video is the i frame generated according to the whole section of video position frame data.
10. equipment as claimed in claim 6, which is characterized in that the initial position frame of the segment video if desired played The frame set on the position of length later is i frame, then the initial position frame of the particular video frequency is i frame in this position;
If desired it is p frame or b frame that the frame on the position of length is set after the initial position frame of the segment video played, then The initial position frame of the particular video frequency is first i frame before or after the p frame or b frame;Wherein, the setting length For the maximum spacing of i frame.
CN201410384598.9A 2014-08-05 2014-08-05 A kind of method and apparatus playing segment video Expired - Fee Related CN105323653B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410384598.9A CN105323653B (en) 2014-08-05 2014-08-05 A kind of method and apparatus playing segment video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410384598.9A CN105323653B (en) 2014-08-05 2014-08-05 A kind of method and apparatus playing segment video

Publications (2)

Publication Number Publication Date
CN105323653A CN105323653A (en) 2016-02-10
CN105323653B true CN105323653B (en) 2019-05-31

Family

ID=55250108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410384598.9A Expired - Fee Related CN105323653B (en) 2014-08-05 2014-08-05 A kind of method and apparatus playing segment video

Country Status (1)

Country Link
CN (1) CN105323653B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107197372B (en) * 2017-06-30 2019-12-27 北京金山安全软件有限公司 Method and device for shearing batch vertical screen videos and electronic equipment
CN107277606B (en) * 2017-07-06 2020-02-14 浙江华创视讯科技有限公司 Method and device for generating video data in streaming storage

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572523A (en) * 2010-12-30 2012-07-11 新奥特(北京)视频技术有限公司 Method and system for downloading video by dotting on line
CN103596016A (en) * 2013-11-20 2014-02-19 韩巍 Multimedia video data processing method and device
CN104240741A (en) * 2013-06-07 2014-12-24 杭州海康威视数字技术股份有限公司 Method for performing video dotting and searching in video recording, and video recording equipment thereof
CN104980808A (en) * 2015-07-06 2015-10-14 无锡天脉聚源传媒科技有限公司 Method and device for accurately dotting video resources
CN104994435A (en) * 2015-07-06 2015-10-21 无锡天脉聚源传媒科技有限公司 Method and device for accurately dotting video resources

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572523A (en) * 2010-12-30 2012-07-11 新奥特(北京)视频技术有限公司 Method and system for downloading video by dotting on line
CN104240741A (en) * 2013-06-07 2014-12-24 杭州海康威视数字技术股份有限公司 Method for performing video dotting and searching in video recording, and video recording equipment thereof
CN103596016A (en) * 2013-11-20 2014-02-19 韩巍 Multimedia video data processing method and device
CN104980808A (en) * 2015-07-06 2015-10-14 无锡天脉聚源传媒科技有限公司 Method and device for accurately dotting video resources
CN104994435A (en) * 2015-07-06 2015-10-21 无锡天脉聚源传媒科技有限公司 Method and device for accurately dotting video resources

Also Published As

Publication number Publication date
CN105323653A (en) 2016-02-10

Similar Documents

Publication Publication Date Title
US11665378B2 (en) Establishment and use of time mapping based on interpolation using low-rate fingerprinting, to help facilitate frame-accurate content revision
CN104394487B (en) The method and apparatus that self adaptation stream is generated and reproduced based on file format
KR101484900B1 (en) Audio splitting with codec-enforced frame sizes
US10930318B2 (en) Gapless video looping
US8947596B2 (en) Alignment of closed captions
JP6054398B2 (en) Switching signaling method providing improved switching of display for adaptive HTTP streaming
CA2771187C (en) Encoding video streams for adaptive video streaming
CA2840091C (en) Fast start of streaming digital media playback with deferred license retrieval
CN105814900B (en) System and method for managing adjacent channel in adaptive streaming environment
CN102664032B (en) A kind of playing progress rate adjustment bar of direct broadcast time-shift and control method thereof
CN105553939B (en) A kind of determination method and device of Streaming Media Caton
CN108235107A (en) Video recording method, device and electric terminal
CN106658226B (en) Playing method and device
TW201607302A (en) A system for filtering media manifests using manifest attributes
CN105744299A (en) Dynamic code rate switching method, server and system
CN104918120A (en) Playing progress adjustment method and electronic apparatus
CN104902145B (en) A kind of player method and device of live stream video
CN105323653B (en) A kind of method and apparatus playing segment video
CN110620950B (en) Method, device and equipment for storing audio and video files
CN110087116B (en) Multi-rate live video stream editing method and device, terminal and storage medium
CN108024125A (en) A kind of audio, video data playback method and server and client side
CN107005743A (en) For realizing the video bits stream process called in
US20120170907A1 (en) System and method for streaming content to blu-ray devices
CN102694823A (en) Method, server and client side to realize control of segmented program playing
CN109218809B (en) Streaming media playing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190531