A kind of video recording method and device
Technical field
The invention belongs to video field, more particularly to a kind of video recording method and device.
Background technology
With the rise of mobile intelligent terminal, on the basis of traditional communication function, smart mobile phone provides more and more richer
Rich function, such as online obtain data, shooting photo or video, play video or music etc., are brought for people's life
Greatly facilitate.
After shooting video using mobile phone, by playing recorded video, can view studio picture and
Sound, it can be very good to reduce the scene of recorded video, can be very good to meet record requirement of the people to historic scenery.But
Be, for some special scenes, such as some actions such as Basketball Match, football match than faster scene, it is necessary to by slow
Speed goes the running at the scene of playing, and to analyze scene, for example analyses whether as foul running etc., existing video record side
Method can not meet the requirement that clear analysis is carried out to fast motion scene.
The content of the invention
It is an object of the invention to provide a kind of video recording method, to solve for acting than faster scene, it is necessary to
By going the running at the scene of playing at a slow speed, to analyze scene, existing video recording method can not meet to fast motion
Scene carries out the problem of requirement of clear analysis.
The present invention is achieved in that a kind of video recording method, and methods described includes:
Video record instruction is received, the video record instruction includes picture broadcasting speed;
Search frame of video picture picking rate corresponding with the picture broadcasting speed;
Video image is gathered according to the frame of video picture picking rate of lookup, and the video frame images of collection are preserved
For video data file.
Another object of the present invention is to provide a kind of video recording device, described device includes:
Picture broadcasting speed receiving unit, for receiving video record instruction, the video record instruction includes picture and broadcast
Put speed;
Frame picture picking rate searching unit, for searching frame of video picture collection corresponding with the picture broadcasting speed
Speed;
Video image acquisition unit, for gathering video image according to the frame of video picture picking rate of lookup, and
The video frame images of collection are saved as into video data file.
In the present invention, by receiving the picture broadcasting speed of setting, video corresponding to the lookup of picture broadcasting speed is passed through
Frame picture picking rate, the collection of frame of video picture is carried out by the frame of video picture picking rate of lookup, by the video of collection
Two field picture saves as video data file, so that the present invention can be to using different frame of video to gather in different scenes
Speed is acquired, and when playing, for fast motion scene, can meet to carry out it requirement that slow motion performs an analysis.
Brief description of the drawings
Fig. 1 is a kind of implementation process figure for video recording method that first embodiment of the invention provides;
Fig. 2 is a kind of implementation process figure for video recording method that second embodiment of the invention provides;
Fig. 3 is that slider bar provided in an embodiment of the present invention carries out picture broadcasting speed control schematic diagram;
Fig. 4 is a kind of implementation process figure for video recording method that third embodiment of the invention provides;
Fig. 5 is a kind of structural representation for video recording device that fourth embodiment of the invention provides.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
The main purpose of the embodiment of the present invention is solve in the prior art in video record, for some special fields
Scape, such as in the video record of some athletic competitions, because normal video record mode can not cause user clearly to see
Action into video pictures, it is not easy to user and the image of Fast transforms is clearly analyzed.For example moved in analysis match
Whether break the rules, or carry out analytic learning etc. to action to need.Existing video recording method obtains video, in normal play
When, it can only obtain the picture as reality scene, it is impossible to meet that user carries out the requirement of clear analysis to it.
To overcome above mentioned problem, the embodiment of the present invention proposes a kind of video recording method, and methods described includes:Reception regards
Frequency record command, the video record instruction include picture broadcasting speed;Search video corresponding with the picture broadcasting speed
Frame picture picking rate;Video image is gathered according to the frame of video picture picking rate of lookup, and by the frame of video of collection
Image saves as video data file.
The present invention passes through frame of video picture corresponding to the lookup of picture broadcasting speed by receiving the picture broadcasting speed set
Picking rate, the collection of frame of video picture is carried out by the frame of video picture picking rate of lookup, by the video frame images of collection
Video data file is saved as, so that the present invention can be to entering in different scenes using different frame of video picking rates
Row collection, when playing, for fast motion scene, it can meet to carry out it requirement that slow motion performs an analysis.Below in conjunction with the accompanying drawings
Specifically illustrate.
Embodiment one:
Fig. 1 shows a kind of implementation process for video recording method that first embodiment of the invention provides, and details are as follows:
In step S101, video record instruction is received, the video record instruction includes picture broadcasting speed.
Specifically, the video record instruction, can be that the video record of user's input instructs, for example user opens shooting
Head, after entering video capture interface, receive after user inputs picture broadcasting speed information and start record command.
The video record instruction, or the motion speed of image in system detectio picture, the automatic picture that carries out are broadcast
Put the regulation of speed, for example when agent object movement velocity in the picture is very fast, reduce picture broadcasting speed.
On the reception of above two video record instruction, will be had in follow-up embodiment two and embodiment three
The introduction of body.
The picture broadcasting speed, i.e., in video analysis, the speed of picture presentation during video playback, typically with standard
Video playout speed on the basis of speed, according to picture broadcasting speed and the ratio of reference speed, the record command as reception
In picture broadcasting speed value.
For example picture broadcasting speed is 0.5,0.5 times of the picture broadcasting speed of normal video is expressed as, i.e., normally to broadcast
The half for putting broadcasting speed carries out the broadcasting of video.Instruction is broadcast similar in player slowly.But instruct essence different from slow broadcast
, the picture broadcasting speed that sets in the embodiment of the present invention, in slow play, the frame per second of broadcasting and the frame per second of normal play
It is identical, more preferable picture play quality and definition can be obtained.
In step s 102, frame of video picture picking rate corresponding with the picture broadcasting speed is searched.
In embodiments of the present invention, it is described to search frame of video picture picking rate step corresponding with the picture broadcasting speed
Suddenly can specifically include:
Step S1021, it is determined that normal frame of video picture picking rate V1;
Step S1022, the picture broadcasting speed a set according to normal frame of video picture picking rate V1 and user ratio
Value V1/a, frame of video picture picking rate corresponding to the picture broadcasting speed of user's setting is calculated.
Specifically, the video pictures picking rate, refers to the frame number of video pictures gathered each second, such as, normally
Frame of video picture picking rate V1 can be 30 frames it is per second.
The persistence of vision caused by the special physiological structure of human eye, if the frame per second of seen picture higher than 24 when
Wait, will be considered coherent, therefore, it is per second that the picking rate V1 of normal frame of video picture is generally higher than 24 frames.
If the picture broadcasting speed set is 0.5 times of normal playback speed, the picture broadcasting speed pair of user's setting
The frame of video picture picking rate answered is that 60 frames are per second.
If the picture broadcasting speed set is 2 times of normal playback speed, the picture broadcasting speed of user's setting is corresponding
Frame of video picture picking rate for 15 frames it is per second.
In step s 103, video image is gathered according to the frame of video picture picking rate of lookup, and by collection
Video frame images save as video data file.
Video data file described in the embodiment of the present invention, as a result of different frame of video picture picking rates,
If the frame of video picture picking rate that user sets is 2 times of normal video frame picture picking rate, then recording it is identical
The video data file of duration, the size of file are 2 times of normal video data file.
It is worth noting that, the video data file that the present invention is obtained by different frame of video picture picking rates,
During broadcasting, played out according to the video frame speed of standard, for example during normal broadcasting speed per second for 30 frames, receive video record
When picture broadcasting speed in system instruction is 0.5 times, recording time is T video, and its reproduction time is 2T.In contrast to this,
When the picture broadcasting speed received in video record instruction is 2 times, recording time is T video, and its reproduction time is 0.5T.
When receive video record instruction in picture broadcasting speed it is smaller when, then can become apparent to fast-changing
Agent object is clearly analyzed, for the agent object of different paces of change, from corresponding picture broadcasting speed, i.e.,
The requirement of the clear analysis to transition activities can be met well.
Embodiment two:
Fig. 2 shows a kind of implementation process for video recording method that second embodiment of the invention provides, and details are as follows:
In step s 201, slip instruction of the user in the dragging sliding block in slider bar region is received, slip instruction is obtained and moves
Position where movable slider rear slider.
Specifically, as shown in figure 3, slider bar is divided into two sections, the cut-point in using 1 as two section.Work as cunning
Block represents that picture broadcasting speed be normal broadcasting speed at 1 position, that is, the speed for the video-frequency playing content recorded with very
Real live event speed is identical.
When sliding block slides to the left, between 0 and 1, the broadcasting speed of video is slack-off for the position of sliding block, can be by sliding block
This section is arranged on, the faster object of pace of change is analyzed, also, when the pace of change of object is faster, can be with
The position of sliding block is moved closer to zero direction, so as to obtain relatively sharp video pictures.
When sliding block slides to the right, the numerical value of the position correspondence of sliding block is more than 1, and the broadcasting speed of video accelerates, and can incite somebody to action
This section is slidably arranged in, is analyzed changing slow object, so as to obtain more intuitively variation effect, such as too
The change of positive position, such as the flowers are in blossom change of state etc. when putting, when sliding block can be adjusted to 1200 times of position, 12 of one day
The time of hour be able to can be finished playing by 60 seconds, and user can be caused more intuitively to view the change of object.
In step S202, slip instruction apart from the distance of normal speed origin is determined according to sliding block accordingly corresponding to,
The picture broadcasting speed being set by the user.
The present invention is corresponding with picture broadcasting speed by the distance change amount in the section on slider bar, such as can be in figure 3
Area border area domain, i.e., in the section less than 1 more than 0, the ratio value in whole [0,1] section is accounted for according to the distance of sliding block and position 0, if
Picture broadcasting speed corresponding to being set to.
And in the section more than 1, can be more remote with the distance of setpoint distance 1, its corresponding picture broadcasting speed is bigger (big
In 1), and the change of broadcasting speed can be in the form of in exponential increase, to improve the convenience for adjusting regulation.
In step S203, frame of video picture picking rate corresponding with the picture broadcasting speed is searched.
In step S204, video image is gathered according to the frame of video picture picking rate of lookup, and by collection
Video frame images save as video data file.
Step S203 and step S204 is identical with the step S102 in embodiment one and step S103, is not repeated herein superfluous
State.
The difference of the embodiment of the present invention and embodiment one is that the embodiment of the present invention specifically describes to be slided by sliding
Block adjusts the control mode of picture broadcasting speed, can make the picture record rate request of video record different scenes, preferably
Facilitate customer analysis screen objects.
Embodiment three:
Fig. 4 shows a kind of implementation process for video recording method that third embodiment of the invention provides, and details are as follows:
In step S401, the movement velocity of the agent object in video pictures is detected.
Specifically, the agent object in the video pictures, can be specified by user, can also be calculated according to predetermined analysis
Method is calculated, for example the object by calculating positioned at picture medium position is used as agent object, or calculates closer to the distance
Object is as agent object etc..
The movement velocity of the agent object, the comparison algorithm of pixel in video pictures can be used, i.e., in unit
In, the position of pixel change number calculate the movement velocity of agent object.
In step S402, according to the corresponding setting screen broadcasting speed of the movement velocity of the agent object of detection.
In embodiments of the present invention, a threshold speed can be set, when speed is less than the threshold speed of the setting, no
Need to adjustment picture broadcasting speed, when less than the threshold speed, according to the incrementss of speed, the corresponding picture that reduces plays
Speed, so that the video pictures recorded can be good at the change of the movement velocity of agent object in adaptive video picture.
Certainly, when that need not be adjusted to picture broadcasting speed, adjustment sliding block to speed that can also be artificially is 1
Position.
In step S403, frame of video picture picking rate corresponding with the picture broadcasting speed is searched.
In step s 404, video image is gathered according to the frame of video picture picking rate of lookup, and by collection
Video frame images save as video data file.
With being in place of the difference of embodiment one, the embodiment of the present invention specifically describes to be regarded the embodiment of the present invention by detection
The movement velocity of agent object carrys out adjustment picture broadcasting speed in frequency picture, so that video record is more intelligent, operation is more
For convenience.
Example IV:
Fig. 5 shows the structural representation for the video recording device that fourth embodiment of the invention provides, and details are as follows:
Video recording device described in the embodiment of the present invention, including:
Picture broadcasting speed receiving unit 501, for receiving video record instruction, the video record instruction includes picture
Broadcasting speed;
Frame picture picking rate searching unit 502, for searching frame of video picture corresponding with the picture broadcasting speed
Picking rate;
Video image acquisition unit 503, for gathering video image according to the frame of video picture picking rate of lookup,
And the video frame images of collection are saved as into video data file.
Preferably, the picture broadcasting speed receiving unit includes:
Command reception subelement, for receiving slip instruction of the user in the dragging sliding block in slider bar region, obtain and slide
Position where the mobile sliding block rear slider of instruction;
Recorded speed determination subelement, for determining that slip refers to accordingly apart from the distance of normal speed origin according to sliding block
The picture broadcasting speed that order is corresponding, is set by the user.
Preferably, the frame picture picking rate searching unit includes:
Normal acquisition speed determination subelement, for determining normal frame of video picture picking rate V1;
Picking rate computation subunit, for the picture set according to normal frame of video picture picking rate V1 and user
Broadcasting speed a ratio V1/a, frame of video picture picking rate corresponding to the picture broadcasting speed of user's setting is calculated.
Preferably, the picture broadcasting speed of user's setting includes playing more than the picture of normal pictures broadcasting speed value
Speed, and the picture broadcasting speed less than normal pictures broadcasting speed value.
Preferably, the picture broadcasting speed receiving unit includes:
Movement velocity detection sub-unit, for detecting the movement velocity of the agent object in video pictures;
Recorded speed sets subelement, and the corresponding setting screen of the movement velocity for the agent object according to detection plays
Speed.
Video recording device described in the embodiment of the present invention is corresponding with the video recording method described in embodiment one to three,
This, which is not repeated, repeats.
In several embodiments provided by the present invention, it should be understood that disclosed apparatus and method, it can be passed through
Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, only
Only a kind of division of logic function, there can be other dividing mode when actually realizing, such as multiple units or component can be tied
Another system is closed or is desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or discussed
Mutual coupling or direct-coupling or communication connection can be the INDIRECT COUPLINGs or logical by some interfaces, device or unit
Letter connection, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use
When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part to be contributed in other words to prior art or all or part of the technical scheme can be in the form of software products
Embody, the computer software product is stored in a storage medium, including some instructions are causing a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the present invention
Portion or part.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory),
Random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with store program codes
Medium.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
All any modification, equivalent and improvement made within refreshing and principle etc., should be included in the scope of the protection.