CN109981988B - Video generation method and device and mobile terminal - Google Patents

Video generation method and device and mobile terminal Download PDF

Info

Publication number
CN109981988B
CN109981988B CN201910270430.8A CN201910270430A CN109981988B CN 109981988 B CN109981988 B CN 109981988B CN 201910270430 A CN201910270430 A CN 201910270430A CN 109981988 B CN109981988 B CN 109981988B
Authority
CN
China
Prior art keywords
shooting
event
video
time
preset
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.)
Active
Application number
CN201910270430.8A
Other languages
Chinese (zh)
Other versions
CN109981988A (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

Images

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

Abstract

The invention discloses a video generation method, a video generation device and a mobile terminal, wherein the method is suitable for being executed in the mobile terminal and comprises the following steps: starting a camera to start shooting a video; responding to an operation event of a user on a shooting button; if the operation event is a click event, caching videos shot in a pre-shooting time before and a first shooting time preset after the start time by taking the moment responding to the click event as a start time point; if the operation event is a long press event, caching videos shot in a pre-shooting time length before the starting time point and a second shooting time length after the starting time point by taking the time responding to the long press event as the starting time point; obtaining the selection of a user on a cached video; and synthesizing the cached videos according to the selected sequence to generate a new video.

Description

Video generation method and device and mobile terminal
The invention is a divisional application of invention patent 201610658197.7 filed on 8/11/2016.
Technical Field
The invention relates to the technical field of internet, in particular to a video generation method and device and a mobile terminal.
Background
With the continuous development of the internet technology, the use mode of the internet by a user is gradually changed from downloading to downloading and uploading, and the user can shoot and generate videos by using a camera of the mobile terminal in mobile terminals such as smart phones, tablet computers and smart cameras, and then uploads the videos to a network platform to be shared by others.
In most of the conventional video generation methods, a user is required to continuously press a shooting button in a mobile terminal interface, shooting of a video is performed while the pressed state is maintained, and after the user releases the pressing of the shooting button, shooting is suspended and the video is generated. However, the shooting button is pressed for a long time to record the video, the obtained video generally has a long time and contains more data, and is inconvenient to process in the later synthesis, and the shooting interest of the user is difficult to be aroused by the conventional pressing operation, so that the user experience cannot be improved. Therefore, a new technical solution for video generation needs to be provided, so as to solve the above problems in a targeted manner.
Disclosure of Invention
To this end, the present invention provides a solution for video generation in an attempt to solve or at least alleviate the above-presented problems.
According to an aspect of the present invention, there is provided a video generating method adapted to be executed in a mobile terminal, the method comprising the steps of: firstly, starting a camera to start shooting a video; responding to an operation event of a user on a shooting button; if the operation event is a click event, caching videos shot in a pre-shooting time before and a first shooting time preset after the start time by taking the moment responding to the click event as a start time point; if the operation event is a long press event, caching videos shot in a pre-shooting time length before the starting time point and a second shooting time length after the starting time point by taking the time responding to the long press event as the starting time point; obtaining the selection of a user on a cached video; and synthesizing the cached videos according to the selected sequence to generate a new video.
Optionally, in the video generating method according to the present invention, the method further includes: and judging whether the operation event of the shooting button by the user is a click event or a long-time press event.
Optionally, in the video generating method according to the present invention, the determining whether the operation event of the shooting button by the user is a click event or a long-press event includes: acquiring the duration of an operation event of a shooting button by a user; if the duration is not greater than a preset first time threshold, judging that the operation event is a click event; and if the duration is greater than a preset first time threshold, judging that the operation event is a long-press event.
Optionally, in the video generating method according to the present invention, the second shooting duration is a duration of the long press event.
Optionally, in the video generating method according to the present invention, caching videos captured in a pre-capturing period before the starting time point and a second capturing period after the starting time point includes: judging whether the second shooting time length is greater than a preset second time threshold value or not; if the second shooting time length is larger than a preset second time threshold, caching videos shot in the preset shooting time length before and the second time threshold after the starting time point; and if the second shooting time length is not more than a preset second time threshold, caching the videos shot in the pre-shooting time length before the starting time point and the second shooting time length after the starting time point.
Optionally, in the video generating method according to the present invention, the method further includes: and judging whether the cached video responding to the long-press event exists in the cached video selected by the user.
Optionally, in the video generating method according to the present invention, the method further includes: if the cached videos selected by the user and responding to the long press event exist, sequentially dividing the cached videos into a plurality of video segments by taking a preset first shooting time as a dividing time unit; and if the duration of the last video clip is not greater than the preset third time threshold, combining the last video clip into the previous video clip.
Optionally, in the video generating method according to the present invention, the preset third time threshold is half of the preset first time threshold.
According to yet another aspect of the present invention, there is provided a video generating apparatus adapted to reside in a mobile terminal, the apparatus comprising a capturing module, a responding module, a caching module, an obtaining module, and a generating module. The shooting module is suitable for starting the camera to start shooting videos; the response module is suitable for responding to the operation event of the user to the shooting button; the caching module is suitable for caching videos shot in a pre-shooting time period before and a first shooting time period preset after the starting time point by taking the moment responding to the click event as the starting time point when the operation event is the click event, and caching videos shot in a pre-shooting time period before and a second shooting time period after the starting time point by taking the moment responding to the long-press event as the starting time point when the operation event is the long-press event; the acquisition module is suitable for acquiring the selection of the user on the cached video; the generation module is suitable for synthesizing the cached videos according to the selected sequence to generate a new video.
Optionally, in the video generating apparatus according to the present invention, a first determining module is further included, which is adapted to determine whether an operation event of the shooting button by the user is a click event or a long-press event.
Optionally, in the video generating apparatus according to the present invention, the first judging module is further adapted to: acquiring the duration of an operation event of a shooting button by a user; when the duration is not greater than a preset first time threshold, judging that the operation event is a click event; and when the duration is greater than a preset first time threshold, judging that the operation event is a long-press event.
Optionally, in the video generating apparatus according to the present invention, the second shooting duration is a duration of the long press event.
Optionally, in the video generating apparatus according to the present invention, the caching module is further adapted to: when the operation event is a long-time pressing event, judging whether the second shooting duration is greater than a preset second time threshold value; when the second shooting time length is larger than a preset second time threshold, caching videos shot in the preset shooting time length before the starting time point and the second time threshold after the starting time point; and when the second shooting duration is not greater than a preset second time threshold, caching videos shot in the pre-shooting duration before the starting time point and the second shooting duration after the starting time point.
Optionally, in the video generating apparatus according to the present invention, a second determining module is further included, which is adapted to determine whether there is a video cached in response to the long press event in the cached videos selected by the user.
Optionally, in the video generating apparatus according to the present invention, further comprising a dividing module adapted to:
when the cached video responding to the long press event exists in the cached video selected by the user, sequentially dividing the cached video into a plurality of video segments by taking a preset first shooting time as a dividing time unit; and when the time length of the last video clip is not more than a preset third time threshold, combining the last video clip into the previous video clip.
Optionally, in the video generating apparatus according to the present invention, the preset third time threshold is half of the preset first time threshold.
According to still another aspect of the present invention, there is also provided a mobile terminal including the video generating apparatus according to the present invention.
According to the technical scheme of the video generation, a camera is started to start to shoot the video, different caching processes are adopted for two situations of the operation event being a click event or a long-time press event in response to the operation event of a shooting button of a user, and the two situations are synthesized according to the selection sequence of the cached video by the user to generate a new video. In the technical scheme, the two different types of operation events, namely the click event and the long-press event, are processed in a distinguishing manner, time length control is adopted when the videos shot by the operation events are cached and responded, the problem of processing in post synthesis caused by the fact that the videos are too long in time is solved, meanwhile, as the shooting button is clicked to achieve video shooting, fingers are not required to be pressed continuously, and the use interest and the personal experience of a user are greatly improved.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of a mobile terminal 100 according to one embodiment of the invention;
FIG. 2 shows a flow diagram of a video generation method 200 according to one embodiment of the invention; and
fig. 3 shows a schematic diagram of a video generation apparatus 300 according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a block diagram of a mobile terminal 100. The mobile terminal 100 may include a memory interface 102, one or more data processors, image processors and/or central processing units 104, and a peripheral interface 106.
The memory interface 102, the one or more processors 104, and/or the peripherals interface 106 can be discrete components or can be integrated in one or more integrated circuits. In the mobile terminal 100, the various elements may be coupled by one or more communication buses or signal lines. Sensors, devices, and subsystems can be coupled to peripheral interface 106 to facilitate a variety of functions.
For example, a motion sensor 110, a light sensor 112, and a distance sensor 114 may be coupled to the peripheral interface 106 to facilitate directional, lighting, and ranging functions. Other sensors 116 may also be coupled to the peripheral interface 106, such as a positioning system (e.g., a GPS receiver), a temperature sensor, a biometric sensor, or other sensing device, to facilitate related functions.
The camera subsystem 120 and optical sensor 122, which may be, for example, a Charge Coupled Device (CCD) or a complementary metal oxide semiconductor (centimeter OS) optical sensor, may be used to facilitate implementation of camera functions such as recording photographs and video clips. Communication functions may be facilitated by one or more wireless communication subsystems 124, which may include radio frequency receivers and transmitters and/or optical (e.g., infrared) receivers and transmitters. The particular design and implementation of the wireless communication subsystem 124 may depend on the one or more communication networks supported by the mobile terminal 100. For example, the mobile terminal 100 may include a network designed to support LTE, 3G, GSM networks, GPRS networks, EDGE networks, Wi-Fi or WiMax networks, and BluetoothTMA communication subsystem 124 of the network.
The audio subsystem 126 may be coupled to a speaker 128 and a microphone 130 to facilitate voice-enabled functions, such as voice recognition, voice replication, digital recording, and telephony functions. The I/O subsystem 140 may include a touch screen controller 142 and/or one or more other input controllers 144. The touch screen controller 142 may be coupled to a touch screen 146. For example, the touch screen 146 and touch screen controller 142 may detect contact and movement or pauses made therewith using any of a variety of touch sensing technologies, including but not limited to capacitive, resistive, infrared, and surface acoustic wave technologies. One or more other input controllers 144 may be coupled to other input/control devices 148 such as one or more buttons, rocker switches, thumbwheels, infrared ports, USB ports, and/or pointing devices such as styluses. The one or more buttons (not shown) may include up/down buttons for controlling the volume of the speaker 128 and/or microphone 130.
The memory interface 102 may be coupled with a memory 150. The memory 150 may include high speed random access memory and/or non-volatile memory, such as one or more magnetic disk storage devices, one or more optical storage devices, and/or flash memory (e.g., NAND, NOR). The memory 150 may store an operating system 172, such as an operating system like Android, iOS or Windows Phone. The operating system 172 may include instructions for handling basic system services and for performing hardware dependent tasks. The memory 150 may also store applications 174. While the mobile device is running, the operating system 172 is loaded from the memory 150 and executed by the processor 104. The application 174, when running, is also loaded from the memory 150 and executed by the processor 104. The applications 174 run on top of the operating system and utilize the interfaces provided by the operating system and the underlying hardware to implement various user-desired functions, such as instant messaging, web browsing, picture management, and the like. The application 174 may be provided independent of the operating system or may be self-contained. In addition, a driver module may also be added to the operating system when the application 174 is installed in the mobile terminal 100. Among the various applications 174 described above, one of them is a video generating apparatus 300 according to the present invention.
Fig. 2 shows a flow diagram of a video generation method 200 according to one embodiment of the invention. The video generation method 200 is suitable for execution in a mobile terminal, such as the mobile terminal 100 shown in fig. 1.
As shown in fig. 2, the method 200 begins at step S210. In step S210, the camera is activated to start capturing a video. In the present embodiment, the frame rate of video shooting is 30fps, where the frame rate is a measure for measuring the number of display Frames, measured in Frames per Second (Frames per Second).
Subsequently, the process proceeds to step S220, in response to an operation event of the shooting button by the user. And after the mobile terminal receives the operation event of the shooting button by the user, judging whether the operation event is a click event or a long-time press event before responding to the operation event. Specifically, the duration of an operation event of the shooting button by the user is obtained, if the duration is not greater than a preset first time threshold, the operation event is judged to be a click event, and if the duration is greater than the preset first time threshold, the operation event is judged to be a long-time press event. In this embodiment, the first time threshold is preset to be 0.75 seconds, if the duration of the operation event of the shooting button by the user is not greater than 0.75 seconds, it is determined that the current operation event to be responded is a click event, and if the duration of the operation event of the shooting button by the user is greater than 0.75 seconds, it is determined that the current operation event to be responded is a long-time click event. At this time, the duration of the acquired operation event is 0.5 second, and the operation event is determined to be a click event.
In step S230, if the operation event is a click event, the video captured within the pre-capture duration before and the first capture duration after the start time point is cached by using the time responding to the click event as the start time point. In this embodiment, the pre-shooting duration is 0.5 second, the first shooting duration is preset to 1 second, and by taking the time of the response click event as the starting time point, videos shot within 0.5 second before and 1 second after the starting time point are cached, and then the duration of the cached video corresponding to the click event is 1.5 seconds in total. In other words, when the user enters the shooting interface, the camera is automatically opened and kept in the state immediately, so that the video shooting is actually carried out before the click event is responded, only the video is temporarily not cached, and when the click event of the user to the shooting button is received and the response is ready, the video within 0.5 second before the moment of responding to the click event is taken as the content shot in advance and the video within 1 second after the moment of responding to the click event is cached. Meanwhile, for the cached video obtained in response to the click event, the cached video can be represented in a form of a dynamic picture in order to be displayed to the user. For the video cached in response to the click event, frame fetching is performed first, that is, the image frames in the video conforming to the frame fetching time point are fetched according to the frame rate and the frame fetching time point, and then are combined into the dynamic picture according to the chronological order. Taking a cached video corresponding to a click event with the duration of 1.5 seconds as an example, taking out image frames at 0.5 second, 0.6 second, 0.7 second, 0.8 second and 0.9 second, wherein the video at 1.5 second comprises 45 frames of images because the frame rate is 30fps, so the frame numbers corresponding to the above-mentioned frame taking time points are the 15 th frame, the 18 th frame, the 21 st frame, the 24 th frame and the 27 th frame in sequence, and combining the 5 frames of images according to the chronological order to obtain a dynamic picture for showing to a user.
In step S240, if the operation event is a long press event, the videos captured in the pre-capture period before the starting time point and the second capture period after the starting time point are cached with the time responding to the long press event as the starting time point. Firstly, judging whether the second shooting time length is greater than a preset second time threshold value, caching videos shot in the preset shooting time length before and after the starting time point if the second shooting time length is greater than the preset second time threshold value, and caching videos shot in the preset shooting time length before and after the starting time point if the second shooting time length is not greater than the preset second time threshold value. And the second shooting duration is the duration of the long-press event. In the present embodiment, the second time threshold is preset to 11.5 seconds. At this time, the user operates the shooting button again, and the mobile terminal responds after judging that the operation event is a long-press event. Firstly, judging whether the second shooting time length is more than 11.5 seconds or not, taking the time responding to the long press event as a starting time point, if the second shooting time length is more than 11.5 seconds, caching videos shot in 1.5 seconds before and 11.5 seconds after the starting time point, wherein the time length of the cached videos corresponding to the long press event is 12 seconds in total, and actually, the longest time length of the cached videos corresponding to the long press event is 12 seconds. And if the second shooting time length is not more than 11.5 seconds, caching the videos shot in the second shooting time length 0.5 seconds before and after the starting time point. In this embodiment, the second shooting time is 9.1 seconds and is not greater than the preset second time threshold value of 11.5 seconds, the videos shot in the time period 1.5 seconds before and 9.1 seconds after the starting time point are cached, and the time period of the cached videos corresponding to the event is 9.6 seconds. The key code is as follows:
Figure BDA0002018207770000081
Figure BDA0002018207770000091
in step S250, the user' S selection of the cached video is obtained. In this embodiment, the cached videos are all stored in the album, and when the cached videos selected by the user in the album are acquired, the selected sequence is recorded at the same time, and the sequence can be changed or exchanged.
In step S260, the cached videos are synthesized according to the selected sequence to generate a new video. Before video synthesis, whether the cached video responding to the long press event exists in the cached video selected by the user needs to be judged. If the cached videos selected by the user have videos cached in response to the long press event, sequentially dividing the cached videos into a plurality of video segments by taking a preset first shooting duration as a dividing time unit; and if the duration of the last video clip is not greater than the preset third time threshold, combining the last video clip into the previous video clip. And the preset third time threshold is half of the preset first time threshold. In this embodiment, after the user performs multiple operations on the shooting key, multiple videos have been cached in the album, where the videos include cached videos corresponding to multiple click events and cached videos corresponding to multiple long-press events. At this time, the user may select one or more cached videos corresponding to the click event to be synthesized, may select one or more cached videos corresponding to the long press event to be synthesized, and may select the cached video corresponding to the click event and the cached video corresponding to the long press event to be synthesized at the same time. If the cached video selected by the user comprises the cached video corresponding to the long press event, the division processing is required. Taking the buffered video corresponding to the long press event with the duration of 9.6 seconds in step S240 as an example, and the preset first shooting duration is 1.5 seconds, the video with the duration of 9.6 seconds is divided into 1.5 second divided time units, and the video is sequentially divided into 6 video segments with the durations of 1.5 seconds, and 0.6 seconds. Since the duration of the last video segment is only 0.6 seconds, and the preset third time threshold is half of the preset first time threshold, that is, the third time threshold is preset to be 0.75 seconds, the duration of the last video segment is less than the preset third time threshold, and the last video segment is combined into the previous video segment, so that the 5 th video segment becomes the last video segment, and the duration is 2.1 seconds. At this time, the user selects 1 cached video corresponding to the 1.5 second click event, and then selects the cached video corresponding to the 9.6 second long press event, in preparation for synthesizing the 2 videos. In actual processing, in order to facilitate the synthesis and the later uploading of the video, the time length of the synthesized new video is limited, and the limitation is realized by the number of video segments. Since the cached video duration corresponding to the click event is the preset first shooting duration, that is, 1.5 seconds, and the video segments obtained by dividing the cached video corresponding to the long-press event except the last one are also the preset first shooting duration, that is, 1.5 seconds, the cached video corresponding to the click event can be regarded as 1 video segment in the cached video corresponding to the long-press event, and then the total number of the video segments is limited to be not more than 9, so that the 2 cached videos can be synthesized to generate a new video, and the duration of the new video is 11.1 seconds. Further, metadata such as the geographic location, date, etc. at the time of capture may be included in the cached video for post-processing when generating a new video. The key code is as follows:
Figure BDA0002018207770000101
Figure BDA0002018207770000111
meanwhile, labeling processing can be carried out on the objects in the generated new video, and the objects in the labeled area are tracked during labeling, so that the labels can move along with the movement of the objects, and the ornamental value of the video and the interestingness of the shooting process are improved. The process of synthesizing the cached video corresponding to the click event and the cached video corresponding to the long press event, which are selected by the user, is similar to the above process, and is not described herein again.
Fig. 3 shows a schematic diagram of a video generation apparatus 300 according to an embodiment of the invention. The device includes: a photographing module 310, a response module 320, a caching module 330, an acquisition module 340, and a generation module 350. The video generating apparatus 300 further includes a first judging module, a second judging module and a dividing module (none of which are shown), wherein the first judging module is located between the photographing module 310 and the responding module 320, the second judging module is located between the acquiring module 340 and the generating module 350, and the dividing module is located between the second judging module and the generating module 350.
The capture module 310 is adapted to activate a camera to start capturing video. In the present embodiment, the frame rate of video shooting is 30 fps.
The response module 320 is adapted to respond to an operation event of the photographing button by the user.
The first judging module is suitable for judging whether the operation event of the shooting button is a click event or a long-time press event, further suitable for obtaining the duration of the operation event of the shooting button, when the duration is not more than a preset first time threshold, the operation event is judged to be the click event, and when the duration is more than the preset first time threshold, the operation event is judged to be the long-time press event. In this embodiment, the first time threshold is preset to be 0.75 seconds, if the duration of the operation event of the shooting button by the user is not greater than 0.75 seconds, it is determined that the current operation event to be responded is a click event, and if the duration of the operation event of the shooting button by the user is greater than 0.75 seconds, it is determined that the current operation event to be responded is a long-time click event.
The caching module 330 is adapted to cache videos captured in a pre-shooting duration before and a first shooting duration preset after the start time point by using the time responding to the click event as the start time point when the operation event is the click event, and cache videos captured in a pre-shooting duration before and a second shooting duration after the start time point by using the time responding to the long-press event as the start time point when the operation event is the long-press event. The caching module 330 is further adapted to determine whether the second shooting duration is greater than a preset second time threshold when the operation event is a long press event, cache videos shot in a preset shooting duration before and after the starting time point when the second shooting duration is greater than the preset second time threshold, and cache videos shot in a preset shooting duration before and after the starting time point when the second shooting duration is not greater than the preset second time threshold. And the second shooting duration is the duration of the long-press event. In the present embodiment, the pre-shooting time period is 0.5 seconds, the first shooting time period is preset to 1 second, and the second time threshold is preset to 11.5 seconds. When the operation event is a click event, the time responding to the click event is taken as a starting time point, videos shot within 0.5 second before and 1 second after the starting time point are cached, and the duration of the cached videos corresponding to the click event is 1.5 seconds in total. When the operation event is a long press event, firstly, whether the second shooting time length is greater than 11.5 seconds is judged, the time responding to the long press event is taken as a starting time point, if the second shooting time length is greater than 11.5 seconds, videos shot in 1.5 seconds before and 11.5 seconds after the starting time point are cached, the time length of the cached video corresponding to the long press event is 12 seconds in total, and actually, the longest time length of the cached video corresponding to the long press event is 12 seconds. And if the second shooting time length is not more than 11.5 seconds, caching the videos shot in the second shooting time length 0.5 seconds before and after the starting time point.
The retrieving module 340 is adapted to retrieve a user selection of a cached video. In this embodiment, the cached videos are all stored in the album, and when the cached videos selected by the user in the album are acquired, the selected sequence is recorded at the same time, and the sequence can be changed or exchanged.
The second judging module is suitable for judging whether the cached video selected by the user exists the video cached in response to the long press event.
The dividing module is suitable for sequentially dividing the cached videos into a plurality of video segments by taking a preset first shooting time length as a dividing time unit when the cached videos responding to the long press event exist in the cached videos selected by the user, and combining the last video segment into the previous video segment when the time length of the last video segment is not more than a preset third time threshold. And the preset third time threshold is half of the preset first time threshold. In this embodiment, when the user completes shooting and buffering 1 video having a duration of 9.6 seconds by long-pressing the shooting button, the 9.6 second video is divided into 1.5 second divided time units, and the video is sequentially divided into 6 video segments having durations of 1.5 seconds, and 0.6 seconds. Since the duration of the last video segment is only 0.6 seconds, and the preset third time threshold is half of the preset first time threshold, that is, the third time threshold is preset to be 0.75 seconds, the duration of the last video segment is less than the preset third time threshold, and the last video segment is combined into the previous video segment, so that the 5 th video segment becomes the last video segment, and the duration is 2.1 seconds.
The generation module 350 is adapted to synthesize the cached videos in the selected order to generate a new video. In this embodiment, the user selects 1 cached video corresponding to the 1.5 second click event, and then selects the cached video corresponding to the 9.6 second long press event, and prepares to synthesize the 2 videos. In actual processing, in order to facilitate the synthesis and the later uploading of the video, the time length of the synthesized new video is limited, and the limitation is realized by the number of video segments. Since the cached video duration corresponding to the click event is the preset first shooting duration, that is, 1.5 seconds, and the video segments obtained by dividing the cached video corresponding to the long-press event except the last one are also the preset first shooting duration, that is, 1.5 seconds, the cached video corresponding to the click event can be regarded as 1 video segment in the cached video corresponding to the long-press event, and then the total number of the video segments is limited to be not more than 9, so that the 2 cached videos can be synthesized to generate a new video, and the duration of the new video is 11.1 seconds.
The specific steps and embodiments of video generation have been disclosed in detail in the description based on fig. 2, and are not described herein again.
In the common video generation methods, most of the video generation methods require a user to continuously press a shooting button in a mobile terminal interface to shoot and generate a video, so that the obtained video is long in time, inconvenient for post-processing, and difficult to make the user feel interesting in the shooting process. According to the technical scheme of the video generation, the camera is started to start to shoot the video, different caching processes are adopted for two situations of the operation event being a click event or a long-time press event in response to the operation event of the shooting button by a user, and the two situations are synthesized according to the selection sequence of the cached video by the user to generate a new video. In the technical scheme, the two different types of operation events, namely the click event and the long-press event, are processed in a distinguishing manner, time length control is adopted when the videos shot by the operation events are cached and responded, the problem of processing in post synthesis caused by the fact that the videos are too long in time is solved, meanwhile, as the shooting button is clicked to achieve video shooting, fingers are not required to be pressed continuously, and the use interest and the personal experience of a user are greatly improved.
B10. The apparatus according to B9, further comprising a first judging module adapted to judge whether the operation event of the shooting button by the user is a click event or a long-press event.
B11. The apparatus of B10, the first determining module further adapted to:
acquiring the duration of an operation event of a shooting button by a user;
when the duration is not greater than a preset first time threshold, judging that the operation event is a click event;
and when the duration is greater than a preset first time threshold, judging that the operation event is a long-press event.
B12. The apparatus of B9, the second photographing time period being a duration of the long press event.
B13. The apparatus of B12, the caching module further adapted to:
when the operation event is a long-time pressing event, judging whether the second shooting duration is greater than a preset second time threshold value;
when the second shooting time length is larger than a preset second time threshold, caching videos shot in the preset shooting time length before the starting time point and the second time threshold after the starting time point;
and when the second shooting duration is not greater than a preset second time threshold, caching videos shot in the pre-shooting duration before the starting time point and the second shooting duration after the starting time point.
B14. The apparatus according to B9, further comprising a second determining module adapted to determine whether there is a video cached in response to the long press event in the cached video selected by the user.
B15. The apparatus of B14, further comprising a partitioning module adapted to:
when the cached video responding to the long press event exists in the cached video selected by the user, sequentially dividing the cached video into a plurality of video segments by taking a preset first shooting time as a dividing time unit;
and when the time length of the last video clip is not more than a preset third time threshold, combining the last video clip into the previous video clip.
B16. The apparatus of B15, wherein the third predetermined time threshold is half of the first predetermined time threshold.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (11)

1. A video generation method adapted to be executed in a mobile terminal, the method comprising:
starting a camera to start shooting a video;
responding to an operation event of a user on a shooting button;
if the operation event is a click event, caching videos shot in a pre-shooting time before and a first shooting time preset after the start time by taking the moment responding to the click event as a start time point;
if the operation event is a long press event, caching videos shot in a pre-shooting time before and a second shooting time after the start time by taking the time responding to the long press event as a starting time point and the duration of the long press event as a second shooting time, wherein the caching comprises the following steps:
judging whether the second shooting time length is greater than a preset second time threshold value or not;
if the second shooting time length is larger than a preset second time threshold, caching videos shot in the preset shooting time length before and the second time threshold after the starting time point;
if the second shooting time length is not greater than a preset second time threshold value, caching videos shot in a pre-shooting time length before the starting time point and a second shooting time length after the starting time point;
obtaining the selection of a user on a cached video;
and synthesizing the cached videos according to the selected sequence to generate a new video.
2. The method of claim 1, further comprising:
and judging whether the operation event of the shooting button by the user is a click event or a long-time press event.
3. The method of claim 2, wherein the determining whether the operation event of the photographing button by the user is a click event or a long-press event comprises:
acquiring the duration of an operation event of a shooting button by a user;
if the duration is not greater than a preset first time threshold, judging that the operation event is a click event;
and if the duration is greater than a preset first time threshold, judging that the operation event is a long-press event.
4. The method of claim 1, further comprising: and judging whether the cached video responding to the long-press event exists in the cached video selected by the user.
5. The method of claim 4, further comprising:
if the cached videos selected by the user and responding to the long press event exist, sequentially dividing the cached videos into a plurality of video segments by taking a preset first shooting time as a dividing time unit;
if the duration of the last video clip is not greater than a preset third time threshold, combining the last video clip into the previous video clip;
the preset third time threshold is half of the preset first time threshold.
6. A video generating apparatus adapted to reside in a mobile terminal, the apparatus comprising:
the shooting module is suitable for starting the camera to start shooting videos;
the response module is suitable for responding to the operation event of the user to the shooting button;
a cache module, adapted to cache videos captured within a preset capturing duration before and a preset first capturing duration after the start time point by taking a time responding to the click event as a start time point when the operation event is the click event, and cache videos captured within a preset capturing duration before and a second capturing duration after the start time point by taking a time responding to the long press event as a start time point and taking a duration of the long press event as a second capturing duration when the operation event is the long press event, wherein the cache module is further adapted to:
when the operation event is a long-time pressing event, judging whether the second shooting duration is greater than a preset second time threshold value;
when the second shooting time length is larger than a preset second time threshold, caching videos shot in the preset shooting time length before the starting time point and the second time threshold after the starting time point;
when the second shooting duration is not greater than a preset second time threshold, caching videos shot in a pre-shooting duration before and a second shooting duration after the starting time point;
the acquisition module is suitable for acquiring the selection of the user on the cached video;
and the generating module is suitable for synthesizing the cached videos according to the selected sequence so as to generate a new video.
7. The apparatus of claim 6, further comprising a first judgment module adapted to judge whether an operation event of the photographing button by the user is a click event or a long press event.
8. The apparatus of claim 7, the first determining module further adapted to:
acquiring the duration of an operation event of a shooting button by a user;
when the duration is not greater than a preset first time threshold, judging that the operation event is a click event;
and when the duration is greater than a preset first time threshold, judging that the operation event is a long-press event.
9. The apparatus of claim 6, further comprising a second determining module adapted to determine whether there is a video cached in response to the long press event in the cached video selected by the user.
10. The apparatus of claim 9, further comprising a partitioning module adapted to:
when the cached video responding to the long press event exists in the cached video selected by the user, sequentially dividing the cached video into a plurality of video segments by taking a preset first shooting time as a dividing time unit;
when the duration of the last video clip is not greater than a preset third time threshold, combining the last video clip into the previous video clip;
the preset third time threshold is half of the preset first time threshold.
11. A mobile terminal comprising the video generation apparatus of any of claims 6-10.
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 CN109981988A (en) 2019-07-05
CN109981988B true 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 (5)

* 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
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

Family Cites Families (7)

* 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
CN103647991A (en) * 2013-12-23 2014-03-19 乐视致新电子科技(天津)有限公司 Method and system for sharing video in intelligent television
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
CN105704387A (en) * 2016-04-05 2016-06-22 广东欧珀移动通信有限公司 Shooting method and device of intelligent terminal and intelligent terminal

Patent Citations (5)

* 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
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

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
视频文件的拆分和合并;林雪莲;《电子与电脑》;20030308;第107-111页 *

Also Published As

Publication number Publication date
CN109981988A (en) 2019-07-05
CN106210541B (en) 2019-05-14
CN106210541A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
KR102289837B1 (en) Method and electronic device for taking a photograph
CN108900902B (en) Method, device, terminal equipment and storage medium for determining video background music
KR101531783B1 (en) Video summary including a particular person
CN109981988B (en) Video generation method and device and mobile terminal
CN105338409B (en) Network video preloading method and device
US20170032219A1 (en) Methods and devices for picture processing
KR102641894B1 (en) Sensor for capturing image and method for controlling thereof
JP6211715B2 (en) Video browsing method, apparatus, program and recording medium
US20170154221A1 (en) Video categorization method and apparatus, and storage medium
KR20110096567A (en) Camera system with touch focus and method
WO2019206243A1 (en) Material display method, terminal, and computer storage medium
WO2021169720A1 (en) Content operation method and device, terminal, and storage medium
CN106095465B (en) Method and device for setting identity image
CN106409317B (en) Method and device for extracting dream speech
CN107870712B (en) Screenshot processing method and device
US10095713B2 (en) Information device, server, recording medium with image file recorded thereon, image file generating method, image file management method, and computer readable recording medium
CN107870999B (en) Multimedia playing method, device, storage medium and electronic equipment
CN111147779B (en) Video production method, electronic device, and medium
CN106231152B (en) Transmit the method and device of picture
CN104636475B (en) Optimize the method and device of multimedia file memory space
WO2018152586A1 (en) Camera apparatus
WO2017080084A1 (en) Font addition method and apparatus
US20170054906A1 (en) Method and device for generating a panorama
CN111432278A (en) Video control method, device, terminal and storage medium
CN110740373B (en) Method and related device for buffering audio/video file

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