CN107197372A - Method and device for shearing batch vertical screen videos and electronic equipment - Google Patents
Method and device for shearing batch vertical screen videos and electronic equipment Download PDFInfo
- Publication number
- CN107197372A CN107197372A CN201710521560.5A CN201710521560A CN107197372A CN 107197372 A CN107197372 A CN 107197372A CN 201710521560 A CN201710521560 A CN 201710521560A CN 107197372 A CN107197372 A CN 107197372A
- Authority
- CN
- China
- Prior art keywords
- portrait layout
- video
- sheared
- key frame
- layout video
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000010008 shearing Methods 0.000 title claims abstract description 81
- 238000000034 method Methods 0.000 title claims abstract description 38
- 238000005520 cutting process Methods 0.000 claims description 22
- 230000000694 effects Effects 0.000 abstract description 17
- 238000003860 storage Methods 0.000 description 13
- 230000006870 function Effects 0.000 description 7
- 238000004590 computer program Methods 0.000 description 6
- 230000005611 electricity Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 210000004556 brain Anatomy 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 208000001491 myopia Diseases 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/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
- H04N21/4402—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 involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440263—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 involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
- H04N21/440272—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 involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA for performing aspect ratio conversion
-
- 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
- H04N21/44008—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 involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The invention provides a method, a device and electronic equipment for shearing batch vertical screen videos, wherein the method comprises the steps of receiving a shearing instruction, and analyzing a time range from the shearing instruction; judging whether the time difference value between the corresponding time points of two adjacent key frames in the vertical screen video to be cut is within the time range or not; if so, extracting the video content between the adjacent key frames from the vertical screen video so as to cut the vertical screen video. According to the invention, the shearing effect of batch vertical screen videos can be improved, the labor cost is saved, and the shearing efficiency is improved.
Description
Technical field
The present invention relates to technical field of video processing, more particularly to a kind of cutting method of batch portrait layout video, device and
Electronic equipment.
Background technology
With the fast development of internet, user can use the electronic equipment under vertical screen mode to browse video, in the portrait layout
The video played under pattern is usually portrait layout video.
In correlation technique, the software for shearing portrait layout video, for example, imove, user can import transverse screen video should
In software, then, arbitrarily sheared, edited according to the demand of oneself, but under application scenes, for example, if desired from batch
Multiple short-sighted frequencies are cut out in the portrait layout video of amount, then need the labour for expending substantial amounts of manpower and repeating to go shearing to regard
Frequently, the shear effect of batch portrait layout video is not good, and it is less efficient under.
The content of the invention
It is contemplated that at least solving one of technical problem in correlation technique to a certain extent.
Therefore, it is an object of the present invention to propose a kind of cutting method of batch portrait layout video, batch can be lifted
The shear effect of portrait layout video, and human cost is saved, lift shear efficiency.
It is another object of the present invention to propose a kind of shear of batch portrait layout video.
It is another object of the present invention to propose a kind of electronic equipment.
It is another object of the present invention to propose a kind of non-transitorycomputer readable storage medium.
It is another object of the present invention to propose a kind of computer program product.
To reach above-mentioned purpose, the cutting method for the batch portrait layout video that first aspect present invention embodiment is proposed, including:
Shearing instruction is received, and time range is parsed from the shearing instruction;Judge in the current portrait layout video to be sheared, phase
Whether the time difference between time point corresponding to adjacent two frame key frames is within the time range;If so, then from described perpendicular
The video content between the adjacent key frame is extracted in screen video, to be sheared to the portrait layout video.
In one embodiment of the invention, in addition to:
Traversal reads next portrait layout video to be sheared from default file folder;
The current portrait layout video to be sheared is replaced using next portrait layout video to be sheared.
In one embodiment of the invention, before the reception shearing instruction, in addition to:
Property value based on frame of video, is determined in multiple portrait layout videos to be sheared, the key frame of each portrait layout video;
Determine each key frame corresponding time point;
By in the time point write-in default file of the key frame;
The default file is stored.
In one embodiment of the invention, in the judgement current portrait layout video to be sheared, adjacent two frame
Before whether time difference between time point corresponding to key frame is within the time range, including:
Time point recorded in the default file is scanned;
Obtain in the current portrait layout video to be sheared, the time difference between time point corresponding to adjacent two frames key frame
Value, obtains multiple time differences.
In one embodiment of the invention, described to judge in the current portrait layout video to be sheared, adjacent two frame is closed
Time difference between time point corresponding to key frame whether within the time range, including:
Judge each time difference in the multiple time difference whether within the time range.
In one embodiment of the invention, before the reception shearing instruction, in addition to:
The length and width of multiple transverse screen videos are adjusted based on preset ratio value, multiple portrait layout videos to be sheared are obtained;
The multiple portrait layout video to be sheared is stored in the default file folder.
The cutting method for the batch portrait layout video that first aspect present invention embodiment is proposed, by receiving shearing instruction, and
Time range is parsed from shearing instruction, and is judged in current portrait layout video to be sheared, when corresponding to adjacent two frames key frame
Between put between time difference whether within time range, if so, between then extracting adjacent key frame from portrait layout video
Video content, to be sheared to portrait layout video, can lift the shear effect of batch portrait layout video, and saving human cost,
Lift shear efficiency.
To reach above-mentioned purpose, the shear for the batch portrait layout video that second aspect of the present invention embodiment is proposed, including:
Receiving module, time range is parsed for receiving shearing instruction, and from the shearing instruction;Judge module, for judging
State in current portrait layout video to be sheared, whether the time difference between time point corresponding to adjacent two frames key frame is when described
Between within the scope of;Shear module, for when the time difference is within the time range, being carried from the portrait layout video
The video content between the adjacent key frame is taken, to be sheared to the portrait layout video.
In one embodiment of the invention, in addition to:
Read module, next portrait layout video to be sheared is read for traversal in being pressed from both sides from default file;
Replacement module, for using next portrait layout video to be sheared to the current portrait layout video to be sheared
It is replaced.
In one embodiment of the invention, in addition to:
First determining module, for the property value based on frame of video, is determined in multiple portrait layout videos to be sheared, each perpendicular
Shield the key frame of video;
Second determining module, for determining each key frame corresponding time point;
Writing module, for the time point of the key frame to be write in default file;
Memory module, for being stored to the default file.
In one embodiment of the invention, including:
Scan module, for being scanned to the time point recorded in the default file;
Acquisition module, for obtaining in the current portrait layout video to be sheared, the time corresponding to adjacent two frames key frame
Time difference between point, obtains multiple time differences.
In one embodiment of the invention, the judge module, specifically for:
Judge each time difference in the multiple time difference whether within the time range.
In one embodiment of the invention, in addition to:
Adjusting module, for being adjusted the length and width of multiple transverse screen videos based on preset ratio value, obtains multiple waiting to cut
The portrait layout video cut;
Preserving module, for the multiple portrait layout video to be sheared to be stored in the default file folder.
The shear for the batch portrait layout video that second aspect of the present invention embodiment is proposed, by receiving shearing instruction, and
Time range is parsed from shearing instruction, and is judged in current portrait layout video to be sheared, when corresponding to adjacent two frames key frame
Between put between time difference whether within time range, if so, between then extracting adjacent key frame from portrait layout video
Video content, to be sheared to portrait layout video, can lift the shear effect of batch portrait layout video, and saving human cost,
Lift shear efficiency.
To reach above-mentioned purpose, the electronic equipment that third aspect present invention embodiment is proposed, including:Processor, memory,
Power circuit, multimedia groupware, audio-frequency assembly, the interface of input/output (I/O), sensor cluster, and communication component;Its
In, circuit board is placed in the interior volume that housing is surrounded, and the processor and the memory are arranged on the circuit board;Institute
Power circuit is stated, for being powered for each circuit or device of the electronic equipment;The memory is used to store executable journey
Sequence code;The processor is run and the executable journey by reading the executable program code stored in the memory
The corresponding program of sequence code, for performing:Shearing instruction is received, and time range is parsed from the shearing instruction;Judge
In the current portrait layout video to be sheared, whether the time difference between time point corresponding to adjacent two frames key frame is described
Within time range;If so, the video content between the adjacent key frame is then extracted from the portrait layout video, with to described
Portrait layout video is sheared.
The electronic equipment that third aspect present invention embodiment is proposed, is solved by receiving shearing instruction, and from shearing instruction
Time range is analysed, and is judged in current portrait layout video to be sheared, the time between time point corresponding to adjacent two frames key frame
Whether difference is within time range, if so, the video content between adjacent key frame is then extracted from portrait layout video, with to perpendicular
Screen video is sheared, and can lift the shear effect of batch portrait layout video, and saves human cost, lifts shear efficiency.
To reach above-mentioned purpose, the non-transitorycomputer readable storage medium that fourth aspect present invention embodiment is proposed,
When the instruction in the storage medium is performed by the processor of mobile terminal so that mobile terminal is able to carry out a kind of batch
The cutting method of portrait layout video, methods described includes:Shearing instruction is received, and time range is parsed from the shearing instruction;
Judge in the current portrait layout video to be sheared, the time difference between time point corresponding to adjacent two frames key frame whether
Within the time range;If so, the video content between the adjacent key frame is then extracted from the portrait layout video, with right
The portrait layout video is sheared.
The non-transitorycomputer readable storage medium that fourth aspect present invention embodiment is proposed, is referred to by receiving shearing
Order, and parsed from shearing instruction in time range, and the current portrait layout video to be sheared of judgement, adjacent two frames key frame institute is right
Time difference that should be between time point whether within time range, if so, then extracted from portrait layout video adjacent key frame it
Between video content, to be sheared to portrait layout video, the shear effect of batch portrait layout video can be lifted, and save manpower into
This, lifts shear efficiency.
To reach above-mentioned purpose, the computer program product that fifth aspect present invention embodiment is proposed, when the computer
Instruction in program product by computing device when, perform a kind of cutting method of batch portrait layout video, methods described includes:Connect
Shearing instruction is received, and time range is parsed from the shearing instruction;Judge in the current portrait layout video to be sheared, it is adjacent
Whether the time difference between time point corresponding to two frame key frames is within the time range;If so, then from the portrait layout
The video content between the adjacent key frame is extracted in video, to be sheared to the portrait layout video.
The computer program product that fifth aspect present invention embodiment is proposed, refers to by receiving shearing instruction, and from shearing
Time range is parsed in order, and is judged in current portrait layout video to be sheared, between time point corresponding to adjacent two frames key frame
Time difference whether within time range, if so, then extract the video content between adjacent key frame from portrait layout video,
To be sheared to portrait layout video, the shear effect of batch portrait layout video can be lifted, and save human cost, lifting shearing effect
Rate.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partly become from the following description
Obtain substantially, or recognized by the practice of the present invention.
Brief description of the drawings
Of the invention above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments
Substantially and be readily appreciated that, wherein:
Fig. 1 is the schematic flow sheet of the cutting method for the batch portrait layout video that one embodiment of the invention is proposed;
Fig. 2 is the schematic flow sheet of the cutting method for the batch portrait layout video that another embodiment of the present invention is proposed;
Fig. 3 is the schematic flow sheet of the cutting method for the batch portrait layout video that another embodiment of the present invention is proposed;
Fig. 4 is the schematic flow sheet of the cutting method for the batch portrait layout video that another embodiment of the present invention is proposed;
Fig. 5 is the structural representation of the shear for the batch portrait layout video that one embodiment of the invention is proposed;
Fig. 6 is the structural representation of the shear for the batch portrait layout video that another embodiment of the present invention is proposed;
Fig. 7 is the structural representation of an electronic equipment of the embodiment of the present invention.
Embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end
Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached
The embodiment of figure description is exemplary, is only used for explaining the present invention, and is not considered as limiting the invention.On the contrary, this
All changes in the range of spirit and intension that the embodiment of invention includes falling into attached claims, modification and equivalent
Thing.
Fig. 1 is the schematic flow sheet of the cutting method for the batch portrait layout video that one embodiment of the invention is proposed.
Embodiments of the invention can be applied during user shears to batch portrait layout video, and this is not limited
System.
Further, user can be by setting video shearing class application program in the terminal to enter batch portrait layout video
Row shearing.
Wherein, application program can refer to run software program on an electronic device, and electronic equipment is, for example, personal electricity
Brain (Personal Computer, PC), cloud device or mobile device, mobile device such as smart mobile phone, or flat board electricity
Brain etc..Terminal can be the hardware that smart mobile phone, tablet personal computer, personal digital assistant, e-book etc. have various operating systems
Equipment, is not restricted to this.
It should be noted that the executive agent of the embodiment of the present invention, can be, for example, that the central of terminal is handled on hardware
Device (Central Processing Unit, CPU), can be, for example, the phase of the video shearing class application in terminal on software
Service is closed, this is not restricted.
Referring to Fig. 1, this method includes:
The related service for shearing class application using video in the present invention is serviced as FFmpeg carries out example, and this is not restricted.
S11:Shearing instruction is received, and parses from shearing instruction time range.
Wherein, time range can be, for example, the time value in 6s to 20s, time range, characterize the shearing of user's request
The duration of portrait layout video afterwards.
Grasped wherein it is possible to provide one in advance in the electronic device, on the front-end operations interface of video shearing class application program
Make interface, the operate interface can be configured to receive the time range of the demand of user's input, and then, according to the time
Scope generates shearing instruction, the related clothes that the video shearing class that the shearing instruction is sent into terminal is applied at front-end operations interface
Business, is parsed to shearing instruction by the service, therefrom parses time range.
Alternatively, in some embodiments, referring to Fig. 2, before S11, it can also include:
S21:The length and width of multiple transverse screen videos are adjusted based on preset ratio value, multiple portrait layouts to be sheared is obtained and regards
Frequently.
Wherein, preset ratio value can be, for example, 16:9.
Preset ratio value can by video shear class application program the program of dispatching from the factory preset, or, can also by with
Family is configured according to the demand of itself, or, the electronics that can also be installed by video shearing class application program according to it is set
Standby screen size is adaptively configured, and with preferable flexibility, this is not restricted.
For example, the order in FFmpeg services can be called, according to 16 after a transverse screen video is got:9 ratio
(keeping the height of transverse screen video constant), cuts into portrait layout video, i.e. assuming that the height of transverse screen video by the transverse screen video between two parties
For ih, then the height of the portrait layout video after shearing is h=ih, and width is w=ih*9/16, and the coordinate of corresponding original position is
(iw/2-ih*9/32,0), is ordered as follows:
Ffmpeg-i input.mp4-vf crop=ih*9/16:ih:iw/2-ih*9/32:0 output.mp4.
Alternatively, in an embodiment of the present invention, can also be to each after multiple portrait layout videos to be sheared are obtained
The resolution ratio of portrait layout video is adjusted, for example, the order in FFmpeg services can be called, video is changed into point of needs
Resolution 1080*1920,720*1280 etc., is ordered as follows:
ffmpeg -i input.mp4 -s 320x240 output.mp4。
In the embodiment of the present invention, because the resolution ratio of most of mobile phones is 1080P, therefore, by calling FFmpeg to service
In order video is changed into 1080*1920 video, further save human cost, ensure video display effect.
S22:Multiple portrait layout videos to be sheared are stored in default file folder.
Wherein, what the program of dispatching from the factory that default file folder can shear class application program by video was pre-established, or, also may be used
With what is set up by user according to the demand of itself, or, the electricity that class application program is installed according to it can also be sheared by video
The optimal storage path of sub- equipment is adaptively set up, and this is not restricted.
By the way that multiple portrait layout videos to be sheared are stored in default file folder in advance so that can subsequently directly invoke
Application programming interfaces traversal reads multiple portrait layout videos under default file folder, simple easily to realize, without every in shearing
The portrait layout video is read from different paths during individual portrait layout video, the calculation resources consumption of system has been saved.
S23:Property value based on frame of video, is determined in multiple portrait layout videos to be sheared, the key of each portrait layout video
Frame.
S24:It is determined that each key frame corresponding time point.
S25:By in the time point write-in default file of key frame.
S26:Default file is stored.
In an embodiment of the present invention, can be respectively to each portrait layout video to be sheared, it is first determined what it was included
Key frame.
Wherein, key frame refers to that frame residing for the key operations in role or object of which movement or change, i.e. key frame
For the excessive frame between two camera lenses adjacent in portrait layout video.
It is understood that in a portrait layout video, the key frame of at least one can be included, it is correspondingly, each crucial
Frame can all correspond to a time point, and the key frame is different from the property value of other frames in portrait layout video.
It is for instance possible to use the property value of each frame in portrait layout video is read in the order in ffprobe services, order is such as
Under:
"ffprobe-show_frames"+input.mp4+"output1.txt";
Then, by the property value of each frame of reading, the key_frame=1 corresponding frame of property value as key frame,
And then, the time point of key frame is stored in default file.
Wherein, what the program of dispatching from the factory that default file can shear class application program by video was pre-established, or, can also
Set up by user according to the demand of itself, or, the electronics that class application program is installed according to it can also be sheared by video
The optimal storage path of equipment is adaptively set up, and this is not restricted.
By the way that the time point of key frame is write in default file in advance so that can subsequently be read directly from default file
Each key frame corresponding time point is taken, is parsed without the frame of video to portrait layout video, has saved the computing of system
Resource consumption, thus, the shear efficiency of batch portrait layout video is lifted, and, because default file is pre-configured with, by direct
Each key frame corresponding time point is read from default file, has ensured that key frame and corresponding time point obtain accurate
Degree.
S12:Judge in current portrait layout video to be sheared, the time difference between time point corresponding to adjacent two frames key frame
Whether value is within time range.
Alternatively, judge in current portrait layout video to be sheared, between time point corresponding to adjacent two frames key frame when
Between difference whether within time range, including:
Judge each time difference in multiple time differences whether within time range;
Or, it can also judge that the time difference of predetermined number whether within time range, is not restricted to this.
It is understood that due to the characteristic of key frame, the video content between adjacent key frame is to belong to same two-by-two
One camera lens, and the video content between non-conterminous key frame belongs to different camera lenses.
Therefore, in an embodiment of the present invention, in order to ensure the continuity of the video that shearing is obtained, it is to avoid produce across camera lens
Phenomenon, can be by portrait layout video currently to be sheared, the time difference between time point corresponding to adjacent two frames key frame
It is compared with the time range in shearing instruction, if time difference is within time range, shows to be based on the time difference
Corresponding two adjacent frame key frames shear obtained video to the progress of portrait layout video has continuity, is within same camera lens
Video.
Or, can not two frames pass corresponding to the time difference if time difference is less than the lower limit of the time range
Video content between key frame is sheared.
Or, if time difference is more than the upper limit of the time range, any one time can be determined from time range
It is worth (for example, 8s), video of the time value based on the 8s from shearing 8s between the corresponding two adjacent frame key frames of time difference
Content, now, because the time difference between two adjacent frame key frames has been more than the upper limit of time range, thus, still can
It is enough to ensure to shear obtained video content not across camera lens.
Alternatively, in some embodiments, referring to Fig. 3, before S12, it can also include:
S31:Time point recorded in default file is scanned.
S32:Obtain in current portrait layout video to be sheared, the time difference between time point corresponding to adjacent two frames key frame
Value, obtains multiple time differences.
In an embodiment of the present invention, the time point recorded in default file can be scanned, calculates two two-phases
Time difference between time point corresponding to adjacent key frame, obtains multiple time differences.
In an embodiment of the present invention, by obtaining the time difference between time point corresponding to key frame adjacent two-by-two
Value, can be sheared based on the time difference to portrait layout video, due to the characteristic of key frame, two-by-two between adjacent key frame
Video content belong to same camera lens, therefore, portrait layout video is sheared based on the time difference, one can be obtained
The video content of full lens so that the video content that shearing is obtained possesses continuity, thus, effectively lift batch portrait layout video
Shear effect.
S13:If so, the video content between adjacent key frame is then extracted from portrait layout video, to be carried out to portrait layout video
Shearing.
For example, it is assumed that time range is 6s to 20s small video, then, if in current portrait layout video to be sheared, it is adjacent
Time difference between time point corresponding to two frame key frames can call the life in FFmpeg services within time range, then
Order is sheared to portrait layout video, and the order is as follows:
ffmpeg-i input.mp4 -vcodec copy -acodec copy -ss t1 -to t2
output.mp4–y.Alternatively, in some embodiments, referring to Fig. 4, after S13, it can also include:
S41:Traversal reads next portrait layout video to be sheared from default file folder.
S42:Portrait layout video currently to be sheared is replaced using next portrait layout video to be sheared.
In an embodiment of the present invention, because default file folder is pre-established, journey is applied therefore, it is possible to directly invoke
Sequence interface traversal reads multiple portrait layout videos under default file folder, and using next portrait layout video to be sheared to current
Portrait layout video to be sheared is replaced, and realizes the shearing automated to the portrait layout video of batch, simple easily to realize, without
Need to read the portrait layout video from different paths when shearing each portrait layout video, saved the calculation resources consumption of system.
In the present embodiment, by receiving shearing instruction, and time range is parsed from shearing instruction, and judge currently to wait to cut
In the portrait layout video cut, the time difference between time point corresponding to adjacent two frames key frame whether within time range, if
It is that the video content between adjacent key frame is then extracted from portrait layout video, to be sheared to portrait layout video, can be lifted and criticized
The shear effect of portrait layout video is measured, and saves human cost, shear efficiency is lifted.
Fig. 5 is the structural representation of the shear for the batch portrait layout video that one embodiment of the invention is proposed.
Referring to Fig. 5, the device 500 includes:
Receiving module 501, for receiving shearing instruction, and parses from shearing instruction time range.
Judge module 502, for judging in current portrait layout video to be sheared, time point corresponding to adjacent two frames key frame
Between time difference whether within time range.
Alternatively, in some embodiments, judge module 502, specifically for:
Judge each time difference in multiple time differences whether within time range.
Shear module 503, for when time difference is within time range, adjacent key frame to be extracted from portrait layout video
Between video content, to be sheared to portrait layout video.
Alternatively, in some embodiments, referring to Fig. 6, the device 500 also includes:
Read module 504, next portrait layout video to be sheared is read for traversal in being pressed from both sides from default file.
Replacement module 505, for being carried out using next portrait layout video to be sheared to portrait layout video currently to be sheared
Replace.
First determining module 506, for the property value based on frame of video, is determined in multiple portrait layout videos to be sheared, often
The key frame of individual portrait layout video.
Second determining module 507, for determining each key frame corresponding time point.
Writing module 508, for the time point of key frame to be write in default file.
Memory module 509, for being stored to default file.
Scan module 510, for being scanned to the time point recorded in default file.
Acquisition module 511, for obtaining in current portrait layout video to be sheared, time point corresponding to adjacent two frames key frame
Between time difference, obtain multiple time differences.
Adjusting module 512, for being adjusted based on preset ratio value to the length and width of multiple transverse screen videos, obtains multiple treat
The portrait layout video of shearing.
Preserving module 513, for multiple portrait layout videos to be sheared to be stored in default file folder.
It should be noted that the explanation in earlier figures 1- Fig. 4 embodiments to the cutting method embodiment of batch portrait layout video
Illustrate the shear of batch portrait layout video for being also applied for the embodiment, its realization principle is similar, and here is omitted.
In the present embodiment, by receiving shearing instruction, and time range is parsed from shearing instruction, and judge currently to wait to cut
In the portrait layout video cut, the time difference between time point corresponding to adjacent two frames key frame whether within time range, if
It is that the video content between adjacent key frame is then extracted from portrait layout video, to be sheared to portrait layout video, can be lifted and criticized
The shear effect of portrait layout video is measured, and saves human cost, shear efficiency is lifted.
The embodiment of the present invention additionally provides a kind of electronic equipment, referring to Fig. 7, and electronic equipment 700 can include with next
Or multiple components:Processor 701, memory 702, power circuit 703, multimedia groupware 704, audio-frequency assembly 705, input/defeated
Go out the interface 706 of (I/O), sensor cluster 707, and communication component 708.
Power circuit 703, for being powered for each circuit or device of electronic equipment;Memory 702 is used to store and can hold
Line program code;Processor 701 is run and executable program by reading the executable program code stored in memory 702
The corresponding program of code, for performing following steps:
Shearing instruction is received, and parses from shearing instruction time range;
Judge in current portrait layout video to be sheared, the time difference between time point corresponding to adjacent two frames key frame is
It is no within time range;
If so, the video content between adjacent key frame is then extracted from portrait layout video, to be sheared to portrait layout video.
It should be noted that the explanation in earlier figures 1- Fig. 4 embodiments to the cutting method embodiment of batch portrait layout video
Illustrate the electronic equipment 700 for being also applied for the embodiment, its realization principle is similar, and here is omitted.
In the present embodiment, by receiving shearing instruction, and time range is parsed from shearing instruction, and judge currently to wait to cut
In the portrait layout video cut, the time difference between time point corresponding to adjacent two frames key frame whether within time range, if
It is that the video content between adjacent key frame is then extracted from portrait layout video, to be sheared to portrait layout video, can be lifted and criticized
The shear effect of portrait layout video is measured, and saves human cost, shear efficiency is lifted.
In order to realize above-described embodiment, the present invention also proposes a kind of non-transitorycomputer readable storage medium, works as storage
Instruction in medium by the computing device of terminal when so that terminal is able to carry out a kind of cutting method of batch portrait layout video,
Method includes:
Shearing instruction is received, and parses from shearing instruction time range;
Judge in current portrait layout video to be sheared, the time difference between time point corresponding to adjacent two frames key frame is
It is no within time range;
If so, the video content between adjacent key frame is then extracted from portrait layout video, to be sheared to portrait layout video.
Non-transitorycomputer readable storage medium in the present embodiment, by receiving shearing instruction, and from shearing instruction
Middle parsing time range, and judge in current portrait layout video to be sheared, between time point corresponding to adjacent two frames key frame
Whether time difference is within time range, if so, the video content between adjacent key frame is then extracted from portrait layout video, with
Portrait layout video is sheared, the shear effect of batch portrait layout video can be lifted, and save human cost, lifting shearing effect
Rate.
In order to realize above-described embodiment, the present invention also proposes a kind of computer program product, when in computer program product
Instruction when being executed by processor, perform a kind of cutting method of batch portrait layout video, method includes:
Shearing instruction is received, and parses from shearing instruction time range;
Judge in current portrait layout video to be sheared, the time difference between time point corresponding to adjacent two frames key frame is
It is no within time range;
If so, the video content between adjacent key frame is then extracted from portrait layout video, to be sheared to portrait layout video.
Computer program product in the present embodiment, by receiving shearing instruction, and the parsing time model from shearing instruction
Enclose, and judge in current portrait layout video to be sheared, whether the time difference between time point corresponding to adjacent two frames key frame
Within time range, if so, the video content between adjacent key frame is then extracted from portrait layout video, to enter to portrait layout video
Row shearing, can lift the shear effect of batch portrait layout video, and save human cost, lift shear efficiency.
It should be noted that in the description of the invention, term " first ", " second " etc. are only used for describing purpose, without
It is understood that to indicate or imply relative importance.In addition, in the description of the invention, unless otherwise indicated, the implication of " multiple "
It is two or more.
Any process described otherwise above or method description are construed as in flow chart or herein, represent to include
Module, fragment or the portion of the code of one or more executable instructions for the step of realizing specific logical function or process
Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not be by shown or discussion suitable
Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention
Embodiment person of ordinary skill in the field understood.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned
In embodiment, the software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage
Or firmware is realized.If, and in another embodiment, can be with well known in the art for example, realized with hardware
Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal
Discrete logic, the application specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method is carried
Rapid to can be by program to instruct the hardware of correlation to complete, described program can be stored in a kind of computer-readable storage medium
In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing module, can also
That unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated mould
Block can both be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.The integrated module is such as
Fruit is realized using in the form of software function module and as independent production marketing or in use, can also be stored in a computer
In read/write memory medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means to combine specific features, structure, material or the spy that the embodiment or example are described
Point is contained at least one embodiment of the present invention or example.In this manual, to the schematic representation of above-mentioned term not
Necessarily refer to identical embodiment or example.Moreover, specific features, structure, material or the feature of description can be any
One or more embodiments or example in combine in an appropriate manner.
Although embodiments of the invention have been shown and described above, it is to be understood that above-described embodiment is example
Property, it is impossible to limitation of the present invention is interpreted as, one of ordinary skill in the art within the scope of the invention can be to above-mentioned
Embodiment is changed, changed, replacing and modification.
Claims (10)
1. a kind of cutting method of batch portrait layout video, it is characterised in that comprise the following steps:
Shearing instruction is received, and time range is parsed from the shearing instruction;
Judge in the current portrait layout video to be sheared, the time difference between time point corresponding to adjacent two frames key frame is
It is no within the time range;
If so, the video content between the adjacent key frame is then extracted from the portrait layout video, with to the portrait layout video
Sheared.
2. the cutting method of batch portrait layout video as claimed in claim 1, it is characterised in that also include:
Traversal reads next portrait layout video to be sheared from default file folder;
The current portrait layout video to be sheared is replaced using next portrait layout video to be sheared.
3. the cutting method of batch portrait layout video as claimed in claim 1, it is characterised in that the reception shearing instruction it
Before, in addition to:
Property value based on frame of video, is determined in multiple portrait layout videos to be sheared, the key frame of each portrait layout video;
Determine each key frame corresponding time point;
By in the time point write-in default file of the key frame;
The default file is stored.
4. the cutting method of batch portrait layout video as claimed in claim 3, it is characterised in that judge described currently to treat described
In the portrait layout video of shearing, time difference between time point corresponding to adjacent two frames key frame whether the time range it
Before interior, including:
Time point recorded in the default file is scanned;
Obtain in the current portrait layout video to be sheared, the time difference between time point corresponding to adjacent two frames key frame,
Obtain multiple time differences.
5. the cutting method of batch portrait layout video as claimed in claim 4, it is characterised in that the judgement is described currently to be waited to cut
In the portrait layout video cut, time difference between time point corresponding to adjacent two frames key frame whether the time range it
It is interior, including:
Judge each time difference in the multiple time difference whether within the time range.
6. the cutting method of batch portrait layout video as claimed in claim 2, it is characterised in that the reception shearing instruction it
Before, in addition to:
The length and width of multiple transverse screen videos are adjusted based on preset ratio value, multiple portrait layout videos to be sheared are obtained;
The multiple portrait layout video to be sheared is stored in the default file folder.
7. a kind of shear of batch portrait layout video, it is characterised in that including:
Receiving module, time range is parsed for receiving shearing instruction, and from the shearing instruction;
Judge module, for judging in the current portrait layout video to be sheared, time point corresponding to adjacent two frames key frame it
Between time difference whether within the time range;
Shear module, for when the time difference is within the time range, extracting described from the portrait layout video
Video content between adjacent key frame, to be sheared to the portrait layout video.
8. the shear of batch portrait layout video as claimed in claim 7, it is characterised in that also include:
Read module, next portrait layout video to be sheared is read for traversal in being pressed from both sides from default file;
Replacement module, for being carried out using next portrait layout video to be sheared to the current portrait layout video to be sheared
Replace.
9. the shear of batch portrait layout video as claimed in claim 7, it is characterised in that also include:
First determining module, for the property value based on frame of video, is determined in multiple portrait layout videos to be sheared, each portrait layout is regarded
The key frame of frequency;
Second determining module, for determining each key frame corresponding time point;
Writing module, for the time point of the key frame to be write in default file;
Memory module, for being stored to the default file.
10. the shear of batch portrait layout video as claimed in claim 9, it is characterised in that including:
Scan module, for being scanned to the time point recorded in the default file;
Acquisition module, for obtaining in the current portrait layout video to be sheared, time point corresponding to adjacent two frames key frame it
Between time difference, obtain multiple time differences.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710521560.5A CN107197372B (en) | 2017-06-30 | 2017-06-30 | Method and device for shearing batch vertical screen videos and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710521560.5A CN107197372B (en) | 2017-06-30 | 2017-06-30 | Method and device for shearing batch vertical screen videos and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107197372A true CN107197372A (en) | 2017-09-22 |
CN107197372B CN107197372B (en) | 2019-12-27 |
Family
ID=59881687
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710521560.5A Expired - Fee Related CN107197372B (en) | 2017-06-30 | 2017-06-30 | Method and device for shearing batch vertical screen videos and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107197372B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111277915A (en) * | 2018-12-05 | 2020-06-12 | 阿里巴巴集团控股有限公司 | Video conversion method and device |
CN112165635A (en) * | 2020-10-12 | 2021-01-01 | 北京达佳互联信息技术有限公司 | Video conversion method, device, system and storage medium |
CN112351308A (en) * | 2020-10-30 | 2021-02-09 | 杭州当虹科技股份有限公司 | Method for realizing rapid transcoding based on local transcoding technology |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0447167B1 (en) * | 1990-03-13 | 1995-11-22 | Sony Corporation | Image display device |
CN104079981A (en) * | 2013-03-25 | 2014-10-01 | 联想(北京)有限公司 | Data processing method and data processing device |
CN104185077A (en) * | 2014-09-12 | 2014-12-03 | 飞狐信息技术(天津)有限公司 | Video editing method and device |
CN105323653A (en) * | 2014-08-05 | 2016-02-10 | 方正国际软件(北京)有限公司 | Method and equipment for playing video clip |
CN105872675A (en) * | 2015-12-22 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | Method and device for intercepting video animation |
CN105933773A (en) * | 2016-05-12 | 2016-09-07 | 青岛海信传媒网络技术有限公司 | Video editing method and system |
CN106803992A (en) * | 2017-02-14 | 2017-06-06 | 北京时间股份有限公司 | Video clipping method and device |
-
2017
- 2017-06-30 CN CN201710521560.5A patent/CN107197372B/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0447167B1 (en) * | 1990-03-13 | 1995-11-22 | Sony Corporation | Image display device |
CN104079981A (en) * | 2013-03-25 | 2014-10-01 | 联想(北京)有限公司 | Data processing method and data processing device |
CN105323653A (en) * | 2014-08-05 | 2016-02-10 | 方正国际软件(北京)有限公司 | Method and equipment for playing video clip |
CN104185077A (en) * | 2014-09-12 | 2014-12-03 | 飞狐信息技术(天津)有限公司 | Video editing method and device |
CN105872675A (en) * | 2015-12-22 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | Method and device for intercepting video animation |
CN105933773A (en) * | 2016-05-12 | 2016-09-07 | 青岛海信传媒网络技术有限公司 | Video editing method and system |
CN106803992A (en) * | 2017-02-14 | 2017-06-06 | 北京时间股份有限公司 | Video clipping method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111277915A (en) * | 2018-12-05 | 2020-06-12 | 阿里巴巴集团控股有限公司 | Video conversion method and device |
CN111277915B (en) * | 2018-12-05 | 2022-08-12 | 阿里巴巴集团控股有限公司 | Video conversion method and device |
CN112165635A (en) * | 2020-10-12 | 2021-01-01 | 北京达佳互联信息技术有限公司 | Video conversion method, device, system and storage medium |
CN112351308A (en) * | 2020-10-30 | 2021-02-09 | 杭州当虹科技股份有限公司 | Method for realizing rapid transcoding based on local transcoding technology |
Also Published As
Publication number | Publication date |
---|---|
CN107197372B (en) | 2019-12-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110505675B (en) | Network connection method and device, storage medium and communication terminal | |
CN106485689B (en) | A kind of image processing method and device | |
CN110852938B (en) | Display picture generation method, device and storage medium | |
CN104965580A (en) | Method and apparatus for displaying unread messages | |
CN107197372A (en) | Method and device for shearing batch vertical screen videos and electronic equipment | |
CN103914550A (en) | Recommended content displaying method and recommended content displaying device | |
CN104252273A (en) | Contact reporting rate processing method and device of touch screen | |
CN103500215A (en) | Multi-media file recommending method and device | |
CN104601770A (en) | Terminal and smoothness evaluation method thereof | |
CN104104995A (en) | Image display method and device | |
CN104219356B (en) | A kind of method of display search associated person information, device and mobile terminal | |
CN103176996A (en) | Image search method based on image feature information and image search engine server based on image feature information | |
CN103714078A (en) | Method, system and device for providing update contents of web pages | |
CN109993817B (en) | Animation realization method and terminal | |
CN112333734A (en) | Serving cell switching method and device | |
CN105188100A (en) | Method for intelligently switching 4G network frequency band of terminal | |
CN105681554B (en) | Floating electro-optical device and method | |
CN104853193A (en) | Video compression method, device and electronic equipment | |
CN105684455A (en) | Video sharing method and system based on app | |
CN105554318B (en) | Percept of call completed test device and method | |
CN105373557A (en) | Content synchronization method and device | |
CN103853347A (en) | Information release method based on gravity sensing horizontal screen display of mobile terminal | |
CN111190634A (en) | Layout information processing method and device and electronic equipment | |
CN101827318A (en) | Information forwarding method and mobile communication terminal capable of realizing information forwarding | |
CN106055229B (en) | Display interface adjusting method and display interface adjusting module based on screen reading |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | 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 | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20191227 |