CN113766275B - Video editing method, device, terminal and storage medium - Google Patents
Video editing method, device, terminal and storage medium Download PDFInfo
- Publication number
- CN113766275B CN113766275B CN202111152804.XA CN202111152804A CN113766275B CN 113766275 B CN113766275 B CN 113766275B CN 202111152804 A CN202111152804 A CN 202111152804A CN 113766275 B CN113766275 B CN 113766275B
- Authority
- CN
- China
- Prior art keywords
- video
- frame
- option
- frame inserting
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 123
- 238000003780 insertion Methods 0.000 claims description 122
- 230000037431 insertion Effects 0.000 claims description 122
- 230000004044 response Effects 0.000 claims description 68
- 230000008859 change Effects 0.000 claims description 60
- 230000001960 triggered effect Effects 0.000 claims description 32
- 238000012790 confirmation Methods 0.000 claims description 18
- 238000009432 framing Methods 0.000 claims description 13
- 230000000694 effects Effects 0.000 abstract description 18
- 238000012545 processing Methods 0.000 abstract description 12
- 238000010586 diagram Methods 0.000 description 12
- 230000002093 peripheral effect Effects 0.000 description 10
- 230000001133 acceleration Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000002156 mixing Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 238000004590 computer program Methods 0.000 description 4
- 230000006978 adaptation Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 239000000919 ceramic Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000012966 insertion method Methods 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 239000010409 thin film Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
- H04N21/234381—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440281—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Television Signal Processing For Recording (AREA)
- Management Or Editing Of Information On Record Carriers (AREA)
Abstract
The disclosure relates to a video editing method, a video editing device, a terminal and a storage medium, and belongs to the technical field of video processing. The video editing method comprises the following steps: 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 clip interface; adjusting 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 value, inserting a second video frame between the first videos to obtain second videos, wherein the second video frame is generated based on the first video frames at two sides of the inserted frame position in the first videos; in the video clip interface, a second video is presented. In the method, the second video frames are inserted into the first video, so that the playing interval of the video frames in the generated second video is smaller, the smoothness of the video in playing is improved, and the display effect of the video is further improved.
Description
Technical Field
The disclosure relates to the technical field of video processing, and in particular relates to a video editing method, a video editing device, a video editing terminal and a storage medium.
Background
Currently, a user can issue a video on a network video platform through a terminal so as to be watched by other users. Before the video is released, the user can also clip the video through the terminal, for example, a clip mode of dividing clips, changing speed clips or adding animations and the like, so as to improve the display effect of the video.
In the related art, a variable speed clip is to change the frame rate of video. In the process of variable speed editing of video, taking an 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, transmission frame number per second), this is equivalent to reducing the frame rate of the video to 15FPS, and the playing interval between two adjacent video frames is prolonged from the original 33.3ms (millisecond) to 66.66ms. The video playing speed is reduced, and the frame rate of the video is also reduced, so that the smoothness of video playing is also reduced, and therefore, a method capable of improving the smoothness of video playing when the video is subjected to variable speed editing is needed urgently, so as 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 the fluency of video playing. The technical scheme of the present disclosure is as follows:
According to a first aspect of embodiments of the present disclosure, there is provided a video editing method, the method comprising:
displaying a video clip interface, wherein the video clip interface displays a first video to be clipped;
determining a target playing speed of the first video based on the video clip interface;
adjusting 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 a speed threshold value, 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 at two sides of the inserted frame position in the first video;
and displaying the second video in the video clip interface.
In the above scheme, because the play interval between the first video frames becomes larger when the target play speed of the first video with the play interval adjusted is smaller than the speed threshold, the first video may have a phenomenon of unsmooth play, and the play interval of the video frames in the generated second video is smaller by inserting the second video frame into the first video, thereby improving the smoothness of the video in play and further improving the display effect of the video.
In some embodiments, the video clip interface also presents a first frame insertion option for inserting frames of the first video; and 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 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 inserting option, inserting the second video frame into the first video to obtain the second video.
In the scheme, the first frame inserting option is displayed in the video clip interface, and when the target playing speed is smaller than the speed threshold, the user can trigger the first frame inserting option so as to insert frames of the first video, so that the user can flexibly select whether to insert frames of the first video, and the flexibility and convenience of video frame inserting are improved.
In some embodiments, the inserting the second video frame into the first video in response to the triggering operation of the first frame inserting option, to obtain the second video includes:
responding to the triggering operation of the first frame inserting options, displaying a frame inserting menu, wherein the frame inserting menu comprises a plurality of second frame inserting options, and each second frame inserting option corresponds to one frame inserting mode;
And responding to the triggering operation of any second frame inserting option, and inserting 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 the scheme, the plurality of second frame inserting options are displayed in the frame inserting menu, so that a proper frame inserting mode can be selected from different frame inserting modes to insert frames of the first video, and the flexibility of video frame inserting is improved.
In some embodiments, the method further comprises:
and responding to the triggering operation of any second frame inserting option, and displaying frame inserting progress information, wherein the frame inserting progress information is used for prompting the current frame inserting progress of the first video.
In the scheme, the frame inserting progress information is displayed, so that a user can see the frame inserting 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.
In some embodiments, the method further comprises:
responding to the triggering operation of any second frame inserting option, and displaying a frame inserting canceling option;
and responding to the triggering operation of the frame inserting cancellation option, and stopping frame inserting of the first video.
In the scheme, the option of canceling the frame inserting is displayed, so that a user can trigger the option in the process of inserting the frame into the first video, the effect of stopping frame inserting is achieved, the convenience of canceling the frame inserting is improved, and the operation mode of frame inserting of the video is enriched.
In some embodiments, the method further comprises:
displaying frame inserting completion information in response to the completion of the first video frame inserting, and displaying the second frame inserting option as a selected state, wherein the frame inserting completion information is used for prompting the completion of the first video frame inserting;
and responding to the frame inserting failure of the first video, displaying frame inserting failure information, wherein the frame inserting failure information is used for prompting the frame inserting failure of the first video and prompting the frame inserting of the first video again.
In the scheme, the user can timely learn that the frame inserting of the current first video is completed by displaying the frame inserting completion information, and the user can timely learn that the frame inserting of the first video fails by displaying the frame inserting failure information, so that the next operation can be timely performed, and the prompting effect of the frame inserting of the video is improved.
In some embodiments, the method further comprises:
And responding to the triggering operation of any second frame inserting option, and displaying the second frame inserting option as a selected state under the condition that the second video is cached.
In the above scheme, since the second video is already cached, the first video does not need to be repeatedly inserted, so that the second frame inserting option is directly displayed in a selected state, the operation flow is reduced, and the efficiency of video frame inserting is improved.
In some embodiments, the method further comprises:
and canceling the display of the frame inserting menu in response to the cancel display operation of the frame inserting menu.
In the scheme, the display frame inserting menu is canceled, 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:
and in response to completion of the first video frame insertion, updating 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.
In the above scheme, when the first video frame inserting is completed, the user can see the frame inserting mode used by the first video on the video clip interface by updating the option name of the first frame inserting option in the video clip interface to the option name of the triggered second frame inserting option, so that the display of the frame inserting menu is not required to be triggered, and the interface display effect is improved.
In some embodiments, the frame insertion menu further comprises a no frame insertion option, the method further comprising:
and responding to the triggering operation of the non-frame inserting option, and not inserting frames into the first video.
In the scheme, the selection mode of the video frame inserting operation is enriched by displaying the non-frame inserting option in the frame inserting menu, so that the video frame inserting operation is more humanized.
In some embodiments, the video clip interface further presents a first frame insertion option for inserting frames of the first video and a variable speed option for adjusting a play speed of the first video, and after presenting the second video in the video clip interface, the method further comprises:
responding to the triggering operation of the variable speed options, and updating the first frame inserting options displayed in the video clip interface into third frame inserting options, wherein the third frame inserting options are used for carrying out frame inserting on the first video again;
and responding to the triggering operation of the third frame inserting option, and executing the step of inserting a second video frame into the first video to obtain the second video under the condition that the target playing speed is smaller than a speed threshold.
In the above scheme, since the user may trigger the video to change speed after the video is inserted, by displaying the third frame inserting option, the user can select whether to insert the frame into the first video again, so that the video meets the speed changing requirement and has enough smoothness, and the accuracy of video frame inserting is improved.
In some embodiments, the method further comprises:
and displaying re-frame inserting information under the condition that the first frame inserting option is updated to be the third frame inserting option, wherein the re-frame inserting information is used for prompting the re-frame inserting of the first video.
In the scheme, the user can know that the first video can be re-inserted in time by displaying the re-inserting frame information, so that the possibility of re-inserting the video is improved, and the accuracy of inserting the video is further improved.
In some embodiments, after the second video is shown in the video clip interface, the method further comprises:
and in response to a triggering operation of the speed change option, deleting the cached second video in the case of caching the second video.
In the above scheme, since the first video needs to be inserted again after the speed is changed again, the buffered second video is the result of the last frame insertion, that is, the buffered second video fails, and the buffered second video is deleted, so that the buffer space is saved.
In some embodiments, the video clip interface also presents a shift menu, the shift menu including the shift option; the method further comprises the steps of:
responsive to a cancel presentation operation of the variable speed menu, presenting a re-frame confirmation option and a re-frame cancel option without re-framing the first video based on the third frame insertion option;
responding to the triggering operation of the reinsertion frame confirmation 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;
and in response to a triggering operation of the reinsertion cancellation option, not carrying out the frame insertion on the first video.
In the scheme, the selection mode of no re-frame inserting is provided for the user by displaying the re-frame inserting confirmation option, so that the user can realize the re-frame inserting by triggering the option when the user wants to insert the frame of the first video, the possibility of the video re-frame inserting is improved, and the selection mode of the frame inserting operation is enriched by displaying the re-frame inserting cancellation option.
In some embodiments, the video clip interface further presents a speed change option for adjusting the playing speed of the first video, the speed change option including a curved speed change option for adjusting the playing speeds of a plurality of first video segments included in the first video; and if the target playing speed of any one of the first video segments is less 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 the 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 a first video segment with the target playing speed not less than the speed threshold.
In the above scheme, since the first video after curve speed change may include a plurality of video segments with different playing speeds, the video segments with the target playing speed smaller than the speed threshold are only required to be inserted, so that the frame inserting time is saved on the basis of ensuring the video smoothness.
In some embodiments, the video clip interface also presents a first frame insertion option for inserting frames of the first video; the method further comprises the steps of:
displaying the first frame inserting option as an inoperable state under the condition that the target playing speed is not less than the speed threshold value;
and displaying the first frame inserting option as an operable state under the condition that the target playing speed is smaller than the speed threshold value.
In the above scheme, the operation state of the first frame inserting option is adjusted according to the target playing speed of the first video, so that a user can select whether to insert frames into the first video or not according to the operation state of the first frame inserting option in real time, and the interface display effect is improved.
In some embodiments, the method further comprises:
and displaying the frame inserting prompt information under the condition that the first frame inserting option is displayed in the operable state, wherein the frame inserting prompt information is used for prompting that the frame inserting can be currently performed.
In the scheme, the frame inserting prompt information is displayed when the first frame inserting option is in the operable state, so that a user can know the function of the first frame inserting option, and the convenience of frame inserting operation is improved.
In some embodiments, the method further comprises:
and under the condition that the first frame inserting option is displayed in the inoperable state, responding to the triggering operation of the first frame inserting option, displaying frame inserting disabling information, wherein the frame inserting disabling information is used for prompting that the frame inserting cannot be performed currently.
In the above scheme, when the first frame inserting option is in an inoperable state but triggered, the user definitely uses the first frame inserting option by displaying the frame inserting disabling information, so that the first frame inserting option is triggered at a proper time, and the convenience of frame inserting operation is improved.
According to a second aspect of embodiments of the present disclosure, there is provided a video editing apparatus, the apparatus comprising:
A first presentation unit configured to execute a presentation 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 adjustment of play intervals of a plurality of first video frames in the first video based on the target play speed;
the frame inserting unit is configured to insert a second video frame into the first video to obtain a second video when the target playing speed is smaller than a speed threshold, wherein the second video frame is generated based on the first video frames at two sides of the inserted frame position in the first video;
and a second display unit configured to display the second video in the video clip interface.
In some embodiments, the video clip interface also presents a first frame insertion option for inserting frames of the first video; the frame inserting unit is configured to perform, in response to a trigger operation on the first frame inserting option, inserting the second video frame into the first video to obtain the second video when the target playing speed is smaller than the speed threshold.
In some embodiments, the frame inserting unit includes:
a display subunit configured to perform a trigger operation in response to the first frame inserting option, and display a frame inserting menu, where the frame inserting menu includes a plurality of second frame inserting options, and each of the second frame inserting options corresponds to one frame inserting mode;
and the frame inserting sub-unit is configured to execute the triggering operation of any 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 perform a trigger operation responding to any second frame inserting option, and display frame inserting progress information, wherein the frame inserting progress information is used for prompting the current frame inserting progress of the first video.
In some embodiments, the apparatus further comprises:
a fourth presentation unit configured to perform a presentation of a cancel frame insertion option in response to a trigger operation to any one of the second frame insertion options; and responding to the triggering operation of the frame inserting cancellation option, and stopping frame inserting of the first video.
In some embodiments, the apparatus further comprises:
a fifth display unit, configured to display frame insertion completion information in response to completion of the frame insertion for the first video, and display the second frame insertion option as a selected state, where the frame insertion completion information is used to prompt completion of the frame insertion for the first video; and responding to the frame inserting failure of the first video, displaying frame inserting failure information, wherein the frame inserting failure information is used for prompting the frame inserting failure of the first video and prompting the frame inserting of the first video again.
In some embodiments, the apparatus further comprises:
and a sixth display unit configured to perform a trigger operation in response to any one of the second frame inserting options, and display the second frame inserting option as a selected state in the case where the second video has been cached.
In some embodiments, the apparatus further comprises:
the presentation subunit is further configured to perform a cancel presentation of the break-in menu in response to a cancel presentation operation of the break-in menu.
In some embodiments, the apparatus further comprises:
a first updating unit configured to perform updating of an option name of a first inter-frame option in the video clip interface to an option name of a triggered second inter-frame option in response to completion of the first video inter-frame.
In some embodiments, the frame insertion menu further comprises a no frame insertion option, the apparatus further comprising:
the frame inserting subunit is further configured to perform a trigger operation in response to the no frame inserting option, not to frame the first video.
In some embodiments, the video clip interface also presents a first frame insertion option for inserting frames of 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 perform updating of a first frame inserting option shown in the video clip interface to a third frame inserting option for re-inserting the first video in response to a trigger operation of the variable speed option;
the frame inserting unit is configured to perform a trigger operation for responding 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 smaller than the speed threshold.
In some embodiments, the apparatus further comprises:
and a seventh display unit configured to display, when the first frame inserting option is updated to the third frame inserting option, re-frame inserting information for prompting to re-frame the first video.
In some embodiments, the apparatus further comprises:
and a deleting unit configured to execute a trigger operation in response to the shift option, in a case where the second video has been cached, deleting the cached second video.
In some embodiments, the video clip interface also presents a shift menu, the shift menu including the shift option; the apparatus further comprises:
an eighth presentation unit configured to perform a presentation of a re-frame confirmation option and a re-frame cancellation option without re-framing the first video based on the third frame insertion option in response to a cancellation presentation operation of the variable-speed menu;
the frame inserting unit is configured to perform a trigger operation in response to the reinsertion frame confirmation option, and insert the second video frame into the first video to obtain the second video if the target playing speed is smaller than the speed threshold; and in response to a triggering operation of the reinsertion cancellation option, not carrying out the frame insertion on the first video.
In some embodiments, the video clip interface further presents a speed change option for adjusting the playing speed of the first video, the speed change option including a curved speed change option for adjusting the playing speeds of a plurality of first video segments included in the first video; the frame inserting unit is configured to execute, when the target playing speed of any one of the first video segments is smaller than the speed threshold, inserting the second video frame into the first video segment to obtain a second video segment for the first video segment with the target playing speed 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 a first video segment with the target playing speed not less than the speed threshold.
In some embodiments, the video clip interface also presents a first frame insertion option for inserting frames of the first video; the apparatus 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 play speed is not less than the speed threshold; and displaying the first frame inserting option as an operable state under the condition that the target playing speed is smaller than the speed threshold value.
In some embodiments, the apparatus further comprises:
and a ninth display unit configured to display a frame inserting prompt message when the first frame inserting option is displayed in the operable state, where the frame inserting prompt message is used for prompting that the frame inserting can be currently performed.
In some embodiments, the apparatus further comprises:
and a tenth display unit configured to perform display of, in response to a trigger operation on the first frame inserting option, frame inserting disabling information for prompting that frame inserting is currently disabled in a case where the first frame inserting option is displayed in the inoperable state.
According to a third aspect of embodiments of the present disclosure, there is provided a terminal comprising: 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 clip method described in the above embodiments.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium, which when executed by a processor of a terminal, causes the terminal to perform the video clip method described in the above 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 editing method described in the above 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 disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a schematic diagram illustrating an implementation environment of a video clip method according to an exemplary embodiment;
FIG. 2 is a flowchart illustrating a video clip method according to an exemplary embodiment;
FIG. 3 is a flowchart illustrating a video clip method according to an exemplary embodiment;
FIG. 4 is a schematic diagram of a video clip interface, shown in accordance with an exemplary embodiment;
FIG. 5 is a schematic diagram of a video clip interface, shown in accordance with an exemplary embodiment;
FIG. 6 is a schematic diagram of a video clip interface, shown in accordance with an exemplary embodiment;
FIG. 7 is a schematic diagram of a video clip interface, shown in accordance with an exemplary embodiment;
FIG. 8 is a flowchart illustrating a video clip method according to an exemplary embodiment;
FIG. 9 is a schematic diagram of a video clip interface, shown in accordance with an exemplary embodiment;
FIG. 10 is a schematic diagram of a video clip interface, shown in accordance with an exemplary embodiment;
FIG. 11 is a block diagram of a video clip apparatus according to an exemplary embodiment;
fig. 12 is a block diagram of a terminal according to an exemplary embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of 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 foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying 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 editing method provided by the embodiment of the disclosure is executed by a terminal. In some embodiments, the terminal is a desktop computer, notebook computer, tablet computer, smart phone, or other terminal.
FIG. 1 is a schematic diagram of an implementation environment of a video clip method, as shown in FIG. 1, according to an exemplary embodiment, the implementation environment comprising: 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, a target application is installed on the terminal 100, and the terminal 100 can clip video through the target application. The target application is any application capable of providing video clips, video releases, or video browsing functions. For example, the target application is a short video application, a social application, a video clip application, a browser, or any application containing webview controls, etc.
The server 200 is used to provide background services for the target application. Server 200 is a server or at least one of a server cluster cloud server consisting of several servers, a cloud computing platform, and a virtualization center. In some embodiments, the number of servers 200 may be greater or lesser, which is not limited by the disclosed embodiments.
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 watch. 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 clipped video is sent to the terminal 100, and the terminal 100 displays the clipped video for the user operating the terminal to watch.
The video editing method provided by the embodiment of the disclosure can be applied to video editing scenes. In some embodiments, taking a scene of publishing a video as an example, a user triggers a terminal to upload a section of video to be published, and the terminal clips the video by using the video clipping method provided by the embodiment of the present disclosure to obtain a section of video with higher smoothness, 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 video, clips the video by using the video clipping method provided by the embodiment of the present disclosure to obtain a video with higher fluency, and then stores the video.
It should be noted that the above application scenario is only an exemplary illustration, and does not limit the video clip scenario, and the present disclosure can be applied to any other video clip scenario in addition to the above scenario.
Fig. 2 is a flow chart illustrating a video clip method according to 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 playing speed of the first video based on the video clip interface.
In step S203, the terminal adjusts the playing intervals of the plurality of first video frames in the first video based on the target playing speed.
In step S204, if the target playing speed is less than the speed threshold, the terminal inserts a second video frame into the first video to obtain a second video, where the second video frame is generated based on the first video frames at two sides of the inserted frame position in the first video.
In step S205, the terminal displays the second video in the video clip interface.
In the embodiment of the disclosure, since the playing interval between the first video frames becomes larger when the target playing speed of the first video with the playing interval adjusted is smaller than the speed threshold, the first video may have a phenomenon of unsmooth playing, and the playing interval of the video frames in the generated second video is smaller by inserting the second video frame into the first video, so that the smoothness of the video in playing is improved, and the display effect of the video is further improved.
In some embodiments, the video clip interface also presents a first frame insertion option for inserting frames of the first video; 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 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 inserting option, inserting the second video frame into the first video to obtain the second video.
In some embodiments, the inserting the second video frame into the first video in response to the triggering operation of the first frame inserting option, to obtain the second video, includes:
responding to the triggering operation of the first frame inserting options, displaying a frame inserting menu, wherein the frame inserting menu comprises a plurality of second frame inserting options, and each second frame inserting option corresponds to one frame inserting mode;
and responding to the triggering operation of any second frame inserting option, and inserting 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 method further comprises:
and responding to the triggering operation of any second frame inserting option, displaying frame inserting progress information, wherein the frame inserting progress information is used for prompting the current frame inserting progress of the first video.
In some embodiments, the method further comprises:
responding to the triggering operation of any second frame inserting option, and displaying a frame inserting canceling option;
and responding to the triggering operation of the frame inserting cancellation option, and stopping frame inserting of the first video.
In some embodiments, the method further comprises:
displaying frame inserting completion information in response to the completion of the first video frame inserting, and displaying the second frame inserting option as a selected state, wherein the frame inserting completion information is used for prompting the completion of the first video frame inserting;
and responding to the frame inserting failure of the first video, displaying frame inserting failure information, wherein the frame inserting failure information is used for prompting the frame inserting failure of the first video and prompting the frame inserting of the first video again.
In some embodiments, the method further comprises:
and responding to the triggering operation of any second frame inserting option, and displaying the second frame inserting option 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 inserting menu in response to the cancel display operation of the frame inserting menu.
In some embodiments, the method further comprises:
in response to completion of the first video clip, the option name of the first clip option in the video clip interface is updated to the option name of the triggered second clip option.
In some embodiments, the frame insertion menu further comprises a no frame insertion option, the method further comprising:
and responding to the triggering operation of the non-frame inserting option, and not carrying out frame inserting on the first video.
In some embodiments, the video clip interface further presents a first frame insertion option for inserting frames of the first video and a variable speed option for adjusting a play speed of the first video, and after presenting the second video in the video clip interface, the method further comprises:
responding to the triggering operation of the variable speed option, and updating the first frame inserting option displayed in the video clip interface into a third frame inserting option, wherein the third frame inserting option is used for carrying out frame inserting on the first video again;
and responding to the triggering operation of the third frame inserting option, and executing the step of inserting a second video frame into the first video to obtain the second video under the condition that the target playing speed is smaller than a speed threshold.
In some embodiments, the method further comprises:
and under the condition that the first frame inserting option is updated to the third frame inserting option, displaying the re-frame inserting information, wherein the re-frame inserting information is used for prompting the re-frame inserting of the first video.
In some embodiments, after the second video is presented in the video clip interface, the method further comprises:
in response to a trigger operation of the shift option, deleting the cached second video if the second video is cached.
In some embodiments, the video clip interface also presents a shift menu, the shift menu including the shift option; the method further comprises the steps of:
responsive to a cancel presentation operation of the variable speed menu, presenting a reinsert confirmation option and a reinsert cancel option without reinserting the first video based on the third reinsertion option;
responding to the triggering operation of the reinsertion frame confirmation 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;
in response to a trigger operation of the reinsert cancellation option, the first video is not subject to an insertion.
In some embodiments, the video clip interface further presents a speed change option for adjusting the playing speed of the first video, the speed change option including a curved speed change option for adjusting the playing speeds of a plurality of first video segments included in the first video; if the target playing speed of any one of the first video segments is less 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 the 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 a first video segment of which the target playing speed is not less than the speed threshold.
In some embodiments, the video clip interface also presents a first frame insertion option for inserting frames of the first video; the method further comprises the steps of:
under the condition that the target playing speed is not less than the speed threshold, the first frame inserting option is displayed as an inoperable state;
and under the condition that the target playing speed is smaller than the speed threshold, displaying the first frame inserting option as an operable state.
In some embodiments, the method further comprises:
and under the condition that the first frame inserting option is displayed in the operable state, displaying frame inserting prompt information, wherein the frame inserting prompt information is used for prompting that the frame inserting can be performed currently.
In some embodiments, the method further comprises:
and under the condition that the first frame inserting option is displayed in the inoperable state, responding to the triggering operation of the first frame inserting option, displaying frame inserting disabling information, wherein the frame inserting disabling information is used for prompting that the frame inserting cannot be performed currently.
Fig. 3 is a flowchart illustrating a video clip method according to an exemplary embodiment. Referring to fig. 3, this embodiment is described by taking a terminal to clip a first video and obtain a second video as an example, and the method includes the following steps:
in step S301, the terminal presents a video clip interface that presents 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 particularly limited in this disclosure. The terminal is provided with a target application, and when a user wants to clip the video, the terminal is triggered to run the target application. In some embodiments, the user-triggered terminal presents 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 triggering operation on the video shooting option, the terminal shoots a first video in response to detecting the triggering operation, or the terminal selects the first video from the video library in response to detecting the triggering operation, so as to clip the first video.
In step S302, the terminal determines a target playing speed of the first video based on the video clip interface.
The video clip interface also displays a speed change option for adjusting the playing speed of the first video. The user can trigger the speed change option to trigger the terminal to clip the first video at a speed change, 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 curved shift option. Wherein the conventional variable speed option is used to equally adjust the play interval between the plurality of video frames of the first video. The adjustment refers to lengthening or shortening the play interval. The curve speed change option is used for respectively adjusting the playing speeds of a plurality of first video segments in the first video, namely, adjusting the playing interval between at least one video frame in the first video segment.
In the case that the triggered speed change option is a normal speed change option, an input area of the video clip interface displaying a target playing speed is provided, and in some embodiments, the implementation manner of determining the target playing speed corresponding to the speed change option by the terminal includes: the user manually inputs the playing speed in the input area, and the terminal obtains 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 this disclosure, for example, the display style of the input area is a rectangular input box. In the embodiment of the disclosure, the accuracy of the target playing speed is higher by manually inputting the playing speed.
Alternatively, a speed selector is presented in the video clip interface, the speed selector comprising a step speed. In some embodiments, the implementation manner of obtaining the target playing speed corresponding to the speed change option by the terminal includes: and triggering any stepping speed in the speed selector by the user, and determining the playing speed corresponding to the triggered stepping speed by the terminal to obtain the target playing speed.
The display style, the stepping speed and the selection range of the speed selector can be set according to requirements, and the disclosure is not limited in particular. For example, referring to fig. 4, the speed selector is shown in a sliding axis, the selection range is 0 to 10 times (x), the stepping speed is 0.1 times, and the playing speed indicated by 0.1 times is 0.1 times of the original playing speed of the first video.
It should be noted that, the terminal may also determine the target playing speed corresponding to the speed change option through other implementation manners, which is not specifically limited in this disclosure.
In the case where the triggered shift option is a curved shift option, the curved shift option includes a plurality of curved shift sub-options, each of the curved shift sub-options corresponding to one of the shift modes, and in some embodiments, the implementation 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 speed change mode may be set as needed, and the present disclosure is not particularly limited thereto. For example, the shift mode includes a montage shift, a flash shift, or a flash shift. 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 curved shift option further includes a non-shift sub-option, and accordingly, the terminal does not perform the curved shift clipping on the first video in response to a trigger operation of the non-shift sub-option.
In step S303, the terminal adjusts the playing intervals of the plurality of first video frames in the first video based on the target playing speed.
In some embodiments, where 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, and then the terminal adjusts the play interval of each first video frame in the first video to be 1.25 times of the original play interval. In the case that the triggered speed change option is a curvilinear speed change option, the target playing speeds of the first videos are in the form of a target playing speed set, wherein the target playing speed set comprises the target playing speeds corresponding to each first video segment in the first videos. Correspondingly, 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 play speed set is [0.5 times, 1 times, 2.5 times ], and correspondingly, the first video includes a first video segment of [ video segment 1, video segment 2, video segment 3], the terminal adjusts the play interval of each first video frame in video segment 1 to be 2 times of the original play interval, and adjusts the play interval of each first video frame in video segment 3 to be 0.4 times of the original play interval, without adjusting the play interval of the first video frames in video segment 2.
In the embodiment of the disclosure, the video clip interface further displays a first frame inserting option, and the first frame inserting option is used for inserting frames of the first video; accordingly, the video editing method provided by the embodiment of the present disclosure further includes the following steps: the terminal displays the first frame inserting option as an inoperable state under the condition that the target playing speed is not less than a speed threshold value; and under the condition that the target playing speed is smaller than the speed threshold, displaying the first frame inserting option as an operable state.
The speed threshold is preset by the terminal and can be set according to needs, which is not particularly limited in the disclosure. For example, the speed threshold is 1-fold, 0.8-fold, 0.6-fold, or the like, and the speed threshold is exemplified as 1-fold in the embodiment of the present disclosure. The operable state and the inoperable state may be set as desired, which is not particularly limited in this disclosure. For example, the operable state is a highlight state and the inoperable state is a gray state.
It should be noted that, in the process of curve variable speed clipping, the target playing speed set includes a plurality of target playing speeds, and accordingly, when any target playing speed in the target playing speed set is smaller than the speed threshold, the terminal determines that the target playing speed of the first video is smaller than the speed threshold; 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, when the normal shift option is selected, the "2x" speed selector is selected, the speed threshold is 1x, and the first frame inserting option "slow frame inserting" is in the gray state. Referring to fig. 5, the curve speed change option is selected, the non-speed change sub-option is selected, at this time, the first frame inserting option "slow frame inserting" is in a gray state, and when the curve speed change sub-option corresponding to the montage speed change mode is selected, the first frame inserting option "slow frame inserting" is in a highlight state due to the existence of the target playing speed smaller than the speed threshold.
In the embodiment of the disclosure, the operation state of the first frame inserting option is adjusted according to the target playing speed of the first video, so that a user can select whether to insert frames into the first video or not according to the operation state of the first frame inserting 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 inserting option, and then the terminal can prompt the user through the frame inserting prompt information, and accordingly, the video editing method provided by the embodiment of the disclosure further includes the following steps: and the terminal displays the frame inserting prompt information under the condition that the first frame inserting option is displayed in the operable state, wherein the frame inserting prompt information is used for prompting that the frame inserting can be performed currently.
The display mode and the prompt content of the frame inserting prompt information can be set according to the needs, and the disclosure is not limited in particular. For example, referring to fig. 6, displaying the frame inserting prompt information "frame inserting may promote video smoothness" above the first frame inserting option "slow frame inserting".
In the embodiment of the disclosure, the frame inserting prompt information is displayed when the first frame inserting option is in the operable state, so that a user can know the function of the first frame inserting option, and the convenience of frame inserting operation is improved.
In some embodiments, in a case that the first frame inserting option is in an inoperable state, the user may trigger the first frame inserting option, and then the terminal can prompt the user through the frame inserting disabling information, and accordingly, the video clipping method provided by the embodiment of the disclosure further includes the following steps: and under the condition that the first frame inserting option is displayed in the inoperable state, the terminal responds to the triggering operation of the first frame inserting option, and displays frame inserting disabling information which is used for prompting that the frame inserting cannot be performed currently.
The display mode and the prompt content of the inserting frame disabling information can be set according to the requirement, and the disclosure is not limited in particular. For example, referring to fig. 4, when the first frame inserting option "slow frame inserting" is clicked, the terminal displays frame inserting disabling information "less than 1x to insert frames", that is, frames cannot be inserted currently, and frames can be inserted when the target playing speed is less than the speed threshold (1 x).
In the embodiment of the disclosure, when the first frame inserting option is in an inoperable state but triggered, the frame inserting disabling information is displayed, so that a user definitely determines the use mode of the first frame inserting option, and the first frame inserting option is triggered at a proper time, thereby improving the convenience of frame inserting operation.
In step S304, the video clip interface further displays a first frame inserting option, where the first frame inserting option is used to insert frames of the first video, and when the target playing speed is less than the speed threshold, the terminal responds to a triggering operation of the first frame inserting option, displays a frame inserting menu, where the frame inserting menu includes a plurality of second frame inserting options, and each of the second frame inserting options corresponds to a frame inserting mode.
The frame inserting mode can be set according to requirements, and the disclosure is not limited in particular. In some embodiments, the frame insertion method includes frame mixing, motion compensation, frame sampling, or optical flow methods. In some embodiments, the frame inserting menu further includes a frame not inserting option, and correspondingly, the video editing 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 inserting option, and does not insert frames of the first video.
The display style of the option without inserting frames can be set according to needs, which is not particularly limited in the disclosure. For example, referring to fig. 6, the user triggers a first frame insertion option "slow frame insertion", the terminal presents a frame insertion menu having three options: the frame not inserted option, the frame mix option, and the motion compensation option.
In the embodiment of the disclosure, the selection mode of the video frame inserting operation is enriched by displaying the non-frame inserting option in the frame inserting menu, so that the video frame inserting operation is more humanized.
It should be noted that, the terminal may perform frame insertion on the first video after the first video is shifted, or the terminal may further perform frame insertion on the first video during the shifting of the first video, so as to obtain a second video with shifted and frame inserted, so as to save operation time. In addition, the terminal may automatically perform frame insertion on the first video, cache the video obtained by frame insertion, or the terminal may start frame insertion on the first video when the user triggers the first frame insertion option, which is not specifically limited in this disclosure.
In step S305, the terminal responds to the triggering operation of any second frame inserting option, and inserts a second video frame into the first video based on the frame inserting mode corresponding to the second frame inserting option, so as to obtain the second video.
Wherein the second video frame is generated based on the first video frame on both sides of the inserted position in the first video. In some embodiments, under a situation that a play speed of the first video does not change greatly, the terminal does not need to insert frames between each pair of adjacent first video frames, and under a situation that a play speed of the first video changes greatly, the terminal needs to insert frames between each pair of adjacent first video frames to improve video smoothness, and correspondingly, based on an inserting frame mode corresponding to the second inserting frame option, the terminal inserts the second video frames into the first video, and an implementation mode for 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 modes corresponding to the second frame inserting options, and inserts the second video frames between the adjacent first video frames of the frames to be inserted to obtain second videos.
The determined adjacent first video frames of the frames to be inserted are the first video frames at the 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 smoothness of the first video in playing, the fewer adjacent first video frames of the frames to be inserted, and correspondingly, the terminal determines the implementation manner of the adjacent first video frames of the frames to be inserted based on the target playing speed, including: 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 frames to be inserted. When the target playing speed is greater than half of the original playing speed of the first video, the terminal selects adjacent first video frames of the frames to be inserted from the first video according to the difference value between the target playing speed and the original playing speed.
For example, taking the original playing speed as 24 frames per second as an example, when the 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 be 12 frames per second, and at this time, 12 frames need to be additionally inserted to ensure that 24 frames per second are still used during playing, namely 1 frame is inserted between each pair of adjacent first video frames, so that smooth video playing is ensured; when the target playing speed is 0.3 times of the original playing speed, the playing speed of the first video after the playing interval is adjusted to be 7 frames per second, and at the moment, 2 frames are needed to be inserted between each pair of adjacent first video frames, so that the video playing can be ensured to be smooth; 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 the moment, 24 frames per second can be met by inserting 4 frames, namely, 1 frame of the second video frame can be inserted between every two adjacent 5 frames.
The second video frame is generated based on the frame inserting mode corresponding to the second frame inserting option. For example, the frame inserting mode corresponding to the second frame inserting option is frame mixing, and the terminal performs frame mixing on the first video frames at two sides of the inserted position in the first video, that is, the adjacent first video frames of the frames to be inserted, to obtain the second video frame. For another example, if the frame inserting mode corresponding to the second frame inserting 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 second video frames.
In the embodiment of the disclosure, in the process of inserting frames into the first video, the adjacent first video frames to be inserted into the frames are determined by combining the target playing speed, so that the frame inserting operation is more flexible, the workload of frame inserting is reduced, and the frame inserting 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 in 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, where the target playing position is a preset inserted frame position, and the target playing position may be set according to the need, which is not limited in the disclosure.
Under the condition that the triggered speed change option is a curve speed change option and the target playing speed of any first video segment is smaller than the speed threshold, the terminal can insert frames into the first video segment, and correspondingly, the terminal inserts second video frames into the first video to obtain a second video, and the implementation mode comprises 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 smaller 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 a first video segment of which the target playing speed is not less than the speed threshold.
The target playing speed is smaller than the speed threshold, which means that the frame rate of the first video segment is smaller than the original frame rate, the fluency of the first video segment during playing may be reduced, the target playing speed is not smaller than the speed threshold, which means that the frame rate of the first video segment is not smaller than the original frame rate, and the fluency of the first video segment during playing is not affected under normal conditions, so that the terminal can perform frame interpolation on the first video segment with the target playing speed smaller than the speed threshold, and does not perform frame interpolation on the first video segment with the target playing speed not smaller than the speed threshold, so that frame interpolation time is saved, and frame interpolation efficiency is improved.
It should be noted that, when the terminal inserts frames into the first video segment, the adjacent first video frames to be inserted can also be determined based on the target playing speed, and the implementation manner of the terminal inserts the second video frame into the first video based on the frame inserting manner corresponding to the second frame inserting option in the above embodiment, so as to obtain the implementation manner of the second video, which is not described herein again.
In the embodiment of the disclosure, since the first video after curve speed change may include a plurality of video segments with different playing speeds, the video segments with playing speeds smaller than the speed threshold are only required to be inserted, so that the frame inserting time is also saved on the basis of ensuring the video smoothness.
In the embodiment of the disclosure, the plurality of second frame inserting options are displayed in the frame inserting menu, so that a proper frame inserting mode can be selected from different frame inserting modes to insert frames of the first video, and the flexibility of video frame inserting is improved.
Because the frame inserting operation takes some time, the terminal can show the frame inserting 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 second frame inserting option, and displays frame inserting progress information which is used for prompting the current frame inserting progress of the first video.
And the terminal updates and displays the frame inserting progress information according to the real-time frame inserting progress of the first video. The manner of displaying the frame inserting progress information may be set as required, which is not particularly limited in this disclosure, and in some embodiments, the frame inserting progress information is displayed in the form of a progress bar or a progress percentage value, etc. For example, referring to fig. 6, the terminal shows the frame insertion progress information "in the frame insertion process" at the middle position of the video clip interface: 75% ".
In the embodiment of the disclosure, the frame inserting progress information is displayed, so that a user can see the frame inserting 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 have touched the second frame inserting option by mistake or the terminal needs to perform other operations during the frame inserting process, the terminal may provide an option for canceling the frame inserting to stop the current frame inserting operation. In some embodiments, the video editing 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 inserting option, and displays a frame inserting canceling option; and responding to the triggering operation of the frame inserting cancellation option, and stopping frame inserting of the first video.
When the second frame inserting option is triggered, the terminal can display the frame canceling frame inserting option and frame inserting progress information at the same time. The display mode of the frame inserting cancellation option can be set according to the requirement, and the disclosure is not limited in particular. For example, referring to fig. 6, the terminal shows a cancel plug option "cancel" below the plug progress information.
It should be noted that, when the frame canceling selection is triggered, the terminal may already partially frame the first video, and after stopping frame interpolation of the first video, the terminal performs other operations based on the first video without frame interpolation, that is, the frame inserted portion in the first video fails.
In the embodiment of the disclosure, the option of canceling the frame inserting is displayed, so that a user can trigger the option in the process of inserting the frame into the first video, the effect of stopping frame inserting is achieved, the convenience of canceling the frame inserting is improved, and the operation modes of frame inserting of the video are enriched.
In some embodiments, the terminal prompts the user that the frame insertion is successful or fails by displaying the prompt information, and correspondingly, the video editing method provided by the embodiment of the disclosure further includes the following steps: the terminal responds to the completion of the first video frame insertion, displays frame insertion completion information, displays the second frame insertion option as a selected state, and the frame insertion completion information is used for prompting the completion of the first video frame insertion; and responding to the frame inserting failure of the first video, displaying frame inserting failure information, wherein the frame inserting failure information is used for prompting the frame inserting failure of the first video and prompting the frame inserting of the first video again.
The display mode and the prompt content of the frame inserting completion information and the frame inserting failure information, and the display mode of the selected state can be set according to needs, which is not particularly limited in this disclosure, for example, referring to fig. 7, the terminal displays that the frame inserting completion information "slow frame inserting succeeds", and the second frame inserting option corresponding to the frame mixing is in the selected state (highlight state).
In some embodiments, the terminal determines that the first video insertion fails in the event that the terminal performs video insertion by means of the server, and in the event that the network connection between the terminal and the server fails. For example, the frame insertion failure information is "processing failure, please retry".
In the embodiment of the disclosure, the frame inserting completion information is displayed, so that a user can timely learn that the frame inserting of the current first video is completed, and the frame inserting failure information is displayed, so that the user can timely learn that the frame inserting of the first video fails, further, the next operation can be timely performed, and the prompting effect of the frame inserting of the video is improved.
It should be noted that, the terminal may also prompt the user of success or failure of frame insertion by voice prompt or other modes, which is not specifically limited in this disclosure.
Since the terminal may have already inserted the first video before triggering the first frame inserting option, for example, during the process of speed-changing editing the first video, and the video after the frame insertion, that is, the second video, is cached, the terminal does not need to insert the frame for the first video. In some embodiments, the video editing method provided by the embodiments of the present disclosure further includes the following steps: and the terminal responds to the triggering operation of any second frame inserting option, and the second frame inserting option is displayed as a selected state under the condition that the second video is cached.
When the second frame inserting option is triggered, the terminal judges whether the second video is cached, if so, the second frame inserting option is directly displayed in a selected state, otherwise, the first video is inserted, and when the frame inserting is completed, the second frame inserting option is displayed in the selected state.
In the embodiment of the disclosure, since the second video is already cached, repeated frame insertion is not needed for the first video, so that the second frame insertion option is directly displayed in a selected state, the operation flow is reduced, and the efficiency of video frame insertion 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 performed currently, 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 inserting, and updates the option name of the first frame inserting option in the video clip interface to the option name of the triggered second frame inserting 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 on the video clip interface, the display of a frame insertion menu is not required to be triggered, and the interface display effect is improved.
After the first video is inserted, the terminal may perform other operations on the first video, and then the terminal may cancel the display of the frame inserting menu, and in some embodiments, the video editing method provided by the embodiments of the present disclosure further includes the following steps: and the terminal responds to the cancel display operation of the frame inserting menu, and cancels display of the frame inserting menu.
The frame inserting menu is provided with a menu withdrawing option, the menu withdrawing option is used for canceling the frame inserting menu, correspondingly, the user triggers the menu withdrawing option, and the terminal cancels the frame inserting menu in response to the triggering operation of the menu withdrawing option. For example, referring to fig. 7, a menu retraction option is shown in the upper right hand corner of the add-in menu.
In the embodiment of the disclosure, the display frame inserting menu is canceled, so that the terminal can continue to perform other operations in the video clip interface, thereby enriching the interface display modes and improving the interface display effect.
In step S306, the terminal displays the second video in the video clip interface.
After obtaining 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 watch the effect of inserting the video frame, and the subsequent operation is convenient. In the embodiment of the disclosure, after the terminal inserts the frame to obtain the second video, the terminal caches the second video.
In the embodiment of the disclosure, since the playing interval between the first video frames becomes larger when the target playing speed of the first video with the playing interval adjusted is smaller than the speed threshold, the first video may have a phenomenon of unsmooth playing, and the playing interval of the video frames in the generated second video is smaller by inserting the second video frame into the first video, so that the smoothness of the video in playing is improved, and the display effect of the video is further improved.
In the embodiment of the present disclosure, after the first video is inserted, the terminal may further adjust the playing speed of the first video again, so that the second video obtained by the previous frame insertion is disabled, and therefore the terminal needs to re-insert the first video, and accordingly, fig. 8 is a flowchart of a video editing method according to an exemplary embodiment. Referring to fig. 8, in this embodiment, after the terminal frames the first video, the first video is shifted again, so that the first video is re-framed, and a second video is obtained, which is illustrated by taking the following steps as an example:
In step S801, the terminal updates the first frame inserting option shown in the video clip interface to a third frame inserting option for re-inserting frames of the first video in response to the triggering operation of the speed change option.
Wherein, since the speed change options include a regular speed change option and a curved speed change option, the terminal updates the first frame insertion option to the third frame insertion option in the video clip interface in case of a change in the target play speed, regardless of the trigger operation of which speed change option.
For example, referring to fig. 9, the target playing speed of the first video is adjusted to 0.4x, the first video is interpolated by adopting a frame blending interpolation method to obtain the second video, then the target playing speed of the first video is adjusted to 0.2x, after the interpolation, the first video is clipped at a variable speed again, and the target playing speed is changed, so that the terminal updates the first interpolation option "frame blending" (the option name is updated after the interpolation) to the third interpolation option "update interpolation".
Since the user may not know the function of the third frame inserting option, the terminal may prompt the user by displaying prompt information, and in some embodiments, 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 inserting option is updated to the third frame inserting option, the terminal displays the re-frame inserting information which is used for prompting the re-frame inserting of the first video.
The display mode and the prompt content of the reinsertion frame information can be set according to requirements, and the disclosure is not limited in particular. For example, referring to fig. 9, the terminal displays the re-framing information "after variable speed adjustment, the framing needs to be updated" above the third framing option.
In the embodiment of the disclosure, the display of the re-frame inserting information enables a user to know that the first video can be re-inserted in time, so that the possibility of re-inserting the video is improved, and the accuracy of inserting the video is further improved.
Since the second video obtained by previous frame insertion has failed in the event of a change in the target playback speed, in some embodiments, the video editing method provided by the embodiments of the present disclosure further includes the steps of: and the terminal responds to the triggering operation of the speed change option, and in the case of caching the second video, the cached second video is deleted.
In the embodiment of the disclosure, since the first video needs to be re-framed after the speed is changed again, the cached second video is the result of the last frame-framed, that is, the cached second video is invalid, and the cached second video is deleted, so that the cache space is saved.
In step S802, the terminal responds to the triggering operation of the third frame inserting option, and 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.
In some embodiments, the implementation manner of inserting the second video frame into the first video by the terminal to obtain the second video is the same as the implementation manner of steps S304-S305, and will not be described herein. For example, referring to fig. 9, the user triggers a third frame inserting option, and the terminal displays a frame inserting menu in which the frame inserting option is selected by default.
In some embodiments, the video clip interface also presents a shift menu that includes the shift option; accordingly, the video editing method provided by the embodiment of the present disclosure further includes the following steps: the terminal responds to the cancel display operation of the variable speed menu, and displays a reinsertion frame confirmation option and a reinsertion frame cancel option under the condition that the first video is not reinserted based on the third reinsertion frame option; responding to the triggering operation of the reinsertion frame confirmation 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; in response to a trigger operation of the reinsert cancellation option, the first video is not subject to an insertion.
Under the condition that the terminal does not insert frames of the video subjected to the speed changing clipping again, when the user triggers the display canceling speed changing menu, the terminal can prompt the user whether to insert frames again. The reinsertion confirmation option and reinsertion cancellation option and presentation mode and option name may be set as desired, as this disclosure is not particularly limited. For example, referring to fig. 10, the upper right corner of the shift menu is presented with a cancel presentation option (i.e., a menu retraction option corresponding to the shift menu), which the user triggers, the terminal presents, in response to the triggering operation, a reinsert confirm option "update" and a reinsert cancel option "cancel", and also presents a prompt message "shift has been modified, whether to update the plug frame". If the re-framing confirmation option is triggered, displaying the framing progress information until the framing completion information "slow framing is successful".
In the embodiment of the disclosure, the selection mode of the frame inserting operation is enriched by displaying the frame reinsertion confirmation option, so that the user can realize frame reinsertion by triggering the option when the user wants to frame the first video, the possibility of frame reinsertion of the video is improved, and the selection mode of the frame inserting operation is enriched by displaying the frame reinsertion cancellation option.
In step S803, the terminal displays the second video in the video clip interface.
And after the first video is re-inserted into the frame to obtain a second video, the terminal displays the second video. In addition, the terminal caches the second video for subsequent operations.
In the embodiment of the disclosure, since the user may trigger the video to change speed after the video is inserted, by displaying the third frame inserting option, the user can select whether to insert the first video again, so that the video meets the speed changing requirement and has enough smoothness, and the accuracy of video frame inserting is improved.
Any combination of the above-mentioned optional solutions may be adopted to form an optional embodiment of the present disclosure, which is not described herein in detail.
Fig. 11 is a block diagram illustrating a video clip apparatus according to an exemplary embodiment. Referring to fig. 11, the apparatus includes: a first display unit 1101, a determination unit 1102, an adjustment unit 1103, a frame insertion unit 1104, and a second display unit 1105.
A first presentation unit 1101 configured to execute a presentation video clip interface that presents a first video to be clipped;
a determining unit 1102 configured to perform determining a target playing speed of the first video based on the video clip interface;
An adjusting unit 1103 configured to perform adjustment of playing intervals of a plurality of first video frames in the first video based on the target playing speed;
a frame inserting unit 1104 configured to insert a second video frame into the first video to obtain a second video, where the second video frame is generated based on the first video frames at both sides of the inserted frame position in the first video, if the target playing speed is less than the speed threshold;
a second presenting unit 1105 configured to execute presenting the second video in the video clip interface. In some embodiments, the video clip interface also presents a first frame insertion option for inserting frames of the first video; the frame inserting unit 1104 is configured to perform, in response to a trigger operation on the first frame inserting option, inserting the second video frame into the first video to obtain the second video, in a case where the target playing speed is less than the speed threshold.
In some embodiments, the frame inserting unit 1104 includes:
a display subunit configured to perform a trigger operation in response to the first frame inserting option, and display a frame inserting menu, where the frame inserting menu includes a plurality of second frame inserting options, and each of the second frame inserting options corresponds to one frame inserting mode;
And the frame inserting sub-unit is configured to execute the triggering operation of responding to any 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 perform a trigger operation responding to any one of the second frame inserting options, and display frame inserting progress information which is used for prompting the current frame inserting progress of the first video.
In some embodiments, the apparatus further comprises:
a fourth presentation unit configured to perform a presentation of a cancel frame insertion option in response to a trigger operation for any one of the second frame insertion options; and responding to the triggering operation of the frame inserting cancellation option, and stopping frame inserting of the first video.
In some embodiments, the apparatus further comprises:
a fifth display unit, responsive to completion of the first video frame insertion, displaying frame insertion completion information, for displaying the second frame insertion option as a selected state, the frame insertion completion information being used to prompt completion of the first video frame insertion; and responding to the frame inserting failure of the first video, displaying frame inserting failure information, wherein the frame inserting failure information is used for prompting the frame inserting failure of the first video and prompting the frame inserting of the first video again.
In some embodiments, the apparatus further comprises:
and a sixth display unit configured to perform a trigger operation in response to any one of the second frame inserting options, and display the second frame inserting option as a selected state in the case where the second video has been cached.
In some embodiments, the apparatus further comprises:
the presentation subunit is further configured to perform a cancel presentation of the add-frame menu in response to a cancel presentation operation of the add-frame menu.
In some embodiments, the apparatus further comprises:
a first updating unit configured to perform updating of the option name of the first inter-cut option in the video clip interface to the option name of the triggered second inter-cut option in response to completion of the first video inter-cut.
In some embodiments, the frame insertion menu further includes a no frame insertion option, the apparatus further comprising:
the frame-inserting subunit is further configured to perform not frame-inserting the first video in response to a trigger operation for the no frame-inserting option.
In some embodiments, the video clip interface further presents a first frame insertion option for inserting frames of 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 perform updating of the first frame inserting option shown in the video clip interface to a third frame inserting option for re-inserting the first video in response to a trigger operation of the variable speed option;
the frame inserting unit 1104 is configured to perform a trigger operation for responding to the third frame inserting option, and insert the second video frame into the first video to obtain the second video if the target playing speed is smaller than the speed threshold.
In some embodiments, the apparatus further comprises:
and a seventh display unit configured to display re-frame information for prompting to re-frame the first video in case that the first frame inserting option is updated to the third frame inserting option.
In some embodiments, the apparatus further comprises:
and a deleting unit configured to perform a trigger operation in response to the shift option, in a case where the second video has been cached, deleting the cached second video.
In some embodiments, the video clip interface also presents a shift menu, the shift menu including the shift option; the apparatus further comprises:
An eighth presentation unit configured to perform a re-frame confirmation option and a re-frame cancellation option without re-framing the first video based on the third frame insertion option in response to a cancellation presentation operation of the variable-speed menu;
the frame inserting unit 1104 is configured to perform a trigger operation in response to the re-frame inserting confirmation option, and insert the second video frame into the first video to obtain the second video if the target playing speed is less than the speed threshold; in response to a trigger operation of the reinsert cancellation option, the first video is not subject to an insertion.
In some embodiments, the video clip interface further presents a speed change option for adjusting the playing speed of the first video, the speed change option including a curved speed change option for adjusting the playing speeds of a plurality of first video segments included in 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 inserting unit 1104 is configured to execute inserting the second video frame into the first video segment for the first video segment with the playing speed less than the speed threshold, so as 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 a first video segment of which the target playing speed is not less than the speed threshold.
In some embodiments, the video clip interface also presents a first frame insertion option for inserting frames of the first video; the apparatus further comprises:
an eighth presentation unit configured to perform presentation of the first frame inserting option as an inoperable state in a case where the target play speed is not less than the speed threshold; and under the condition that the target playing speed is smaller than the speed threshold, displaying the first frame inserting option as an operable state.
In some embodiments, the apparatus further comprises:
and a ninth display unit configured to display a frame inserting prompt message for prompting that the frame inserting is currently enabled when the first frame inserting option is displayed in the operable state.
In some embodiments, the apparatus further comprises:
and a tenth display unit configured to perform displaying, in response to a trigger operation on the first frame inserting option in a case where the first frame inserting option is displayed in the inoperable state, frame inserting disabling information for prompting that frame inserting is currently disabled.
In the embodiment of the disclosure, since the playing interval between the first video frames becomes larger when the target playing speed of the first video with the playing interval adjusted is smaller than the speed threshold, the first video may have a phenomenon of unsmooth playing, and the playing interval of the video frames in the generated second video is smaller by inserting the second video frame into the first video, so that the smoothness of the video in playing is improved, and the display effect of the video is further improved.
With respect to the video editing apparatus in the above-described embodiments, the specific manner in which the respective units perform the operations has been described in detail in the embodiments regarding the video editing method, and is not described in detail herein.
Fig. 12 is a block diagram of a terminal according to an exemplary embodiment. In some embodiments, the terminal 100 is: desktop computers, notebook computers, tablet computers, smart phones or other terminals, etc. Terminal 100 may also be referred to by other names of user devices, portable terminals, laptop terminals, desktop terminals, and the like.
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, or the like. In some embodiments, the processor 101 is implemented in hardware in at least one of a DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). In some embodiments, the processor 101 also includes a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); 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, image processor) for taking care of rendering and drawing of the content that the display screen is required 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 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 editing method provided by the method embodiments in the present disclosure.
In some embodiments, the terminal 100 may further optionally include: a peripheral interface 103 and at least one peripheral. In some embodiments, processor 101, memory 102, and peripheral interface 103 are coupled via buses or signal lines. In some embodiments, each peripheral device is connected to peripheral device 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 Radio Frequency circuit 104 is configured to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuitry 104 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency 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 radio frequency circuit 104 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, 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 protocol includes, but is not limited to: the world wide web, metropolitan area networks, intranets, generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 104 further includes NFC (Near Field Communication ) related circuitry, which is not limited by the present 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 collect touch signals at or above the surface of the display screen 105. In some embodiments, the touch signal is input as a control signal to the processor 101 for processing. At this time, the display screen 105 is also used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards. In some embodiments, the display screen 105 is one and is disposed on the front panel of the terminal 100; in other embodiments, the display screen 105 is at least two, and is 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 a folded surface of the terminal 100. Even further, the display screen 105 is also arranged in an irregular pattern that is not rectangular, i.e. a shaped screen. In some embodiments, the display 105 is made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode), or the like.
The camera assembly 106 is used to capture images or video. In some embodiments, the camera assembly 106 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera 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 dual-color temperature flash lamp refers to 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 circuit 107 includes a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, 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 for voice communication. For purposes of stereo acquisition or noise reduction, in some embodiments, the microphones are provided in a plurality of different locations of the terminal 100. In some embodiments, the microphone is an array microphone or an omni-directional pickup 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 thin film speaker, and in some embodiments, the speaker is a piezoceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only an electric signal but also an acoustic wave audible to humans can be converted into an acoustic wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 107 also includes a headphone jack.
The location component 108 is used to locate the current geographic location of the terminal 100 to enable navigation or LBS (Location Based Service, location based services). In some embodiments, the positioning component 108 is a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, or the Galileo system of Russia.
The power supply 109 is used to power the various components in the terminal 100. In some embodiments, the power source 109 is an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power source 109 comprises 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 further includes one or more sensors 110. The one or more sensors 110 include, but are not limited to: an acceleration sensor 111, a gyro sensor 112, a pressure sensor 113, a fingerprint sensor 114, an optical sensor 115, and a proximity sensor 116.
In some embodiments, the acceleration sensor 111 detects the magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 100. For example, the acceleration sensor 111 is used to detect components of gravitational acceleration on three coordinate axes. In some embodiments, processor 101 controls display screen 105 to display a user interface in either a landscape view or a portrait view based on gravitational acceleration signals acquired by acceleration sensor 111. In some embodiments, the acceleration sensor 111 is also used for the acquisition of motion data of a game or 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 collect the 3D motion of the user on the terminal 100. The processor 101 can realize the following functions according to the data collected by the gyro sensor 112: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
In some embodiments, the pressure sensor 113 is disposed at a side frame of the terminal 100 and/or at an underlying layer of the display screen 105. When the pressure sensor 113 is disposed at the side frame of the terminal 100, a grip signal of the terminal 100 by a user can be detected, and the processor 101 performs left-right hand recognition or quick operation according to the grip 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 controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 114 is used to collect a fingerprint of a user, and the processor 101 identifies the identity of the user based on the fingerprint collected by the fingerprint sensor 114, or the fingerprint sensor 114 identifies the identity of the user based on the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 101 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for 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 key or a manufacturer Logo is provided on the terminal 100, the fingerprint sensor 114 is integrated with the physical key or the manufacturer 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 intensity of ambient light collected by optical sensor 115. Specifically, when the intensity of the ambient light is high, the display brightness of the display screen 105 is turned up; when the ambient light intensity is low, the display brightness of the display screen 105 is turned down. In another embodiment, the processor 101 also dynamically adjusts the shooting parameters of the camera assembly 106 based on the intensity of ambient light collected by the optical sensor 115.
A proximity sensor 116, also referred to as a distance sensor, is typically provided on the front panel of the terminal 100. The proximity sensor 116 is used to collect the distance between the user and the front of the terminal 100. In one embodiment, when the proximity sensor 116 detects that the distance between the user and the front face of the terminal 100 gradually decreases, the processor 101 controls the display screen 105 to switch from the bright screen state to the off screen state; when the proximity sensor 116 detects that the distance between the user and the front surface of the terminal 100 gradually increases, the processor 101 controls the display screen 105 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 12 is not limiting of the terminal 100 and can include more or fewer components than shown, or certain components may be combined, or a different arrangement of components may be employed.
In an exemplary embodiment, a computer readable storage medium comprising instructions, such as a memory 102 comprising instructions, is also provided, which when executed by the processor 101 of the terminal 100, enables the terminal 100 to perform the video clip method in the above-described embodiments. In some embodiments, the computer readable storage medium may be ROM (Read-Only Memory), RAM (Random Access Memory ), CD-ROM (Compact Disc Read-Only Memory, compact disc Read Only), magnetic tape, floppy disk, optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, comprising a computer program which, when executed by a processor, implements the video editing method in the above 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 adaptations, uses, or adaptations of the disclosure following the general 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 is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (36)
1. A method of video editing, the method comprising:
displaying a video clip interface, wherein the video clip interface displays a first video to be clipped, and the video clip interface also displays a first frame inserting option;
determining a target playing speed of the first video based on the video clip interface;
adjusting playing intervals of a plurality of first video frames in the first video based on the target playing speed;
when the target playing speed is smaller than a speed threshold value and the target playing speed is not larger than half of the original playing speed of the first video, responding to a triggering operation of the first frame inserting option, and taking each pair of adjacent first video frames as adjacent first video frames of frames to be inserted; inserting a second video frame between adjacent first video frames of the frames to be inserted in the first video to obtain a second video, wherein the second video frame is generated based on the adjacent first video frames of the frames to be inserted;
When the target playing speed is smaller than the speed threshold and the target playing speed is larger than half of the original playing speed of the first video, responding to the triggering operation of the first frame inserting option, and selecting adjacent first video frames of the frames to be inserted from the first video according to the difference value between the target playing speed and the original playing speed; inserting the second video frame between adjacent first video frames of the frames to be inserted in the first video to obtain the second video;
displaying the second video in the video clip interface;
the method further comprises the steps of:
and in response to completion of the first video frame insertion, updating the option name of the first frame insertion option to an option name corresponding to a frame insertion mode used in frame insertion, wherein the frame insertion mode used in frame insertion is a frame insertion mode selected from a plurality of displayed frame insertion modes after the first frame insertion option is triggered.
2. The method according to claim 1, wherein the method further comprises:
responding to the triggering operation of the first frame inserting options, displaying a frame inserting menu, wherein the frame inserting menu comprises a plurality of second frame inserting options, and each second frame inserting option corresponds to one frame inserting mode;
And responding to the triggering operation of any second frame inserting option, and inserting 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.
3. The method according to claim 2, wherein the method further comprises:
and responding to the triggering operation of any second frame inserting option, and displaying frame inserting progress information, wherein the frame inserting progress information is used for prompting the current frame inserting progress of the first video.
4. The method according to claim 2, wherein the method further comprises:
responding to the triggering operation of any second frame inserting option, and displaying a frame inserting canceling option;
and responding to the triggering operation of the frame inserting cancellation option, and stopping frame inserting of the first video.
5. The method according to claim 2, wherein the method further comprises:
displaying frame inserting completion information in response to the completion of the first video frame inserting, and displaying the second frame inserting option as a selected state, wherein the frame inserting completion information is used for prompting the completion of the first video frame inserting;
and responding to the frame inserting failure of the first video, displaying frame inserting failure information, wherein the frame inserting failure information is used for prompting the frame inserting failure of the first video and prompting the frame inserting of the first video again.
6. The method according to claim 2, wherein the method further comprises:
and responding to the triggering operation of any second frame inserting option, and displaying the second frame inserting option as a selected state under the condition that the second video is cached.
7. The method according to claim 2, wherein the method further comprises:
and canceling the display of the frame inserting menu in response to the cancel display operation of the frame inserting menu.
8. The method according to claim 2, wherein the method further comprises:
and in response to completion of the first video inter-frame, updating the option name of the first inter-frame option to the option name of the triggered second inter-frame option.
9. The method of claim 2, wherein the frame insertion menu further comprises a no frame insertion option, the method further comprising:
and responding to the triggering operation of the non-frame inserting option, and not inserting frames into the first video.
10. The method of claim 1, wherein the video clip interface further presents a speed change option for adjusting a play speed of the first video, wherein after presenting the second video in the video clip interface, the method further comprises:
Responding to the triggering operation of the variable speed options, and updating the first frame inserting options displayed in the video clip interface into third frame inserting options, wherein the third frame inserting options are used for carrying out frame inserting on the first video again;
and responding to the triggering operation of the third frame inserting option, and executing the step of inserting 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.
11. The method according to claim 10, wherein the method further comprises:
and displaying re-frame inserting information under the condition that the first frame inserting option is updated to be the third frame inserting option, wherein the re-frame inserting information is used for prompting the re-frame inserting of the first video.
12. The method of claim 10, wherein after the second video is presented in the video clip interface, the method further comprises:
and in response to a triggering operation of the speed change option, deleting the cached second video in the case of caching the second video.
13. The method of claim 10, wherein the video clip interface further presents a shift menu, the shift menu comprising the shift option; the method further comprises the steps of:
Responsive to a cancel presentation operation of the variable speed menu, presenting a re-frame confirmation option and a re-frame cancel option without re-framing the first video based on the third frame insertion option;
responding to the triggering operation of the reinsertion frame confirmation option, and executing the step of inserting 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;
and in response to a triggering operation of the reinsertion cancellation option, not carrying out the frame insertion on the first video.
14. The method of claim 1, wherein the video clip interface further presents a speed change option for adjusting the play speed of the first video, the speed change option comprising a curved speed change option for adjusting the play speed of a plurality of first video segments comprised by the first video;
and inserting the second video frame into the first video to obtain the second video when the target playing speed of any one of the first video segments is smaller than the speed threshold, wherein the method comprises the following steps:
For the first video segment of which the target playing speed is 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 a first video segment of which the target playing speed is not less than the speed threshold.
15. The method according to claim 1, wherein the method further comprises:
displaying the first frame inserting option as an inoperable state under the condition that the target playing speed is not less than the speed threshold value;
and displaying the first frame inserting option as an operable state under the condition that the target playing speed is smaller than the speed threshold value.
16. The method of claim 15, wherein the method further comprises:
and displaying the frame inserting prompt information under the condition that the first frame inserting option is displayed in the operable state, wherein the frame inserting prompt information is used for prompting that the frame inserting can be currently performed.
17. The method of claim 15, wherein the method further comprises:
and under the condition that the first frame inserting option is displayed in the inoperable state, responding to the triggering operation of the first frame inserting option, displaying frame inserting disabling information, wherein the frame inserting disabling information is used for prompting that the frame inserting cannot be performed currently.
18. A video editing apparatus, the apparatus comprising:
a first display unit configured to execute a display video clip interface, the video clip interface displaying a first video to be clipped, the video clip interface further displaying a first frame insertion option;
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 adjustment of play intervals of a plurality of first video frames in the first video based on the target play speed;
a frame inserting unit configured to perform, in response to a trigger operation of the first frame inserting option, each pair of adjacent first video frames as adjacent first video frames of a frame to be inserted in a case where the target play speed is less than a speed threshold and the target play speed is not greater than half of an original play speed of the first video; inserting a second video frame between adjacent first video frames of the frames to be inserted in the first video to obtain a second video, wherein the second video frame is generated based on the adjacent first video frames of the frames to be inserted;
the frame inserting unit is further configured to perform selecting, in response to a trigger operation on the first frame inserting option, an adjacent first video frame of the frame to be inserted from the first video according to a difference between the target playing speed and an original playing speed, in a case where the target playing speed is less than the speed threshold and the target playing speed is greater than half of an original playing speed of the first video; inserting the second video frame between adjacent first video frames of the frames to be inserted in the first video to obtain the second video;
A second presentation unit configured to execute presentation of the second video in the video clip interface;
the apparatus further comprises:
and a first updating unit configured to perform updating, in response to completion of the first video frame insertion, an option name of the first frame insertion option to an option name corresponding to a frame insertion mode used when frame insertion, wherein the frame insertion mode used when frame insertion is a frame insertion mode selected from a plurality of displayed frame insertion modes after the first frame insertion option is triggered.
19. The apparatus of claim 18, wherein the framing unit comprises:
a display subunit configured to perform a trigger operation in response to the first frame inserting option, and display a frame inserting menu, where the frame inserting menu includes a plurality of second frame inserting options, and each of the second frame inserting options corresponds to one frame inserting mode;
and the frame inserting sub-unit is configured to execute the triggering operation of any 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.
20. The apparatus of claim 19, wherein the apparatus further comprises:
And the third display unit is configured to perform a trigger operation responding to any second frame inserting option, and display frame inserting progress information, wherein the frame inserting progress information is used for prompting the current frame inserting progress of the first video.
21. The apparatus of claim 19, wherein the apparatus further comprises:
a fourth presentation unit configured to perform a presentation of a cancel frame insertion option in response to a trigger operation to any one of the second frame insertion options; and responding to the triggering operation of the frame inserting cancellation option, and stopping frame inserting of the first video.
22. The apparatus of claim 19, wherein the apparatus further comprises:
a fifth display unit configured to perform displaying a frame insertion completion information in response to completion of the frame insertion for the first video, the frame insertion completion information being used to prompt completion of the frame insertion for the first video, and display the second frame insertion option in a selected state; and responding to the frame inserting failure of the first video, displaying frame inserting failure information, wherein the frame inserting failure information is used for prompting the frame inserting failure of the first video and prompting the frame inserting of the first video again.
23. The apparatus of claim 19, wherein the apparatus further comprises:
and a sixth display unit configured to perform a trigger operation in response to any one of the second frame inserting options, and display the second frame inserting option as a selected state in the case where the second video has been cached.
24. The apparatus of claim 19, wherein the apparatus further comprises:
the presentation subunit is further configured to perform a cancel presentation of the break-in menu in response to a cancel presentation operation of the break-in menu.
25. The apparatus of claim 19, wherein the apparatus further comprises:
the first updating unit is configured to perform updating of the option name of the first frame inserting option to the option name of the triggered second frame inserting option in response to completion of the first video frame inserting.
26. The apparatus of claim 19, wherein the frame insertion menu further comprises a no frame insertion option, the apparatus further comprising:
the frame inserting subunit is further configured to perform a trigger operation in response to the no frame inserting option, not to frame the first video.
27. The apparatus of claim 18, wherein the video clip interface further presents a speed change option for adjusting a play speed of the first video, the apparatus further comprising:
a second updating unit configured to perform updating of a first frame inserting option shown in the video clip interface to a third frame inserting option for re-inserting the first video in response to a trigger operation of the variable speed option;
the frame inserting unit is configured to perform a trigger operation for responding 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 smaller than the speed threshold.
28. The apparatus of claim 27, wherein the apparatus further comprises:
and a seventh display unit configured to display, when the first frame inserting option is updated to the third frame inserting option, re-frame inserting information for prompting to re-frame the first video.
29. The apparatus of claim 27, wherein the apparatus further comprises:
And a deleting unit configured to execute a trigger operation in response to the shift option, in a case where the second video has been cached, deleting the cached second video.
30. The apparatus of claim 27, wherein the video clip interface further presents a shift menu, the shift menu comprising the shift option; the apparatus further comprises:
an eighth presentation unit configured to perform a presentation of a re-frame confirmation option and a re-frame cancellation option without re-framing the first video based on the third frame insertion option in response to a cancellation presentation operation of the variable-speed menu;
the frame inserting unit is configured to perform a trigger operation in response to the reinsertion frame confirmation option, and insert the second video frame into the first video to obtain the second video if the target playing speed is smaller than the speed threshold; and in response to a triggering operation of the reinsertion cancellation option, not carrying out the frame insertion on the first video.
31. The apparatus of claim 18, wherein the video clip interface further presents a speed change option for adjusting the playback speed of the first video, the speed change option comprising a curved speed change option for adjusting the playback speed of a plurality of first video segments comprised by the first video;
The frame inserting unit is configured to execute, when the target playing speed of any one of the first video segments is smaller than the speed threshold, inserting the second video frame into 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 a first video segment of which the target playing speed is not less than the speed threshold.
32. The apparatus of claim 18, wherein the apparatus 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 play speed is not less than the speed threshold; and displaying the first frame inserting option as an operable state under the condition that the target playing speed is smaller than the speed threshold value.
33. The apparatus of claim 32, wherein the apparatus further comprises:
and a ninth display unit configured to display a frame inserting prompt message when the first frame inserting option is displayed in the operable state, where the frame inserting prompt message is used for prompting that the frame inserting can be currently performed.
34. The apparatus of claim 32, wherein the apparatus further comprises:
and a tenth display unit configured to perform display of, in response to a trigger operation on the first frame inserting option, frame inserting disabling information for prompting that frame inserting is currently disabled in a case where the first frame inserting option is displayed in the inoperable state.
35. A terminal, the terminal comprising:
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 clip method of any of claims 1-17.
36. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of a terminal, enable the terminal to perform the video editing method of any of claims 1-17.
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 CN113766275A (en) | 2021-12-07 |
CN113766275B true 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) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116260928B (en) * | 2023-05-15 | 2023-07-11 | 湖南马栏山视频先进技术研究院有限公司 | Visual optimization method based on intelligent frame insertion |
CN118450209A (en) * | 2023-12-29 | 2024-08-06 | 荣耀终端有限公司 | Video processing method and related equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Family Cites Families (6)
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 |
US8839110B2 (en) * | 2011-02-16 | 2014-09-16 | Apple Inc. | Rate conform operation for a media-editing application |
US11081139B2 (en) * | 2018-10-12 | 2021-08-03 | Adobe Inc. | Video inpainting via confidence-weighted motion estimation |
CN111385639B (en) * | 2018-12-28 | 2021-02-12 | 广州市百果园信息技术有限公司 | Video special effect adding method, device, equipment and storage medium |
CN111640187B (en) * | 2020-04-20 | 2023-05-02 | 中国科学院计算技术研究所 | Video stitching method and system based on interpolation transition |
CN112689111B (en) * | 2020-12-21 | 2023-04-07 | 峰米(北京)科技有限公司 | Video processing method, device, terminal and storage medium |
-
2021
- 2021-09-29 CN CN202111152804.XA patent/CN113766275B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Also Published As
Publication number | Publication date |
---|---|
CN113766275A (en) | 2021-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109246466B (en) | Video playing method and device and electronic equipment | |
CN108401124B (en) | Video recording method and device | |
CN108391171B (en) | Video playing control method and device, and terminal | |
CN109874312B (en) | Method and device for playing audio data | |
CN110740340B (en) | Video live broadcast method and device and storage medium | |
CN110300274B (en) | Video file recording method, device and storage medium | |
CN111083526B (en) | Video transition method and device, computer equipment and storage medium | |
CN109144346B (en) | Song sharing method and device and storage medium | |
CN113766275B (en) | Video editing method, device, terminal and storage medium | |
CN113204672B (en) | Resource display method, device, computer equipment and medium | |
CN113395566B (en) | Video playing method and device, electronic equipment and computer readable storage medium | |
CN111741366A (en) | Audio playing method, device, terminal and storage medium | |
CN111818358A (en) | Audio file playing method and device, terminal and storage medium | |
CN108845777B (en) | Method and device for playing frame animation | |
CN112383808A (en) | Video playing method, device, terminal and storage medium | |
CN110868642B (en) | Video playing method, device and storage medium | |
CN111565338A (en) | Method, device, system, equipment and storage medium for playing video | |
CN111459363A (en) | Information display method, device, equipment and storage medium | |
CN112004134A (en) | Multimedia data display method, device, equipment and storage medium | |
CN107888975B (en) | Video playing method, device and storage medium | |
CN110992268B (en) | Background setting method, device, terminal and storage medium | |
CN110377208B (en) | Audio playing method, device, terminal and computer readable storage medium | |
CN112616082A (en) | Video preview method, device, terminal and storage medium | |
CN114388001A (en) | Multimedia file playing method, device, equipment and storage medium | |
CN111711841B (en) | Image frame playing 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 |