CN113766275A - Video editing method, device, terminal and storage medium - Google Patents

Video editing method, device, terminal and storage medium Download PDF

Info

Publication number
CN113766275A
CN113766275A CN202111152804.XA CN202111152804A CN113766275A CN 113766275 A CN113766275 A CN 113766275A CN 202111152804 A CN202111152804 A CN 202111152804A CN 113766275 A CN113766275 A CN 113766275A
Authority
CN
China
Prior art keywords
video
frame
option
frame insertion
speed
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
CN202111152804.XA
Other languages
Chinese (zh)
Other versions
CN113766275B (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111152804.XA priority Critical patent/CN113766275B/en
Publication of CN113766275A publication Critical patent/CN113766275A/en
Application granted granted Critical
Publication of CN113766275B publication Critical patent/CN113766275B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234381Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the temporal resolution, e.g. decreasing the frame rate by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping

Abstract

The disclosure relates to a video editing method, a video editing device, a video editing terminal and a storage medium, and belongs to the technical field of video processing. The video clipping method includes: displaying a video editing interface, wherein the video editing interface displays a first video to be edited; determining a target playing speed of the first video based on the video clipping interface; adjusting the playing intervals of a plurality of first video frames in the first video based on the target playing speed; under the condition that the target playing speed is smaller than the speed threshold, inserting second video frames between the first videos to obtain second videos, wherein the second video frames are generated based on the first video frames on two sides of the position of the inserted frame in the first videos; in the video clip interface, a second video is presented. In the method, the second video frame is inserted into the first video, so that the playing interval of the video frame in the generated second video is smaller, the fluency of the video in playing is improved, and the display effect of the video is improved.

Description

Video editing method, device, terminal and storage medium
Technical Field
The present disclosure relates to the field of video processing technologies, and in particular, to a video editing method, an apparatus, a terminal, and a storage medium.
Background
Currently, a user can publish a video on a network video platform through a terminal for other users to watch. Before the video is released, the user can also clip the video through the terminal, for example, a cutting mode such as cutting a clip, changing a speed clip or adding animation is adopted, so as to improve the display effect of the video.
In the related art, the variable-speed clipping is to change the frame rate of the video. In the process of performing variable-speed clipping on a video, taking the example of adjusting the playing speed of the video to 50% of the original playing speed, if the original frame rate of the video is 30FPS (Frames Per Second), which is equivalent to reducing the frame rate of the video to 15FPS, the playing interval between two adjacent video Frames is extended from the original 33.3ms (milliseconds) to 66.66 ms. Since the video playing speed is reduced, the video frame rate is also reduced, and the fluency of video playing is also reduced, a method capable of improving the fluency of video playing when performing variable speed editing on video is urgently needed to improve the video display effect.
Disclosure of Invention
The embodiment of the disclosure provides a video editing method, a video editing device, a terminal and a storage medium, so as to improve fluency of video playing. The technical scheme of the disclosure is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a video clipping method, the method comprising:
displaying a video clipping interface, wherein the video clipping interface displays a first video to be clipped;
determining a target play speed of the first video based on the video clip interface;
adjusting a playing interval of a plurality of first video frames in the first video based on the target playing speed;
under the condition that the target playing speed is smaller than a speed threshold, inserting a second video frame into the first video to obtain a second video, wherein the second video frame is generated based on the first video frames on two sides of the position of the inserted frame in the first video;
in the video clip interface, the second video is presented.
In the above scheme, since the playing interval between the first video frames is increased when the target playing speed of the first video with the adjusted playing interval is smaller than the speed threshold, a phenomenon that the first video is not smooth may occur during playing, and by inserting the second video frame into the first video, the playing interval of the video frames in the generated second video is smaller, so that the fluency of the video during playing is improved, and the display effect of the video is improved.
In some embodiments, the video clip interface further presents a first frame insertion option for inserting frames into the first video; under the condition that the target playing speed is smaller than the speed threshold, inserting a second video frame into the first video to obtain a second video, wherein the method comprises the following steps:
and under the condition that the target playing speed is smaller than the speed threshold, responding to the triggering operation of the first frame insertion option, and inserting the second video frame into the first video to obtain the second video.
In the above scheme, the first frame insertion option is displayed in the video clip interface, and when the target playing speed is less than the speed threshold, the user can trigger the first frame insertion option, so that the frame insertion is performed on the first video.
In some embodiments, said inserting the second video frame in the first video in response to the triggering operation of the first frame insertion option to obtain the second video comprises:
responding to the triggering operation of the first frame insertion option, and displaying a frame insertion menu, wherein the frame insertion menu comprises a plurality of second frame insertion options, and each second frame insertion option corresponds to one frame insertion mode;
and responding to the triggering operation of any second frame insertion option, and inserting the second video frame into the first video based on the frame insertion mode corresponding to the second frame insertion option to obtain the second video.
In the above scheme, a plurality of second frame insertion options are displayed in the frame insertion menu, so that a proper frame insertion mode can be selected from different frame insertion modes to insert the frame of the first video, and the flexibility of video frame insertion is improved.
In some embodiments, the method further comprises:
and responding to the triggering operation of any second frame insertion option, and displaying frame insertion progress information, wherein the frame insertion progress information is used for prompting the current frame insertion progress of the first video.
In the scheme, the frame insertion progress of the current first video can be seen by the user in real time through displaying the frame insertion progress information, the progress display mode is more humanized, and the visual effect of the progress display is improved.
In some embodiments, the method further comprises:
responding to the trigger operation of any second frame insertion option, and displaying a frame insertion cancellation option;
and stopping the frame interpolation of the first video in response to the triggering operation of the frame interpolation cancellation option.
In the scheme, the option for canceling the frame interpolation is displayed, so that a user can trigger the option in the process of frame interpolation of the first video, the effect of frame interpolation stopping is achieved, convenience of frame interpolation canceling is improved, and the operation mode of video frame interpolation is enriched.
In some embodiments, the method further comprises:
displaying frame insertion completion information in response to completion of the first video frame insertion, and displaying the second frame insertion option in a selected state, wherein the frame insertion completion information is used for prompting completion of the first video frame insertion;
and responding to the failure of frame insertion of the first video, displaying frame insertion failure information, wherein the frame insertion failure information is used for prompting the failure of frame insertion of the first video and prompting the re-frame insertion of the first video.
In the above scheme, the user can timely know that the current first video finishes the frame insertion by displaying the frame insertion completion information, and the user can timely know that the first video fails to insert the frame by displaying the frame insertion failure information, so that the next operation can be timely performed, and the prompt effect of the video frame insertion is improved.
In some embodiments, the method further comprises:
and responding to the triggering operation of any second frame insertion option, and displaying the second frame insertion option as a selected state under the condition that the second video is cached.
In the above scheme, since the second video is cached, the frame insertion of the first video is not required to be repeated, so that the second frame insertion option is directly displayed in the selected state, the operation flow is reduced, and the video frame insertion efficiency is improved.
In some embodiments, the method further comprises:
and canceling the display of the frame insertion menu in response to the canceling display operation of the frame insertion menu.
In the scheme, the display frame insertion menu is cancelled, so that a user can continue to perform other operations in the video clip interface, the interface display mode is enriched, and the interface display effect is improved.
In some embodiments, the method further comprises:
in response to completion of the first video frame insertion, updating an option name of a first frame insertion option in the video clip interface to an option name of a triggered second frame insertion option.
In the above scheme, when the first video frame insertion is completed, the option name of the first frame insertion option in the video clip interface is updated to the option name of the triggered second frame insertion option, so that a user can see the frame insertion mode used by the first video in the video clip interface, the display of a frame insertion menu does not need to be triggered, and the effect of interface display is improved.
In some embodiments, the frame insertion menu further comprises a not frame insertion option, the method further comprising:
and in response to the triggering operation of the non-frame-interpolation option, not interpolating the first video.
In the scheme, the non-frame-interpolation option is displayed in the frame interpolation menu, so that the selection modes of video frame interpolation operation are enriched, and the video frame interpolation operation is more humanized.
In some embodiments, the video clip interface further presents a first frame insertion option for inserting frames into the first video and a variable speed option for adjusting the play speed of the first video, and after presenting the second video in the video clip interface, the method further comprises:
in response to the triggering operation of the speed change option, updating a first frame interpolation option displayed in the video clip interface to a third frame interpolation option, wherein the third frame interpolation option is used for re-frame interpolation of the first video;
and responding to the triggering operation of the third frame insertion option, and executing the step of inserting a second video frame into the first video to obtain a second video under the condition that the target playing speed is less than the speed threshold.
In the above scheme, since the user may also trigger video speed change after video frame interpolation, the user can select whether to interpolate the first video again by displaying the third frame interpolation option, so that the video meets the speed change requirement and has sufficient fluency, thereby improving the accuracy of video frame interpolation.
In some embodiments, the method further comprises:
and under the condition that the first frame interpolation option is updated to the third frame interpolation option, displaying re-frame interpolation information, wherein the re-frame interpolation information is used for prompting to re-frame the first video.
In the scheme, the user can timely know that the first video can be re-inserted at present by displaying the re-frame insertion information, so that the possibility of re-inserting the video is improved, and the accuracy of video frame insertion is improved.
In some embodiments, after said presenting said second video in said video clip interface, said method further comprises:
in response to a triggering operation of the speed change option, deleting the cached second video in a case where the second video has been cached.
In the above scheme, since the first video needs to be interpolated again after the speed is changed again, and the buffered second video is the result of the last frame interpolation, that is, the buffered second video is invalidated, the buffered second video is deleted, so that the buffering space is saved.
In some embodiments, the video clip interface further presents a variable speed menu, the variable speed menu including the variable speed option; the method further comprises the following steps:
displaying a re-interpolation confirmation option and a re-interpolation cancellation option without re-interpolating the first video based on the third interpolation option in response to a cancellation display operation of the variable speed menu;
responding to the triggering operation of the frame re-insertion confirming option, and executing the step of inserting a second video frame into the first video to obtain a second video under the condition that the target playing speed is smaller than a speed threshold value;
in response to a triggering operation of the re-frame interpolation cancellation option, not interpolating the first video.
In the above scheme, by displaying the re-frame insertion confirmation option, the user can realize the re-frame insertion by triggering the option when the user wants to perform the frame insertion on the first video, so that the possibility of the video re-frame insertion is improved, and a selection mode without re-frame insertion is provided for the user by displaying the re-frame insertion cancellation option, so that the selection modes of the frame insertion operation are enriched.
In some embodiments, the video clip interface further exhibits a variable speed option for adjusting a playback speed of the first video, the variable speed option including a curvilinear variable speed option for adjusting a playback speed of a plurality of first video segments included in the first video; when the target playing speed of any one of the first video segments is smaller than the speed threshold, inserting a second video frame into the first video to obtain a second video, including:
for a first video segment with a target playing speed smaller than the speed threshold, inserting the second video frame into the first video segment to obtain a second video segment;
and forming the second video by the second video segment and a third video segment, wherein the third video segment is the first video segment of which the target playing speed is not less than the speed threshold.
In the above scheme, since the first video after the curve speed change may include a plurality of video segments with different playing speeds, only the video segment with the target playing speed less than the speed threshold needs to be subjected to frame interpolation, so that the frame interpolation time is saved on the basis of ensuring the video fluency.
In some embodiments, the video clip interface further presents a first frame insertion option for inserting frames into the first video; the method further comprises the following steps:
displaying the first frame insertion option as an inoperable state if the target play speed is not less than the speed threshold;
in the event that the target playback speed is less than the speed threshold, the first frame insertion option is shown to be operational.
In the above scheme, the operation state of the first frame insertion option is adjusted according to the target playing speed of the first video, so that a user can select whether to insert the frame into the first video according to the operation state of the first frame insertion option in real time, and the interface display effect is improved.
In some embodiments, the method further comprises:
and displaying frame insertion prompt information under the condition that the first frame insertion option is displayed in the operable state, wherein the frame insertion prompt information is used for prompting that frame insertion can be carried out currently.
In the above scheme, the frame insertion prompt information is displayed when the first frame insertion option is in the operable state, so that the user can know the function of the first frame insertion option, and the convenience of frame insertion operation is improved.
In some embodiments, the method further comprises:
and under the condition that the first frame insertion option is displayed in the inoperable state, displaying frame insertion disabling information in response to the triggering operation of the first frame insertion option, wherein the frame insertion disabling information is used for prompting that frame insertion cannot be performed currently.
In the above scheme, when the first frame insertion option is in the inoperable state but is triggered, the user specifies the use mode of the first frame insertion option by displaying the frame insertion disabling information, so that the first frame insertion option is triggered at a proper time, and the convenience of frame insertion operation is improved.
According to a second aspect of embodiments of the present disclosure, there is provided a video clipping device, the device comprising:
a first presentation unit configured to perform presentation of a video clip interface that presents a first video to be clipped;
a determining unit configured to perform determining a target play speed of the first video based on the video clip interface;
an adjusting unit configured to perform adjusting a playing interval of a plurality of first video frames in the first video based on the target playing speed;
the frame interpolation unit is configured to insert a second video frame into the first video to obtain a second video under the condition that the target playing speed is smaller than a speed threshold, wherein the second video frame is generated based on the first video frames on two sides of the frame interpolation position in the first video;
a second presentation unit configured to perform presentation of the second video in the video clip interface.
In some embodiments, the video clip interface further presents a first frame insertion option for inserting frames into the first video; the frame inserting unit is configured to insert the second video frame into the first video to obtain the second video in response to a trigger operation on the first frame inserting option when the target playing speed is less than the speed threshold.
In some embodiments, the frame interpolation unit includes:
the display subunit is configured to execute a trigger operation responding to the first frame interpolation option, and display a frame interpolation menu, wherein the frame interpolation menu comprises a plurality of second frame interpolation options, and each second frame interpolation option corresponds to one frame interpolation mode;
and the frame inserting subunit is configured to execute a triggering operation responding to any one second frame inserting option, and insert the second video frame into the first video based on a frame inserting mode corresponding to the second frame inserting option to obtain the second video.
In some embodiments, the apparatus further comprises:
and the third display unit is configured to execute a triggering operation responding to any one of the second frame insertion options, and display frame insertion progress information, wherein the frame insertion progress information is used for prompting the current frame insertion progress of the first video.
In some embodiments, the apparatus further comprises:
the fourth display unit is configured to execute a triggering operation responding to any one second frame insertion option and display a frame insertion cancellation option; and stopping the frame interpolation of the first video in response to the triggering operation of the frame interpolation cancellation option.
In some embodiments, the apparatus further comprises:
the fifth display unit is used for displaying frame insertion completion information in response to the completion of the first video frame insertion, displaying the second frame insertion option in a selected state, wherein the frame insertion completion information is used for prompting the completion of the first video frame insertion; and responding to the failure of frame insertion of the first video, displaying frame insertion failure information, wherein the frame insertion failure information is used for prompting the failure of frame insertion of the first video and prompting the re-frame insertion of the first video.
In some embodiments, the apparatus further comprises:
a sixth presentation unit configured to perform, in response to a trigger operation on any one of the second frame insertion options, in a case where the second video has been cached, presentation of the second frame insertion option in a selected state.
In some embodiments, the apparatus further comprises:
the display subunit is further configured to perform canceling display of the frame insertion menu in response to a canceling display operation of the frame insertion menu.
In some embodiments, the apparatus further comprises:
a first updating unit configured to perform updating an option name of a first frame insertion option in the video clip interface to an option name of a triggered second frame insertion option in response to completion of the first video frame insertion.
In some embodiments, the frame insertion menu further comprises a not frame insertion option, the apparatus further comprising:
the frame interpolation subunit is further configured to perform not interpolating the first video in response to a trigger operation on the not-frame-interpolation option.
In some embodiments, the video clip interface further exhibits a first frame insertion option for inserting frames into the first video and a variable speed option for adjusting a playback speed of the first video, the apparatus further comprising:
a second updating unit configured to execute, in response to a trigger operation on the speed change option, updating a first frame interpolation option presented in the video clip interface to a third frame interpolation option, where the third frame interpolation option is used to re-frame the first video;
the frame inserting unit is configured to perform a triggering operation in response to the third frame inserting option, and insert the second video frame into the first video to obtain the second video when the target playing speed is less than the speed threshold.
In some embodiments, the apparatus further comprises:
a seventh presentation unit, configured to perform, when the first frame insertion option is updated to the third frame insertion option, presentation of re-frame insertion information, where the re-frame insertion information is used to prompt re-frame insertion of the first video.
In some embodiments, the apparatus further comprises:
a deletion unit configured to perform deletion of the buffered second video in a case where the second video has been buffered in response to a trigger operation on the shift option.
In some embodiments, the video clip interface further presents a variable speed menu, the variable speed menu including the variable speed option; the device further comprises:
an eighth presentation unit configured to perform, in response to a cancellation presentation operation for the variable speed menu, presentation of a re-interpolation confirmation option and a re-interpolation cancellation option without re-interpolating the first video based on the third interpolation option;
the frame interpolation unit is configured to execute a triggering operation responding to the frame re-interpolation confirmation option, and insert the second video frame into the first video to obtain the second video under the condition that the target playing speed is smaller than the speed threshold; in response to a triggering operation of the re-frame interpolation cancellation option, not interpolating the first video.
In some embodiments, the video clip interface further exhibits a variable speed option for adjusting a playback speed of the first video, the variable speed option including a curvilinear variable speed option for adjusting a playback speed of a plurality of first video segments included in the first video; under the condition that the target playing speed of any one first video segment is smaller than the speed threshold, the frame interpolation unit is configured to execute the step of interpolating the second video frame in the first video segment to obtain a second video segment for the first video segment of which the target playing speed is smaller than the speed threshold; and forming the second video by the second video segment and a third video segment, wherein the third video segment is the first video segment of which the target playing speed is not less than the speed threshold.
In some embodiments, the video clip interface further presents a first frame insertion option for inserting frames into the first video; the device further comprises:
an eighth presentation unit configured to perform presentation of the first frame insertion option as an inoperable state in a case where the target playback speed is not less than the speed threshold; in the event that the target playback speed is less than the speed threshold, the first frame insertion option is shown to be operational.
In some embodiments, the apparatus further comprises:
a ninth presentation unit configured to perform, in a case where the first frame insertion option is presented in the operable state, presentation of frame insertion prompt information, where the frame insertion prompt information is used to prompt that frame insertion is currently possible.
In some embodiments, the apparatus further comprises:
a tenth presentation unit, configured to perform, when the first frame insertion option is presented in the inoperable state, presentation of frame insertion disabling information in response to a trigger operation on the first frame insertion option, where the frame insertion disabling information is used to prompt that frame insertion is not currently possible.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal, including: one or more processors; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the video clipping method of the above embodiment.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium in which instructions, when executed by a processor of a terminal, enable the terminal to perform the video clipping method of the above-described embodiments.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the video clipping method of the above-described embodiments.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic illustration of an environment for implementing a video clipping method according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of video clipping in accordance with an exemplary embodiment;
FIG. 3 is a flow diagram illustrating a method of video clipping in accordance with an exemplary embodiment;
FIG. 4 is a schematic diagram illustrating a video clip interface in accordance with an illustrative embodiment;
FIG. 5 is a schematic diagram illustrating a video clip interface in accordance with an illustrative embodiment;
FIG. 6 is a schematic diagram illustrating a video clip interface in accordance with an illustrative embodiment;
FIG. 7 is a schematic diagram illustrating a video clip interface in accordance with an illustrative embodiment;
FIG. 8 is a flow diagram illustrating a method of video clipping in accordance with an exemplary embodiment;
FIG. 9 is a schematic diagram illustrating a video clip interface in accordance with an illustrative embodiment;
FIG. 10 is a schematic diagram illustrating a video clip interface in accordance with an illustrative embodiment;
FIG. 11 is a block diagram of a video clipping device shown in accordance with an exemplary embodiment;
fig. 12 is a block diagram illustrating a terminal according to an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In addition, the data to which the present disclosure relates is data authorized by a user or sufficiently authorized by each party.
The video clipping method provided by the embodiment of the disclosure is executed by a terminal. In some embodiments, the terminal is a desktop computer, laptop, tablet, smartphone, or other terminal.
FIG. 1 is a schematic diagram illustrating an implementation environment of a video clipping method according to an example embodiment, as shown in FIG. 1, the implementation environment including: a terminal 100 and a server 200. The terminal 100 is connected to the server 200 through wired or wireless communication, which is not limited in the embodiment of the present disclosure.
In some embodiments, the terminal 100 has a target application installed thereon, and the terminal 100 can clip a video through the target application. The target application is any application capable of providing video clipping, video distribution, or video browsing functionality. For example, the target application is a short video application, a social application, a video clip application, a browser, or any application that contains a webview control, etc.
The server 200 is used to provide background services for the target application. The server 200 is a server, or at least one of a server cluster cloud server, a cloud computing platform and a virtualization center which are composed of a plurality of servers. In some embodiments, the number of the servers 200 may be more or less, and the embodiments of the present disclosure do not limit this.
In some embodiments, the terminal 100 is configured to clip a video to obtain a clipped video, and display the clipped video for a user operating the terminal to view the video. In other embodiments, the terminal 100 uploads the video to the server 200, the server 200 clips the video to obtain a clipped video, the video is sent to the terminal 100, and the terminal 100 displays the clipped video for a user operating the terminal to view the video.
The video clipping method provided by the embodiment of the disclosure can be applied to video clipping scenes. In some embodiments, taking a video publishing scene as an example, a user triggers a terminal to upload a section of video to be published, the terminal clips the video through the video clipping method provided by the embodiments of the present disclosure to obtain a section of video with higher fluency, and then publishes the video so that other users can watch the video.
In other embodiments, taking a scene of recording a video as an example, a terminal records a segment of video first, then clips the video by the video clipping method provided by the embodiments of the present disclosure to obtain a segment of video with higher fluency, and then stores the video.
It should be noted that the above application scenarios are only exemplary, and do not limit the video clip scenario, and the present disclosure can be applied to any other video clip scenario besides the above scenarios.
FIG. 2 is a flow diagram illustrating a method of video clipping in accordance with an exemplary embodiment. Referring to fig. 2, the method is performed by a terminal and includes the steps of:
in step S201, the terminal presents a video clip interface that presents a first video to be clipped.
In step S202, the terminal determines a target play speed of the first video based on the video clip interface.
In step S203, the terminal adjusts the playing intervals of the first video frames in the first video based on the target playing speed.
In step S204, the terminal inserts a second video frame into the first video to obtain a second video when the target playing speed is less than the speed threshold, where the second video frame is generated based on the first video frames on both sides of the inserted frame position in the first video.
In step S205, the terminal presents the second video in the video clip interface.
In the embodiment of the disclosure, when the target playing speed of the first video with the adjusted playing interval is smaller than the speed threshold, the playing interval between the first video frames is increased, and then the first video may have a phenomenon of unsmooth playing.
In some embodiments, the video clip interface further exhibits a first frame insertion option for inserting frames into the first video; the inserting a second video frame into the first video to obtain a second video under the condition that the target playing speed is less than the speed threshold value includes:
and under the condition that the target playing speed is less than the speed threshold, responding to the triggering operation of the first frame insertion option, inserting the second video frame into the first video to obtain the second video.
In some embodiments, the inserting the second video frame in the first video in response to the triggering operation of the first frame insertion option to obtain the second video comprises:
responding to the triggering operation of the first frame insertion option, displaying a frame insertion menu, wherein the frame insertion menu comprises a plurality of second frame insertion options, and each second frame insertion option corresponds to a frame insertion mode;
and responding to the triggering operation of any second frame insertion option, and inserting the second video frame into the first video based on the frame insertion mode corresponding to the second frame insertion option to obtain the second video.
In some embodiments, the method further comprises:
and responding to the triggering operation of any second frame insertion option, and displaying frame insertion progress information, wherein the frame insertion progress information is used for prompting the current frame insertion progress of the first video.
In some embodiments, the method further comprises:
responding to the trigger operation of any second frame insertion option, and displaying a frame insertion cancellation option;
and stopping the frame interpolation of the first video in response to the triggering operation of the frame interpolation cancellation option.
In some embodiments, the method further comprises:
displaying frame insertion completion information in response to completion of the first video frame insertion, and displaying the second frame insertion option in a selected state, wherein the frame insertion completion information is used for prompting completion of the first video frame insertion;
and in response to the failure of frame insertion of the first video, displaying frame insertion failure information, wherein the frame insertion failure information is used for prompting the failure of frame insertion of the first video and prompting the re-frame insertion of the first video.
In some embodiments, the method further comprises:
and in response to the triggering operation of any one second frame insertion option, the second frame insertion option is shown as a selected state under the condition that the second video is cached.
In some embodiments, the method further comprises:
and canceling the display of the frame insertion menu in response to the canceling display operation of the frame insertion menu.
In some embodiments, the method further comprises:
in response to completing the first video frame insertion, the option name of the first frame insertion option in the video clip interface is updated to the option name of the triggered second frame insertion option.
In some embodiments, the frame insertion menu further comprises a not frame insertion option, the method further comprising:
and in response to the triggering operation of the non-frame-interpolation option, not interpolating the first video.
In some embodiments, the video clip interface further exhibits a first frame insertion option for inserting frames into the first video and a variable speed option for adjusting the play speed of the first video, the method further comprising, after the second video is presented in the video clip interface:
in response to the triggering operation of the speed change option, updating a first frame interpolation option displayed in the video clip interface to a third frame interpolation option, wherein the third frame interpolation option is used for re-frame interpolation of the first video;
and responding to the triggering operation of the third frame insertion option, and executing the step of inserting a second video frame into the first video to obtain a second video under the condition that the target playing speed is less than the speed threshold.
In some embodiments, the method further comprises:
and under the condition that the first frame interpolation option is updated to the third frame interpolation option, displaying re-frame interpolation information, wherein the re-frame interpolation information is used for prompting to re-frame the first video.
In some embodiments, after the presenting the second video in the video clip interface, the method further comprises:
and in response to the triggering operation of the speed change option, deleting the cached second video in the case that the second video is cached.
In some embodiments, the video clip interface further exhibits a variable speed menu, the variable speed menu including the variable speed option; the method further comprises the following steps:
displaying a re-interpolation confirmation option and a re-interpolation cancellation option without re-interpolating the first video based on the third interpolation option in response to a cancellation display operation of the variable speed menu;
responding to the triggering operation of the frame re-insertion confirming option, and executing the step of inserting a second video frame into the first video to obtain a second video under the condition that the target playing speed is less than a speed threshold;
in response to a triggering operation of the re-frame interpolation cancellation option, the first video is not interpolated.
In some embodiments, the video clip interface further exhibits a variable speed option for adjusting a playback speed of the first video, the variable speed option including a curvilinear variable speed option for adjusting a playback speed of a plurality of first video segments comprised by the first video; when the target playing speed of any one of the first video segments is less than the speed threshold, the inserting a second video frame into the first video to obtain a second video includes:
for a first video segment with a target playing speed smaller than the speed threshold, inserting the second video frame into the first video segment to obtain a second video segment;
and forming the second video by the second video segment and a third video segment, wherein the third video segment is the first video segment of which the target playing speed is not less than the speed threshold.
In some embodiments, the video clip interface further exhibits a first frame insertion option for inserting frames into the first video; the method further comprises the following steps:
under the condition that the target playing speed is not less than the speed threshold value, the first frame insertion option is displayed to be in an inoperable state;
and in the case that the target playing speed is less than the speed threshold value, the first frame insertion option is shown to be operable.
In some embodiments, the method further comprises:
and under the condition that the first frame insertion option is displayed in the operable state, displaying frame insertion prompt information, wherein the frame insertion prompt information is used for prompting that frame insertion can be carried out currently.
In some embodiments, the method further comprises:
and under the condition that the first frame insertion option is displayed in the inoperable state, displaying frame insertion disabling information in response to the triggering operation of the first frame insertion option, wherein the frame insertion disabling information is used for prompting that frame insertion cannot be performed currently.
FIG. 3 is a flow chart illustrating a method of video clipping in accordance with an exemplary embodiment. Referring to fig. 3, this embodiment is described by taking an example that a terminal clips a first video to obtain a second video, and the method includes the following steps:
in step S301, the terminal presents a video clip interface presenting a first video to be clipped.
The first video is a video currently shot by the terminal, or the first video is a video in a video library of the terminal, which is not specifically limited in this disclosure. The terminal is provided with a target application, and when a user wants to clip a video, the user triggers the terminal to run the target application. In some embodiments, the user triggers the terminal to present the video clip interface in the target application. For example, the terminal displays a main interface of the target application, the main interface displays a video shooting option, the user performs a trigger operation on the video shooting option, the terminal shoots the first video in response to detecting the trigger operation, or the terminal selects the first video from a video library in response to detecting the trigger operation, so that the first video is edited.
In step S302, the terminal determines a target play speed of the first video based on the video clip interface.
And the video clip interface also shows a variable speed option which is used for adjusting the playing speed of the first video. The user can trigger the variable speed option to trigger the terminal to perform variable speed clipping on the first video, and accordingly, the implementation manner of step S302 includes: and the terminal responds to the triggering operation of the variable speed option in the video clip interface and determines the target playing speed corresponding to the variable speed option.
In some embodiments, the shift options include a conventional shift option and a curvilinear shift option. Wherein the regular variable speed option is used to adjust the playing interval between the plurality of video frames of the first video at equal intervals. The adjustment is to lengthen or shorten the playing interval. The curve shifting option is used to adjust the playing speed of a plurality of first video segments in the first video, i.e. adjust the playing interval between at least one video frame in the first video segment.
In some embodiments, the implementation manner of the terminal determining the target play speed corresponding to the shift option includes: the user manually inputs the playing speed in the input area, and the terminal acquires the manually input playing speed to obtain the target playing speed. The display style of the input area may be set as required, which is not specifically limited in the present disclosure, for example, the display style of the input area is a rectangular input box. In the embodiment of the present disclosure, the accuracy of the target play speed is made higher by manually inputting the play speed.
Alternatively, a speed selector is shown in the video clip interface, the speed selector comprising a step speed. In some embodiments, the implementation manner of the terminal obtaining the target play speed corresponding to the speed change option includes: the user triggers any step speed in the speed selector, and the terminal determines the playing speed corresponding to the triggered step speed to obtain the target playing speed.
The display style, the stepping speed and the selection range of the speed selector can be set as required, which is not specifically limited in the present disclosure. For example, referring to fig. 4, the presentation style of the speed selector is a sliding axis, the selection range is 0 to 10 times (x), the step speed is 0.1 times, and the playback speed indicated by 0.1 times is 0.1 times the original playback speed of the first video.
It should be noted that the terminal may also determine the target play speed corresponding to the speed change option through other implementation manners, which is not specifically limited in this disclosure.
In some embodiments, the implementation manner of the terminal determining the target play speed corresponding to the shift option includes: when a user wants to use a certain speed change mode, the speed change mode is triggered, and the terminal determines the playing speed corresponding to the triggered speed change mode to obtain the target playing speed.
The shifting manner may be set as needed, and the present disclosure is not particularly limited thereto. For example, the shift pattern includes a montage shift pattern, a flash-in shift pattern, or a flash-out shift pattern. The user triggers a speed change mode, and the terminal determines a curve speed change sub-option corresponding to the triggered speed change mode.
It should be noted that the curve-shifting option further includes a non-shifting sub-option, and accordingly, the terminal does not perform curve-shifting clipping on the first video in response to the triggering operation on the non-shifting sub-option.
In step S303, the terminal adjusts the playing intervals of the first video frames in the first video based on the target playing speed.
In some embodiments, in the case that the triggered shift option is a regular shift option, the play interval of each first video frame adjusted based on the target play speed is the same. For example, the target play speed is 0.8 times, the terminal adjusts the play interval of each first video frame in the first video to 1.25 times the original play interval. In the case that the triggered speed change option is a curve speed change option, the target playing speed of the first video exists in the form of a target playing speed set, where the target playing speed set includes a target playing speed corresponding to each first video segment in the first video. Accordingly, the terminal adjusts the playing intervals of a plurality of first video frames in each first video segment based on the target playing speed corresponding to the first video segment. For example, the target playing speed set is [0.5 times, 1 times, 2.5 times ], accordingly, the first video includes [ video segment 1, video segment 2, video segment 3], the terminal adjusts the playing interval of each first video frame in the video segment 1 to be 2 times of the original playing interval, adjusts the playing interval of each first video frame in the video segment 3 to be 0.4 times of the original playing interval, and does not adjust the playing interval of the first video frame in the video segment 2.
In the embodiment of the present disclosure, the video editing interface further shows a first frame insertion option, where the first frame insertion option is used to perform frame insertion on the first video; correspondingly, the video clipping method provided by the embodiment of the disclosure further includes the following steps: the terminal displays the first frame insertion option as an inoperable state under the condition that the target playing speed is not less than a speed threshold value; and in the case that the target playing speed is less than the speed threshold value, the first frame insertion option is shown to be operable.
The speed threshold is set in advance by the terminal, and may be set as needed, which is not specifically limited by the present disclosure. For example, the speed threshold is 1 time, 0.8 time, or 0.6 time, and the speed threshold is 1 time in the embodiment of the present disclosure. The operable state and the inoperable state may be set as desired, and the present disclosure is not particularly limited thereto. For example, the operable state is a highlighted state, and the inoperable state is a grayed-out state.
It should be noted that, in the process of the curve variable speed editing, the target playing speed set includes a plurality of target playing speeds, and correspondingly, the terminal determines that the target playing speed of the first video is less than the speed threshold value when any target playing speed in the target playing speed set is less than the speed threshold value; otherwise, the terminal determines that the target playing speed of the first video is not less than the speed threshold.
For example, referring to fig. 4, if the normal shift option is selected, the speed selector is selected to have "2 x", and the speed threshold is 1x, then the first frame insertion option "slow frame insertion" is in the grayed-out state. Referring to fig. 5, the curve speed change option is selected, the constant speed sub-option is selected, and at this time, the first frame interpolation option "slow frame interpolation" is in the gray setting state, and when the curve speed change sub-option corresponding to the montage speed change mode is selected, the first frame interpolation option "slow frame interpolation" is in the highlight state due to the existence of the target play speed smaller than the speed threshold.
In the embodiment of the disclosure, the operation state of the first frame insertion option is adjusted according to the target playing speed of the first video, so that a user can select whether to insert the frame into the first video according to the operation state of the first frame insertion option in real time, and the interface display effect is improved.
In some embodiments, the user may not know the function of the first frame insertion option, and the terminal can prompt the user through the frame insertion prompt message, accordingly, the video clipping method provided by the embodiment of the present disclosure further includes the following steps: and the terminal displays frame insertion prompt information under the condition that the first frame insertion option is displayed in the operable state, wherein the frame insertion prompt information is used for prompting that frame insertion can be carried out currently.
The display mode and the prompt content of the frame insertion prompt information may be set as required, which is not specifically limited in the present disclosure. For example, referring to fig. 6, showing the frame insertion cue information "frame insertion" above the first frame insertion option "slow frame insertion" may improve video fluency.
In the embodiment of the disclosure, the frame insertion prompt information is displayed when the first frame insertion option is in the operable state, so that a user can know the function of the first frame insertion option, and the convenience of frame insertion operation is improved.
In some embodiments, in a case that the first frame insertion option is in an inoperable state, the user may also trigger the first frame insertion option, and then the terminal can prompt the user through the frame insertion disabling information, and accordingly, the video clipping method provided by the embodiments of the present disclosure further includes the following steps: and under the condition that the first frame insertion option is displayed in the inoperable state, the terminal responds to the triggering operation of the first frame insertion option and displays frame insertion disabling information, wherein the frame insertion disabling information is used for prompting that frame insertion cannot be performed currently.
The display mode and the prompt content of the frame insertion disabling information may be set as required, which is not specifically limited in the present disclosure. For example, referring to fig. 4, when the first frame insertion option "slow frame insertion" is clicked, the terminal displays frame insertion disabling information "frame insertion can be performed only when the number of frames is smaller than 1 x" at the middle position of the display interface, that is, the frame insertion cannot be performed currently, and frame insertion can be performed only when the target play speed is smaller than the speed threshold (1 x).
In the embodiment of the disclosure, when the first frame insertion option is in the inoperable state but is triggered, the use mode of the first frame insertion option is made clear by the user by displaying the frame insertion disabling information, so that the first frame insertion option is triggered at a proper time, and the convenience of frame insertion operation is improved.
In step S304, the video clip interface further displays a first frame insertion option, where the first frame insertion option is used to perform frame insertion on the first video, and the terminal responds to a trigger operation on the first frame insertion option when the target playing speed is less than the speed threshold, and displays a frame insertion menu, where the frame insertion menu includes a plurality of second frame insertion options, and each of the second frame insertion options corresponds to a frame insertion mode.
The frame insertion mode may be set as required, and this is not specifically limited in this disclosure. In some embodiments, the frame interpolation includes frame mixing, motion compensation, frame sampling, or optical flow. In some embodiments, the frame interpolation menu further includes a frame non-interpolation option, and accordingly, the video clipping method provided by the embodiments of the present disclosure further includes the following steps: and the terminal responds to the triggering operation of the non-frame-interpolation option and does not interpolate the first video.
The display style of the non-frame insertion option may be set as required, which is not specifically limited in this disclosure. For example, referring to fig. 6, the user triggers the first frame insertion option "slow frame insertion", the terminal displays the frame insertion menu, which displays three options: an un-interpolated frame option, a frame blending option, and a motion compensation option.
In the embodiment of the disclosure, the selection mode of video frame interpolation operation is enriched by displaying the option of not interpolating frames in the frame interpolation menu, so that the video frame interpolation operation is more humanized.
It should be noted that the terminal may perform frame interpolation on the first video after the speed change of the first video is completed, or the terminal may perform frame interpolation on the first video during the speed change of the first video, so as to obtain a second video with speed change and frame interpolation completed, so as to save operation time. In addition, the terminal may automatically perform frame interpolation on the first video, and buffer the video obtained by frame interpolation, or the terminal may start to perform frame interpolation on the first video only when the user triggers the first frame interpolation option, which is not specifically limited by the present disclosure.
In step S305, the terminal inserts a second video frame into the first video to obtain the second video based on the frame insertion mode corresponding to the second frame insertion option in response to the trigger operation on any one of the second frame insertion options.
And generating the second video frame based on the first video frames at two sides of the inserted position in the first video. In some embodiments, in a case that the play speed of the first video does not change much, the terminal does not need to interpolate a frame between each pair of adjacent first video frames, and in a case that the play speed of the first video changes greatly, the terminal needs to interpolate a frame between each pair of adjacent first video frames to improve the fluency of the video, and accordingly, the terminal inserts a second video frame into the first video based on a frame interpolation manner corresponding to the second frame interpolation option, and an implementation manner of obtaining the second video includes: the terminal determines adjacent first video frames of the frames to be inserted based on the target playing speed, generates second video frames based on the adjacent first video frames of the frames to be inserted and the frame inserting mode corresponding to the second frame inserting option, and inserts the second video frames between the adjacent first video frames of the frames to be inserted to obtain a second video.
And determining adjacent first video frames of the frame to be inserted, namely the first video frames at two sides of the inserted position. The closer the target playing speed is to the original playing speed of the first video, the higher the fluency of the first video during playing is, the fewer the adjacent first video frames of the frame to be inserted are, and accordingly, the implementation manner of determining the adjacent first video frames of the frame to be inserted by the terminal based on the target playing speed includes: and when the target playing speed is not more than half of the original playing speed of the first video, the terminal takes each pair of adjacent first video frames as adjacent first video frames of the frame to be inserted. And when the target playing speed is more than half of the original playing speed of the first video, the terminal selects an adjacent first video frame of the frame to be inserted from the first video according to the difference between the target playing speed and the original playing speed.
For example, taking an original playing speed of 24 frames per second as an example, when a target playing speed is 0.5 times of the original playing speed, the playing speed of the first video after the playing interval is adjusted to 12 frames per second, at this time, 12 frames need to be additionally inserted to ensure that the playing time is still 24 frames per second, that is, 1 frame is inserted between each pair of adjacent first video frames, so as to ensure that the video is played more smoothly; when the target playing speed is 0.3 times of the original playing speed, the playing speed of the first video after the adjusted playing interval is 7 frames per second, and at the moment, 2 frames need to be inserted between each pair of adjacent first video frames to ensure that the video is played smoothly; when the target video speed is 0.8 times of the original playing speed, the playing speed of the first video after the playing interval is adjusted to be 20 frames per second, and at this time, the 24 frames per second can be met by inserting 4 frames, namely, inserting 1 frame of the second video frame between every two adjacent 5 frames.
And the second video frame is generated based on the frame insertion mode corresponding to the second frame insertion option. For example, if the frame interpolation mode corresponding to the second frame interpolation option is frame mixing, the terminal performs frame mixing on the first video frames at the two sides of the inserted position in the first video, that is, the adjacent first video frames of the frame to be interpolated to obtain the second video frame. If the frame interpolation mode corresponding to the second frame interpolation option is motion compensation, the terminal performs motion compensation on the first video frames at two sides of the inserted position in the first video to obtain a second video frame.
In the embodiment of the disclosure, in the process of frame interpolation of the first video, the adjacent first video frame of the frame to be interpolated is determined by combining the target playing speed, so that the frame interpolation operation is more flexible, the workload of frame interpolation is reduced, and the frame interpolation efficiency is improved.
It should be noted that the terminal may also determine the adjacent first video frame of the frame to be inserted through other implementation manners, which is not specifically limited by this disclosure. For example, the terminal uses the first video frame located at the target playing position as the adjacent first video frame of the frame to be inserted, the target playing position is also a preset frame inserted position, and the target playing position may be set according to the need, which is not limited by the present disclosure.
When the triggered speed change option is a curve speed change option and the target playing speed of any first video segment is less than the speed threshold, the terminal can perform frame interpolation on the first video segment, and accordingly, the terminal inserts a second video frame into the first video to obtain the second video in an implementation manner, which includes the following steps: the terminal inserts the second video frame between adjacent first video frames in the first video segment for the first video segment with the target playing speed less than the speed threshold value to obtain a second video segment; and forming the second video by the second video segment and a third video segment, wherein the third video segment is the first video segment of which the target playing speed is not less than the speed threshold.
The target playing speed is less than the speed threshold, which indicates that the frame rate of the first video segment is less than the original frame rate, so that the fluency of the first video segment during playing may be reduced, and the target playing speed is not less than the speed threshold, which indicates that the frame rate of the first video segment is not less than the original frame rate, so that the fluency of the first video segment during playing is not affected under normal conditions.
It should be noted that, when the terminal performs frame interpolation on the first video segment, the terminal may also determine an adjacent first video frame of the frame to be interpolated based on the target play speed, and the implementation manner of this may be obtained by inserting the second video frame into the first video based on the frame interpolation manner corresponding to the second frame interpolation option in the foregoing embodiment, which is not described herein again.
In the embodiment of the present disclosure, since the first video after the curve speed change may include a plurality of video segments with different playing speeds, only the video segment with the playing speed less than the speed threshold needs to be subjected to frame interpolation, so that the frame interpolation time is saved on the basis of ensuring the video fluency.
In the embodiment of the disclosure, a plurality of second frame insertion options are displayed in the frame insertion menu, so that a suitable frame insertion mode can be selected from different frame insertion modes to insert the frame of the first video, and further, the flexibility of video frame insertion is improved.
Since the frame insertion operation takes some time, the terminal may show the frame insertion progress on the video clip interface, and in some embodiments, the video clip method provided by the embodiments of the present disclosure further includes the following steps: and the terminal responds to the triggering operation of any one second frame insertion option and displays frame insertion progress information, wherein the frame insertion progress information is used for prompting the current frame insertion progress of the first video.
And the terminal updates and displays the frame insertion progress information according to the real-time frame insertion progress of the first video. The display mode of the frame insertion progress information may be set as required, which is not specifically limited in the present disclosure, and in some embodiments, the frame insertion progress information is displayed in the form of a progress bar or a progress percentage value. For example, referring to fig. 6, the terminal shows frame insertion progress information "in frame insertion processing at the middle position of the video clip interface: 75% ".
In the embodiment of the disclosure, the frame insertion progress information is displayed, so that a user can see the frame insertion progress of the current first video in real time, the progress display mode is more humanized, and the visual effect of the progress display is improved.
Since the user may be mistakenly touching the second frame insertion option or the terminal needs to perform other operations during the frame insertion process, the terminal may provide an option for canceling the frame insertion to stop the current frame insertion operation. In some embodiments, the video clipping method provided by the embodiments of the present disclosure further includes the following steps: the terminal responds to the triggering operation of any second frame insertion option and displays a frame insertion canceling option; and stopping the frame interpolation of the first video in response to the triggering operation of the frame interpolation cancellation option.
When the second frame insertion option is triggered, the terminal can simultaneously display the frame insertion cancellation option and the frame insertion progress information. The display mode of the option of canceling the frame insertion may be set as required, and this disclosure is not particularly limited thereto. For example, referring to fig. 6, the terminal shows a cancel frame insertion option "cancel" below the frame insertion progress information.
It should be noted that, when the frame interpolation canceling option is triggered, the terminal may already perform partial frame interpolation on the first video, and after the frame interpolation on the first video is stopped, the terminal subsequently performs other operations on the first video based on the non-interpolated frame, that is, the frame interpolated part in the first video fails.
In the embodiment of the disclosure, by displaying the option of canceling the frame interpolation, the user can trigger the option in the process of frame interpolation of the first video, so that the effect of stopping frame interpolation is realized, the convenience of frame interpolation cancellation is improved, and the operation mode of video frame interpolation is enriched.
In some embodiments, the terminal prompts the user that frame insertion is successful or frame insertion is failed by displaying a prompt message, and accordingly, the video clipping method provided by the embodiment of the present disclosure further includes the following steps: the terminal responds to the completion of the first video frame insertion, displays frame insertion completion information and displays the second frame insertion option in a selected state, wherein the frame insertion completion information is used for prompting the completion of the first video frame insertion; and in response to the failure of frame insertion of the first video, displaying frame insertion failure information, wherein the frame insertion failure information is used for prompting the failure of frame insertion of the first video and prompting the re-frame insertion of the first video.
For example, referring to fig. 7, the terminal displays the frame insertion completion information "slow frame insertion success", and the second frame insertion option corresponding to the frame mixture is in a selected state (highlight state).
In some embodiments, in case the terminal performs video interpolation by means of the server, and in case the network connection between the terminal and the server fails, the terminal determines that the first video interpolation failed. For example, the frame insertion failure information is "processing failure, retry please".
In the embodiment of the disclosure, the user can timely know that the current first video completes the frame insertion by displaying the frame insertion completion information, and the user can timely know that the first video fails to frame insertion by displaying the frame insertion failure information, so that the next operation can be timely performed, and the prompt effect of the video frame insertion is improved.
It should be noted that the terminal may also prompt the user that the frame insertion succeeds or fails in a voice prompt manner or other manners, which is not limited in this disclosure.
Since the terminal may already perform frame interpolation on the first video before triggering the first frame interpolation option, for example, during variable-speed editing of the first video, and buffer the video after frame interpolation, that is, the second video, the terminal does not need to perform frame interpolation on the first video. In some embodiments, the video clipping method provided by the embodiments of the present disclosure further includes the following steps: and the terminal responds to the triggering operation of any one second frame insertion option, and displays the second frame insertion option in a selected state under the condition that the second video is cached.
When the second frame insertion option is triggered, the terminal judges whether a second video is cached or not, if the second video is cached, the second frame insertion option is directly displayed in a selected state, otherwise, the first video is subjected to frame insertion, and when the frame insertion is completed, the second frame insertion option is displayed in the selected state.
In the embodiment of the disclosure, since the second video is cached, the frame insertion of the first video is not required to be repeated, so that the second frame insertion option is directly displayed in the selected state, the operation flow is reduced, and the video frame insertion efficiency is improved.
After the first video frame insertion is completed, the terminal may update the option name of the first frame insertion option to prompt the user that the frame insertion operation has been currently performed, and in some embodiments, the video clipping method provided by the embodiments of the present disclosure further includes the following steps: and the terminal responds to the completion of the first video frame insertion, and updates the option name of the first frame insertion option in the video clip interface to the option name of the triggered second frame insertion option.
For example, referring to FIG. 7, the first frame insertion option in the video clip interface is updated from "slow frame insertion" to "frame mix".
In the embodiment of the disclosure, when the first video frame insertion is completed, the option name of the first frame insertion option in the video clip interface is updated to the option name of the triggered second frame insertion option, so that a user can see the frame insertion mode used by the first video in the video clip interface, the display of a frame insertion menu does not need to be triggered, and the effect of interface display is improved.
After the first video frame insertion is completed, the terminal may further perform other operations on the first video, and then the terminal may cancel the frame insertion menu, in some embodiments, the video clipping method provided by the embodiment of the present disclosure further includes the following steps: and the terminal responds to the display canceling operation of the frame insertion menu and cancels the display of the frame insertion menu.
The method comprises the steps that a menu retraction option is displayed in an insertion frame menu and used for canceling the display of the insertion frame menu, correspondingly, a user triggers the menu retraction option, and the terminal responds to triggering operation of the menu retraction option and cancels the display of the insertion frame menu. For example, referring to FIG. 7, a menu retraction option is shown in the upper right hand corner of the frame insertion menu.
In the embodiment of the disclosure, the display frame insertion menu is cancelled, so that the terminal can continue to perform other operations in the video clip interface, thereby enriching the interface display mode and improving the interface display effect.
In step S306, the terminal presents the second video in the video clip interface.
After the terminal obtains the second video, the terminal may display the second video in the video clip interface, for example, the terminal displays a first frame video frame of the second video, or plays the second video, so that the user can view an effect after the video frame insertion, which is convenient for subsequent operations. In the embodiment of the disclosure, the terminal buffers the second video after the second video is obtained by frame interpolation.
In the embodiment of the disclosure, when the target playing speed of the first video with the adjusted playing interval is smaller than the speed threshold, the playing interval between the first video frames is increased, and then the first video may have a phenomenon of unsmooth playing.
In the embodiment of the present disclosure, after the frame insertion of the first video is completed, the terminal may further adjust the playing speed of the first video again, so that the second video obtained by the previous frame insertion fails, and accordingly, the terminal needs to perform frame insertion again on the first video, and accordingly, fig. 8 is a flowchart illustrating a video clipping method according to an exemplary embodiment. Referring to fig. 8, this embodiment is described by taking as an example that after the terminal performs frame interpolation on the first video, the first video is shifted again, so as to perform frame interpolation on the first video again, and obtain a second video, and the method includes the following steps:
in step S801, in response to the triggering operation on the speed change option, the terminal updates the first frame interpolation option shown in the video clip interface to a third frame interpolation option, where the third frame interpolation option is used to re-frame the first video.
Wherein, since the speed change options include a normal speed change option and a curve speed change option, no matter which speed change option is triggered, the terminal updates the first frame insertion option in the video clip interface to the third frame insertion option when the target playing speed is changed.
For example, referring to fig. 9, the target playing speed of the first video is first adjusted to 0.4x, the first video is interpolated in a frame interpolation manner of frame mixing to obtain the second video, and then the target playing speed of the first video is adjusted to 0.2x, since the variable-speed clipping is performed on the first video again after the frame interpolation, and the target playing speed is changed, the terminal updates the first frame interpolation option "frame mixing" (the option name is updated after the frame interpolation is completed) to the third frame interpolation option "update frame interpolation".
Since the user may not know the function of the third frame insertion option, the terminal may prompt the user by presenting a prompt message, and in some embodiments, the video clipping method provided by the embodiments of the present disclosure further includes the following steps: and the terminal displays re-frame insertion information under the condition that the first frame insertion option is updated to the third frame insertion option, wherein the re-frame insertion information is used for prompting to re-frame the first video.
The display mode and the prompt content of the re-interpolation information may be set as required, which is not specifically limited in the present disclosure. For example, referring to fig. 9, the terminal displays the re-frame-insertion information "the frame is updated after the speed change adjustment" above the third frame-insertion option.
In the embodiment of the disclosure, the user can timely know that the first video can be re-inserted at present by displaying the re-frame insertion information, so that the possibility of re-inserting the video is improved, and the accuracy of video frame insertion is further improved.
Since the second video obtained by the previous frame interpolation has already failed in the case of the change of the target play speed, in some embodiments, the video clipping method provided by the embodiments of the present disclosure further includes the following steps: and the terminal responds to the triggering operation of the speed change option and deletes the cached second video under the condition that the second video is cached.
In the embodiment of the present disclosure, since the first video needs to be interpolated again after the speed is changed again, and the buffered second video is the result of the last frame interpolation, that is, the buffered second video is invalidated, the buffered second video is deleted, so that the buffering space is saved.
In step S802, the terminal inserts a second video frame into the first video to obtain a second video in response to the triggering operation on the third frame insertion option and when the target playing speed is less than the speed threshold.
In some embodiments, the terminal inserts the second video frame into the first video, and the implementation manner of obtaining the second video is the same as the implementation manner of steps S304 to S305, and is not described herein again. For example, referring to fig. 9, the user triggers the third frame insertion option, the terminal displays a frame insertion menu, and the non-frame insertion option is selected by default in the frame insertion menu.
In some embodiments, the video clip interface further presents a variable speed menu, the variable speed menu including the variable speed option; correspondingly, the video clipping method provided by the embodiment of the disclosure further includes the following steps: the terminal responds to the cancellation display operation of the variable speed menu, and displays a re-frame insertion confirming option and a re-frame insertion cancellation option under the condition that the first video is not re-frame-inserted based on the third frame insertion option; responding to the triggering operation of the frame re-insertion confirming option, and executing the step of inserting a second video frame into the first video to obtain a second video under the condition that the target playing speed is less than a speed threshold; in response to a triggering operation of the re-frame interpolation cancellation option, the first video is not interpolated.
When the user triggers and cancels the display variable speed menu, the terminal can prompt the user whether to perform frame re-insertion or not under the condition that the terminal does not perform frame interpolation on the video subjected to variable speed editing again. The reinsertion frame confirmation option, the reinsertion frame cancellation option, the display mode, and the option name may be set as needed, which is not specifically limited in this disclosure. For example, referring to fig. 10, a cancellation presentation option (i.e., a menu retraction option corresponding to the shift menu) is presented in the upper right corner of the shift menu, the user triggers the cancellation presentation option, the terminal responds to the triggering operation, presents a re-interpolation frame confirmation option "update" and a re-interpolation frame cancellation option "cancel", and also presents a prompt message "shift is modified, and whether to update the interpolation frame". And if the frame re-insertion confirmation option is triggered, displaying the frame insertion progress information until the frame insertion completion information 'slow frame insertion success'.
In the embodiment of the disclosure, by displaying the re-frame insertion confirmation option, the user can realize the re-frame insertion by triggering the option when the user wants to perform the frame insertion on the first video, so that the possibility of the video re-frame insertion is improved, and a selection mode without re-frame insertion is provided for the user by displaying the re-frame insertion cancellation option, so that the selection mode of the frame insertion operation is enriched.
In step S803, the terminal presents the second video in the video clip interface.
And after the first video is subjected to frame re-insertion to obtain a second video, the terminal displays the second video. In addition, the terminal caches the second video for subsequent operation.
In the embodiment of the disclosure, since the user may also trigger video speed change after video frame interpolation, by displaying the third frame interpolation option, the user can select whether to interpolate the first video again, so that the video meets the speed change requirement and has sufficient fluency, thereby improving the accuracy of video frame interpolation.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
FIG. 11 is a block diagram illustrating a video clipping device in accordance with an example embodiment. Referring to fig. 11, the apparatus includes: a first presentation unit 1101, a determination unit 1102, an adjustment unit 1103, a frame insertion unit 1104, and a second presentation unit 1105.
A first presentation unit 1101 configured to perform presentation of a video clip interface that presents a first video to be clipped;
a determining unit 1102 configured to perform determining a target play speed of the first video based on the video clip interface;
an adjusting unit 1103 configured to perform adjusting a playing interval of a plurality of first video frames in the first video based on the target playing speed;
an interpolation unit 1104 configured to perform, in a case where the target play speed is less than a speed threshold, interpolation of a second video frame in the first video to obtain a second video, the second video frame being generated based on first video frames on both sides of an interpolated frame position in the first video;
a second presenting unit 1105 configured to perform presenting the second video in the video clip interface. In some embodiments, the video clip interface further exhibits a first frame insertion option for inserting frames into the first video; the frame insertion unit 1104 is configured to insert the second video frame into the first video to obtain the second video in response to a trigger operation on the first frame insertion option if the target playing speed is less than the speed threshold.
In some embodiments, the frame interpolation unit 1104 includes:
the display subunit is configured to execute a triggering operation responding to the first frame interpolation option, and display a frame interpolation menu, wherein the frame interpolation menu comprises a plurality of second frame interpolation options, and each second frame interpolation option corresponds to one frame interpolation mode;
and the frame inserting subunit is configured to execute triggering operation responding to any one second frame inserting option, and insert the second video frame into the first video based on the frame inserting mode corresponding to the second frame inserting option to obtain the second video.
In some embodiments, the apparatus further comprises:
and the third display unit is configured to execute a triggering operation responding to any one of the second frame insertion options, and display frame insertion progress information which is used for prompting the current frame insertion progress of the first video.
In some embodiments, the apparatus further comprises:
the fourth display unit is configured to execute a triggering operation responding to any one of the second frame insertion options and display a frame insertion cancellation option; and stopping the frame interpolation of the first video in response to the triggering operation of the frame interpolation cancellation option.
In some embodiments, the apparatus further comprises:
a fifth display unit, which is used for displaying frame insertion completion information in response to completion of the first video frame insertion, and displaying the second frame insertion option in a selected state, wherein the frame insertion completion information is used for prompting completion of the first video frame insertion; and in response to the failure of frame insertion of the first video, displaying frame insertion failure information, wherein the frame insertion failure information is used for prompting the failure of frame insertion of the first video and prompting the re-frame insertion of the first video.
In some embodiments, the apparatus further comprises:
a sixth presentation unit configured to perform, in response to a trigger operation on any one of the second frame insertion options, in a case where the second video has been cached, presentation of the second frame insertion option in a selected state.
In some embodiments, the apparatus further comprises:
the display subunit is further configured to perform canceling the display of the frame interpolation menu in response to a canceling display operation of the frame interpolation menu.
In some embodiments, the apparatus further comprises:
a first updating unit configured to perform updating an option name of a first frame insertion option in the video clip interface to an option name of a triggered second frame insertion option in response to completion of the first video frame insertion.
In some embodiments, the frame insertion menu further comprises a not frame insertion option, the apparatus further comprising:
the frame interpolation subunit is further configured to perform not interpolating the first video in response to a trigger operation on the not-frame-interpolation option.
In some embodiments, the video clip interface further exhibits a first frame insertion option for inserting frames into the first video and a variable speed option for adjusting a play speed of the first video, the apparatus further comprising:
a second updating unit configured to update a first frame insertion option presented in the video clip interface to a third frame insertion option in response to a triggering operation on the speed change option, wherein the third frame insertion option is used for re-frame insertion of the first video;
the frame interpolation unit 1104 is configured to perform, in response to a triggering operation on the third frame interpolation option, in a case that the target playing speed is less than the speed threshold, inserting the second video frame into the first video to obtain the second video.
In some embodiments, the apparatus further comprises:
a seventh presentation unit configured to perform, in a case where the first frame interpolation option is updated to the third frame interpolation option, presentation of re-frame interpolation information for prompting re-frame interpolation of the first video.
In some embodiments, the apparatus further comprises:
and a deleting unit configured to perform a deletion of the buffered second video in a case where the second video has been buffered in response to a trigger operation to the shift option.
In some embodiments, the video clip interface further exhibits a variable speed menu, the variable speed menu including the variable speed option; the device also includes:
an eighth presentation unit configured to perform presentation of a re-interpolation confirmation option and a re-interpolation cancellation option without re-interpolating the first video based on the third interpolation option in response to a cancellation presentation operation of the variable speed menu;
the frame interpolation unit 1104 is configured to perform a triggering operation in response to the re-frame interpolation confirmation option, and in a case that the target playing speed is less than the speed threshold, insert the second video frame into the first video to obtain the second video; in response to a triggering operation of the re-frame interpolation cancellation option, the first video is not interpolated.
In some embodiments, the video clip interface further exhibits a variable speed option for adjusting a playback speed of the first video, the variable speed option including a curvilinear variable speed option for adjusting a playback speed of a plurality of first video segments comprised by the first video; in the case that the playing speed of any one of the first video segments is less than the speed threshold, the frame interpolation unit 1104 is configured to perform, for the first video segment whose playing speed is less than the speed threshold, interpolating the second video frame in the first video segment to obtain a second video segment; and forming the second video by the second video segment and a third video segment, wherein the third video segment is the first video segment of which the target playing speed is not less than the speed threshold.
In some embodiments, the video clip interface further exhibits a first frame insertion option for inserting frames into the first video; the device also includes:
an eighth presentation unit configured to perform presentation of the first frame insertion option as an inoperable state in a case where the target playback speed is not less than the speed threshold; and in the case that the target playing speed is less than the speed threshold value, the first frame insertion option is shown to be operable.
In some embodiments, the apparatus further comprises:
a ninth presentation unit configured to perform, in a case where the first frame insertion option is presented in the operable state, presentation of frame insertion prompting information for prompting that frame insertion is currently possible.
In some embodiments, the apparatus further comprises:
a tenth presentation unit configured to perform, in a case where the first frame insertion option is presented in the inoperable state, presentation of frame insertion disabling information in response to a trigger operation on the first frame insertion option, the frame insertion disabling information being used to prompt that frame insertion is not currently possible.
In the embodiment of the disclosure, when the target playing speed of the first video with the adjusted playing interval is smaller than the speed threshold, the playing interval between the first video frames is increased, and then the first video may have a phenomenon of unsmooth playing.
With regard to the video clipping apparatus in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the video clipping method, and is not described in detail here.
Fig. 12 is a block diagram illustrating a terminal according to an example embodiment. In some embodiments, the terminal 100 is: desktop computers, notebook computers, tablet computers, smart phones or other terminals, etc. The terminal 100 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, the terminal 100 includes: a processor 101 and a memory 102.
In some embodiments, processor 101 includes one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. In some embodiments, the processor 101 is implemented in hardware using at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). In some embodiments, the processor 101 also includes a main processor and a coprocessor, the main processor is a processor for Processing data in the wake state, also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 101 is integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor 101 further includes an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
In some embodiments, memory 102 includes one or more computer-readable storage media that are non-transitory. In some embodiments, memory 102 also includes high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 102 is used to store at least one instruction for execution by processor 101 to implement the video clipping method provided by method embodiments in the present disclosure.
In some embodiments, the terminal 100 may further include: a peripheral interface 103 and at least one peripheral. In some embodiments, processor 101, memory 102, and peripheral interface 103 are connected by a bus or signal line. In some embodiments, various peripheral devices are connected to peripheral interface 103 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 104, display screen 105, camera assembly 106, audio circuitry 107, positioning assembly 108, and power supply 109.
The peripheral interface 103 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 101 and the memory 102. In some embodiments, processor 101, memory 102, and peripheral interface 103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 101, the memory 102 and the peripheral interface 103 are implemented on a single chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 104 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 104 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 104 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. In some embodiments, the rf circuitry 104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. In some embodiments, the radio frequency circuitry 104 communicates with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 104 further includes NFC (Near Field Communication) related circuits, which are not limited by this disclosure.
The display screen 105 is used to display a UI (User Interface). In some embodiments, the UI includes graphics, text, icons, video, and any combination thereof. When the display screen 105 is a touch display screen, the display screen 105 also has the ability to capture touch signals on or over the surface of the display screen 105. In some embodiments, the touch signal is input to the processor 101 as a control signal for processing. At this point, the display screen 105 is also used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 105 is one, and is disposed on a front panel of the terminal 100; in other embodiments, the display screens 105 are at least two, respectively disposed on different surfaces of the terminal 100 or in a folded design; in other embodiments, the display 105 is a flexible display disposed on a curved surface or on a folded surface of the terminal 100. Even further, the display screen 105 is arranged in a non-rectangular irregular pattern, i.e. a shaped screen. In some embodiments, the Display 105 is made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 106 is used to capture images or video. In some embodiments, camera assembly 106 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each of the rear cameras is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and a VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, camera head assembly 106 also includes a flash. In some embodiments, the flash is a single color temperature flash, and in some embodiments, the flash is a dual color temperature flash. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp and is used for light compensation under different color temperatures.
In some embodiments, audio circuitry 107 includes a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 101 for processing or inputting the electric signals to the radio frequency circuit 104 to realize voice communication. For stereo capture or noise reduction purposes, in some embodiments, multiple microphones are provided, each at a different location of terminal 100. In some embodiments, the microphone is an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 101 or the radio frequency circuit 104 into sound waves. In some embodiments, the speaker is a conventional membrane speaker, and in some embodiments, the speaker is a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to human, but also the electric signal can be converted into a sound wave inaudible to human for use in distance measurement or the like. In some embodiments, audio circuitry 107 also includes a headphone jack.
The positioning component 108 is used to locate the current geographic Location of the terminal 100 to implement navigation or LBS (Location Based Service). In some embodiments, the Positioning component 107 is a Positioning component based on the united states GPS (Global Positioning System), the chinese beidou System, or the russian galileo System.
The power supply 109 is used to supply power to various components in the terminal 100. In some embodiments, the power source 109 is alternating current, direct current, a disposable battery, or a rechargeable battery. When the power supply 109 includes a rechargeable battery, the rechargeable battery is a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery is also used to support fast charge technology.
In some embodiments, the terminal 100 also includes one or more sensors 110. The one or more sensors 110 include, but are not limited to: acceleration sensor 111, gyro sensor 112, pressure sensor 113, fingerprint sensor 114, optical sensor 115, and proximity sensor 116.
In some embodiments, the acceleration sensor 111 detects acceleration magnitudes on three coordinate axes of a coordinate system established with the terminal 100. For example, the acceleration sensor 111 is used to detect components of the gravitational acceleration in three coordinate axes. In some embodiments, the processor 101 controls the display screen 105 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 111. In some embodiments, the acceleration sensor 111 is also used for the acquisition of motion data of a game or a user.
In some embodiments, the gyro sensor 112 detects the body direction and the rotation angle of the terminal 100, and the gyro sensor 112 and the acceleration sensor 111 cooperate to acquire the 3D motion of the user on the terminal 100. The processor 101 can implement the following functions according to the data collected by the gyro sensor 112: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
In some embodiments, the pressure sensors 113 are disposed on the side bezel of the terminal 100 and/or underlying layers of the display screen 105. When the pressure sensor 113 is disposed on the side frame of the terminal 100, a user's holding signal of the terminal 100 can be detected, and the processor 101 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 113. When the pressure sensor 113 is disposed at the lower layer of the display screen 105, the processor 101 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 105. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 114 is used for collecting a fingerprint of the user, and the processor 101 identifies the user according to the fingerprint collected by the fingerprint sensor 114, or the fingerprint sensor 114 identifies the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 101 authorizes the user to perform relevant sensitive operations including unlocking a screen, viewing encrypted information, downloading software, paying, and changing settings, etc. In some embodiments, the fingerprint sensor 114 is disposed on the front, back, or side of the terminal 100. When a physical button or a vendor Logo is provided on the terminal 100, the fingerprint sensor 114 is integrated with the physical button or the vendor Logo.
The optical sensor 115 is used to collect the ambient light intensity. In one embodiment, processor 101 controls the display brightness of display screen 105 based on the ambient light intensity collected by optical sensor 115. Specifically, when the ambient light intensity is high, the display brightness of the display screen 105 is increased; when the ambient light intensity is low, the display brightness of the display screen 105 is reduced. In another embodiment, the processor 101 also dynamically adjusts the shooting parameters of the camera head assembly 106 according to the ambient light intensity collected by the optical sensor 115.
A proximity sensor 116, also known as a distance sensor, is typically disposed on the front panel of the terminal 100. The proximity sensor 116 is used to collect the distance between the user and the front surface of the terminal 100. In one embodiment, when the proximity sensor 116 detects that the distance between the user and the front surface of the terminal 100 gradually decreases, the processor 101 controls the display 105 to switch from the bright screen state to the dark screen state; when the proximity sensor 116 detects that the distance between the user and the front surface of the terminal 100 is gradually increased, the processor 101 controls the display 105 to switch from the breath-screen state to the bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 12 is not intended to be limiting of terminal 100, and can include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an exemplary embodiment, there is also provided a computer-readable storage medium comprising instructions, for example, the memory 102 comprising instructions, which when executed by the processor 101 of the terminal 100, enable the terminal 100 to perform the video clipping method in the above-described embodiments. In some embodiments, the computer-readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, and so forth.
In an exemplary embodiment, a computer program product is also provided, which comprises a computer program that, when executed by a processor, implements the video clipping method in the above-described embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method of video clipping, the method comprising:
displaying a video clipping interface, wherein the video clipping interface displays a first video to be clipped;
determining a target play speed of the first video based on the video clip interface;
adjusting a playing interval of a plurality of first video frames in the first video based on the target playing speed;
under the condition that the target playing speed is smaller than a speed threshold, inserting a second video frame into the first video to obtain a second video, wherein the second video frame is generated based on the first video frames on two sides of the position of the inserted frame in the first video;
in the video clip interface, the second video is presented.
2. The method of claim 1, wherein the video clip interface further presents a first frame insertion option for inserting frames into the first video; under the condition that the target playing speed is smaller than the speed threshold, inserting a second video frame into the first video to obtain a second video, wherein the method comprises the following steps:
and under the condition that the target playing speed is smaller than the speed threshold, responding to the triggering operation of the first frame insertion option, and inserting the second video frame into the first video to obtain the second video.
3. The method of claim 2, wherein the inserting the second video frame in the first video in response to the triggering operation of the first frame insertion option to obtain the second video comprises:
responding to the triggering operation of the first frame insertion option, and displaying a frame insertion menu, wherein the frame insertion menu comprises a plurality of second frame insertion options, and each second frame insertion option corresponds to one frame insertion mode;
and responding to the triggering operation of any second frame insertion option, and inserting the second video frame into the first video based on the frame insertion mode corresponding to the second frame insertion option to obtain the second video.
4. The method of claim 3, further comprising:
and responding to the triggering operation of any second frame insertion option, and displaying frame insertion progress information, wherein the frame insertion progress information is used for prompting the current frame insertion progress of the first video.
5. The method of claim 3, further comprising:
responding to the trigger operation of any second frame insertion option, and displaying a frame insertion cancellation option;
and stopping the frame interpolation of the first video in response to the triggering operation of the frame interpolation cancellation option.
6. The method of claim 3, further comprising:
displaying frame insertion completion information in response to completion of the first video frame insertion, and displaying the second frame insertion option in a selected state, wherein the frame insertion completion information is used for prompting completion of the first video frame insertion;
and responding to the failure of frame insertion of the first video, displaying frame insertion failure information, wherein the frame insertion failure information is used for prompting the failure of frame insertion of the first video and prompting the re-frame insertion of the first video.
7. A video clipping apparatus, characterized in that the apparatus comprises:
a first presentation unit configured to perform presentation of a video clip interface that presents a first video to be clipped;
a determining unit configured to perform determining a target play speed of the first video based on the video clip interface;
an adjusting unit configured to perform adjusting a playing interval of a plurality of first video frames in the first video based on the target playing speed;
the frame interpolation unit is configured to insert a second video frame into the first video to obtain a second video under the condition that the target playing speed is smaller than a speed threshold, wherein the second video frame is generated based on the first video frames on two sides of the frame interpolation position in the first video;
a second presentation unit configured to perform presentation of the second video in the video clip interface.
8. A terminal, characterized in that the terminal comprises:
one or more processors;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the video clipping method of any of claims 1-6.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of a terminal, enable the terminal to perform the video clipping method of any one of claims 1-6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the video clipping method of any one of claims 1-6.
CN202111152804.XA 2021-09-29 2021-09-29 Video editing method, device, terminal and storage medium Active CN113766275B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111152804.XA CN113766275B (en) 2021-09-29 2021-09-29 Video editing method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111152804.XA CN113766275B (en) 2021-09-29 2021-09-29 Video editing method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113766275A true CN113766275A (en) 2021-12-07
CN113766275B CN113766275B (en) 2023-05-30

Family

ID=78798287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111152804.XA Active CN113766275B (en) 2021-09-29 2021-09-29 Video editing method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113766275B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116260928A (en) * 2023-05-15 2023-06-13 湖南马栏山视频先进技术研究院有限公司 Visual optimization method based on intelligent frame insertion

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6424789B1 (en) * 1999-08-17 2002-07-23 Koninklijke Philips Electronics N.V. System and method for performing fast forward and slow motion speed changes in a video stream based on video content
US20120210232A1 (en) * 2011-02-16 2012-08-16 Wang Xiaohuan C Rate Conform Operation for a Media-Editing Application
US20200118594A1 (en) * 2018-10-12 2020-04-16 Adobe Inc. Video inpainting via user-provided reference frame
CN111385639A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 Video special effect adding method, device, equipment and storage medium
CN111640187A (en) * 2020-04-20 2020-09-08 中国科学院计算技术研究所 Video splicing method and system based on interpolation transition
CN112689111A (en) * 2020-12-21 2021-04-20 峰米(北京)科技有限公司 Video processing method, device, terminal and storage medium
WO2021175049A1 (en) * 2020-03-05 2021-09-10 Oppo广东移动通信有限公司 Video frame interpolation method and related apparatus
WO2021175055A1 (en) * 2020-03-05 2021-09-10 Oppo广东移动通信有限公司 Video processing method and related device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6424789B1 (en) * 1999-08-17 2002-07-23 Koninklijke Philips Electronics N.V. System and method for performing fast forward and slow motion speed changes in a video stream based on video content
US20120210232A1 (en) * 2011-02-16 2012-08-16 Wang Xiaohuan C Rate Conform Operation for a Media-Editing Application
US20200118594A1 (en) * 2018-10-12 2020-04-16 Adobe Inc. Video inpainting via user-provided reference frame
CN111385639A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 Video special effect adding method, device, equipment and storage medium
WO2021175049A1 (en) * 2020-03-05 2021-09-10 Oppo广东移动通信有限公司 Video frame interpolation method and related apparatus
WO2021175055A1 (en) * 2020-03-05 2021-09-10 Oppo广东移动通信有限公司 Video processing method and related device
CN111640187A (en) * 2020-04-20 2020-09-08 中国科学院计算技术研究所 Video splicing method and system based on interpolation transition
CN112689111A (en) * 2020-12-21 2021-04-20 峰米(北京)科技有限公司 Video processing method, device, terminal and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WANRONG: "该如何进⾏pr补帧?", 《虎课网百科,HTTPS://M.HUKE88.COM/BAIKE/A32050/》 *
天津滨海迅腾科技集团有限公司主编: "《视频剪辑与特效》", 31 August 2018, 南开大学出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116260928A (en) * 2023-05-15 2023-06-13 湖南马栏山视频先进技术研究院有限公司 Visual optimization method based on intelligent frame insertion
CN116260928B (en) * 2023-05-15 2023-07-11 湖南马栏山视频先进技术研究院有限公司 Visual optimization method based on intelligent frame insertion

Also Published As

Publication number Publication date
CN113766275B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
CN110336960B (en) Video synthesis method, device, terminal and storage medium
CN110233976B (en) Video synthesis method and device
CN108769562B (en) Method and device for generating special effect video
CN109246466B (en) Video playing method and device and electronic equipment
CN109302538B (en) Music playing method, device, terminal and storage medium
CN108391171B (en) Video playing control method and device, and terminal
CN108769561B (en) Video recording method and device
CN107908929B (en) Method and device for playing audio data
CN109618212B (en) Information display method, device, terminal and storage medium
US11632584B2 (en) Video switching during music playback
CN111065001B (en) Video production method, device, equipment and storage medium
CN111031393A (en) Video playing method, device, terminal and storage medium
CN110300274B (en) Video file recording method, device and storage medium
CN110324689B (en) Audio and video synchronous playing method, device, terminal and storage medium
CN110868636B (en) Video material intercepting method and device, storage medium and terminal
CN108831513B (en) Method, terminal, server and system for recording audio data
CN111901658A (en) Comment information display method and device, terminal and storage medium
CN112383808A (en) Video playing method, device, terminal and storage medium
CN113938748A (en) Video playing method, device, terminal, storage medium and program product
CN112565911A (en) Bullet screen display method, bullet screen generation device, bullet screen equipment and storage medium
CN111083526B (en) Video transition method and device, computer equipment and storage medium
CN114546227A (en) Virtual lens control method, device, computer equipment and medium
CN111818358A (en) Audio file playing method and device, terminal and storage medium
CN111565338A (en) Method, device, system, equipment and storage medium for playing video
CN112866584B (en) Video synthesis method, device, terminal 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