Video editing method and related device
By detecting the intercept operation in the video editing method and adding keyframes to the intercepted video, the problem of adding keyframes in video editing is solved, the user operation steps are reduced, ensuring that the intercepted video retains the original animation effect, and improving the User experience.
Patent Information
- Application Number
- CN202310862311.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2043-07-12
AI Technical Summary
The prior art is difficult to effectively process video interception and add keyframes after video editing, resulting in failure of user editing operations and increasing user workload.
In the video editing method, the intercept operation is detected and keyframes are added to the intercepted video, so that its effect is consistent with the deleted keyframes, and the editing operation of the original video is retained.
It realizes automatic keyframe addition after video interception, which reduces user operation steps, ensures that the intercepted video retains the keyframe animation effect, and improves user experience.
Smart Images

Figure CN119316661A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video editing technology, and in particular to a video editing method and related devices. Background Art
[0002] When a video contains two or more key frames, the electronic device can generate a series of animation effects for the images between the two key frames. The electronic device can also intercept the video. How to add key frames to the intercepted video is a problem that needs to be solved in this field. Summary of the invention
[0003] In the first aspect, the present application provides a method and related device for video editing, the method comprising: displaying a first user interface, the first user interface comprising: a preview area, a first track, and a pointer with a fixed position, the first track displays multiple frames of a first video, the preview area displays the first frame of the first track pointed to by the pointer, the first position and the second position of the first track both display key frame marks, the first position is before the second position, the effect of the frame at the first position of the first track is the first effect, and the effect of the frame at the second position of the first track is the second effect. Upon receiving a video capture operation acting on the first track, the first track is adjusted to a second track, the second track includes the starting position of the first track to a third position, the third position is between the first position and the second position, and the first position and the third position of the second track both display key frame marks. Upon receiving a play operation, a second video is played starting from the first frame in the preview area, the second video including a plurality of frames between the starting frame and the third frame of the first video, the starting frame being the frame at the starting position of the first track, the third frame being the frame at the third position of the first track, in the second video, a plurality of frames before the second frame are presented as the first effect, a plurality of frames from the second frame to the third frame gradually transition from the first effect to the second effect, and the second frame being the frame at the first position of the second track.
[0004] By implementing the above method, the electronic device can intercept the video with the key frame animation added, and when the intercepted part includes the key frame picture, the key frame can be added at the intercepted position in the intercepted video, so that the effect of the newly added key frame picture is consistent with the effect of the deleted key frame picture. In this way, the user's editing operation can be retained and the user's workload can be reduced.
[0005] In combination with the first aspect, in some embodiments, the first track further includes a right handle at the right edge, and the video capture operation includes a left sliding operation on the right handle.
[0006] In a second aspect, the present application provides a method for video editing, the method comprising: displaying a first user interface, the first user interface comprising: a preview area, a first track, and a pointer at a fixed position, the first track displays multiple frames of a first video, the preview area displays the first frame of the first track pointed to by the pointer, the first position and the second position of the first track both display key frame identifiers, the first position is before the second position, the effect of the frame at the first position of the first track is the first effect, and the effect of the frame at the second position of the first track is the second effect. Upon receiving a video capture operation acting on the first track, the first track is adjusted to a second track, the second track includes the third position of the first track to the end position, the third position is between the first position and the second position, and the second position and the third position of the second track both display key frame identifiers. Upon receiving a play operation, a second video is played starting from the first frame in the preview area, the second video including a plurality of frames between the third frame and the end frame of the first video, the third frame being the frame at the third position of the first track, the end frame being the frame at the end position of the first track, and in the second video, the plurality of frames from the third frame to the second frame gradually transition from the first effect to the second effect, the plurality of frames after the second frame present the second effect, and the second frame being the frame at the second position of the second track.
[0007] By implementing the above method, the electronic device can intercept the video with the key frame animation added, and when the intercepted part includes the key frame picture, the key frame can be added at the intercepted position in the intercepted video, so that the effect of the newly added key frame picture is consistent with the effect of the deleted key frame picture. In this way, the user's editing operation can be retained and the user's workload can be reduced.
[0008] In combination with the second aspect, in some embodiments, the first track further includes a left handle at the left edge, and the video capture operation includes a right sliding operation on the left handle.
[0009] In combination with the first aspect and the second aspect, in some embodiments, the first effect includes displaying at a first display position, the editing operation is used to adjust the screen from the first display position to the second display position, and the second effect includes displaying at the second display position. And / or the first effect includes displaying at a first size, the editing operation is used to adjust the screen from the first size to the second size, and the second effect includes displaying at the second size. And / or the first effect includes displaying at a first display angle, the editing operation is used to adjust the screen from the first display angle to the second display angle, and the second effect includes displaying at the second display angle. And / or the first effect includes displaying at a first opacity, the editing operation is used to adjust the screen from the first opacity to the second opacity, and the second effect includes displaying at the second opacity.
[0010] In combination with the first aspect and the second aspect, in some embodiments, before displaying the first user interface, the method includes: displaying a second user interface, the second user interface including: the preview area, the first track, and the pointer at a fixed position, the preview area displays a picture of the first position of the first track pointed to by the pointer. An operation of selecting the first track is received. An operation of adding a key frame is received, and a key frame identifier is displayed at the first position. A left swipe operation on the first track is received, the first track is moved to the left, and the picture of the second position of the first track pointed to by the pointer is displayed in the preview area. An editing operation acting on the picture of the second position in the preview area is received, the effect of the picture of the second position is adjusted to the second effect, and a key frame identifier is displayed at the second position. A right swipe operation on the first track is received, and the first track is moved to the right. In this way, after the first video is intercepted, two key frames can be added by the above method.
[0011] In combination with the first aspect and the second aspect, in some implementations, after receiving the operation of adding a keyframe, the method further includes: obtaining parameters of the picture at the first position, the parameters of the picture at the first position are used to indicate the first effect. After receiving the editing operation acting on the picture at the second position in the preview area, the method further includes: obtaining parameters of the picture at the second position, the parameters of the picture at the second position are used to indicate the second effect.
[0012] In combination with the first aspect and the second aspect, in some implementations, after receiving an operation of selecting the first track, the method further includes: displaying a first control in the second user interface, and the operation of adding a keyframe includes an operation acting on the first control.
[0013] In combination with the first aspect and the second aspect, in some implementations, after the second video is played from the first screen in the preview area, the method further includes: receiving a user operation for exporting the video, and storing the second video.
[0014] In combination with the first aspect and the second aspect, in some implementations, the first track displays all or part of the first video.
[0015] In combination with the first aspect and the second aspect, in some embodiments, after the second video is played from the first screen in the preview area, the method further includes: receiving an operation of pausing playback. Receiving an operation of adding a third track, the third track displays multiple frames of the first material, the preview area displays the fourth screen of the second track pointed to by the pointer and the fifth screen of the third track pointed to by the pointer, the fourth position and the fifth position of the third track are both displayed with key frame marks, the fourth position is before the fifth position, the effect of the screen at the fourth position of the third track is the third effect, and the effect of the screen at the fifth position of the third track is the fourth effect. Receiving a video capture operation acting on the third track, adjusting the third track to the fourth track, the fourth track includes the starting position to the sixth position of the third track, the sixth position is between the fourth position and the fifth position, and the fourth position and the sixth position of the third track are both displayed with key frame marks. Upon receiving a play operation, the second video is played from the fourth frame in the preview area, and the second material is played from the fifth frame, the second material includes multiple frames between the sixth frame and the seventh frame of the first material, the sixth frame is the frame at the starting position of the third track, and the seventh frame is the frame at the sixth position of the third track. In the second material, multiple frames from the sixth frame to the seventh frame gradually transition from the third effect to the fourth effect, and multiple frames after the seventh frame present the fourth effect.
[0016] In a third aspect, the present application provides an electronic device, comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method of the first aspect or any embodiment of the first aspect or the second aspect or any embodiment of the second aspect.
[0017] In a fourth aspect, an embodiment of the present application provides a chip, comprising one or more processors. When the one or more processors execute computer instructions, the electronic device executes the method of any of the first aspect or the first aspect or the second aspect or any of the second embodiment.
[0018] In a fifth aspect, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of any of the above-mentioned first aspect or the first aspect or the second aspect or any of the second aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1A-1B A user interface for capturing video of an electronic device provided in an embodiment of the present application;
[0020] Figure 2A-2D A user interface for playing a captured video by an electronic device provided in an embodiment of the present application;
[0021] Figure 3A-3E A user interface for capturing video of an electronic device provided in an embodiment of the present application;
[0022] Figure 4A-4D A user interface for playing a captured video by an electronic device provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of a video editing method provided in an embodiment of the present application;
[0024] Figure 6 An OS interaction diagram corresponding to a video editing method provided in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0026] Figure 8 A software structure block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0028] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0029] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.
[0030] First, two related terms involved in the embodiments of the present application are introduced:
[0031] Keyframe: It is a computer animation term. A keyframe can refer to a frame where a key action is located in the motion change of a character or object. Among them, a frame is a single image with the smallest unit of influence in an animation, which is equivalent to each frame of a movie film. In an embodiment of the present application, a keyframe can be represented by a mark added to a certain position in a material track in a user interface displayed by a video editing application of an electronic device. It is equivalent to that the frame where the mark is located can be considered as a keyframe. Adding a keyframe means marking a frame as a keyframe.
[0032] Track: It can be used to place materials and edit the materials. The length of the track can be used to represent the duration of the material, and each position in the track can be used to represent a frame of the material. Placing different materials can generate different tracks. For example, the main video track can display multiple frames of the main video, and the text track can display text images, etc.
[0033] The electronic device can edit the video. For example, the electronic device can add two key frames to the video and edit the added key frames. The editing process may include: moving the key frame, changing the size, rotating the angle, changing the opacity, etc. The multiple frames between the two key frames can also be edited to generate a key frame animation. The electronic device can also intercept the video containing the key frames to delete the part of the video that the user does not need.
[0034] The following describes the process of capturing a video and playing the captured video in conjunction with a user interface provided by an electronic device.
[0035] Figure 1A-1B The user interface of an electronic device for capturing a video is exemplarily shown.
[0036] like Figure 1A As shown, the user interface 20 is a user interface provided by a video editing application in an electronic device. The user interface 20 may include, but is not limited to, a video preview interface 201, a video track 202, a pointer 203, a key frame 204, a key frame 205, a playback control 206, a left handle 207, and a right handle 208. Among them. The length of the video track 202 is S1 seconds, the key frame 204 is located at the Ath frame of the video track 202, and the key frame 205 is located at the Bth frame of the video track. The user interface may also include: an effect option bar, a track option bar, a key frame adding control, and the like. The electronic device can edit the video displayed in the video preview interface 201 in the user interface 20. The effect option bar may include but is limited to: splitting, intercepting, volume conditions, speed change, deleting, cropping, single frame export, filters, adjustment parameters (such as color adjustment, brightness, contrast, etc.), opacity, cutting picture-in-picture, replacement, and the like options. The track option bar may include but is not limited to: templates, clips, filters, music, text, stickers, special effects, picture-in-picture, frame, background, and the like tracks.
[0037] The video track 202 includes a key frame 204 and a key frame 205. That is, the electronic device has completed the operation of editing the video by adding key frames to the video track 202. In the embodiment of the present application, the editing operation includes: rotating the picture of the key frame 205 of the video track 202 counterclockwise by 90 degrees. This can make the pictures between the key frame 204 and the key frame 205 of the video track 202 rotate in sequence according to the playback order, and the rotation of the above multiple pictures can be called a key frame animation.
[0038] The electronic device can respond to the long press on the right handle 208 and press Figure 1A The video track 202 is intercepted and displayed as shown in the following figure: Figure 1BThe user interface 21 is shown. In the embodiment of the present application, the long press and slide operation on the right handle is only an exemplary description, and more other operations can be included to capture the video, which is not limited to this.
[0039] Exemplarily, the sliding operation may end when the right handle 213 is slid. The duration of the video track 211 in the user interface 21 is S2 seconds, which means that the electronic device deletes the images from the S2th second to the S1th second in the video track based on the above-mentioned capture operation on the user interface 20, and generates the video track 211. Figure 1B As shown, the video track 211 includes a key frame 212. The key frame 212 is located at the Ath frame of the video track 211.
[0040] Figure 2A-2D The user interface of an electronic device playing a captured video is exemplified.
[0041] like Figure 2A As shown, the pointer 301 in the user interface 30 points to the Ath frame in the video track 302. The electronic device can respond to a click operation on the play control 303 and play the captured video in the video preview area 304. At this time, the Ath frame is displayed in the video preview area 303. The Ath frame displayed in the video preview area 303 is not rotated.
[0042] When the rotated video is played to the Cth frame, the electronic device can display the following Figure 2B The user interface 31 shown. The pointer 311 in the user interface 31 points to the C-th frame in the video track 312, and the C-th frame is displayed in the video preview area 313. The C-th frame displayed in the video preview area 313 is also not rotated.
[0043] When the rotated video is played to the Dth frame, the electronic device may display the following Figure 2C The user interface 32 shown. The pointer 321 in the user interface 32 points to the D-th frame in the video track 322, and the D-th frame is displayed in the video preview area 323. The D-th frame displayed in the video preview area 323 is also not rotated.
[0044] When the rotated video is played to the Bth frame (i.e., the S2th frame), the electronic device may display the following Figure 2D The user interface 33 shown. The pointer 331 in the user interface 33 points to the B-th frame in the video track 332, and the B-th frame is displayed in the video preview area 333. The B-th frame displayed in the video preview area 333 is also not rotated.
[0045] From the above process of playing the intercepted video, it can be seen that since the intercepted video track only contains one key frame, one key frame cannot generate a key frame animation in the video track 211, that is, the intercepted video track does not retain the editing operation for the original video.
[0046] In some implementations, if an electronic device intercepts a video containing two key frames so that one of the key frame images is deleted, the video after interception only contains one key frame, and a key frame animation cannot be generated when the video contains one key frame. This will cause the electronic device to display the original video before editing, that is, the original video without the key frame animation, during the process of playing the intercepted video. If the user needs the intercepted video to have the effect of the original video after editing, it is necessary to perform the operations of adding key frames and editing the key frame images in order to generate a key frame animation for the intercepted video. In other words, the operation of intercepting the video may invalidate the operation of editing the video. This will increase the burden on users to edit videos and provide a poor user experience.
[0047] In order to solve the above problems, an embodiment of the present application provides a method for video editing. In this method, an electronic device can perform interception processing on a first video. In the case where the deleted part of the video includes a key frame picture, the electronic device can add a key frame at the moment corresponding to the interception position of the video after interception, and set the parameters of the newly added key frame picture to the parameters of the intercepted key frame picture. The above parameters may include but are not limited to: the position, size, rotation angle, opacity and other parameters of the picture. In this way, the key frame animation of the original video can be retained, and the video after interception can also include the key frame animation without the need for user operation, thereby reducing the user's operation steps.
[0048] The following specifically introduces the expression form of the parameters used to describe the picture. The electronic device can set the type of various parameters to float floating point type for storage.
[0049] Exemplarily, the position parameter can be represented by the coordinates moved along the x and y axes relative to the position of the default screen, the sign of the coordinates moved in the negative direction of the x or y axis is "-", and the sign of the coordinates moved in the positive direction of the x or y axis is "+", and the unit of the coordinates is px. The size parameter can be represented by the scale of reduction or enlargement relative to the size of the default screen. The rotation angle parameter can be represented by the degree of counterclockwise or clockwise rotation relative to the rotation angle of the default screen, the sign of the degree of counterclockwise rotation is "-", and the sign of the degree of clockwise rotation is "+", and the unit of degree is °. The opacity parameter can be represented by a numerical value that increases or decreases the opacity relative to the opacity of the default screen. The range of the numerical value used to represent the opacity parameter is between 0 and 100.
[0050] In the embodiment of the present application, the parameters used to describe the picture are not limited to the above types, and may also include more types of parameters, which are not limited to this.
[0051] Exemplarily, when the screen displayed by the electronic device is default, that is, the electronic device has not edited the screen, the display position of the screen can be expressed as (0px, 0px), the size of the screen can be expressed as 1, the rotation degree of the screen can be expressed as 0°, and the opacity of the screen can be expressed as 100.
[0052] In some implementations, parameters of a picture may be used to describe the effect of the picture.
[0053] The following describes the process of capturing a video and playing the captured video provided in an embodiment of the present application in conjunction with a user interface provided by an electronic device.
[0054] Figure 3A-3E The user interface of an electronic device for capturing video in two situations is exemplified.
[0055] Case 1: Capture the latter part of the video.
[0056] like Figure 3A As shown, user interface 40 is a user interface provided by a video editing application in an electronic device. Similarly, user interface 40 may include, but is not limited to: video preview interface 401, video track 402, pointer 403, key frame 404, key frame 405, play control 406, left handle 407, and right handle 408. Among them, the length of video track 402 is S1 seconds, key frame 404 is located at the Ath frame of video track 402, and key frame 405 is located at the Bth frame of the video track.
[0057] Among them, since the video track 402 includes two key frames, the electronic device has completed the operation of editing the video by adding key frames for the video track 402. In the embodiment of the present application, the editing operation includes: rotating the picture of the key frame 405 of the video track 402 by 90 degrees counterclockwise. This can make the pictures between the key frame 404 and the key frame 405 of the video track 402 rotate in sequence according to the playback order, and the rotation of the above multiple pictures can be called a key frame animation.
[0058] The electronic device may respond to a long press on the right handle 408 and press Figure 3A The video track 402 is intercepted and displayed as shown in the following figure: Figure 3B The user interface 41 is shown. In the embodiment of the present application, the long press and slide operation on the right handle is only an exemplary description, and more other operations can be included to capture the video, which is not limited to this.
[0059] For example, the sliding operation may end when the right handle 414 is slid to the position shown. The duration of the video track 411 in the user interface 41 is S2 seconds, which means that the electronic device deletes the images from the S2th second to the S1th second in the video track based on the above-mentioned capture operation on the user interface 40, and generates the video track 411. Figure 3B As shown, the video track 411 includes a key frame 412 and a key frame 413. The key frame 412 is located at the Ath frame of the video track 411, and the key frame 413 is located at the S2th frame of the video track 411. In addition, the parameters of the picture of the key frame 412 are consistent with the parameters of the picture of the key frame 404, and the parameters of the picture of the key frame 413 are consistent with the parameters of the picture of the key frame 405 that has been cut off.
[0060] Case 2: Capture the first part of the video.
[0061] like Figure 3C As shown, user interface 42 is a user interface provided by a video editing application in an electronic device. Similarly, user interface 42 may include, but is not limited to: video preview interface 421, video track 422, pointer 423, key frame 424, key frame 425, play control 426, left handle 427, and right handle 428. The length of video track 422 is S1 seconds, key frame 424 is located at the Ath frame of video track 422, and key frame 425 is located at the Bth frame of the video track.
[0062] The electronic device may respond to acting on the left handle 427 and pressing Figure 3CThe sliding operation in the direction indicated by the middle arrow is used to intercept the video track 422. In the embodiment of the present application, the long press sliding operation on the left handle is only an exemplary description, and more other operations can be included to intercept the video, which is not limited to this.
[0063] Exemplarily, the above sliding operation can end when the left handle 431 is slid to the position shown. Before the sliding operation ends, the electronic device displays the following Figure 3D When the sliding operation ends, the electronic device jumps to display the user interface 43 shown in FIG. Figure 3E User interface 44 is shown.
[0064] The duration of the video track 441 in the user interface 44 is S3 seconds, which means that the electronic device deletes the images from the 0th second to the S3th second in the video track based on the above-mentioned interception operation on the user interface 42, and generates the video track 441. Figure 3E As shown, video track 441 includes key frame 442 and key frame 443. Key frame 442 is located at the 0th frame of video track 441, and key frame 443 is located at the B-(S1-S3)th frame of video track 441. In addition, the parameters of the picture of key frame 442 are consistent with the parameters of the picture of key frame 424 that has been cut off, and the parameters of the picture of key frame 443 are consistent with the parameters of the picture of key frame 425.
[0065] This is because the intercepted portion is the first half of the video, but the subsequent playback of the intercepted video generally does not play the deleted video portion. This requires that the electronic device can automatically align the intercepted video. That is, at the moment when the sliding operation ends, the electronic device jumps from displaying user interface 43 to displaying user interface 44.
[0066] Figure 4A-4D The user interface of an electronic device playing a captured video is exemplified.
[0067] Exemplarily, the following describes a process of playing the captured video in the above-mentioned situation one.
[0068] like Figure 4A As shown, the pointer 501 in the user interface 50 points to the Ath frame in the video track 502. The electronic device can respond to a click operation on the play control 503 and play the captured video in the video preview area 504. At this time, the Ath frame is displayed in the video preview area 503. The Ath frame displayed in the video preview area 503 is rotated 0 degrees counterclockwise relative to the Ath frame in the unrotated video.
[0069] When the captured video is played to the Cth frame, the electronic device can display the following Figure 4B The user interface 51 shown. The pointer 511 in the user interface 51 points to the C-th frame in the video track 512, and the C-th frame is displayed in the video preview area 513. The C-th frame displayed in the video preview area 513 is rotated a degrees counterclockwise relative to the C-th frame in the unrotated video. Where a is greater than 0.
[0070] When the captured video is played to the Dth frame, the electronic device can display the following Figure 4C The user interface 52 shown. The pointer 521 in the user interface 52 points to the D-th frame in the video track 522, and the D-th frame is displayed in the video preview area 523. The D-th frame displayed in the video preview area 523 is rotated b degrees counterclockwise relative to the D-th frame in the unrotated video. Where b is greater than a.
[0071] When the captured video is played to the Bth frame (i.e., the S2th frame), the electronic device may display the following Figure 4D The user interface 53 shown. The pointer 531 in the user interface 53 points to the B-th frame in the video track 532, and the B-th frame is displayed in the video preview area 533. The B-th frame displayed in the video preview area 533 is rotated c degrees counterclockwise relative to the B-th frame in the unrotated video. Where c is greater than b.
[0072] From the above process of playing the video after interception, it can be seen that since the video track after interception contains two key frames, and the parameters of the screens of the two key frames are consistent with the parameters of the screens of the two key frames in the video track before interception, the video track after interception can retain the editing operation for the original video.
[0073] Based on the user interface for capturing videos and playing captured videos introduced above, a flow chart of adding key frames provided in an embodiment of the present application is introduced below.
[0074] Figure 5 The present invention exemplifies a process of a video editing method. Figure 5 The method shown is based on an example of interception based on a single track, and the single track contains two key frames.
[0075] like Figure 5 As shown, the method includes:
[0076] S501. Display a first user interface, where the first user interface includes a first track. The first track displays multiple frames of a first video. The first track includes two key frames, where the first key frame is located before the second key frame.
[0077] The above-mentioned first user interface may refer to a user interface in an electronic device for capturing videos. For example, the first user interface may be a user interface provided by a video editing application in an electronic device. In an embodiment of the present application, the application to which the first user interface belongs may be a system application or a third-party application, without limitation. And the name of the application to which the first user interface belongs is not limited. The above-mentioned first track and the above-mentioned first video may be a video stored in an electronic device or a video shot by an electronic device.
[0078] In some implementations, the electronic device may display the first user interface in response to a user operation. The user operation may include: a click operation, a slide operation, a voice command, a gesture command, etc. Exemplarily, the electronic device may enter the first user interface in response to a click operation on an edit control for a first video in a gallery application.
[0079] In some implementations, the electronic device may play the first video in the first user interface, and may also edit the first video in the first user interface. Playing the first video may refer to continuously displaying each frame of the first video; editing the first video may refer to editing one or more frames of the first video. Exemplarily, the electronic device may play the first video in the video preview area in the first user interface, and may also edit a frame of the first video displayed in the video preview area.
[0080] In some implementations, the first video included in the electronic device may refer to a video after editing. For example, the electronic device may first add a key frame at a certain moment of the first video before editing, and then perform editing on a screen at another moment of the first video before editing, and the editing is equivalent to adding another key frame. In this way, the first video includes two key frames, and the first key frame is located before the second key frame.
[0081] In some implementations, the identifier of the first key frame is located at a first position of the first track, and the identifier of the second key frame is located at a second position of the first track.
[0082] In some implementations, after adding a key frame, the electronic device can not only display the first key frame mark at a certain moment in the video track, but also store the timestamp information of the first key frame. For example, the first key frame is located at 2.5s of the first video, and the timestamp information of the first key frame is 2500ms. The video track is used to display multiple frames of the first video in the user interface.
[0083] Exemplarily, the first user interface may refer to Figure 3A The user interface 40 shown. The first track may refer to Figure 3A In the video track 402, the first key frame may refer to the key frame 404, and the second key frame may refer to the key frame 405. In the embodiment of the present application, the content included in the above-mentioned first user interface is only for exemplary description, and more or less content may also be included.
[0084] S502: An operation of capturing a first video is detected.
[0085] The above-mentioned interception may refer to the electronic device intercepting or deleting a part of the screen of the first video and retaining another part of the screen of the first video. In some implementations, the electronic device may intercept the first part of the screen of the first video and retain the second part of the screen of the first video; the electronic device may also intercept the second part of the screen of the first video and retain the first part of the screen of the first video.
[0086] For example, the above operation may refer to the above long pressing of the right handle 408 and pressing Figure 3A The above operation may also refer to the above long pressing of the left handle 427 and pressing Figure 3C Slide in the direction indicated by the arrow.
[0087] In some implementations, after the electronic device detects the operation of intercepting the first video, the first track in the first user interface is adjusted to the second track. Figure 3B The video track 411 in. The second track may also refer to Figure 3E Video track 441 in.
[0088] S503: Determine whether the key frame of the first video is captured.
[0089] In some implementations, after the electronic device detects the operation of intercepting the first video, the electronic device needs to determine whether the intercepted portion contains a key frame. Specifically, the electronic device can determine whether the intercepted portion contains a key frame based on the data of the interception operation. Exemplarily, the electronic device can determine the specific position of the intercepted portion in the first video based on the position data of the interception operation. The judgment result may include the following situations:
[0090] Case 1: The captured part does not contain any key frame.
[0091] In a possible implementation, the electronic device may intercept the first part of the first video, or may intercept the second part of the video. The first part or the second part of the first video intercepted by the electronic device does not include a key frame. When the judgment result obtained by the electronic device is case 1, S504-1 is executed.
[0092] Case 2: The intercepted portion includes a key frame.
[0093] In a possible implementation, the electronic device may intercept the first part of the first video, or may intercept the second part of the video.
[0094] In the case where the electronic device intercepts the first part of the first video and the intercepted part includes a key frame, S504-2 is executed. Figure 3A-3B The interception process described.
[0095] In the case where the electronic device intercepts the latter part of the first video and the intercepted part includes a key frame, S504-3 is executed. Figure 3C-Figure 3D The interception process described.
[0096] Case 3: The intercepted portion includes two key frames.
[0097] When the portion intercepted by the electronic device includes two key frame images, that is, when the first video after interception does not include any key frame image, a second video is generated at this time, and the second video does not include any key frame image.
[0098] S504-1. Generate a second video including a first key frame and a second key frame.
[0099] In some implementations, after the electronic device determines that the intercepted portion does not include a key frame, the electronic device may generate a second video, the second video being obtained based on the first video after interception. In addition, the first key frame and the second key frame are retained in the second video. However, since the duration of the second video is inconsistent with the duration of the first video, and the timestamps of the first key frame and the second key frame may also be inconsistent in the first video and the second video. Therefore, the electronic device may need to update the timestamps of the first key frame and the second key frame in the second video.
[0100] Exemplarily, assuming that the length of the first video is S1 seconds, the first key frame is located at the Ath second in the first video, the second key frame is located at the Bth second in the first video, and the length of the second video is S2.
[0101] When the electronic device intercepts the first part of the first video, and the first part does not include a key frame, the first key frame is located at A-(S1-S2) seconds in the second video, and the second key frame is located at B-(S1-S2) seconds in the second video;
[0102] When the electronic device captures the latter part of the first video and the former part does not include a key frame, the first key frame is located at the Ath second in the second video, and the second key frame is located at the Bth second in the second video.
[0103] It is worth noting that the parameters of the first key frame in the first video are consistent with the parameters of the first key frame in the second video, and the parameters of the second key frame in the first video are consistent with the parameters of the second key frame in the second video. In other words, the effect of the first key frame in the first video is the same as the effect of the first key frame in the second video, and the effect of the second key frame in the first video is the same as the effect of the second key frame in the second video.
[0104] In some implementations, before the electronic device generates the second video, the electronic device needs to obtain the parameters of each picture in the second video according to the parameters of the key frame pictures, and then generate the second video. Specifically, the parameters of the pictures before the first key frame picture in the second video are the parameters of the first key frame picture, the parameters of the pictures between the first key frame picture and the second key frame picture in the second video are uniformly changed from the parameters of the first key frame picture to the parameters of the second key frame picture, and the parameters of the pictures after the second key frame picture in the second video are the parameters of the second key frame picture. Based on the parameters of the above-mentioned pictures, the electronic device can generate a second video containing the first key frame and the second key frame.
[0105] In some implementations, after S504 - 1 is executed, S505 is executed.
[0106] S504-2: Generate a second video including a second key frame and a third key frame, wherein the third key frame is added to the start position of the second video, and the parameters of the third key frame are consistent with the parameters of the first key frame.
[0107] In some implementations, after the electronic device determines that the intercepted portion is the previous portion and the intercepted portion includes the first key frame picture, the electronic device can generate a second video, which is obtained based on the first video after interception. And the second key frame is retained in the second video. However, since the duration of the second video is inconsistent with the duration of the first video, and the timestamp of the second key frame may also be inconsistent in the first video and the second video. Therefore, the electronic device needs to update the timestamp of the second key frame in the second video. In addition, the electronic device can also add a third key frame at the starting position of the second video. And the parameters of the third key frame picture are consistent with the parameters of the first key frame picture. In this way, the effect generated by adding the key frame to the first video can be retained.
[0108] Exemplarily, assuming that the length of the first video is S1 seconds, the first key frame is located at the Ath second in the first video, the second key frame is located at the Bth second in the first video, and the length of the second video is S2.
[0109] When the electronic device intercepts the first part of the first video, and the first part includes the first key frame, the third key frame is located at the 0th second in the second video, and the second key frame is located at the B-(S1-S2)th second in the second video. The third key frame is located before the second key frame.
[0110] It is worth noting that the parameters of the first key frame in the first video are consistent with the parameters of the third key frame in the second video, and the parameters of the second key frame in the first video are consistent with the parameters of the second key frame in the second video. In other words, the effect of the first key frame in the first video is the same as the effect of the third key frame in the second video, and the effect of the second key frame in the first video is the same as the effect of the second key frame in the second video.
[0111] In some implementations, before the electronic device generates the second video, the electronic device needs to obtain the parameters of each picture in the second video according to the parameters of the key frame picture, and then generate the second video. Specifically, the parameters of the picture between the third key frame picture and the second key frame picture in the second video are uniformly changed from the parameters of the first key frame picture to the parameters of the second key frame picture, and the parameters of the picture after the second key frame picture in the second video are the parameters of the second key frame picture. Based on the parameters of the above-mentioned pictures, the electronic device can generate a second video containing the third key frame and the second key frame.
[0112] Exemplarily, the second video generated in S504-2 may refer to Figure 3E The video represented by video track 441 is shown.
[0113] In some implementations, after executing S504 - 2 , S505 is executed.
[0114] S504-3: Generate a second video including a first key frame and a third key frame, wherein the third key frame is added to the end position of the second video, and the parameters of the third key frame are consistent with the parameters of the second key frame.
[0115] In some implementations, after the electronic device determines that the intercepted portion is the latter portion and the intercepted portion includes a second key frame picture, the electronic device can generate a second video, which is obtained based on the first video after interception. And the first key frame is retained in the second video. However, since the duration of the second video is inconsistent with the duration of the first video, and the timestamp of the first key frame may also be inconsistent in the first video and the second video. Therefore, the electronic device needs to update the timestamp of the first key frame in the second video. In addition, the electronic device can also add a third key frame at the end position of the second video. And the parameters of the third key frame picture are consistent with the parameters of the second key frame picture. In this way, the effect generated by adding the key frame to the first video can be retained.
[0116] Exemplarily, assuming that the length of the first video is S1 seconds, the first key frame is located at the Ath second in the first video, the second key frame is located at the Bth second in the first video, and the length of the second video is S2.
[0117] When the electronic device captures the latter part of the first video, and the latter part includes the second key frame, the first key frame is located at the Ath second in the second video, and the third key frame is located at the S2th second in the second video. The first key frame is located before the third key frame.
[0118] It is worth noting that the parameters of the first key frame in the first video are consistent with the parameters of the first key frame in the second video, and the parameters of the second key frame in the first video are consistent with the parameters of the third key frame in the second video. In other words, the effect of the first key frame in the first video is the same as the effect of the first key frame in the second video, and the effect of the second key frame in the first video is the same as the effect of the third key frame in the second video.
[0119] In some implementations, before the electronic device generates the second video, the electronic device needs to obtain the parameters of each picture in the second video according to the parameters of the key frame pictures, and then generate the second video. Specifically, the parameters of the pictures before the first key frame picture in the second video are the parameters of the first key frame picture, and the parameters of the pictures between the first key frame picture and the third key frame picture in the second video are uniformly changed from the parameters of the first key frame picture to the parameters of the second key frame picture. Based on the parameters of the above-mentioned pictures, the electronic device can generate a second video containing the first key frame and the third key frame.
[0120] Exemplarily, the second video generated in S504-3 may refer to Figure 3B The video track 411 is shown representing the video.
[0121] In some implementations, after executing S504 - 3 , S505 is executed.
[0122] S505: Play the second video.
[0123] In some implementations, after the electronic device generates the second video, the second track included in the first user interface can display multiple frames of the second video. In addition, the electronic device can play the second video in the first user interface. Specifically, the electronic device can start playing from the beginning of the second video, or from a certain frame in the second video. In some implementations, the effect of the electronic device playing each frame of the second video can be displayed based on the parameters of each frame obtained in the above steps, which will not be described in detail here.
[0124] Exemplarily, the electronic device can respond to the sliding operation on the second track to change the position of the second track pointed to by the pointer, that is, change the position where the second video starts to be played. Exemplarily, the electronic device can play the second video by sliding the second track in the first user interface, or by responding to a click operation on the play control to play the second video. Exemplarily, the electronic device can respond to the sliding operation on the second track to change the position of the second track pointed to by the pointer, that is, change the position where the second video starts to be played. Figure 4A Click the play control 503 to play the second video.
[0125] By the above Figure 5 As can be seen from the process shown, the electronic device can intercept the video with key frame animation added, and when the intercepted part includes the key frame picture, the key frame can be added at the intercepted position in the video after interception, so that the effect of the newly added key frame picture is consistent with the effect of the deleted key frame picture. In this way, the user's editing operation can be retained and the user's workload can be reduced.
[0126] In one possible implementation, Figure 5 The interception process shown is also applicable to multiple material track video scenes. Material tracks may include but are not limited to: text tracks, sticker tracks, and picture-in-picture tracks. In some implementations, the electronic device may intercept a material track containing two key frame images. In the case where the deleted part of the material includes a key frame image, the electronic device may add a key frame at the time corresponding to the interception position of the material after interception, and set the parameters of the newly added key frame image to the parameters of the intercepted key frame image. The electronic device uses the video editing method provided by the present application to process the material track. Figure 5 The method shown is similar to that shown in Figure 5 The process shown will not be described in detail here.
[0127] Specifically, after playing the above-mentioned second video, the electronic device can pause the playback of the second video. First, the electronic device can add a third track in the first user interface, and the third track displays multiple frames of the first material. The preview area in the first user interface displays the fourth frame of the second track pointed to by the pointer and the fifth frame of the third track pointed to by the pointer. And the fourth position and the fifth position of the third track are both displayed with key frame marks, wherein the fourth position is before the fifth position, and the effect of the picture at the fourth position is the third effect, and the effect of the picture at the fifth position is the fourth effect. Then, the third track of the electronic device is adjusted to the fourth track, and the fourth track includes the starting position to the sixth position of the third track, and the sixth position is between the fourth position and the fifth position, and the fourth position and the sixth position of the third track are both displayed with key frame marks. Finally, the electronic device plays a video including the second material and the second video. In the preview area, the second video is played from the fourth frame, and the second material is played from the fifth frame. The second material includes multiple frames between the sixth frame and the seventh frame of the first material, the sixth frame is the frame at the starting position of the third track, and the seventh frame is the frame at the sixth position of the third track. In the second material, multiple frames from the sixth frame to the seventh frame gradually transition from the third effect to the fourth effect, and multiple frames after the seventh frame present the fourth effect.
[0128] In this way, the electronic device can add other material tracks when there is a main track video in the user interface, and can adopt the video editing method provided in the embodiment of the present application for the other newly added material tracks, so that the other newly added material tracks can also retain the picture effect after interception.
[0129] Next, combine Figure 6 Introduction Figure 5 An operating system (OS) interaction diagram of an electronic device corresponding to the method flow in FIG.
[0130] Figure 6 The user operation module, data control module (operation), data storage module, and data rendering module shown in are modules included in the electronic device for managing captured videos and adding key frames. For the definitions of these modules, please refer to the detailed description of the electronic device software architecture later. The specific functions of these modules have been recorded in detail in the following process and will not be repeated here.
[0131] S601: A user operation module detects an operation of capturing a first video.
[0132] In some implementations, the capture operation may include a right-slide operation of a left handle acting on a left edge of the first video, or may refer to a left-slide operation of a right handle acting on a right edge of the first video.
[0133] S602: The user operation module sends the intercepted data to the key frame data processing layer in the data storage module.
[0134] S603: The key frame data processing layer determines whether the key frame image is intercepted according to the intercepted data.
[0135] S604: The key frame data processing layer determines whether the first key frame is intercepted, and adds a third key frame according to the intercepted data.
[0136] S605: The key frame data processing layer sends instruction information for deleting parameters of the first key frame image and parameter information of the added third key frame image to a data storage module in the data storage module.
[0137] S606: The data storage module deletes the parameters of the first key frame, updates the timestamp marking the parameters of the second key frame, and adds the parameters of the third key frame.
[0138] S607: The user operation module detects the operation of playing the video.
[0139] For example, the user operation module may detect a click operation on the play control. For the relevant introduction of S607, reference may be made to the detailed description of S505 above.
[0140] S608: The user operation module sends instruction information for playing the second video to the data rendering layer of the data rendering module.
[0141] S609: The data rendering layer sends instruction information for calculating parameters of the Nth frame in the second video to the key frame data processing layer in the data storage module.
[0142] Before executing S609 , the data rendering layer also needs to determine whether the parameters of the first key frame image and the parameters of the third key frame image are valid.
[0143] The above-mentioned validity actually refers to the parameters of the first key frame and the parameters of the third key frame. That is, the first video is effectively edited. This is because a video containing only one key frame for a period of time does not have practical functions. In order to generate a multi-frame picture that is automatically edited by the user editing one or two frames, the video needs to contain two or more key frames.
[0144] Wherein, N is a non-negative integer, and the Nth frame is any frame in the second video. Since the second video is composed of multiple pictures, it is necessary to render and generate each frame of the second video as the second video is played.
[0145] S610: The key frame data processing layer determines whether the Nth frame is between the third key frame and the second key frame, and obtains parameters of the Nth frame in the second video according to the first parameter and the second parameter.
[0146] In some implementations, when the Nth frame is before the first moment, the parameters of the Nth frame are the first parameters; when the Nth frame is after the second moment, the parameters of the Nth frame are the second parameters; when the Nth frame is between the first moment and the second moment, the parameters of the Nth frame can be based on the above Figure 6 The two formulas introduced are calculated and will not be repeated here.
[0147] S611. The key frame data processing layer sends information about parameters of the Nth frame in the second video to the data storage layer.
[0148] S612: The data storage layer stores the parameters of the Nth frame in the second video.
[0149] In some implementations, the data storage layer stores the parameters of the Nth frame in the second video in the material data class through data monitoring, so that when the second video is played again later, it can be directly read without executing S610.
[0150] S613: The data storage layer sends the parameters of the Nth frame in the second video to the Animation in the data rendering module.
[0151] In some implementations, the data storage layer may send the parameters of the Nth frame in the second video and the content of the frame at the second moment to the Animation via the data rendering layer.
[0152] S614. Animation draws the Nth frame in the second video based on the parameters of the Nth frame in the second video.
[0153] In some implementations, the Animation may render and generate the Nth frame in the edited second video according to the parameters of the Nth frame in the second video and the content of the Nth frame.
[0154] S609-S614 are repeatedly executed until the second video is played completely.
[0155] In some implementations, the editing process for multiple material tracks can refer to the above Figure 6 The OS schematic diagram shown is not described in detail here.
[0156] Figure 7 A schematic structural diagram of an electronic device 100 is shown.
[0157] The electronic device 100 may be equipped with Or a portable terminal device of other operating systems, the electronic device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle, a vehicle-mounted device, a smart home device and / or a smart city device, but not limited thereto, the electronic device 100 can also include a laptop computer (laptop) with a touch-sensitive surface or a touch panel, a desktop computer with a touch-sensitive surface or a touch panel, and other non-portable terminal devices, etc. The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device.
[0158] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0159] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0160] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0161] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0162] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0163] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0164] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0165] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0166] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0167] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0168] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0169] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0170] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0171] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0172] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0173] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0174] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0175] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0176] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0177] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0178] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0179] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0180] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0181] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0182] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0183] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0184] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0185] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0186] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0187] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0188] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.
[0189] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; can be divided into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; can be divided into universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.
[0190] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.
[0191] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
[0192] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
[0193] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0194] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0195] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0196] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0197] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0198] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0199] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0200] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0201] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0202] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.
[0203] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0204] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0205] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0206] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0207] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0208] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0209] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0210] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0211] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0212] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0213] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
[0214] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0215] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.
[0216] Figure 8 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.
[0217] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0218] The application layer can include a series of application packages.
[0219] like Figure 8 As shown, the application package may include video editing, camera, gallery and other applications. Among them, the video editing application includes a user operation module, a data control module, a data storage module and a data rendering module.
[0220] Specifically, the user operation module is used to receive various operations of the user, such as detecting an operation of adding a key frame, detecting an operation of capturing, detecting an operation of playing, and the like.
[0221] The data control module is used to convert user operations into data that can be transmitted between various modules.
[0222] The data storage module includes a data transmission layer, a data storage module layer and a key frame data processing layer. The data transmission layer is used to receive data sent by other modules and transmit the data to the data storage layer and the key frame data processing layer (also known as the data processing layer); the data storage layer includes a data visitor and a material data class (Material), wherein the data visitor is used to monitor and identify the data sent to the data storage layer, and the material data class is used to store, delete, and change the parameters of the picture and store the content information of various pictures, such as the timestamp of the key frame and the parameters of each key frame picture; the key frame data processing layer is used to calculate the parameters of other pictures in the video or material according to the key frame picture parameters, and send the parameters of the other pictures to the data rendering module, and is also used to determine whether the key frame picture is intercepted.
[0223] The data rendering module includes a data rendering layer and Animation, wherein the Animation is used to render and generate the pictures displayed in the user interface in real time according to the parameters of various pictures and the contents of various pictures.
[0224] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0225] like Figure 8As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0226] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0227] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0228] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0229] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0230] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0231] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0232] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0233] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0234] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0235] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0236] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0237] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0238] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0239] A 2D graphics engine is a drawing engine for 2D drawings.
[0240] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0241] The following is an illustrative description of the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.
[0242] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture static images or videos through the camera 193.
[0243] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.
[0244] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0245] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0246] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.
Claims
1. A video editing method, characterized in that: The method comprises: Displaying a first user interface, the first user interface comprising: a preview area, a first track, and a pointer at a fixed position, the first track displays multiple frames of a first video, the preview area displays a first frame of the first track pointed to by the pointer, a first position and a second position of the first track both display key frame identifiers, the first position is before the second position, the effect of the frame of the first track at the first position is a first effect, and the effect of the frame of the first track at the second position is a second effect; receiving a video capture operation acting on the first track, adjusting the first track to a second track, wherein the second track includes a starting position to a third position of the first track, the third position is located between the first position and the second position, and the first position and the third position of the second track are both displayed with key frame marks; Upon receiving a play operation, a second video is played starting from the first picture in the preview area, the second video including a plurality of pictures between the starting picture and the third picture of the first video, the starting picture being the picture at the starting position of the first track, the third picture being the picture at the third position of the first track, in the second video, a plurality of pictures before the second picture are presented as the first effect, a plurality of pictures from the second picture to the third picture gradually transition from the first effect to the second effect, and the second picture being the picture at the first position of the second track.
2. The method according to claim 1, characterized in that The first track also includes a right handle at the right edge, and the video capture operation includes a left sliding operation acting on the right handle.
3. A video editing method, characterized in that: The method comprises: Displaying a first user interface, the first user interface comprising: a preview area, a first track, and a pointer at a fixed position, the first track displays multiple frames of a first video, the preview area displays a first frame of the first track pointed to by the pointer, a first position and a second position of the first track both display key frame identifiers, the first position is before the second position, the effect of the frame of the first track at the first position is a first effect, and the effect of the frame of the first track at the second position is a second effect; receiving a video capture operation acting on the first track, adjusting the first track to a second track, wherein the second track includes a third position to an end position of the first track, the third position is located between the first position and the second position, and the second position and the third position of the second track are both displayed with key frame marks; Upon receiving a play operation, a second video is played starting from the first frame in the preview area, the second video including a plurality of frames between the third frame and the end frame of the first video, the third frame being the frame at the third position of the first track, the end frame being the frame at the end position of the first track, and in the second video, a plurality of frames from the third frame to the second frame gradually transition from the first effect to the second effect, a plurality of frames after the second frame present the second effect, and the second frame being the frame at the second position of the second track.
4. The method according to claim 3, characterized in that The first track also includes a left handle at the left edge, and the video capture operation includes a right sliding operation acting on the left handle.
5. The method according to any one of claims 1 to 4, characterized in that The first effect includes displaying at a first display position, the editing operation is used to adjust the image from the first display position to a second display position, and the second effect includes displaying at the second display position; and / or The first effect includes displaying the image in a first size, the editing operation is used to adjust the image from the first size to a second size, and the second effect includes displaying the image in the second size; and / or The first effect includes displaying at a first display angle, the editing operation is used to adjust the image from the first display angle to a second display angle, and the second effect includes displaying at the second display angle; and / or The first effect includes displaying at a first opacity, the editing operation is used to adjust the image from the first opacity to a second opacity, and the second effect includes displaying at the second opacity.
6. The method according to any one of claims 1 to 5, characterized in that Before displaying the first user interface, the method includes: displaying a second user interface, the second user interface comprising: the preview area, the first track, and the pointer at a fixed position, the preview area displaying a picture of the first position of the first track pointed to by the pointer; receiving an operation of selecting the first track; Upon receiving an operation of adding a key frame, displaying a key frame identifier at the first position; receiving a left sliding operation on the first track, moving the first track to the left, and displaying a picture of the second position of the first track pointed to by the pointer in the preview area; receiving an editing operation acting on the picture at the second position in the preview area, adjusting the effect of the picture at the second position to the second effect, and displaying a key frame mark at the second position; A right sliding operation on the first track is received, and the first track is moved rightward.
7. The method according to claim 6, characterized in that After receiving the operation of adding a key frame, the method further includes: acquiring parameters of the picture at the first position, where the parameters of the picture at the first position are used to indicate the first effect; After receiving the editing operation acting on the picture at the second position in the preview area, the method further includes: acquiring parameters of the picture at the second position, where the parameters of the picture at the second position are used to indicate the second effect.
8. The method according to claim 6 or 7, characterized in that: After receiving an operation of selecting the first track, the method further includes: A first control is displayed in the second user interface, and the operation of adding a key frame includes an operation acting on the first control.
9. The method according to any one of claims 1 to 8, characterized in that After playing the second video from the first picture in the preview area, the method further includes: Receiving a user operation for exporting a video; The second video is stored.
10. The method according to any one of claims 1 to 9, characterized in that The first track displays all or part of the first video.
11. The method according to any one of claims 1 to 10, characterized in that After playing the second video from the first picture in the preview area, the method further includes: Receive the operation of pausing playback; An operation of adding a third track is received, the third track displays multiple frames of the first material, the preview area displays the fourth frame of the second track pointed to by the pointer and the fifth frame of the third track pointed to by the pointer, the fourth position and the fifth position of the third track are both displayed with key frame marks, the fourth position is before the fifth position, the effect of the frame at the fourth position of the third track is the third effect, and the effect of the frame at the fifth position of the third track is the fourth effect; receiving a video capture operation acting on the third track, adjusting the third track to a fourth track, wherein the fourth track includes a starting position to a sixth position of the third track, wherein the sixth position is located between the fourth position and the fifth position, and the fourth position and the sixth position of the third track are both displayed with key frame marks; Upon receiving a play operation, the second video is played from the fourth screen in the preview area, and the second material is played from the fifth screen, wherein the second material includes multiple screens between the sixth screen and the seventh screen of the first material, wherein the sixth screen is the screen at the starting position of the third track, and the seventh screen is the screen at the sixth position of the third track. In the second material, multiple screens from the sixth screen to the seventh screen gradually transition from the third effect to the fourth effect, and multiple screens after the seventh screen present the fourth effect.
12. An electronic device, characterized in that: The electronic device includes a memory and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method described in any one of claims 1-11.
13. A chip, which is applied to electronic equipment, characterized in that: The chip includes one or more processors, and the processor is used to call computer instructions to enable the electronic device to execute the method as described in any one of claims 1-11.
14. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 11.
Citation Information
Patent Citations
Multi treatment methods for key frame curve after modifying exit and entry points of materials
CN102572302A
Video special effect adding method and device, and intelligent mobile terminal
CN108022279A
Information processing method, interceptor, electronic device and storage medium
CN110139128A
Multi-track video editing method, graphical user interface and electronic equipment
CN116055799A
Video editing method and apparatus, device, and storage medium
WO2020187086A1