CN109981988A - A kind of video generation method, device and mobile terminal - Google Patents

A kind of video generation method, device and mobile terminal Download PDF

Info

Publication number
CN109981988A
CN109981988A CN201910270430.8A CN201910270430A CN109981988A CN 109981988 A CN109981988 A CN 109981988A CN 201910270430 A CN201910270430 A CN 201910270430A CN 109981988 A CN109981988 A CN 109981988A
Authority
CN
China
Prior art keywords
video
event
duration
shooting
time
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
Application number
CN201910270430.8A
Other languages
Chinese (zh)
Other versions
CN109981988B (en
Inventor
贾博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Interactive (beijing) Technology Co Ltd
Original Assignee
Interactive (beijing) Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Interactive (beijing) Technology Co Ltd filed Critical Interactive (beijing) Technology Co Ltd
Priority to CN201910270430.8A priority Critical patent/CN109981988B/en
Publication of CN109981988A publication Critical patent/CN109981988A/en
Application granted granted Critical
Publication of CN109981988B publication Critical patent/CN109981988B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a kind of video generation method, device and mobile terminal, the method is suitable for executing in the terminal, comprising: starting camera starts to shoot video;User is responded to the action event of shooting button;If the action event is click event, as time to count point at the time of to respond the click event, video captured in preset first shooting duration of video by pre- shooting duration of video before the time to count point and later is cached;If the action event is long-pressing event, as time to count point at the time of to respond the long-pressing event, video captured in the second shooting duration of video by pre- shooting duration of video before the time to count point and later is cached;Obtain selection of the user to buffered video;The buffered video is synthesized according to the sequencing of selection, to generate new video.

Description

A kind of video generation method, device and mobile terminal
The present invention is the divisional application of patent of invention 201610658197.7 filed on August 11st, 2016.
Technical field
The present invention relates to Internet technical field, in particular to a kind of video generation method, device and mobile terminal.
Background technique
With the continuous development of Internet technology, user is gradually converted to down the usage mode of internet based on the downloading Load is laid equal stress on upload, and in the mobile terminals such as smart phone, tablet computer and smart camera, user can utilize above-mentioned movement The included camera of terminal is shot and is generated video, and then it is shared with other people to be uploaded to the network platform.
In existing video generation method, the overwhelming majority be need user to the shooting button in interface of mobile terminal into Row Continued depression carries out the shooting of video during pressing state is kept, and after user unclamps the pressing to shooting button, claps It takes the photograph pause and generates video.However, pressing shooting button for a long time to carry out video record, obtained video typical time It is longer and include that data are more, upper inconvenient processing is synthesized in the later period, and such conventional pressing operation is difficult to excite user's Interest is shot, user experience cannot be promoted.It is, therefore, desirable to provide a kind of technical solution that new video generates, thus specific aim It solves the above problems.
Summary of the invention
For this purpose, the present invention provides a kind of scheme that video generates, to try hard to solve or at least alleviate existing above ask Topic.
According to an aspect of the present invention, a kind of video generation method is provided, suitable for executing in the terminal, this method Include the following steps: to start to shoot video firstly, starting camera;User is responded to the action event of shooting button;If described Action event be click event, then to respond the click event at the time of as time to count point, by the time to count point it Captured video is cached in preceding pre- shooting duration of video and later preset first shooting duration of video;If the action event is length By event, then to respond the long-pressing event at the time of as time to count point, by pre- shooting duration of video before the time to count point Video captured in the second shooting duration of video is cached later;Obtain selection of the user to buffered video;According to selection Sequencing the buffered video is synthesized, to generate new video.
Optionally, in video generation method according to the present invention, further includes: judge user to the operation thing of shooting button Part is click event or long-pressing event.
Optionally, in video generation method according to the present invention, judge that user is a little to the action event of shooting button It hits event or long-pressing event includes: to obtain user to the duration of the action event of shooting button;If the duration No more than preset first time threshold, then judge the action event for click event;If the duration is greater than default First time threshold, then judge the action event for long-pressing event.
Optionally, in video generation method according to the present invention, the second shooting duration of video is continuing for the long-pressing event Duration.
Optionally, in video generation method according to the present invention, by pre- shooting duration of video before the time to count point and It includes: that judge whether second shooting duration of video is greater than preset that video captured in the second shooting duration of video, which carries out caching, later Second time threshold;If second shooting duration of video be greater than preset second time threshold, by the time to count point it Preceding pre- shooting duration of video and video captured in second time threshold later are cached;If second shooting duration of video is little In preset second time threshold, then clapped in the second shooting duration of video by pre- shooting duration of video before the time to count point and later The video taken the photograph is cached.
Optionally, in video generation method according to the present invention, further includes: in the buffered video for judging user's selection The video cached with the presence or absence of the response long-pressing event.
Optionally, in video generation method according to the present invention, further includes: if being deposited in the buffered video of user's selection It is then to divide time quantum with preset first shooting duration of video in the video that the response long-pressing event is cached, it will be described slow The video deposited is in turn divided into multiple video clips;If the duration of the last one video clip is not more than preset third time threshold The last one video clip, then be combined in its previous video segment by value.
Optionally, in video generation method according to the present invention, when preset third time threshold is preset first Between threshold value half.
According to a further aspect of the invention, a kind of video-generating device is provided, is suitable for being resident in the terminal, the dress It sets including shooting module, respond module, cache module, obtain module and generation module.Wherein, shooting module is suitable for starting camera shooting Head starts to shoot video;Respond module is adapted to respond to user to the action event of shooting button;Cache module is suitable for working as the behaviour Make event be click event when, as time to count point at the time of to respond the click event, before the time to count point Captured video is cached in pre- shooting duration of video and later preset first shooting duration of video, when the action event is long-pressing When event, as time to count point at the time of to respond the long-pressing event, by pre- shooting duration of video before the time to count point and Video captured in the second shooting duration of video is cached later;It obtains module and is suitable for obtaining choosing of the user to buffered video It selects;Generation module is suitable for synthesizing the buffered video according to the sequencing of selection, to generate new video.
Optionally, further include first judgment module in video-generating device according to the present invention, be suitable for judging user couple The action event of shooting button is click event or long-pressing event.
Optionally, in video-generating device according to the present invention, first judgment module is further adapted for: obtaining user couple The duration of the action event of shooting button;When the duration is not more than preset first time threshold, institute is judged Stating action event is click event;When the duration is greater than preset first time threshold, the action event is judged For long-pressing event.
Optionally, in video-generating device according to the present invention, the second shooting duration of video is continuing for the long-pressing event Duration.
Optionally, in video-generating device according to the present invention, cache module is further adapted for: when the action event When for long-pressing event, judge whether second shooting duration of video is greater than preset second time threshold;When the described second shooting It is long when being greater than preset second time threshold, by pre- shooting duration of video before the time to count point and later in second time threshold Captured video is cached;When second shooting duration of video is not more than preset second time threshold, by the start of calculation Pre- shooting duration of video and video captured in the second shooting duration of video later are cached before time point.
Optionally, further include the second judgment module in video-generating device according to the present invention, be suitable for judging that user selects The video cached in the buffered video selected with the presence or absence of the response long-pressing event.
Optionally, in video-generating device according to the present invention, further include division module, be suitable for:
When exist in the buffered video of user's selection respond video that the long-pressing event is cached when, with preset the One shooting duration of video is to divide time quantum, and the video of the caching is in turn divided into multiple video clips;When the last one view When the duration of frequency segment is not more than preset third time threshold, the last one video clip is combined to its previous video piece Duan Zhong.
Optionally, in video-generating device according to the present invention, when preset third time threshold is preset first Between threshold value half.
According to a further aspect of the invention, a kind of mobile terminal is also provided, including video according to the present invention generates dress It sets.
The technical solution that video according to the present invention generates, first starting camera start to shoot video, respond user couple The action event of shooting button is that click event or long-pressing event both of these case are taken at different cachings to action event Reason, is synthesized according to selecting sequence of the user to buffered video to generate new video.In the above-mentioned technical solutions, to point It hits event and long-pressing event both different types of action events is handled differently, captured by cache responses action event Video when take duration control, avoid generating the processing problem that prolonged video tape is come in later period synthesis, simultaneously Due to that can realize video capture by clicking shooting button, Continued depression can not had to liberate finger, greatly improved The use interest and personal experience's degree of user.
Detailed description of the invention
To the accomplishment of the foregoing and related purposes, certain illustrative sides are described herein in conjunction with following description and drawings Face, these aspects indicate the various modes that can practice principles disclosed herein, and all aspects and its equivalent aspect It is intended to fall in the range of theme claimed.Read following detailed description in conjunction with the accompanying drawings, the disclosure it is above-mentioned And other purposes, feature and advantage will be apparent.Throughout the disclosure, identical appended drawing reference generally refers to identical Component or element.
Fig. 1 shows the schematic diagram of mobile terminal 100 according to an embodiment of the invention;
Fig. 2 shows the flow charts of video generation method 200 according to an embodiment of the invention;And
Fig. 3 shows the schematic diagram of video-generating device 300 according to an embodiment of the invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Fig. 1 is the structural block diagram of mobile terminal 100.Mobile terminal 100 may include memory interface 102, one or more A data processor, image processor and/or central processing unit 104 and peripheral interface 106.
Memory interface 102, one or more processors 104 and/or peripheral interface 106 either discrete component, It can integrate in one or more integrated circuits.In the mobile terminal 100, various elements can pass through one or more communication Bus or signal wire couple.Sensor, equipment and subsystem may be coupled to peripheral interface 106, a variety of to help to realize Function.
For example, motion sensor 110, light sensor 112 and range sensor 114 may be coupled to peripheral interface 106, To facilitate the functions such as orientation, illumination and ranging.Other sensors 116 can equally be connected with peripheral interface 106, such as positioning system System (such as GPS receiver), temperature sensor, biometric sensor or other sensor devices, it is possible thereby to help to implement phase The function of pass.
Camera sub-system 120 and optical sensor 122 can be used for the camera of convenient such as record photos and video clips The realization of function, wherein the camera sub-system and optical sensor for example can be charge-coupled device (CCD) or complementary gold Belong to oxide semiconductor (centimetre OS) optical sensor.Reality can be helped by one or more radio communication subsystems 124 Existing communication function, wherein radio communication subsystem may include that radio-frequency transmitter and transmitter and/or light (such as infrared) receive Machine and transmitter.The particular design and embodiment of radio communication subsystem 124 can depend on what mobile terminal 100 was supported One or more communication networks.For example, mobile terminal 100 may include being designed to support LTE, 3G, GSM network, GPRS net Network, EDGE network, Wi-Fi or WiMax network and BlueboothTMThe communication subsystem 124 of network.
Audio subsystem 126 can be coupled with loudspeaker 128 and microphone 130, to help to implement to enable voice Function, such as speech recognition, speech reproduction, digital record and telephony feature.I/O subsystem 140 may include touch screen control Device 142 processed and/or other one or more input controllers 144.Touch screen controller 142 may be coupled to touch screen 146.It lifts For example, any one of a variety of touch-sensing technologies are can be used to detect in the touch screen 146 and touch screen controller 142 The contact and movement or pause carried out therewith, wherein detection technology includes but is not limited to capacitive character, resistive, infrared and table Face technology of acoustic wave.Other one or more input controllers 144 may be coupled to other input/control devicess 148, such as one Or the pointer device of multiple buttons, rocker switch, thumb wheel, infrared port, USB port, and/or stylus etc.It is described One or more button (not shown)s may include the up/down for controlling 130 volume of loudspeaker 128 and/or microphone Button.
Memory interface 102 can be coupled with memory 150.The memory 150 may include that high random access is deposited Reservoir and/or nonvolatile memory, such as one or more disk storage equipments, one or more optical storage apparatus, and/ Or flash memories (such as NAND, NOR).Memory 150 can store an operating system 172, for example, Android, iOS or The operating system of Windows Phone etc.The operating system 172 may include for handling basic system services and execution The instruction of task dependent on hardware.Memory 150 can also be stored using 174.It, can be from memory in mobile device operation Load operating system 172 in 150, and executed by processor 104.At runtime using 174, can also add from memory 150 It carries, and is executed by processor 104.It operates on operating system using 174, is provided using operating system and bottom hardware Interface realizes the various desired functions of user, such as instant messaging, web page browsing, pictures management.Using 174 can be independently of What operating system provided, it is also possible to what operating system carried.In addition, when being mounted in mobile terminal 100 using 174, Drive module can be added to operating system.In above-mentioned various applications 174, one such application is view according to the present invention Frequency generating means 300.
Fig. 2 shows the flow charts of video generation method 200 according to an embodiment of the invention.Video generation method 200 are suitable for executing in mobile terminal (such as mobile terminal 100 shown in FIG. 1).
As shown in Fig. 2, method 200 starts from step S210.In step S210, starting camera starts to shoot video.? In the present embodiment, the frame per second of video capture is 30fps, and wherein frame per second is the measurement for measuring display frame number, with display per second Frame number (Frames per Second) Lai Hengliang.
Then, S220, action event of the response user to shooting button are entered step.And when mobile terminal receives user After the action event of shooting button, before responding the action event, judge that the action event is click event or long-pressing Event.Specifically, user is obtained to the duration of the action event of shooting button, if duration is not more than preset first Time threshold then judges that action event for click event, if duration is greater than preset first time threshold, judges to operate Event is long-pressing event.In the present embodiment, first time threshold is preset as 0.75 second, if user is to the operation thing of shooting button The duration of part is not more than 0.75 second, then judges action event currently to be responded as click event, if user presses shooting The duration of the action event of button is greater than 0.75 second, then judges action event currently to be responded as long-pressing event.At this point, obtaining The duration for the action event got is 0.5 second, judges the action event for click event.
In step S230, if action event is click event, as time to count point at the time of to respond click event, Video captured in preset first shooting duration of video by pre- shooting duration of video before time to count point and later caches.At this In embodiment, pre- shooting duration of video is 0.5 second, and the first shooting duration of video is preset as 1 second, when at the time of responding click event to start Between point, video captured in 0.5 second and 1 second later before time to count point is cached, then it is corresponding to click event The duration of buffered video is 1.5 seconds total.In other words, after user enters shooting interface, camera will be automatically turned at once simultaneously This state is kept, therefore before responding click event, is actually carrying out video capture always, wouldn't only cache, and Be wait receive user to the click event of shooting button and preparation respond when, will respond click event at the time of before 0.5 Video in second is used as the content shot in advance, and at the time of respond click event after video in 1 second cache together.Together When, for the obtained buffered video of response click event, for convenient for showing to user, can be used the form of dynamic picture into Row performance.For the video cached in response to click event, first carry out that frame is taken to handle, i.e., according to frame per second and taking frame time point, Will meet in the video take frame time point picture frame take out, then temporally on sequencing be combined into dynamic picture.With one When a for the corresponding buffered video of a length of 1.5 seconds click events, will wherein the 0.5th second, 0.6 second, 0.7 second, 0.8 second and Picture frame at 0.9 second takes out, and since frame per second is 30fps, then 1.5 seconds videos include 45 frame images, therefore above-mentioned when taking frame Between put corresponding frame number and be followed successively by the 15th frame, the 18th frame, the 21st frame, the 24th frame and the 27th frame, by this 5 frame image temporally on Sequencing be combined, obtained the dynamic picture for showing to user.
In step S240, if action event is long-pressing event, as time to count point at the time of to respond long-pressing event, Video captured in second shooting duration of video by pre- shooting duration of video before time to count point and later caches.First, it is determined that Whether the second shooting duration of video is greater than preset second time threshold, if the second shooting duration of video is greater than preset second time threshold Value, then video captured in second time threshold by pre- shooting duration of video before time to count point and later caches, if Second shooting duration of video is not more than preset second time threshold, then by pre- shooting duration of video before time to count point and second count later Video captured in duration is taken the photograph to be cached.Wherein, the second shooting duration of video is the duration of long-pressing event.In the present embodiment In, second time threshold is preset as 11.5 seconds.At this point, user again operates shooting button, mobile terminal should in judgement Action event be long-pressing event after responded.First, it is determined that whether the second shooting duration of video is greater than 11.5 seconds, to respond long-pressing thing It is time to count point at the time of part, if the second shooting duration of video is greater than 11.5 seconds, by 1.5 seconds before time to count point and later Captured video is cached in 11.5 seconds, and the duration of the corresponding buffered video of long-pressing event is 12 seconds total, actually For the corresponding buffered video of long-pressing event, longest duration is 12 seconds.If the second shooting duration of video is not more than 11.5 seconds, Then video captured in the second shooting duration of video by 0.5 second before time to count point and later caches.And in the present embodiment The second shooting duration of video be 9.1 seconds, be not more than preset second time threshold 11.5 seconds, then by 1.5 seconds before time to count point Captured video is cached in 9.1 seconds later, and the duration of the corresponding buffered video of long-pressing event is 9.6 seconds total.It closes Keyness code is as follows:
In step s 250, selection of the user to buffered video is obtained.In the present embodiment, the video of caching stores Among photograph album, when obtaining the video cached that user chooses in photograph album, the sequencing of selection can be recorded simultaneously, And the change or exchange of sequence can be carried out.
In step S260, the video cached is synthesized according to the sequencing of selection, to generate new video. And before carrying out Video Composition, it also needs to be cached in the buffered video for judging user's selection with the presence or absence of response long-pressing event Video.If there is the video that response long-pressing event is cached in the buffered video of user's selection, with preset first count A length of division time quantum when taking the photograph, is in turn divided into multiple video clips for the video of caching;If the last one video clip Duration is not more than preset third time threshold, then the last one video clip is combined in its previous video segment.Its In, preset third time threshold is the half of preset first time threshold.In the present embodiment, user is by pressing shooting After the multi-pass operation of key, multiple videos have been cached in photograph album, including the corresponding buffered video of multiple click events, It also include the corresponding buffered video of multiple long-pressing events.At this point, the optional one or more click events of user are corresponding Buffered video is synthesized, and also be can choose the corresponding buffered video of one or more long-pressing events and is synthesized, can be with Simultaneous selection clicks the corresponding buffered video of event and the corresponding buffered video of long-pressing event is synthesized.If user selects Buffered video in include the corresponding buffered video of long-pressing event, then need to carry out division processing.With duration in step S240 For the corresponding buffered video of 9.6 seconds long-pressing events, preset first shooting duration of video is 1.5 seconds, then to above-mentioned 9.6 seconds Video division processing was carried out with 1.5 seconds division time quantums, a length of 1.5 seconds when which is successively divided into, 1.5 seconds, 1.5 seconds, 1.5 seconds, 1.5 seconds, 1.5 seconds and 0.6 second 6 video clips.Since the duration of the last one video clip is only 0.6 Second, and preset third time threshold is the half of preset first time threshold, i.e. third time threshold is preset as 0.75 second, Therefore the duration of the last one video clip is less than preset third time threshold, is at this time combined to the last one video clip In its previous video segment, therefore the 5th video clip becomes the last one video clip, and Shi Changwei 2.1 seconds.User is at this time The corresponding buffered video of 1 1.5 seconds click event has first been selected, has selected above-mentioned 9.6 seconds long-pressing events corresponding afterwards Buffered video, preparation synthesize this 2 videos.In actual treatment, for the synthesis and later period upload convenient for video, meeting New video duration after synthesis is limited, this limitation is realized by the quantity of video clip.Due to clicking thing A length of preset first shooting duration of video when the corresponding buffered video of part, i.e., 1.5 seconds, and the corresponding buffered video of long-pressing event The video clip divided is also preset first shooting duration of video, i.e., 1.5 seconds except the last one, can will click on event pair The buffered video answered is considered as 1 video clip in the corresponding buffered video of long-pressing event, then above-mentioned 2 buffered videos In video clip total 7, and the sum of video clip is to be limited to no more than 9, therefore can be to this 2 buffered videos Synthesized to generate new video, new video when it is 11.1 seconds a length of.It further, may include when shooting in the video of caching The metadata such as geographical location, date, to generate post-processing when new video.Key code is as follows:
Meanwhile label processing can be carried out to the object in the new video of generation, to being tagged when labelling The object in region is tracked, so that label can be moved with the movement of object, promotes the ornamental value and shooting process of video Interest.The corresponding buffered video of click event has only been selected for user and has only selected long-pressing event is corresponding to cache The synthesis process of video with it is like above, do not repeated herein.
Fig. 3 shows the schematic diagram of video-generating device 300 according to an embodiment of the invention.The device includes: to clap It takes the photograph module 310, respond module 320, cache module 330, obtain module 340 and generation module 350.Video-generating device 300 is also Including first judgment module, the second judgment module and division module (being not shown in figure), first judgment module is located at shooting mould Between block 310 and respond module 320, the second judgment module, which is located at, to be obtained between module 340 and generation module 350, division module Between the second judgment module and generation module 350.
Shooting module 310 is suitable for starting camera and starts to shoot video.In the present embodiment, the frame per second of video capture is 30fps。
Respond module 320 is adapted to respond to user to the action event of shooting button.
First judgment module is suitable for judging that user is click event or long-pressing event to the action event of shooting button, into One step is suitable for obtaining user to the duration of the action event of shooting button, when duration is not more than preset first time When threshold value, judge that action event for click event, when duration is greater than preset first time threshold, judges action event For long-pressing event.In the present embodiment, first time threshold is preset as 0.75 second, if user is to the action event of shooting button Duration is not more than 0.75 second, then judges action event currently to be responded as click event, if user is to shooting button The duration of action event is greater than 0.75 second, then judges action event currently to be responded as long-pressing event.
Cache module 330 is suitable for when action event is click event, as time to count at the time of to respond click event Point, video captured in preset first shooting duration of video by pre- shooting duration of video before time to count point and later cache, When action event is long-pressing event, as time to count point at the time of to respond long-pressing event, clapped pre- before time to count point Video captured in duration and later the second shooting duration of video is taken the photograph to be cached.Cache module 330 is further adapted for when operation thing When part is long-pressing event, judge whether the second shooting duration of video is greater than preset second time threshold, when the second shooting duration of video is greater than When preset second time threshold, view captured in second time threshold by pre- shooting duration of video before time to count point and later Frequency is cached, when the second shooting duration of video is not more than preset second time threshold, when by shooting in advance before time to count point Video long and captured in the second shooting duration of video later is cached.Wherein, the second shooting duration of video is continuing for long-pressing event Duration.In the present embodiment, pre- shooting duration of video is 0.5 second, and the first shooting duration of video is preset as 1 second, and second time threshold is preset as 11.5 seconds.When action event be click event when, as time to count point at the time of to respond click event, by time to count point it Captured video is cached in first 0.5 second and 1 second later, then the duration for clicking the corresponding buffered video of event is total 1.5 the second.When action event is long-pressing event, first determine whether the second shooting duration of video is greater than 11.5 seconds, to respond long-pressing thing It is time to count point at the time of part, if the second shooting duration of video is greater than 11.5 seconds, by 1.5 seconds before time to count point and later Captured video is cached in 11.5 seconds, and the duration of the corresponding buffered video of long-pressing event is 12 seconds total, actually For the corresponding buffered video of long-pressing event, longest duration is 12 seconds.If the second shooting duration of video is not more than 11.5 seconds, Then video captured in the second shooting duration of video by 0.5 second before time to count point and later caches.
It obtains module 340 and is suitable for obtaining selection of the user to buffered video.In the present embodiment, the video of caching is deposited It is stored among photograph album, when obtaining the video cached that user chooses in photograph album, the successive suitable of selection can be recorded simultaneously Sequence, and the change or exchange of sequence can be carried out.
Second judgment module is suitable for judging in the buffered video of user's selection being cached with the presence or absence of response long-pressing event Video.
Division module is suitable for when there is the video that response long-pressing event is cached in the buffered video that user selects, with Preset first shooting duration of video is to divide time quantum, the video of caching is in turn divided into multiple video clips, when last When the duration of a video clip is not more than preset third time threshold, the last one video clip is combined to its previous view In frequency segment.Wherein, preset third time threshold is the half of preset first time threshold.In the present embodiment, user The shooting of a length of 9.6 seconds videos and caching when completing 1 by long-pressing shooting button, then to above-mentioned 9.6 seconds videos with 1.5 seconds division time quantums carry out division processing, a length of 1.5 seconds, 1.5 seconds, 1.5 seconds, 1.5 when which is successively divided into 6 video clips of second, 1.5 seconds, 1.5 seconds and 0.6 second.Since the duration of the last one video clip is only 0.6 second, and preset Third time threshold be preset first time threshold half, i.e. third time threshold is preset as 0.75 second, therefore last The duration of one video clip is less than preset third time threshold, and it is previous that the last one video clip is combined to its at this time In video clip, therefore the 5th video clip becomes the last one video clip, and Shi Changwei 2.1 seconds.
Generation module 350 is suitable for synthesizing buffered video according to the sequencing of selection, to generate new video. In the present embodiment, user has first selected the corresponding buffered video of 1 1.5 seconds click event at this time, has selected afterwards above-mentioned The corresponding buffered video of 9.6 seconds long-pressing events, preparation synthesize this 2 videos.In actual treatment, for convenient for view The synthesis of frequency and later period upload, and can limit the new video duration after synthesis, this limitation is the number by video clip It measures to realize.A length of preset first shooting duration of video when buffered video corresponding due to click event, i.e., 1.5 seconds, and grow The video clip divided by the corresponding buffered video of event is also preset first shooting duration of video except the last one, I.e. 1.5 seconds, 1 piece of video that the corresponding buffered video of event is considered as in the corresponding buffered video of long-pressing event can be will click on Section, then above-mentioned 2 the video clip in buffered video it is 7 total, and the sum of video clip is to be limited to no more than 9, Therefore can to this 2 buffered video synthesized to generate new video, new video when it is 11.1 seconds a length of.
About specific steps and embodiment that video generates, it has been disclosed in detail in the description based on Fig. 2, herein not It repeats again.
In video generation method common now, the overwhelming majority be need user to the shooting in interface of mobile terminal by Button carries out Continued depression to shoot and generate video, causes the video time obtained longer without just post-processing, and be difficult to User is set to experience interest in shooting process.The technical solution that video according to an embodiment of the present invention generates, starts first Camera starts to shoot video, and response user is click event or long-pressing to action event to the action event of shooting button Event both of these case takes different caching process, is synthesized according to selecting sequence of the user to buffered video to generate New video.In the above-mentioned technical solutions, to the event of click and both different types of action events progress areas of long-pressing event Other places reason, when video captured by cache responses action event, take duration control, avoid generating prolonged view Frequency band carrys out the processing problem in later period synthesis, simultaneously because video capture can be realized by clicking shooting button, can not have to hold Continuous pressing greatly improves the use interest and personal experience's degree of user to liberate finger.
B10. the device as described in B9 further includes first judgment module, suitable for judging user to the operation thing of shooting button Part is click event or long-pressing event.
B11. the device as described in B10, the first judgment module are further adapted for:
User is obtained to the duration of the action event of shooting button;
When the duration is not more than preset first time threshold, judge the action event for click event;
When the duration is greater than preset first time threshold, judge the action event for long-pressing event.
B12. the device as described in B9, second shooting duration of video are the duration of the long-pressing event.
B13. device, the cache module are further adapted for as described in B12:
When the action event is long-pressing event, judge whether second shooting duration of video is greater than preset second time Threshold value;
When second shooting duration of video is greater than preset second time threshold, by shooting pre- before the time to count point Captured video is cached in duration and later second time threshold;
When second shooting duration of video is not more than preset second time threshold, clapped pre- before the time to count point Video captured in duration and later the second shooting duration of video is taken the photograph to be cached.
B14. the device as described in B9 further includes the second judgment module, in the buffered video suitable for judging user's selection The video cached with the presence or absence of the response long-pressing event.
B15. the device as described in B14 further includes division module, is suitable for:
When exist in the buffered video of user's selection respond video that the long-pressing event is cached when, with preset the One shooting duration of video is to divide time quantum, and the video of the caching is in turn divided into multiple video clips;
When the duration of the last one video clip is not more than preset third time threshold, by the last one video clip It is combined in its previous video segment.
B16. the device as described in B15, the preset third time threshold are the half of preset first time threshold.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, knot is not been shown in detail Structure and technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims than feature more features expressly recited in each claim.More precisely, as following As claims reflect, inventive aspect is all features less than single embodiment disclosed above.Therefore, it abides by Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself As a separate embodiment of the present invention.
Those skilled in the art should understand that the module of the equipment in example disclosed herein or unit or groups Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in the example In different one or more equipment.Module in aforementioned exemplary can be combined into a module or furthermore be segmented into multiple Submodule.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
In addition, be described as herein can be by the processor of computer system or by executing by some in the embodiment The combination of method or method element that other devices of the function are implemented.Therefore, have for implementing the method or method The processor of the necessary instruction of element forms the device for implementing this method or method element.In addition, Installation practice Element described in this is the example of following device: the device be used for implement as in order to implement the purpose of the invention element performed by Function.
As used in this, unless specifically stated, come using ordinal number " first ", " second ", " third " etc. Description plain objects, which are merely representative of, is related to the different instances of similar object, and is not intended to imply that the object being described in this way must Must have the time it is upper, spatially, sequence aspect or given sequence in any other manner.
Although the embodiment according to limited quantity describes the present invention, above description, the art are benefited from It is interior it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that Language used in this specification primarily to readable and introduction purpose and select, rather than in order to explain or limit Determine subject of the present invention and selects.Therefore, without departing from the scope and spirit of the appended claims, for this Many modifications and changes are obvious for the those of ordinary skill of technical field.For the scope of the present invention, to this Invent done disclosure be it is illustrative and not restrictive, it is intended that the scope of the present invention be defined by the claims appended hereto.

Claims (10)

1. a kind of video generation method, suitable for executing in the terminal, which comprises
Starting camera starts to shoot video;
User is responded to the action event of shooting button;
If the action event is click event, as time to count point at the time of to respond the click event, described will rise Pre- shooting duration of video and video captured in preset first shooting duration of video later are cached before evaluation time point;
If the action event is long-pressing event, as time to count point at the time of to respond the long-pressing event, described will rise Pre- shooting duration of video and video captured in the second shooting duration of video later are cached before evaluation time point;
Obtain selection of the user to buffered video;
The buffered video is synthesized according to the sequencing of selection, to generate new video.
2. the method as described in claim 1, further includes:
Judge that user is click event or long-pressing event to the action event of shooting button.
3. method according to claim 2, the judgement user is click event or length to the action event of shooting button Include: by event
User is obtained to the duration of the action event of shooting button;
If the duration is not more than preset first time threshold, judge the action event for click event;
If the duration is greater than preset first time threshold, judge the action event for long-pressing event.
4. the method as described in claim 1, second shooting duration of video is the duration of the long-pressing event.
It is described by pre- shooting duration of video before the time to count point and the second shooting later 5. method as claimed in claim 4 Captured video, which cache, in duration includes:
Judge whether second shooting duration of video is greater than preset second time threshold;
If second shooting duration of video is greater than preset second time threshold, when by being shot in advance before the time to count point Video long and captured in second time threshold later is cached;
If second shooting duration of video is not more than preset second time threshold, by shooting pre- before the time to count point Captured video is cached in duration and later the second shooting duration of video.
6. the method as described in claim 1, further includes: judge in the buffered video of user's selection with the presence or absence of described in response The video that long-pressing event is cached.
7. method as claimed in claim 6, further includes:
The video that the long-pressing event is cached is responded if existing in the buffered video of user's selection, with preset first count A length of division time quantum when taking the photograph, is in turn divided into multiple video clips for the video of the caching;
If the duration of the last one video clip is not more than preset third time threshold, combine the last one video clip Into its previous video segment.
8. the method for claim 7, the preset third time threshold is the half of preset first time threshold.
9. a kind of video-generating device is suitable for being resident in the terminal, described device includes:
Shooting module starts to shoot video suitable for starting camera;
Respond module is adapted to respond to user to the action event of shooting button;
Cache module is suitable for when the action event is click event, when at the time of responding the click event to start Between point, video captured in preset first shooting duration of video carries out by pre- shooting duration of video before the time to count point and later Caching, as time to count point at the time of to respond the long-pressing event, described will rise when the action event is long-pressing event Pre- shooting duration of video and video captured in the second shooting duration of video later are cached before evaluation time point;
Module is obtained, suitable for obtaining selection of the user to buffered video;
Generation module synthesizes the buffered video suitable for the sequencing according to selection, to generate new video.
10. a kind of mobile terminal, including video-generating device as claimed in claim 9.
CN201910270430.8A 2016-08-11 2016-08-11 Video generation method and device and mobile terminal Active CN109981988B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910270430.8A CN109981988B (en) 2016-08-11 2016-08-11 Video generation method and device and mobile terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910270430.8A CN109981988B (en) 2016-08-11 2016-08-11 Video generation method and device and mobile terminal
CN201610658197.7A CN106210541B (en) 2016-08-11 2016-08-11 A kind of video generation method, device and mobile terminal

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201610658197.7A Division CN106210541B (en) 2016-08-11 2016-08-11 A kind of video generation method, device and mobile terminal

Publications (2)

Publication Number Publication Date
CN109981988A true CN109981988A (en) 2019-07-05
CN109981988B CN109981988B (en) 2021-09-14

Family

ID=57515075

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201610658197.7A Expired - Fee Related CN106210541B (en) 2016-08-11 2016-08-11 A kind of video generation method, device and mobile terminal
CN201910270430.8A Active CN109981988B (en) 2016-08-11 2016-08-11 Video generation method and device and mobile terminal

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201610658197.7A Expired - Fee Related CN106210541B (en) 2016-08-11 2016-08-11 A kind of video generation method, device and mobile terminal

Country Status (1)

Country Link
CN (2) CN106210541B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110086905B (en) * 2018-03-26 2020-08-21 华为技术有限公司 Video recording method and electronic equipment
EP3764632B1 (en) * 2018-03-26 2023-02-22 Huawei Technologies Co., Ltd. Method and electronic device for video recording
CN110324552A (en) * 2018-03-29 2019-10-11 沈阳美行科技有限公司 Grasping means, grasp shoot method, relevant apparatus equipment and the system of audio, video data
CN108322659B (en) * 2018-03-30 2021-05-28 维沃移动通信有限公司 Shooting method and mobile terminal

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103152654A (en) * 2013-03-15 2013-06-12 杭州智屏软件有限公司 Low-latency video fragment interception technology
CN103647991A (en) * 2013-12-23 2014-03-19 乐视致新电子科技(天津)有限公司 Method and system for sharing video in intelligent television
CN104125388A (en) * 2013-04-25 2014-10-29 广州华多网络科技有限公司 Method for shooting and storing photos and device thereof
CN104796602A (en) * 2015-03-23 2015-07-22 北京畅游天下网络技术有限公司 Method and device for combination of video files
WO2015143841A1 (en) * 2014-03-24 2015-10-01 努比亚技术有限公司 Mobile terminal and shooting method thereof
CN105187713A (en) * 2015-08-03 2015-12-23 厦门美图之家科技有限公司 Shooting startup method and device synchronously supporting picture taking and video recording and shooting terminal
CN105704387A (en) * 2016-04-05 2016-06-22 广东欧珀移动通信有限公司 Shooting method and device of intelligent terminal and intelligent terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009100192A (en) * 2007-10-16 2009-05-07 Fuji Xerox Co Ltd Information processing apparatus, storing method, and program
CN103546698B (en) * 2013-10-31 2016-08-17 广东欧珀移动通信有限公司 A kind of mobile terminal recorded video store method and device
CN103795923A (en) * 2014-01-27 2014-05-14 北京飞流九天科技有限公司 Shooting control method of camera shooting device and camera shooting device
CN105338259B (en) * 2014-06-26 2020-06-02 北京新媒传信科技有限公司 Method and device for synthesizing video
CN105493512B (en) * 2014-12-14 2018-07-06 深圳市大疆创新科技有限公司 A kind of method for processing video frequency, video process apparatus and display device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103152654A (en) * 2013-03-15 2013-06-12 杭州智屏软件有限公司 Low-latency video fragment interception technology
CN104125388A (en) * 2013-04-25 2014-10-29 广州华多网络科技有限公司 Method for shooting and storing photos and device thereof
CN103647991A (en) * 2013-12-23 2014-03-19 乐视致新电子科技(天津)有限公司 Method and system for sharing video in intelligent television
WO2015143841A1 (en) * 2014-03-24 2015-10-01 努比亚技术有限公司 Mobile terminal and shooting method thereof
CN104796602A (en) * 2015-03-23 2015-07-22 北京畅游天下网络技术有限公司 Method and device for combination of video files
CN105187713A (en) * 2015-08-03 2015-12-23 厦门美图之家科技有限公司 Shooting startup method and device synchronously supporting picture taking and video recording and shooting terminal
CN105704387A (en) * 2016-04-05 2016-06-22 广东欧珀移动通信有限公司 Shooting method and device of intelligent terminal and intelligent terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
林雪莲: "视频文件的拆分和合并", 《电子与电脑》 *

Also Published As

Publication number Publication date
CN109981988B (en) 2021-09-14
CN106210541B (en) 2019-05-14
CN106210541A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN106210541B (en) A kind of video generation method, device and mobile terminal
US9681186B2 (en) Method, apparatus and computer program product for gathering and presenting emotional response to an event
CN105630686B (en) A kind of application traversal test method, equipment and mobile terminal
CN107925738B (en) Method and electronic device for providing image
JP6924901B2 (en) Photography method and electronic equipment
KR20160108928A (en) Electronic Device Including The Camera Module And Method For Processing Image Of the Same
CN106303156B (en) To the method, device and mobile terminal of video denoising
WO2021169720A1 (en) Content operation method and device, terminal, and storage medium
CN110268707A (en) Sensor and its control method used to capture images
CN112770059B (en) Photographing method and device and electronic equipment
CN108900771A (en) A kind of method for processing video frequency, device, terminal device and storage medium
CN109218614A (en) A kind of automatic photographing method and mobile terminal of mobile terminal
CN107870999B (en) Multimedia playing method, device, storage medium and electronic equipment
US9992443B2 (en) System and methods for time lapse video acquisition and compression
CN105391940B (en) A kind of image recommendation method and device
JP2013532323A (en) Ranking key video frames based on camera position
CN106879263A (en) A kind of image pickup method and mobile device
CN105072347A (en) Method for taking panoramic photos, mobile terminal and corollary equipment
CN109672908A (en) A kind of method for protecting privacy, device and mobile terminal
CN111669495B (en) Photographing method, photographing device and electronic equipment
CN110913138B (en) Continuous shooting method, device, terminal and computer readable storage medium
CN105704387A (en) Shooting method and device of intelligent terminal and intelligent terminal
CN104834699B (en) The method, apparatus and mobile terminal of photo are deleted based on use state
CN108184056B (en) Snapshot method and terminal equipment
JP7058309B2 (en) Imaging method, imaging device and storage medium

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