CN106507204A - A kind of video play-reverse method and apparatus - Google Patents
A kind of video play-reverse method and apparatus Download PDFInfo
- Publication number
- CN106507204A CN106507204A CN201611116754.9A CN201611116754A CN106507204A CN 106507204 A CN106507204 A CN 106507204A CN 201611116754 A CN201611116754 A CN 201611116754A CN 106507204 A CN106507204 A CN 106507204A
- Authority
- CN
- China
- Prior art keywords
- video
- frame
- decoding
- reverse
- play
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000015654 memory Effects 0.000 abstract description 40
- 230000006870 function Effects 0.000 description 11
- 230000006854 communication Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 101000969688 Homo sapiens Macrophage-expressed gene 1 protein Proteins 0.000 description 1
- 102100021285 Macrophage-expressed gene 1 protein Human genes 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000005314 correlation function Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/114—Adapting the group of pictures [GOP] structure, e.g. number of B-frames between two anchor frames
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
- H04N19/436—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation using parallelised computational arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/4104—Peripherals receiving signals from specially adapted client devices
- H04N21/4126—The peripheral being portable, e.g. PDAs or mobile phones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The embodiment of the invention discloses a kind of video play-reverse method and apparatus;The embodiment of the present invention is instructed using video play-reverse is received, the video play-reverse instruction indicates the video file for needing to put upside down, then, according to the video play-reverse instruction, obtain the reproduction time needed for frame of video in decoding time and the video file in the video file needed for frame of video group, the frame of video quantity of parallel decoding is determined according to the decoding time and the reproduction time, concurrently frame of video in video file is inversely decoded according to the frame of video quantity, video data is obtained, Reverse Play is carried out to video data;As the program can greatly reduce EMS memory occupation amount.
Description
Technical field
The present invention relates to video technique field, and in particular to a kind of video play-reverse method and apparatus.
Background technology
As video play-reverse (i.e. Reverse Play) can bring interesting effect, very big enjoyment is brought, therefore, depending on
Frequently technology of putting upside down is widely used in the broadcasting of various videos.
At present, video play-reverse scheme is specially:First last GOP (Group ofPictures, picture group) press from
Order after arriving first decodes out, and the decoding data of each frame is stored in internal memory, then according to time requirement, shows.
When last GOP is finished, further decoding goes out all of frame of penultimate GOP, is stored in internal memory, then according to the time
Requirement shows.
However, video play-reverse scheme needs the decoding data of all frames in GOP to be stored in internal memory at present, therefore, can cause
Video play-reverse takes substantial amounts of internal memory, that is, increased EMS memory occupation amount.
Content of the invention
The embodiment of the present invention provides a kind of video play-reverse method and apparatus, it is possible to reduce EMS memory occupation amount.
The embodiment of the present invention provides a kind of video play-reverse method, including:
Video play-reverse instruction is received, the video play-reverse instruction indicates the video file for needing to put upside down;
Instructed according to the video play-reverse, the decoding time, Yi Jisuo in the acquisition video file needed for frame of video group
State the reproduction time needed for frame of video in video file;
The frame of video quantity of parallel decoding is determined according to the decoding time and the reproduction time;
Concurrently frame of video in video file is inversely decoded according to the frame of video quantity, obtained video data;
Reverse Play is carried out to video data.
Accordingly, the embodiment of the present invention also carries a kind of video play-reverse device, including:
Receiving unit, for instructing according to the video play-reverse, obtains the solution needed for frame of video group in the video file
Reproduction time in code time and the video file needed for frame of video;
Determining unit, for determining the frame of video quantity of parallel decoding according to the decoding time and the reproduction time;
Decoding unit, for concurrently inversely being decoded to frame of video in video file according to the frame of video quantity,
Obtain video data;
Broadcast unit, for carrying out Reverse Play to video data.
Using video play-reverse instruction is received, the video play-reverse instruction indicates the video text for needing to put upside down to the embodiment of the present invention
Part, then, according to the video play-reverse instruction, obtains the decoding time in the video file needed for frame of video group and the video
Reproduction time in file needed for frame of video, determines the video frame number of parallel decoding according to the decoding time and the reproduction time
Amount, is concurrently inversely decoded to frame of video in video file according to the frame of video quantity, is obtained video data, to video counts
According to carrying out Reverse Play;Due to the program can based on frame of video group needed for decoding the time and frame of video needed for broadcasting when
Between determining the frame of video quantity of each parallel decoding, and concurrently the frame of video of the quantity is inversely decoded;Therefore, should
Scheme is after decoding every time without the need for storing the decoding data of all frames in GOP to internal memory, it is possible to reduce deposit during putting upside down
Store up to the decoding data amount of internal memory, accordingly, with respect to prior art for, EMS memory occupation amount or use can be greatly reduced
Amount.
Description of the drawings
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, below will be to making needed for embodiment description
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for
For those skilled in the art, on the premise of not paying creative work, can be other attached to be obtained according to these accompanying drawings
Figure.
Fig. 1 a are the flow charts of video play-reverse method provided in an embodiment of the present invention;
Fig. 1 b are frame of video schematic diagrams provided in an embodiment of the present invention;
Fig. 1 c are GOP schematic diagrams provided in an embodiment of the present invention;
Fig. 2 is another flow chart of video play-reverse method provided in an embodiment of the present invention;
Fig. 3 is the structural representation of video play-reverse device provided in an embodiment of the present invention;
Fig. 4 is the structural representation of terminal provided in an embodiment of the present invention.
Specific embodiment
Accompanying drawing in below in conjunction with the embodiment of the present invention, to the embodiment of the present invention in technical scheme carry out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiment.It is based on
Embodiment in the present invention, the every other enforcement obtained under the premise of creative work is not made by those skilled in the art
Example, belongs to the scope of protection of the invention.
The embodiment of the present invention provides a kind of video play-reverse method and apparatus.It is described in detail individually below.
Embodiment one,
Angle from video play-reverse device is described by the present embodiment, and the video play-reverse device can specifically be integrated in end
In the equipment such as end, the terminal can be with equipment such as mobile phone, panel computer or notebook computers.
A kind of video play-reverse method, including:Video play-reverse instruction is received, the video play-reverse instruction indicates to need that put upside down to regard
Frequency file, then, according to the video play-reverse instruction, obtains the decoding time in the video file needed for frame of video group and is somebody's turn to do
Reproduction time in video file needed for frame of video, determines the frame of video of parallel decoding according to the decoding time and the reproduction time
Quantity, is concurrently inversely decoded to frame of video in video file according to the frame of video quantity, is obtained video data, to video
Data carry out Reverse Play.
As shown in Figure 1a, a kind of video play-reverse method, idiographic flow can be as follows:
101st, video play-reverse instruction is received, and the video play-reverse instruction indicates the video file for needing to put upside down.
Wherein, video file can include some frame of video, such as, can include sequence of frames of video.Specifically, the video
File can include key frame (such as intracoded frame) and non-key frame (such as forward-predictive-coded frames).With reference to Fig. 1 b, wherein, I
Key frame is represented, P represents non-key frame.Nearest I frames, Ran Houyi before the P frames can first be solved in forward play video
Secondary solve backward, can just solve the P frames.
Frame of video group of the key frame to the former frame of next key frame, referred to as GOP (Group in the video file
OfPicture, picture group), with reference to Fig. 1 c.
In the present embodiment, the form of video file is multiple, such as, can be with MPEG (Moving Picture Experts
Group, dynamic image expert group), MPEG1, MPEG2 or extended formatting.
Wherein, video play-reverse instruction can be carried out by presetting the triggering such as triggering key or input frame interface in triggering terminal
Triggering, such as, when user clicks on or streaks certain icon, then triggering generates the video play-reverse instruction, now, the video play-reverse
Device just can be received to the video play-reverse instruction, such as, the video play-reverse is referred to by default command reception interface
Order is received, etc..
The video play-reverse instruction can carry the information such as the mark of video file.
102nd, according to the video play-reverse instruction, obtain the decoding time in the video file needed for frame of video group and be somebody's turn to do
Reproduction time in video file needed for frame of video.
Specifically, video file is obtained according to video play-reverse instruction, then, is obtained in the video file needed for frame of video group
The decoding time and the video file in reproduction time needed for frame of video.
Wherein, obtain video file mode can have multiple, such as, can be according to video play-reverse instruction from locally stored
Video file is obtained in unit, and such as, video file can be obtained from the webserver according to video play-reverse instruction.
In the present embodiment, the frame of video group can be constituted with successive video frames, can be set according to the actual requirements.Such as can be with
For the frame of video group of key frame to the former frame of next key frame, i.e. GOP.Now, the decoding time can be one GOP of decoding
The required time, i.e., from the beginning of starting keyframe, it is decoded to the time of the GOP last frames.
Preferably, the maximum duration that the decoding time can be for needed for decoding a GOP, i.e., decode one under worst case
Time needed for GOP.For example, the when a length of 150ms needed for normal condition decoding GOP, excessive etc. in abnormal conditions such as cpu load
In the case of decode GOP needed for when a length of 200ms, now, just can select 200ms.
Reproduction time needed for the frame of video can be the playing duration of frame of video or display duration in video file.One
As for decode a GOP time more than a frame of video reproduction time.
In the present embodiment, the decoding time can carry out actual decoding to GOP in video file and obtain, it is also possible to pre-set,
Such as, before video play-reverse instruction is received, decoding time of a preset GOP etc..
Alternatively, in some other embodiments, can getting frame number decoder time map set of relationship in advance, the collection
Conjunction includes the mapping relations in GOP between frame number and decoding time, now, just can be closed according to the frame number in GOP and the mapping
Assembly is closed and obtains the corresponding decoding time.
The reproduction time acquisition modes of frame of video can also have multiple, and such as frame of video generally comprises the starting of frame of video and broadcasts
The time is put, be therefore, it can the initial reproduction time of initial reproduction time according to frame of video and the frame of video being adjacent, obtained
Take the reproduction time needed for frame of video.
In the present embodiment, can be with the total quantity according to video frame rate and frame of video, when obtaining the broadcasting needed for frame of video
Between;Such as, the video of 1000 frames, video frame rate is 25fps, now, a length of 1000/25=40ms when showing per frame.
103rd, the frame of video quantity of parallel decoding is determined according to the decoding time and the reproduction time.
The frame of video quantity of the parallel decoding can be to carry out parallel frame of video quantity every time.
Preferably, the frame of video quantity included less than frame of video group such as GOP by the frame of video quantity.As such, it is possible to cause
A small amount of decoding data is preserved in the initial play stage, the occupancy of internal memory is reduced.
Specifically, be to ensure the frame of video is can decode that before the reproduction time of frame of video reaches, improve video playback
Quality, current embodiment require that arranging a rational parallel decoding frame of video quantity, such as can be broadcast with this based on the decoding time
Put division quotient between the time to determine the frame of video quantity of parallel decoding;Namely step " is broadcast with this according to the decoding time
The time of putting determines the frame of video quantity of parallel decoding " can include:
By the decoding time divided by the reproduction time, quotient is obtained;
According to the frame of video quantity that the quotient determines parallel decoding.
Wherein step " according to the frame of video quantity that the quotient determines parallel decoding " can include:Choose and be not less than the quotient
Smallest positive integral as parallel decoding frame of video quantity.
Such as, the decoding time is m, when the presentation of video frames time is n, frame of video quantity q=ceil (m/n).ceil
Refer to the smallest positive integral taken not less than m/n.Such as m=220ms, n=40ms, now, m/n=5.5, then q=6, and such as m=
200ms, n=40ms, now, m/n=5, then q=5.
104th, concurrently frame of video in video file is inversely decoded according to the frame of video quantity, is obtained video counts
According to.
Wherein, reverse decoding refers to start to be solved to initial frame of video from last frame of video of video file
Code.Such as, video file includes S frames, and S is positive integer, is designated as frame 1, frame 2, frame 3 ..., frame S, then
Now, inversely it is decoded as starting to be decoded to frame 1 from frame S.
In order to accelerate video play-reverse speed, the present embodiment can arrange some decoding threads and concurrently frame of video is solved
Code, wherein, the quantity for decoding thread can be determined based on the frame of video quantity of parallel decoding;Namely step is " according to the frame of video
Quantity is concurrently inversely decoded to frame of video in video file " can include:
The quantity of the decoding thread for needing to enable is determined according to the frame of video quantity;
Decoding thread according to the quantity is concurrently inversely decoded to frame of video in video file.
Preferably, the quantity of decoding thread can be consistent with frame of video quantity, such as, when the frame of video quantity of parallel decoding
For k when, then need start k decode thread, k is positive integer.
In reverse decoding process, can first determine which needs the frame of video of decoding for each decodes thread, then, then
The frame of video that chooses is decoded by the decoding thread;Namely step is " according to the decoding thread of the quantity concurrently to regarding
In frequency file, frame of video is inversely decoded " can include:
From the frame of video of video file, reverse selection decoding thread is currently needed for the target video frame for decoding;
The target video frame is decoded by the decoding thread.
Wherein, reverse choose refer to along with last frame of video of video file as starting point, video file rises
Direction selecting video frame of the beginning frame of video for terminal, such as, video file includes S frame of video, then now, for certain solution
Code thread, reverse selection can be for choosing the S frame of video, the S-3 frame of video, the S-5 frame of video ... the 1st successively
Frame of video.
Wherein, for each decoding thread, can be inverse based on the history decoding video frame of the quantity of thread and decoding thread
To selection target video frame;Namely step " the target that reverse selection decoding thread needs are decoded from the frame of video of video file
Frame of video " can include:
According to the quantity and the history decoding video frame of decoding thread, from the frame of video of video file, reverse selection decodes
Thread needs the target video frame of decoding.
Wherein, the history decoding video frame of decoding thread can be the frame of video of the previous decoding thread decoding.
In the present embodiment, target video frame can inversely be chosen according to the mark of the quantity and history decoding video frame.Than
Such as, in the case where being numbered to frame of video, target can inversely be chosen according to the numbering of quantity and history decoding video frame
Frame of video.In actual applications, can also be numbered for decoding thread, at this point it is possible to according to quantity, the numbering of decoding thread
And the numbering of history decoding video frame inversely chooses target video frame.Preferably, the current target video frame is decoded with history
The numbering difference of video is equal to the quantitative value.
Such as, video file include S frame of video, i.e. frame of video 1, frame of video 2 ... frame of video S;Start number of threads
For k, T1, T2, T3 ... Ti, Tk is designated as.For thread Ti, during the 1st selection, history decoding video frame is 0, now chooses target
Frame of video is frame of video S-i+1, and during the 2nd selection, it is frame of video (S-i+1)-k to choose target video frame, during the 3rd selection,
When selection target video frame is that frame of video (S-i+1) -2k ... ... jth time line selection takes, it is (S-i+ that target video frame is frame of video
1)-(j-1)k.
In the present embodiment, after being decoded to target video and obtaining video data, can the video counts that obtain of decoding
According to adding into video data set, so that subsequently Reverse Play can be carried out to video data in video data set, lifted
The speed of video play-reverse.
105th, Reverse Play is carried out to video data.
Wherein, Reverse Play refers to play out from last frame of video to initial frame of video, such as plays successively and regards
The video data S of frequency frame S, the video data 1 of video data S-1 ... the frame of video 1 of frame of video S-1.
Specifically, Reverse Play can be carried out to video data according to reproduction time, namely step " is carried out to video data
Reverse Play " can include:
Obtain current video reproduction time;
Reverse Play is carried out to video data according to the current video reproduction time.
Such as, the target video data for needing to play is determined according to current video reproduction time, then, is played the target and is regarded
Frequency evidence.For example, video file includes frame of video 1, frame of video 2 ... frame of video S, and the playing duration of each frame of video is n millis
During the second, 0 millisecond of video data S for playing last frame of video S, n milliseconds play video data the S-1, (k- of frame of video S-1
1) play during * n milliseconds the video data S-k+1 ... of frame of video S-k+1 (2k-1) * n milliseconds when play frame of video S-2k+1
Video data ... (2k) * n milliseconds when play frame of video S-2k video data ....
Specifically, in order to can decode before the reproduction time of frame of video reaches obtain the frame of video video counts
According to the present embodiment can be when the video data to certain decoding thread decoding carries out Reverse Play, again to triggering the decoding
Thread is decoded to follow-up non-decoding video frame again.Namely step " carrying out Reverse Play to video data " can include:
Carry out Reverse Play, and return the reverse decoding thread of choosing of execution when the video data is played needing to video data
The step of target video frame to be decoded.
Such as, it is k to start number of threads, is designated as T1, and T2, T3 ... Ti, Tk, for Ti, can be inversely selected from frame of video
Take Ti be currently needed for decode target video frame be frame of video S-i+1 (last frame of video), by Ti to frame of video S-i
After+1 is decoded, video data S-i+1 is obtained, subsequently can inversely choose Ti when playing to video data S-i+1 again
The target video frame for needing decoding is frame of video (S-i+1)-k and obtains video data (S-i+1)-k, subsequently to video data
(S-i+1) when-k is played, another mistake is decoded to target video frame is chosen ..., and by that analogy, all until video file regard
Stop reverse selection and decoding operate when frequency frame decoding is completed.
Optionally, in the case of in the video data that decoding is obtained is added to video data set, can be to video
Video data in data acquisition system carries out Reverse Play.
From the foregoing, it will be observed that the embodiment of the present invention is using video play-reverse instruction is received, the video play-reverse instruction indicates that needs are put upside down
Video file, then, according to video play-reverse instruction, obtain decoding time in the video file needed for frame of video group, with
And the reproduction time in the video file needed for frame of video, regarding for parallel decoding is determined according to the decoding time and the reproduction time
Frequency number of frames, is concurrently inversely decoded to frame of video in video file according to the frame of video quantity, is obtained video data, right
Video data carries out Reverse Play;Due to the program can based on frame of video group needed for decoding the time and frame of video needed for
Reproduction time is determining the frame of video quantity of each parallel decoding, and concurrently the frame of video of the quantity is inversely decoded;
Therefore, without the need for storing the decoding data of all frames in GOP to internal memory after decoding every time, such as, the program is first for the program
Need to only decode during beginning state and preserve a small amount of decoding data, only need when follow-up play decoding data carries out video frame decoding again
A decoding data is preserved, therefore, it can reduce storing during putting upside down to the decoding data amount of internal memory, relative to existing skill
For art, EMS memory occupation amount or usage amount can be greatly reduced.Also, as the program is by the way of parallel decoding, phase
For the existing mode for decoding GOP successively, decoding efficiency can be greatly improved, it is to avoid influencing each other between decoding, lifted
Video playback quality.
Further, since existing video play-reverse scheme needs to take a large amount of internal memories, and restricted during the usage amount of internal memory, because
This, the video resolution that existing video play-reverse scheme is supported is that limitedly which cannot support high-resolution video play-reverse, and this
Scheme of the invention need not take a large amount of internal memories, breach the restriction of video resolution, can support high-resolution video play-reverse.
Embodiment two,
Citing is described in further detail by method according to described by embodiment one below.
In the present embodiment, will illustrate so that the video play-reverse device is integrated in terminal as an example.
As shown in Fig. 2 a kind of video play-reverse method, idiographic flow includes:
201st, terminal receives video play-reverse instruction, and the video play-reverse instruction indicates the video file for needing to put upside down.
Such as, when user clicks on and " puts " button in video playback interface upside down, triggering terminal generates video play-reverse instruction, this
When, terminal just can receive the instruction.
202nd, terminal obtains video file according to video play-reverse instruction, and the video file includes multiple frame of video.
Such as, terminal extracts video file from local video data storehouse according to video play-reverse instruction, it is also possible to according to regarding
Frequency puts instruction upside down from server downloading video files.
The video file can include key frame and non-key frame, referred to as former frame of the key frame to next key frame, group
Frame, i.e. GOP (Group ofPicture).
For example, the video file can include S frame of video, be designated as frame 1, frame 2, frame3 ... respectively,
frame S.
203rd, terminal obtains the playing duration for decoding time and frame of video in video file needed for GOP.
Wherein, duration of the decoding time needed for GOP for needed for being decoded to last frame from the starting keyframe of GOP.Should
The decoding time can be obtained based on actually detected, or a preset value.
Preferably, the most long decoding time that the decoding time can be for needed for GOP, i.e., a GOP is decoded under worst case
Required duration.
Wherein, the totalframes and video frame rate that the playing duration of frame of video can be included based on video file is obtained.Than
Such as, the video of 1000 frames, video frame rate is 50fps, then the playing duration of each frame of video is 1000/50=20ms.
204th, terminal determines the quantity of the decoding thread for needing to start according to decoding time and playing duration.
Specifically, decoding duration can be obtained quotient divided by playing duration, then, the minimum for taking the not little quotient is just whole
Number.
Such as, the decoding time is m, when playing duration is n, enables Thread Count k=ceil (m/n).Ceil refers to take and is not less than
The smallest positive integral of m/n.This k thread is designated as T1, T2, T3 respectively ..., Tk.
205th, terminal inversely chooses the target video frame that decoding thread is currently needed for decoding from frame of video.
Wherein, reverse choose refer to along with last frame of video of video file as starting point, video file rises
Direction selecting video frame of the beginning frame of video for terminal, such as, video file includes S frame of video, then now, for certain solution
Code thread, reverse selection can be to choose frame S, frame S-4, frame S-5 ... frame2 successively.
In practical application, can to frame of video and decoding thread be numbered, such as frame1, frame2 ...
FrameS, decodes thread T1, T2, T3 ..., Tk.So at this point it is possible to according to number of threads, the numbering of decoding thread and go through
The numbering of history decoding video frame inversely chooses target video frame.The history decoding video frame of the decoding thread can be somebody's turn to do for previous time
The frame of video of decoding thread decoding.
Specifically, for thread Ti, when choosing for the 1st time, history decoding video frame is 0, now choose target video frame be regarding
Frequency frame S-i+1, during the 2nd selection, it is frame of video (S-i+1)-k to choose target video frame, during the 3rd selection, chooses target and regards
When frequency frame is that frame of video (S-i+1) -2k ... ... jth time line selection takes, it is (S-i+1)-(j-1) k that target video frame is frame of video.
Such as, the starting stage, it may be determined that the frame of video of T1 currently decodings is frameS, i.e. T1seek (frame S) should
Seek is the operation for being randomly assigned any frame, and T2 decoding video frame frameS-1 are T2seek (S-1), T3seek (S-
2)……Tk seek(S-k+1).
206th, terminal is decoded to target video frame by decoding thread, obtains corresponding video data, and by video
During data are added to video data set.
Such as, starting stage, T1 are decoded to frame of video frameS, obtain video data data S, i.e. T1seek (frame
S), video data data S are obtained, T2seek (S-1) obtains video data S-1 ... ... Tk seek (S-k+1) and obtains video counts
According to data S-k+1.
The video data set is may be located in tag memory, or other storage locations.Such as, by data S, data
During S-1 ... data S-k+1 add to video data set.
207th, terminal carries out Reverse Play according to current video reproduction time to video data in video data set, and returns
Return execution step 205.
Such as, specifically play and decoding process can be as follows:
0 plays data S triggering T1 decoding frame S-K, i.e. T1seek (S-k);Now T1seek (S-k) just can be
Complete before k*n, i.e. T1seek (S-k) -->Complete before k*n;
N broadcasting data S-1 triggerings T2seek (S-k-1)->(k+1) complete before * n;
2n broadcasting data S-2 triggerings T3seek (S-k-2)->(k+2) complete before * n;
...
(k-1) * n play data S-k+1 triggering Tk seek (S-2k-1)->(2k-1) complete before * n;
K*n broadcasting data S-k triggerings T1seek (S-2k)->(2k) complete before * n;
(k+1) * n play data S-k-1 triggering T2seek (S-2k-1)->(2k+1) complete before * n;
(k+2) * n play data S-k-2 triggering T3seek (S-2k-2)->(2k+2) complete before * n;
...
(2k-1) * n play data S-2k+1 triggering Tk seek (S-3k+1)->(3k-1) complete before * n
(2k) * n play dataS-2k triggering T1seek (S-3k)->(3k) complete before * n
......
Until S frame of video, all decoding is completed or frame1 decodings complete to terminate.
It can be seen that, video play-reverse method provided in an embodiment of the present invention can be
Below citing is described in detail to the present embodiment method:
Assuming, Reverse Play, i.e. video file is done to a video for there are 1000 frames includes 1000 frame of video.Decoding one
Maximum duration needed for individual GOP is 200ms, and video frame rate is 25fps, i.e., show 40ms per frame.
First, determine and Thread Count is enabled for 200/40=5, that is, need 5 threads to complete.
Initial preparation state:
T1:Seek (1000) obtains data1000
T2:Seek (999) obtains data999
T3:Seek (998) obtains data998
T4:Seek (997) obtains data997
T5:Seek (996) obtains data996
Commence play out:
0ms shows data1000T1seek (995) -->Complete before 200ms
40ms shows data999T2seek (994) -->Complete before 240ms
80ms shows data998T3seek (993) -->Complete before 280ms
120ms shows data997T4seek (992) -->Complete before 320ms
160ms shows data996T5seek (991) -->Complete before 360ms
200ms shows data995T1seek (990) -->Complete before 400ms
240ms shows data994T2seek (989)
280ms shows data993T3seek (988)
320ms shows data992T4seek (987)
360ms shows data991T5seek (986)
400ms shows data990T1seek (985)
......
By that analogy, till first frame of video of decoding is completed.
From the foregoing, it will be observed that the embodiment of the present invention is using video play-reverse instruction is received, the video play-reverse instruction indicates that needs are put upside down
Video file, then, according to video play-reverse instruction, obtain decoding time in the video file needed for frame of video group, with
And the reproduction time in the video file needed for frame of video, regarding for parallel decoding is determined according to the decoding time and the reproduction time
Frequency number of frames, is concurrently inversely decoded to frame of video in video file according to the frame of video quantity, is obtained video data, right
Video data carries out Reverse Play;Due to the program can based on frame of video group needed for decoding the time and frame of video needed for
Reproduction time is determining the frame of video quantity of each parallel decoding, and concurrently the frame of video of the quantity is inversely decoded;
Therefore, without the need for storing the decoding data of all frames in GOP to internal memory after decoding every time, such as, the program is first for the program
Need to only decode during beginning state and preserve a small amount of decoding data, only need when follow-up play decoding data carries out video frame decoding again
A decoding data is preserved, therefore, it can reduce storing during putting upside down to the decoding data amount of internal memory, relative to existing skill
For art, EMS memory occupation amount or usage amount can be greatly reduced.Also, as the program is by the way of parallel decoding, phase
For the existing mode for decoding GOP successively, decoding efficiency can be greatly improved, it is to avoid influencing each other between decoding, lifted
Video playback quality.
Further, since existing video play-reverse scheme needs to take a large amount of internal memories, and restricted during the usage amount of internal memory, because
This, the video resolution that existing video play-reverse scheme is supported is that limitedly which cannot support high-resolution video play-reverse, and this
Scheme of the invention need not take a large amount of internal memories, breach the restriction of video resolution, can support high-resolution video play-reverse.
Embodiment three,
In order to preferably implement said method, the embodiment of the present invention also provides a kind of video play-reverse device, as shown in figure 3,
The video play-reverse device can include receiving unit 301, acquiring unit 302, determining unit 303, decoding unit 304 and play single
Unit 305, as follows:
(1) receiving unit 301;
Receiving unit 301, for receiving video play-reverse instruction, the video play-reverse instruction indicates the video text for needing to put upside down
Part.
Wherein, video play-reverse instruction can be carried out by presetting the triggering such as triggering key or input frame interface in triggering terminal
Triggering, such as, when user clicks on or streaks certain icon, then triggering generates the video play-reverse instruction, i.e.,:
Receiving unit 301, the video play-reverse instruction specifically for receive user by triggering interface triggering.
(2) acquiring unit 302;
Acquiring unit 302, for according to the video play-reverse instruction, obtaining the decoding needed for frame of video group in the video file
Reproduction time in time and the video file needed for frame of video.
Acquiring unit 302 can be used for obtaining video file according to video play-reverse instruction, then, obtain in the video file
Reproduction time in the decoding time and the video file needed for frame of video group needed for frame of video.
In the present embodiment, the frame of video group can be frame of video group of the key frame to the former frame of next key frame, i.e.,
GOP.Now, the time that the decoding time can be for needed for decoding a GOP, i.e., from the beginning of starting keyframe, the GOP is decoded to most
The time of a later frame.Preferably, the maximum duration that the decoding time can be for needed for decoding a GOP, i.e., decode under worst case
Time needed for one GOP.
Reproduction time needed for the frame of video can be the playing duration of frame of video or display duration in video file.One
As for decode a GOP time more than a frame of video reproduction time.
(3) determining unit 303;
Determining unit 303, for determining the frame of video quantity of parallel decoding according to the decoding time and the reproduction time.
Preferably, the frame of video quantity included less than frame of video group such as GOP by the frame of video quantity.As such, it is possible to cause
A small amount of decoding data is preserved in the initial play stage, the occupancy of internal memory is reduced.
Such as, the determining unit 303 can be used for the decoding time divided by the reproduction time, obtain quotient, according to this
Quotient determines the frame of video quantity of parallel decoding.As chosen frame of video of the smallest positive integral for being not less than the quotient as parallel decoding
Quantity.
(4) decoding unit 304;
Decoding unit 304, for concurrently inversely being decoded to frame of video in video file according to the frame of video quantity,
Obtain video data.
Wherein, reverse decoding refers to start to be solved to initial frame of video from last frame of video of video file
Code.Such as, video file includes S frames, and S is positive integer, is designated as frame 1, frame 2, frame 3 ..., frame S, then
Now, inversely it is decoded as starting to be decoded to frame 1 from frame S.
Such as, decoding unit 304 can include:
Determination subelement, for determining the quantity of the decoding thread for needing to enable according to the frame of video quantity;
Decoding subunit, is concurrently inversely solved to frame of video in video file for the decoding thread according to the quantity
Code.
Preferably, the quantity of decoding thread can be consistent with frame of video quantity.
Such as, decoding subunit, can be used for reverse decoding thread of choosing from the frame of video of video file and is currently needed for
The target video frame of decoding, is decoded to the target video frame by the decoding thread.
Wherein, reverse choose refer to along with last frame of video of video file as starting point, video file rises
Direction selecting video frame of the beginning frame of video for terminal.
Specifically, decoding subunit, can specifically for according to the quantity and decoding thread history decoding video frame, from
In the frame of video of video file, reverse decoding thread of choosing needs the target video frame of decoding.
(5) broadcast unit 305;
Broadcast unit 305, for carrying out Reverse Play to video data.
Wherein, Reverse Play refers to play out from last frame of video to initial frame of video, such as plays successively and regards
The video data S of frequency frame S, the video data 1 of video data S-1 ... the frame of video 1 of frame of video S-1.
Such as broadcast unit 305, can be used for obtaining current video reproduction time, according to the current video reproduction time pair
Video data carries out Reverse Play.
Specifically, in order to can decode before the reproduction time of frame of video reaches obtain the frame of video video counts
According to broadcast unit 305 specifically for carrying out Reverse Play to the video data, and triggers the solution numeral in playing video data
Unit executes the step of reverse selection decoding thread is currently needed for the target video frame for decoding from the frame of video of video file.
When being embodied as, above unit can be realized as independent entity, it is also possible to carry out combination in any, made
Realize for same or several entities, being embodied as of above unit can be found in embodiment of the method above, and here is not
Repeat again.
The video play-reverse device can be specifically integrated in the equipment such as terminal, and the terminal is specifically as follows mobile phone or flat board electricity
The equipment such as brain.
From the foregoing, it will be observed that the embodiment of the present invention receives video play-reverse instruction using receiving unit 301, the video play-reverse refers to
Show the video file that needs are put upside down, then, by acquiring unit 302 according to the video play-reverse instruction, obtain and regard in the video file
Reproduction time in the decoding time and the video file needed for frequency frame group needed for frame of video, by determining unit 303 according to this
Decoding time and the reproduction time determine the frame of video quantity of parallel decoding, by decoding unit 304 according to the frame of video quantity simultaneously
Row ground is inversely decoded to frame of video in video file, is obtained video data, video data is fallen by broadcast unit 305
Sequence is played;As the program can be determined based on the decoding time needed for frame of video group and the reproduction time needed for frame of video
The frame of video quantity of each parallel decoding, and concurrently the frame of video of the quantity is inversely decoded;Therefore, the program is every
Without the need for storing the decoding data of all frames in GOP to internal memory after secondary decoding, such as, the program only needs to decode in original state
A small amount of decoding data is preserved, and a solution yardage need to be only preserved when follow-up play decoding data carries out video frame decoding again
According to, therefore, it can reduce storing during putting upside down to the decoding data amount of internal memory, in terms of existing technologies, Ke Yi great
Big minimizing EMS memory occupation amount or usage amount.Also, as the program is by the way of parallel decoding, solved relative to existing successively
The mode of code GOP, can greatly improve decoding efficiency, it is to avoid influencing each other between decoding, improve video playback quality.
Further, since existing video play-reverse scheme needs to take a large amount of internal memories, and restricted during the usage amount of internal memory, because
This, the video resolution that existing video play-reverse scheme is supported is that limitedly which cannot support high-resolution video play-reverse, and this
Scheme of the invention need not take a large amount of internal memories, breach the restriction of video resolution, can support high-resolution video play-reverse.
Example IV,
Additionally, the embodiment of the present invention also provides a kind of terminal, as shown in figure 4, the terminal can include radio frequency (RF, Radio
Frequency) circuit 401, include the memorizer 402, input block of one or more computer-readable recording mediums
403rd, broadcast unit 404, sensor 405, voicefrequency circuit 406, Wireless Fidelity (WiFi, Wireless Fidelity) module
407th, the parts such as the processor 408 and power supply 409 of or more than one processing core is included.People in the art
Member it is appreciated that in Fig. 4 the terminal structure that illustrates not structure paired terminal restriction, can include more more or less of than illustrating
Part, or some parts are combined, or different part arrangements.Wherein:
RF circuits 401 can be used to receiving and sending messages or communication process in, the reception and transmission of signal, especially, by base station
After downlink information is received, transfer to one or more than one processor 408 is processed;In addition, will be related to up data is activation to
Base station.Generally, RF circuits 401 include but is not limited to antenna, at least one amplifier, tuner, one or more agitators, use
Family identity module (SIM, Subscriber Identity Module) card, transceiver, bonder, low-noise amplifier
(LNA, Low Noise Amplifier), duplexer etc..Additionally, RF circuits 401 can also pass through radio communication and network and its
His equipment communication.The radio communication can use arbitrary communication standard or agreement, including but not limited to global system for mobile telecommunications system
System (GSM, Global System ofMobile communication), general packet radio service (GPRS, General
Packet Radio Service), CDMA (CDMA, Code Division Multiple Access), wideband code division many
Location (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long Term
Evolution), Email, Short Message Service (SMS, Short Messaging Service) etc..
Memorizer 402 can be used to store software program and module, and processor 408 is stored in memorizer 402 by operation
Software program and module, so as to execute various function application and data processing.Memorizer 402 mainly can include storing journey
Sequence area and storage data field, wherein, storing program area can storage program area, the application program (ratio needed at least one function
Such as sound-playing function, image player function etc.) etc.;Storage data field can be stored and use created data according to terminal
(such as voice data, phone directory etc.) etc..Additionally, memorizer 402 can include high-speed random access memory, can also include
Nonvolatile memory, for example, at least one disk memory, flush memory device or other volatile solid-state parts.Phase
Ying Di, memorizer 402 can also include Memory Controller, to provide processor 408 and input block 403 is to memorizer 402
Access.
Input block 403 can be used for the numeral of receives input or character information, and produce and user setup and function
The relevant keyboard of control, mouse, action bars, optics or trace ball signal input.Specifically, in a specific embodiment
In, input block 403 may include Touch sensitive surface and other input equipments.Touch sensitive surface, also referred to as touches and plays screen or touch
Control plate, user can be collected thereon or neighbouring touch operation (such as user using any suitable objects such as finger, stylus or
Operation of the adnexa on Touch sensitive surface or near the Touch sensitive surface), and corresponding connection dress is driven according to formula set in advance
Put.Optionally, Touch sensitive surface may include two parts of touch detecting apparatus and touch controller.Wherein, touch detecting apparatus inspection
The touch orientation of survey user, and the signal that touch operation brings is detected, transmit a signal to touch controller;Touch controller from
Touch information is received on touch detecting apparatus, and is converted into contact coordinate, then give processor 408, and can reception processing
Order that device 408 is sent simultaneously is executed.Furthermore, it is possible to adopt resistance-type, condenser type, infrared ray and surface acoustic wave etc. multiple
Type realizes Touch sensitive surface.Except Touch sensitive surface, input block 403 can also include other input equipments.Specifically, other are defeated
Enter equipment and can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, Mus
One or more in mark, action bars etc..
Broadcast unit 404 can be used for play by user input information or be supplied to user information and terminal various
Graphical user interface, these graphical user interface can be made up of figure, text, icon, video and its combination in any.Play
Unit 404 may include play panel, optionally, can adopt liquid crystal player (LCD, Liquid Crystal Display),
The forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) are configuring broadcasting panel.Further
, Touch sensitive surface can cover broadcasting panel, when Touch sensitive surface is detected thereon or after neighbouring touch operation, send process to
Device 408 is provided according to the type of touch event on broadcasting panel with preprocessor 408 corresponding with determining the type of touch event
Visual output.Although in the diagram, Touch sensitive surface is with to play panel be the part independent as two realizing being input into and be input into
Function, but in some embodiments it is possible to will be integrated with broadcasting panel for Touch sensitive surface and realization input and output function.
Terminal may also include at least one sensor 405, such as optical sensor, motion sensor and other sensors.
Specifically, optical sensor may include ambient light sensor and proximity transducer, and wherein, ambient light sensor can be according to ambient light
Light and shade adjusting the brightness for playing panel, proximity transducer can cut out and play panel and/or the back of the body when terminal is moved in one's ear
Light.Used as one kind of motion sensor, Gravity accelerometer can detect (generally three axles) acceleration in all directions
Size, can detect that size and the direction of gravity when static, can be used for recognize mobile phone attitude application (such as horizontal/vertical screen switching,
Dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Can also configure as terminal
Gyroscope, barometer, drimeter, thermometer, the other sensors such as infrared ray sensor, will not be described here.
Voicefrequency circuit 406, speaker, microphone can provide the audio interface between user and terminal.Voicefrequency circuit 406 can
The signal of telecommunication after the voice data for receiving is changed, is transferred to speaker, is converted to acoustical signal output by speaker;Another
The acoustical signal of collection is converted to the signal of telecommunication by aspect, microphone, is converted to voice data by voicefrequency circuit 406 after being received, then
After voice data output processor 408 is processed, through RF circuits 401 being sent to such as another terminal, or by voice data
Export to memorizer 402 further to process.Voicefrequency circuit 406 is also possible that earphone jack, with provide peripheral hardware earphone with
The communication of terminal.
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronicses postal by WiFi module 407
Part, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and has accessed.Although Fig. 4 shows
WiFi module 407, but it is understood that, which is simultaneously not belonging to must be configured into for terminal, can not change as needed completely
Omit in the scope of the essence for becoming invention.
Processor 408 is the control centre of terminal, using various interfaces and the various pieces of connection whole mobile phone, leads to
Cross operation or execute the software program and/or the module that are stored in memorizer 402, and call and be stored in memorizer 402
Data, execute the various functions and processing data of terminal, so as to carry out integral monitoring to mobile phone.Optionally, processor 408 can be wrapped
Include one or more processing cores;Preferably, processor 408 can integrated application processor and modem processor, wherein, should
Operating system, user interface and application program etc. are mainly processed with processor, and modem processor mainly processes radio communication.
It is understood that above-mentioned modem processor can not also be integrated in processor 408.
Terminal also includes the power supply 409 (such as battery) that powers to all parts, it is preferred that power supply can pass through power supply pipe
Reason system is logically contiguous with processor 408, so as to realize management charging, electric discharge and power managed by power-supply management system
Etc. function.Power supply 409 can also include one or more direct current or alternating current power supply, recharging system, power failure inspection
The random component such as slowdown monitoring circuit, power supply changeover device or inverter, power supply status indicator.
Although not shown, terminal can also include photographic head, bluetooth module etc., will not be described here.Specifically in this enforcement
In example, the processor 408 in terminal can be according to following instruction, will be corresponding for the process of one or more application program
Executable file is loaded in memorizer 402, and is run the application program being stored in memorizer 402 by processor 408, from
And realize various functions:
Video play-reverse instruction is received, the video play-reverse instruction indicates the video file for needing to put upside down, then, according to the video
Put upside down instruction, obtain in decoding time and the video file in the video file needed for frame of video group needed for frame of video
Reproduction time, determines the frame of video quantity of parallel decoding, according to the frame of video quantity according to the decoding time and the reproduction time
Concurrently frame of video in video file is inversely decoded, video data is obtained, Reverse Play is carried out to video data.
Alternatively, concurrently frame of video in video file is inversely decoded according to the frame of video quantity, including:
The quantity of the decoding thread for needing to enable is determined according to the frame of video quantity;
Decoding thread according to the quantity is concurrently inversely decoded to frame of video in video file.
Alternatively, concurrently frame of video in video file is inversely decoded according to the decoding thread of the quantity, is wrapped
Include:
From the frame of video of video file, reverse selection decoding thread is currently needed for the target video frame for decoding;
The target video frame is decoded by the decoding thread;
Described Reverse Play is carried out to video data, including:Reverse Play is carried out to the video data, and is regarded in broadcasting
Frequency according to when return execute reverse choose the target video frame that decoding thread needs decoding the step of.
Alternatively, in the frame of video from video file, reverse decoding thread of choosing needs the target video frame of decoding,
Including:
According to the quantity and the history decoding video frame of decoding thread, from the frame of video of video file, reverse selection solves
Code thread needs the target video frame of decoding.
Alternatively, the frame of video quantity of parallel decoding is determined according to the decoding time and the reproduction time, including:
By the decoding time divided by the reproduction time, quotient is obtained;
According to the frame of video quantity that the quotient determines parallel decoding.
Alternatively, described Reverse Play is carried out to video data, including:
Obtain current video reproduction time;
Reverse Play is carried out to video data according to the current video reproduction time.
Wherein, the frame of video group can be the frame of video group of key frame to the former frame of next key frame, i.e. GOP.
Wherein, reverse decoding refers to start to be solved to initial frame of video from last frame of video of video file
Code.
Wherein, Reverse Play refers to play out from last frame of video to initial frame of video.
Aforesaid operations specifically can be found in embodiment of the method above, will not be described here.
From the foregoing, it will be observed that the terminal of the embodiment of the present invention receives video play-reverse instruction, the video play-reverse instruction indicates that needs fall
The video file that puts, then, according to video play-reverse instruction, obtain decoding time in the video file needed for frame of video group,
And the reproduction time in the video file needed for frame of video, parallel decoding is determined according to the decoding time and the reproduction time
Frame of video quantity, is concurrently inversely decoded to frame of video in video file according to the frame of video quantity, is obtained video data,
Reverse Play is carried out to video data;Due to the program can be based on the decoding time needed for frame of video group and frame of video needed for
Reproduction time determining the frame of video quantity of each parallel decoding, and concurrently the frame of video of the quantity is inversely solved
Code;Therefore, without the need for storing the decoding data of all frames in GOP to internal memory after decoding every time, such as, the program exists the program
Need to only decode during original state and preserve a small amount of decoding data, when follow-up play decoding data carries out video frame decoding again only
A decoding data need to be preserved, therefore, it can reduce storing during putting upside down to the decoding data amount of internal memory, relative to existing
For technology, EMS memory occupation amount or usage amount can be greatly reduced.Also, as the program is by the way of parallel decoding,
Relative to the existing mode for decoding GOP successively, decoding efficiency can be greatly improved, it is to avoid influencing each other between decoding, carry
Video playback quality is risen.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can
Completed with instructing the hardware of correlation by program, the program can be stored in a computer-readable recording medium, storage
Medium can include:Read only memory (ROM, Read Only Memory), random access memory (RAM, Random
Access Memory), disk or CD etc..
A kind of video play-reverse method and apparatus that above embodiment of the present invention is provided is described in detail, herein
Apply specific case to be set forth principle of the invention and embodiment, the explanation of above example is only intended to help
Understand the method for the present invention and its core concept;Simultaneously for those skilled in the art, according to the thought of the present invention, in tool
Will change in body embodiment and range of application, in sum, this specification content is should not be construed as to the present invention
Restriction.
Claims (10)
1. a kind of video play-reverse method, it is characterised in that include:
Video play-reverse instruction is received, the video play-reverse instruction indicates the video file for needing to put upside down;
Instructed according to the video play-reverse, obtain the decoding time in the video file needed for frame of video group and described regard
Reproduction time in frequency file needed for frame of video;
The frame of video quantity of parallel decoding is determined according to the decoding time and the reproduction time;
Concurrently frame of video in video file is inversely decoded according to the frame of video quantity, obtained video data;
Reverse Play is carried out to video data.
2. video play-reverse method as claimed in claim 1, it is characterised in that according to the frame of video quantity concurrently to video
In file, frame of video is inversely decoded, including:
The quantity of the decoding thread for needing to enable is determined according to the frame of video quantity;
Decoding thread according to the quantity is concurrently inversely decoded to frame of video in video file.
3. video play-reverse method as claimed in claim 2, it is characterised in that concurrently right according to the decoding thread of the quantity
In video file, frame of video is inversely decoded, including:
From the frame of video of video file, reverse selection decoding thread is currently needed for the target video frame for decoding;
The target video frame is decoded by the decoding thread;
Described Reverse Play is carried out to video data, including:Reverse Play is carried out to the video data, and is playing video counts
According to when return execute reverse choose the target video frame that decoding thread needs decoding the step of.
4. video play-reverse method as claimed in claim 3, it is characterised in that inversely select in the frame of video from video file
Taking decoding thread needs the target video frame of decoding, including:
According to the quantity and the history decoding video frame of decoding thread, reverse selection decoding line from the frame of video of video file
Journey needs the target video frame of decoding.
5. the video play-reverse method as described in any one of claim 1-4, it is characterised in that according to decoding time and described
Reproduction time determines the frame of video quantity of parallel decoding, including:
By the decoding time divided by the reproduction time, quotient is obtained;
According to the frame of video quantity that the quotient determines parallel decoding.
6. video play-reverse method as claimed in claim 1, it is characterised in that described carry out Reverse Play, bag to video data
Include:
Obtain current video reproduction time;
Reverse Play is carried out to video data according to the current video reproduction time.
7. a kind of video play-reverse device, it is characterised in that include:
Receiving unit, for receiving video play-reverse instruction, the video play-reverse instruction indicates the video file for needing to put upside down;
Acquiring unit, for being instructed according to the video play-reverse, when obtaining in the video file decoding needed for frame of video group
Between and the video file in reproduction time needed for frame of video;
Determining unit, for determining the frame of video quantity of parallel decoding according to the decoding time and the reproduction time;
Decoding unit, for concurrently inversely being decoded to frame of video in video file according to the frame of video quantity, obtains
Video data;
Broadcast unit, for carrying out Reverse Play to video data.
8. video play-reverse device as claimed in claim 7, it is characterised in that the decoding unit, specifically includes:
Determination subelement, for determining the quantity of the decoding thread for needing to enable according to the frame of video quantity;
Decoding subunit, is concurrently inversely solved to frame of video in video file for the decoding thread according to the quantity
Code.
9. video play-reverse device as claimed in claim 8, it is characterised in that
The decoding subunit, specifically for:From the frame of video of video file, reverse decoding thread of choosing is currently needed for decoding
Target video frame, by described decoding thread the target video frame is decoded;
The broadcast unit, specifically for carrying out Reverse Play to the video data, and triggers institute in playing video data
State decoding subunit and execute the target video frame that reverse selection decoding thread from the frame of video of video file is currently needed for decoding
The step of.
10. the video play-reverse device as described in any one of claim 7-9, it is characterised in that the determining unit is used for:By institute
The decoding time is stated divided by the reproduction time, quotient is obtained, according to the frame of video quantity that the quotient determines parallel decoding.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611116754.9A CN106507204B (en) | 2016-12-07 | 2016-12-07 | Video reverse playing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611116754.9A CN106507204B (en) | 2016-12-07 | 2016-12-07 | Video reverse playing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106507204A true CN106507204A (en) | 2017-03-15 |
CN106507204B CN106507204B (en) | 2020-03-17 |
Family
ID=58329773
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611116754.9A Active CN106507204B (en) | 2016-12-07 | 2016-12-07 | Video reverse playing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106507204B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107222779A (en) * | 2017-06-08 | 2017-09-29 | 浙江大华技术股份有限公司 | A kind of method and device of video play-reverse |
CN107547814A (en) * | 2017-09-28 | 2018-01-05 | 维沃移动通信有限公司 | A kind of video recording method, mobile terminal |
CN109889895A (en) * | 2019-03-13 | 2019-06-14 | 浙江大华技术股份有限公司 | Video broadcasting method, device, storage medium and electronic device |
CN111641824A (en) * | 2019-03-01 | 2020-09-08 | 杭州海康威视数字技术股份有限公司 | Video reverse playing method and device |
CN111866574A (en) * | 2019-04-29 | 2020-10-30 | 浙江开奇科技有限公司 | Real-time reverse playing method for mobile end streaming media |
CN112019856A (en) * | 2020-08-27 | 2020-12-01 | 上海七牛信息技术有限公司 | Video reversing method and system for smart phone |
WO2021197157A1 (en) * | 2020-03-31 | 2021-10-07 | 阿里巴巴集团控股有限公司 | Video stream processing method and apparatus, and electronic device and computer-readable medium |
CN113973225A (en) * | 2020-07-22 | 2022-01-25 | 阿里巴巴集团控股有限公司 | Video reverse playing method and device, computer storage medium and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101854508A (en) * | 2009-03-30 | 2010-10-06 | 三星电子株式会社 | The method and apparatus of the content of multimedia of reverse playback of encoded |
CN104185982A (en) * | 2012-02-29 | 2014-12-03 | 远升科技股份有限公司 | Video processing method and video appliance implementing method |
CN105025357A (en) * | 2015-06-05 | 2015-11-04 | 北京中电兴发科技有限公司 | A video back-playing method |
CN105227884A (en) * | 2014-07-03 | 2016-01-06 | 深圳中兴力维技术有限公司 | Realize method that video file puts upside down and device thereof |
-
2016
- 2016-12-07 CN CN201611116754.9A patent/CN106507204B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101854508A (en) * | 2009-03-30 | 2010-10-06 | 三星电子株式会社 | The method and apparatus of the content of multimedia of reverse playback of encoded |
CN104185982A (en) * | 2012-02-29 | 2014-12-03 | 远升科技股份有限公司 | Video processing method and video appliance implementing method |
CN105227884A (en) * | 2014-07-03 | 2016-01-06 | 深圳中兴力维技术有限公司 | Realize method that video file puts upside down and device thereof |
CN105025357A (en) * | 2015-06-05 | 2015-11-04 | 北京中电兴发科技有限公司 | A video back-playing method |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107222779A (en) * | 2017-06-08 | 2017-09-29 | 浙江大华技术股份有限公司 | A kind of method and device of video play-reverse |
CN107222779B (en) * | 2017-06-08 | 2019-11-19 | 浙江大华技术股份有限公司 | A kind of method and device of video play-reverse |
CN107547814A (en) * | 2017-09-28 | 2018-01-05 | 维沃移动通信有限公司 | A kind of video recording method, mobile terminal |
CN107547814B (en) * | 2017-09-28 | 2019-10-15 | 维沃移动通信有限公司 | A kind of video recording method, mobile terminal |
CN111641824A (en) * | 2019-03-01 | 2020-09-08 | 杭州海康威视数字技术股份有限公司 | Video reverse playing method and device |
CN111641824B (en) * | 2019-03-01 | 2022-08-05 | 杭州海康威视数字技术股份有限公司 | Video reverse playing method and device |
CN109889895A (en) * | 2019-03-13 | 2019-06-14 | 浙江大华技术股份有限公司 | Video broadcasting method, device, storage medium and electronic device |
CN111866574A (en) * | 2019-04-29 | 2020-10-30 | 浙江开奇科技有限公司 | Real-time reverse playing method for mobile end streaming media |
WO2021197157A1 (en) * | 2020-03-31 | 2021-10-07 | 阿里巴巴集团控股有限公司 | Video stream processing method and apparatus, and electronic device and computer-readable medium |
US11997314B2 (en) | 2020-03-31 | 2024-05-28 | Alibaba Group Holding Limited | Video stream processing method and apparatus, and electronic device and computer-readable medium |
CN113973225A (en) * | 2020-07-22 | 2022-01-25 | 阿里巴巴集团控股有限公司 | Video reverse playing method and device, computer storage medium and electronic equipment |
CN112019856A (en) * | 2020-08-27 | 2020-12-01 | 上海七牛信息技术有限公司 | Video reversing method and system for smart phone |
Also Published As
Publication number | Publication date |
---|---|
CN106507204B (en) | 2020-03-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106507204A (en) | A kind of video play-reverse method and apparatus | |
CN104065982B (en) | The method and apparatus of live streaming media | |
CN104618794B (en) | The method and apparatus for playing video | |
CN104519404B (en) | The player method and device of graphic interchange format file | |
CN104869468A (en) | Method and apparatus for displaying screen information | |
CN106686396A (en) | Method and system for switching broadcasting rooms | |
CN104967910A (en) | Multimedia play progress control method and apparatus | |
CN103458305A (en) | Video playing method and device, terminal device and server | |
CN106162316A (en) | The data processing method of a kind of video flowing, device and system | |
CN106502834A (en) | The backup method of data, apparatus and system | |
CN103699309B (en) | A kind of method for recording of synchronization video, device and mobile terminal | |
CN105606117A (en) | Navigation prompting method and navigation prompting apparatus | |
CN103475914A (en) | Video playing method, video playing device, terminal equipment and server | |
CN106341713B (en) | A kind of multimedia synchronous plays method, apparatus, system and terminal | |
CN105516784A (en) | Virtual good display method and device | |
CN103294442B (en) | A kind of method of playing alert tones, device and terminal device | |
CN106231433A (en) | A kind of methods, devices and systems playing Internet video | |
CN104036536A (en) | Generating method and apparatus of stop motion animation | |
CN106254910A (en) | A kind of method and apparatus recording image | |
CN104965642A (en) | Method and apparatus for generating a drop-down list | |
CN104869465A (en) | Video playing control method and device | |
CN104519262A (en) | Method, device for acquiring video data, and terminal | |
CN104602135A (en) | Method and device for controlling full screen play | |
CN103458286A (en) | Television channel switching method and device | |
CN104423840A (en) | Progress bar implementing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |