Video editing method and device
By segmenting video multimedia information and generating descriptive information, the problem of cumbersome video editing operations in existing technologies is solved, and the effect of simplifying video editing is achieved.
Patent Information
- Application Number
- CN202211297275.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-10-21
AI Technical Summary
In existing video editing methods, users find it difficult to precisely control the video progress bar, resulting in cumbersome operations that require multiple adjustments to determine the target video segment.
By dividing the video into multiple segments based on its multimedia information and generating descriptive information for each segment, the video content is displayed using visual descriptive information. Users can select the descriptive information as the starting point for video editing.
It simplifies video editing, allowing users to make precise edits simply by selecting description information for video clips, thus improving editing efficiency and flexibility.
Smart Images

Figure CN116033094B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a video editing method and device. Background Art
[0002] In recent years, with the development of science and technology, the functions of electronic devices have become more and more abundant. For example, electronic devices generally have a video editing function, and users can use the video editing function of the electronic device to edit videos they have taken or videos from the Internet.
[0003] In the related art, users crop videos by dragging the progress bar of the video. Although this method can realize video editing, it also has some problems. For example, it is difficult for users to accurately control the progress bar. Usually, the progress bar needs to be adjusted repeatedly many times to determine the target video segment, which is a cumbersome operation. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a video editing method and device that can simplify the related operations of video editing.
[0005] In a first aspect, an embodiment of the present application provides a video editing method, the method comprising:
[0006] Divide the first video into a plurality of video segments according to multimedia information of the first video to be edited, wherein the multimedia information includes: one or more of voice information, image information, and text information;
[0007] Generate multiple description information corresponding to the multiple video clips, wherein one video clip corresponds to one description information;
[0008] Display the multiple description information;
[0009] receiving a first input;
[0010] In response to the first input, selecting at least one piece of description information from the plurality of description information as target description information;
[0011] The video segment corresponding to the target description information is used as a cropping starting point to crop the first video to obtain a second video.
[0012] In a second aspect, an embodiment of the present application provides a video editing device, the device comprising:
[0013] A division module, configured to divide the first video to be edited into a plurality of video segments according to multimedia information of the first video, wherein the multimedia information includes: one or more of voice information, image information, and text information;
[0014] A generating module, configured to generate a plurality of description information corresponding to the plurality of video clips, wherein one video clip corresponds to one piece of description information;
[0015] A display module, used to display the multiple description information;
[0016] A receiving module, configured to receive a first input;
[0017] A selection module, configured to select at least one piece of description information from the plurality of description information as target description information in response to the first input;
[0018] The editing module is used to use the video segment corresponding to the target description information as a cropping starting point to crop the first video to obtain a second video.
[0019] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0020] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0021] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0022] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0023] In an embodiment of the present application, the video can be segmented through the multimedia information of the video to generate description information of each video segment, and the main video content of each video segment can be displayed to the user using the visual description information. The user can refer to the video content displayed by the visual description information to select the cropping starting point in the video and edit the video based on the cropping starting point. In an embodiment of the present application, the user only needs to select the description information of each video segment to edit the video. Since the visual description information can intuitively reflect the main content of each video segment, the solution in which the user selects the cropping starting point in the video by selecting the description information to perform video editing can simplify the related operations of video editing while ensuring that the video editing result meets the user's expectations. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is one of the flow charts of the video editing method provided in the embodiment of the present application;
[0025] Figure 2 This is one of the example diagrams of the video editing interface provided in the embodiment of the present application;
[0026] Figure 3 This is the second flowchart of the video editing method provided in the embodiment of the present application;
[0027] Figure 4 This is the second example diagram of the video editing interface provided in the embodiment of the present application;
[0028] Figure 5 This is the third flowchart of the video editing method provided in the embodiment of the present application;
[0029] Figure 6 This is the third example diagram of the video editing interface provided in the embodiment of the present application;
[0030] Figure 7 is a structural block diagram of a video editing device provided in an embodiment of the present application;
[0031] Figure 8 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0032] Fig. 9 It is a schematic diagram of the hardware structure of an electronic device implementing various embodiments of the present application. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0034] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0035] Currently, video editing software allows users to select a video for editing by dragging the progress bar of the video. During the process of dragging the progress bar, the video screen will be displayed above the progress bar, and users can control the video content they want to cut out by displaying the screen and time. However, this method may require repeated adjustment of the progress bar due to the large video content and inaccurate dragging, which is cumbersome.
[0036] In order to solve the above technical problems, the embodiments of the present application provide a video editing method and device.
[0037] The video editing method provided by the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0038] It should be noted that the video editing method provided in the embodiment of the present application is applicable to electronic devices. In practical applications, the electronic devices may include: mobile terminals such as smart phones, tablet computers, personal digital assistants, etc., and the embodiment of the present application does not limit this.
[0039] Figure 1 is one of the flow charts of the video editing method provided in the embodiment of the present application, such as Figure 1 As shown, the method may include the following steps: step 101, step 102, step 103, step 104, step 105 and step 106;
[0040] In step 101, the first video to be edited is divided into a plurality of video segments according to multimedia information of the first video, wherein the multimedia information includes: one or more of voice information, image information, and text information.
[0041] In an embodiment of the present application, in order to provide users with more auxiliary information when editing videos, the first video can be segmented into key information according to the multimedia information of the first video, and description information of each video segment can be generated within a limited time. Users can edit the video with reference to the description information.
[0042] In the embodiment of the present application, the first video may be a video shot by a user using an electronic device, or may be a video from the Internet, such as a video website or a vertical portal website.
[0043] In an embodiment of the present application, the voice information is information carried in the source audio of the first video, and the voice information may include at least one of the following: voice content and voice attribute information of the source audio, and the voice attribute information may include at least one of the following: pitch, timbre and loudness.
[0044] In the embodiment of the present application, the image information is information carried by each video frame in the source image sequence of the first video, and the image information may include at least one of the following: image content and image features.
[0045] In the embodiment of the present application, the text information may include subtitle information of the first video.
[0046] In an embodiment of the present application, dividing the first video into multiple video segments can include two division methods: the first method is to capture the first video into independent video segments to obtain multiple independent video segments; the second method is to record the starting time point and the ending time point of each video segment in the first video without performing a video capture operation, and mark the video segments in the first video with each group of start and end time points to obtain multiple video segments, wherein a group of start and end time points corresponds to one video segment.
[0047] In some embodiments, after acquiring the first video, the user may select a division method for the first video.
[0048] Optionally, when the user chooses to use the voice information of the first video, the above step 101 includes the following steps: dividing the first video into multiple video segments according to the voice information of the first video to be edited.
[0049] Optionally, when the user chooses to use the image information of the first video, the above step 101 includes the following steps: dividing the first video into a plurality of video segments according to the image information of the first video to be edited.
[0050] Optionally, when the user chooses to use the text information of the first video, the above step 101 includes the following steps: dividing the first video into multiple video segments according to the text information of the first video to be edited.
[0051] Optionally, when the user chooses to use all multimedia information of the first video, the above step 101 includes the following steps: dividing the first video into multiple video segments according to the voice information, image information and text information of the first video to be edited.
[0052] In some embodiments, the electronic device may utilize an artificial intelligence algorithm to adaptively select a division method for the first video.
[0053] Optionally, it can be preferred to divide the first video into video segments according to the voice information of the first video. If the division according to the voice information fails, the first video is divided into video segments according to the image information of the first video.
[0054] Optionally, it can be preferred to divide the first video into video segments according to image information of the first video. If the division according to the image information fails, the first video can be divided into video segments according to voice information of the first video.
[0055] It can be seen that in the embodiment of the present application, multiple ways of dividing the first video can be provided, which is highly flexible and can meet the diverse needs of users.
[0056] In step 102, a plurality of description information corresponding to a plurality of video clips is generated, wherein one video clip corresponds to one description information.
[0057] In the embodiment of the present application, the description information is used to describe the main content related to the video clip, and the description information may include at least one of the following types of information: text information and image information.
[0058] In an embodiment of the present application, the starting time point and the ending time point of each video clip can be recorded, and a correspondence between the starting time point and the ending time point of each video clip and the description information can be established.
[0059] In step 103, a plurality of description information is displayed.
[0060] In an embodiment of the present application, when displaying multiple descriptive information, the first video can be displayed in the upper half of the screen of the electronic device, and the descriptive information can be displayed in the lower half of the screen, so that the user can intuitively understand the correspondence between the first video and each descriptive information.
[0061] In the embodiment of the present application, when displaying multiple pieces of description information, the multiple pieces of description information may be sorted in chronological order according to the video clips corresponding to the description information, and displayed according to the sorting result.
[0062] In the embodiment of the present application, when multiple description information are displayed, the start and end time information of the video clips corresponding to each description information can be displayed at the same time.
[0063] For ease of understanding, the contents of the above steps 101 to 103 are described with reference to an example. Figure 2 As shown, an editing interface 21 of the first video is displayed on the electronic device 20. The first video is displayed on the editing interface 21. The user can choose to segment the first video. The interface jumps to the editing interface 22. The editing interface 22 displays the first video and the segmentation progress of the first video. After the segmentation is completed, the interface jumps to the editing interface 23. The editing interface 23 displays the description information of the first video and each video segment.
[0064] In step 104, a first input is received.
[0065] In the embodiment of the present application, the first input is used to select at least one target description information from multiple description information.
[0066] In an embodiment of the present application, the first input may be: a click input of the description information by the user, or a voice command input by the user, or a text input, or a specific gesture input by the user. The specific input may be determined based on actual usage requirements, and the embodiment of the present application does not limit this.
[0067] In the embodiment of the present application, the specific gesture can be any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, a double-press gesture, and a double-click gesture.
[0068] In the embodiment of the present application, the click input can be a single-click input, a double-click input, or any number of click inputs, etc. It can also be a long-press input or a short-press input.
[0069] In step 105 , in response to the first input, at least one piece of description information is selected from multiple pieces of description information as target description information.
[0070] In step 106, the video segment corresponding to the target description information is used as a cropping starting point to crop the first video to obtain a second video.
[0071] In some embodiments, the cropping method can be selected by the user.
[0072] Optionally, two video segments in the first video may be selected by selecting two pieces of target description information, and the video between the two video segments may be intercepted as a cropping result or as a source file for further video editing. Accordingly, the above step 106 includes the following steps: step 1061;
[0073] In step 1061, when the number of video segments corresponding to the target description information is two, the video segment that comes earlier in time is used as the cropping start point, and the video segment that comes later in time is used as the cropping end point in chronological order, and the video from the cropping start point to the cropping end point in the first video is intercepted to obtain the second video.
[0074] Optionally, a video segment selected by the user in the first video may be captured, and an edited video desired by the user may be generated based on the video segment selected by the user. Accordingly, the above step 106 includes the following steps: step 1062;
[0075] In step 1062, video segments corresponding to the target description information are captured from the first video, and the video segments corresponding to the target description information are spliced to obtain a second video.
[0076] In an embodiment of the present application, when splicing video clips selected by a user, the video clips may be spliced in chronological order, for example, video clips that are earlier in time are placed in front during splicing, and video clips that are later in time are placed in the back during splicing; alternatively, the user may select the order of splicing, which is not limited in the embodiment of the present application.
[0077] Optionally, the corresponding video content may be deleted by deleting some video clips in the first video to avoid multiple editing and cutting of the video. Accordingly, the above step 106 includes the following steps: step 1063;
[0078] In step 1063, the video segments corresponding to the target description information are captured from the first video, and the remaining video segments in the first video are spliced to obtain the second video.
[0079] In an embodiment of the present application, when splicing video clips other than video clips selected by the user, the video clips may be spliced in chronological order, for example, video clips that are earlier in time may be placed in front during splicing, and video clips that are closer in time may be placed in the back during splicing; alternatively, the user may select the order of splicing, which is not limited in the embodiment of the present application.
[0080] It can be seen that in the embodiments of the present application, a variety of video cropping methods can be provided, which is relatively flexible and can meet the diverse needs of users.
[0081] As can be seen from the above embodiments, in this embodiment, the video can be segmented through the multimedia information of the video to generate description information of each video segment, and the main video content of each video segment can be displayed to the user using the visual description information. The user can refer to the video content displayed by the visual description information to select the cropping starting point in the video and edit the video based on the cropping starting point. In the embodiment of the present application, the user only needs to select the description information of each video segment to edit the video. Since the visual description information can intuitively reflect the main content of each video segment, the user selects the cropping starting point in the video by selecting the description information to perform video editing. This can simplify the related operations of video editing while ensuring that the video editing result meets the user's expectations.
[0082] Figure 3 is a second flow chart of a video editing method provided in an embodiment of the present application. In the embodiment of the present application, the first video is edited by voice information, such as Figure 3 As shown, the method may include the following steps: step 301, step 302, step 303, step 304, step 305, step 306, step 307 and step 308;
[0083] In step 301, source audio corresponding to a first video to be edited is obtained.
[0084] In the embodiment of the present application, the first video can be analyzed to obtain the source audio corresponding to the first video.
[0085] In step 302, the source audio is segmented into sentences to obtain a plurality of speech segments, wherein one speech segment corresponds to one sentence.
[0086] In an embodiment of the present application, speech recognition is performed on the source audio, each speech pause point in the source audio is identified, the source audio is speech-sentenced according to the time information of each pause point, and the starting time point and the ending time point of each sentence point are recorded as the timestamp of each speech segment.
[0087] In step 303, the first video is divided into a plurality of video segments according to the plurality of voice segments, wherein one voice segment corresponds to one video segment.
[0088] In an embodiment of the present application, since each time point in the source audio corresponds one-to-one to each time point in the first video, the first video can be divided into multiple video segments according to the timestamps of each voice segment of the source audio.
[0089] In step 304, for each voice segment corresponding to the video segment, the text information and voice attribute information of the voice segment are identified; and description information including the text information and the voice attribute information is generated.
[0090] In an embodiment of the present application, in addition to identifying each voice segment as text information, voice attribute information of each voice segment can also be identified. The voice attribute information is used as a role feature in the description information, so that the description information includes not only the text information of each voice segment, but also the role information of each text information, so as to facilitate users to accurately understand the content of the video segment.
[0091] In an embodiment of the present application, the description information may also include a timestamp of each voice segment, so that the user can intuitively understand the correspondence between the description information and each video segment in the first video.
[0092] Considering that the voice in general videos has a short pause after completing a complete sentence, between 0.8 seconds and 1.1 seconds, the pause rule of punctuation marks is generally: the pause time of period, question mark, exclamation mark, ellipsis is slightly longer than that of semicolon, dash, hyphen; the pause time of semicolon, dash, hyphen is longer than that of comma and colon; the pause time of comma and colon is longer than that of comma and spacer. In the embodiment of the present application, when the voice segment is recognized as text information, the corresponding punctuation marks can be added to the text information based on the above pause rule.
[0093] In step 305, a plurality of description information is displayed.
[0094] In the embodiment of the present application, when displaying multiple pieces of description information, the multiple pieces of description information can be sorted according to the timestamps of the voice segments corresponding to the description information, and displayed according to the sorting results.
[0095] In the embodiment of the present application, considering that the description information contains voice attribute information, the description information can also be converted into a chat record format of a multi-person chat session for display.
[0096] In an example, as shown in the following Table 1, each description information includes a role and content, which can facilitate users to distinguish between roles and content.
[0097] Description Role Text content of speech Description information 1 Male 1 Who's going to the gym after get off work today? Description 2 Male 2 I have to work overtime today and can't go. Description information 3 Female 1 I can go. Description 4 Female 2 I can't go because I have something to do.
[0098] Table 1
[0099] In step 306, a first input is received.
[0100] In the embodiment of the present application, the first input is used to select at least one target description information from multiple description information.
[0101] In the embodiment of the present application, the user can select the target description information by clicking on the description information; or the user can use the search function to match the corresponding target description information from multiple description information.
[0102] In step 307 , in response to the first input, at least one piece of description information is selected from the plurality of description information as target description information.
[0103] In step 308, the video segment corresponding to the target description information is used as a cropping starting point to crop the first video to obtain a second video.
[0104] To facilitate understanding, let's take an example. Figure 3 The embodiment shown is described as follows. Figure 4As shown, the editing interface 22 of the electronic device 20 displays the first video and the segmentation progress of the first video. After the segmentation is completed, the interface jumps to the editing interface 24. The editing interface 24 displays the first video, the first control for editing based on image information, and the second control for editing based on voice information. If the user selects the second control, the interface jumps to the editing interface 25. The editing interface 25 displays the description information of the first video and each video segment of the first video, wherein the description information is generated based on the voice information of the first video. In addition, for the editing interface 25, the user can save the editing result through the control in the upper right corner to generate the desired video, and the first video as the video source file will not be deleted; the user can undo the last editing operation on the video through the control in the lower left corner; if the user makes multiple mistakes and wants to re-edit the video, it can be achieved through the control in the lower right corner.
[0105] It can be seen from the above embodiments that in this embodiment, the first video can be segmented according to the voice of the first video, and the information carried by the voice can be converted into visual description information of the video clip to assist the user in editing the video. The user only needs to select the description information of the video clip to be edited to realize the editing of the video. The operation is relatively simple and flexible.
[0106] Figure 5 is a flowchart of the video editing method provided in the embodiment of the present application. In the embodiment of the present application, the first video is edited by image information, such as Figure 5 As shown, the method may include the following steps: step 501, step 502, step 503, step 504, step 505, step 506 and step 507;
[0107] In step 501, a source image sequence corresponding to a first video to be edited is obtained.
[0108] In the embodiment of the present application, the first video can be analyzed to obtain a source image sequence corresponding to the first video.
[0109] In step 502, image feature recognition is performed on the video frames in the source image sequence, and the recognition results are clustered to obtain a plurality of video segments, wherein the video frames contained in each video segment have the same image features.
[0110] In an embodiment of the present application, in order to improve the clustering speed, when identifying the image features of each video frame, the main features of the video frame, that is, the features that account for the largest proportion of the content in the video frame, can be identified and the main features can be used as image features.
[0111] In one example, the image feature may be a picture style. After dividing the first video, three video segments are obtained, wherein the style of each video frame in the first video segment is a person-type picture, the style of each video frame in the second video segment is a food-type picture, and the style of each video frame in the third video segment is a landscape-type picture.
[0112] In step 503, for each video segment, a video frame is selected from the video segment as a representative image; and description information including image features and the representative image is generated.
[0113] In the embodiment of the present application, a video frame may be randomly selected from the video clip as a representative image, or a video frame with the most obvious image features may be selected as a representative image.
[0114] In the embodiment of the present application, the image features in the description information may be content in text form.
[0115] In step 504, a plurality of description information is displayed.
[0116] In an embodiment of the present application, when displaying each descriptive information, the representative image may be displayed in the front and the corresponding image features may be displayed in the back; or the image features may be displayed in the front and the corresponding representative image may be displayed in the back.
[0117] In step 505, a first input is received.
[0118] In the embodiment of the present application, the first input is used to select at least one target description information from multiple description information.
[0119] In the embodiment of the present application, the user can select the target description information by clicking on the description information; or the user can use the search function to match the corresponding target description information from multiple description information.
[0120] In step 506, in response to the first input, at least one piece of description information is selected from the plurality of description information as target description information.
[0121] In step 507, the video segment corresponding to the target description information is used as a cropping starting point to crop the first video to obtain a second video.
[0122] To facilitate understanding, let's take an example. Figure 5 The embodiment shown is described as follows. Figure 6As shown, the editing interface 22 of the electronic device 20 displays the first video and the segmentation progress of the first video. After the segmentation is completed, the interface jumps to the editing interface 26. The editing interface 26 displays the first video, a first control for editing based on image information, and a second control for editing based on voice information. If the user selects the first control, the interface jumps to the editing interface 27. The editing interface 27 displays the description information of the first video and each video segment of the first video, wherein the description information is generated based on the image information of the first video.
[0123] It can be seen from the above embodiments that in this embodiment, the video frames in the first video can be clustered according to the image features of the first video to form multiple video segments, and the information carried by the picture can be converted into visual description information of the video segment to assist the user in editing the video. The user only needs to select the description information of the video segment to be edited to realize the editing of the video. The operation is relatively simple and flexible.
[0124] In another embodiment provided by the present application, considering that the amount of information carried by voice in some dialogue videos is larger, while the amount of information carried by images in landscape videos is larger, that is, in different types of videos, the amount of information carried by voice and image is different, and each has its own emphasis. Therefore, in order to further simplify the user's editing operation and optimize the video editing effect, the video segmentation method can be selected according to the type of the first video. Accordingly, the above step 101 includes the following steps: step 1011, step 1012 and step 1013;
[0125] In step 1011 , the type of the first video to be edited is determined.
[0126] In step 1012, when the first video is a video containing a conversation between people, the first video is divided into a plurality of video segments according to voice information of the first video.
[0127] In step 1013, when the first video is a video that does not include a conversation between people, the first video is divided into a plurality of video segments according to image information of the first video.
[0128] In another embodiment provided in the present application, considering that the voice of the first video may sometimes have poor sound quality, it may not be possible to segment the first video using the voice information of the first video, or the segmentation effect may be poor. At this time, the image information of the first video may be used, or the subtitle information of the first video may be used to segment the first video.
[0129] In another embodiment provided in the present application, considering that the image of the first video may sometimes have poor image quality, it may not be possible to segment the first video using the image information of the first video, or the segmentation effect may be poor. In this case, the voice information of the first video may be used to segment the first video.
[0130] Considering that it is relatively rare that the first video has both poor sound quality and poor picture quality, in an embodiment of the present application, voice can be used to segment the video when the picture quality is poor, and image can be used to segment the video when the sound quality is poor, so as to ensure that video segmentation can be carried out normally.
[0131] In another embodiment provided by the present application, considering that the voice of the first video may sometimes have poor sound quality, the first video may be segmented according to the subtitle information, or the first video may be segmented in combination with the voice information and subtitle information of the first video. Figure 3 The embodiments shown are similar and will not be described again here.
[0132] It can be seen that compared with the solution of dragging the video progress bar to edit the video, in the embodiment of the present application, by extracting multimedia information such as voice information, image information and subtitle information in the video, the video is segmented and clustered, thereby improving the flexibility and customization of video editing. By deleting certain scenes or fragments through description information, multiple editing and cutting of the video is avoided. The entire editing process is simple and efficient. When facing large videos such as movies, the desired cutting effect can be achieved through one editing, narrowing the gap between mobile video editing and computer video editing software, and meeting users' high demand for editing videos.
[0133] The video editing method provided in the embodiment of the present application can be executed by a video editing device. In the embodiment of the present application, the video editing device provided in the embodiment of the present application is described by taking the video editing device executing the video editing method as an example.
[0134] Figure 7 is a structural block diagram of a video editing device provided in an embodiment of the present application, such as Figure 7 As shown, the video editing device 700 may include: a division module 701, a generation module 702, a display module 703, a receiving module 704, a selection module 705 and an editing module 706;
[0135] The division module 701 is used to divide the first video to be edited into multiple video segments according to the multimedia information of the first video, wherein the multimedia information includes: one or more of voice information, image information, and text information;
[0136] A generating module 702, configured to generate a plurality of description information corresponding to the plurality of video clips, wherein one video clip corresponds to one piece of description information;
[0137] A display module 703, used to display the multiple description information;
[0138] A receiving module 704, configured to receive a first input;
[0139] A selection module 705, configured to select at least one piece of description information from the plurality of description information as target description information in response to the first input;
[0140] The editing module 706 is configured to use the video segment corresponding to the target description information as a cropping starting point to crop the first video to obtain a second video.
[0141] As can be seen from the above embodiments, in this embodiment, the video can be segmented through the multimedia information of the video to generate description information of each video segment, and the main video content of each video segment can be displayed to the user using the visual description information. The user can refer to the video content displayed by the visual description information to select the cropping starting point in the video and edit the video based on the cropping starting point. In the embodiment of the present application, the user only needs to select the description information of each video segment to edit the video. Since the visual description information can intuitively reflect the main content of each video segment, the user selects the cropping starting point in the video by selecting the description information to perform video editing. This can simplify the related operations of video editing while ensuring that the video editing result meets the user's expectations.
[0142] Optionally, as an embodiment, the division module 701 may include:
[0143] A first acquisition submodule, used to acquire the source audio corresponding to the first video to be edited;
[0144] A first segmentation submodule is used to perform voice sentence segmentation on the source audio to obtain a plurality of voice segments, wherein one voice segment corresponds to one sentence;
[0145] The second division submodule is used to divide the first video into multiple video segments according to the multiple voice segments, wherein one voice segment corresponds to one video segment.
[0146] Optionally, as an embodiment, the generating module 702 may include:
[0147] A first recognition submodule, configured to recognize text information and voice attribute information of the voice segment corresponding to each of the video segments;
[0148] The first generating submodule is used to generate description information including the text information and the voice attribute information.
[0149] Optionally, as an embodiment, the division module 701 may include:
[0150] A second acquisition submodule is used to acquire a source image sequence corresponding to the first video to be edited;
[0151] A second recognition submodule is used to perform image feature recognition on video frames in the source image sequence;
[0152] The third division submodule is used to cluster the recognition results to obtain multiple video clips, wherein the video frames contained in each of the video clips have the same image features.
[0153] Optionally, as an embodiment, the generating module 702 may include:
[0154] A selection submodule, configured to select, for each of the video clips, a video frame from the video clip as a representative image;
[0155] The second generating submodule is used to generate description information including the image features and the representative image.
[0156] Optionally, as an embodiment, the editing module 706 may include:
[0157] A first editing submodule is used for, when the number of the video segments corresponding to the target description information is two, taking the earlier video segment as the cropping start point and the later video segment as the cropping end point in chronological order, and intercepting the video from the cropping start point to the cropping end point in the first video to obtain a second video; or
[0158] A second editing submodule is configured to capture the video segments corresponding to the target description information from the first video, and splice the video segments corresponding to the target description information to obtain a second video; or
[0159] The third editing submodule is used to capture the video segment corresponding to the target description information from the first video, and splice the remaining video segments in the first video to obtain a second video.
[0160] The video editing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0161] The video editing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0162] The video editing device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment will not be described again here.
[0163] Alternatively, if Figure 8 As shown, an embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores programs or instructions that can be executed on the processor 801, and when the program or instructions are executed by the processor 801, the various steps of the above-mentioned video editing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0164] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0165] Fig. 9 It is a schematic diagram of the hardware structure of an electronic device implementing various embodiments of the present application.
[0166] The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, a processor 910 and other components.
[0167] Those skilled in the art will appreciate that the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0168] The processor 910 is configured to divide the first video to be edited into a plurality of video segments according to multimedia information of the first video, wherein the multimedia information includes one or more of voice information, image information, and text information; generate a plurality of description information corresponding to the plurality of video segments, wherein one video segment corresponds to one description information; and instruct the display unit 906 to display the plurality of description information;
[0169] A user input unit 907, configured to receive a first input;
[0170] Processor 910 is also used to select at least one description information from the multiple description information as target description information in response to the first input; use the video segment corresponding to the target description information as the cropping starting point, crop the first video, and obtain a second video.
[0171] It can be seen that in the embodiment of the present application, the video can be segmented through the multimedia information of the video, and the description information of each video segment can be generated. The main video content of each video segment can be displayed to the user using the visual description information. The user can refer to the video content displayed by the visual description information to select the cropping starting point in the video and edit the video based on the cropping starting point. In the embodiment of the present application, the user only needs to select the description information of each video segment to edit the video. Since the visual description information can intuitively reflect the main content of each video segment, the solution in which the user selects the cropping starting point in the video by selecting the description information to perform video editing can simplify the related operations of video editing while ensuring that the video editing result meets the user's expectations.
[0172] Optionally, as an embodiment, the processor 910 is also used to obtain the source audio corresponding to the first video to be edited; perform voice sentence segmentation on the source audio to obtain multiple voice segments, wherein one voice segment corresponds to one sentence; and divide the first video into multiple video segments according to the multiple voice segments, wherein one voice segment corresponds to one video segment.
[0173] Optionally, as an embodiment, the processor 910 is further configured to identify text information and voice attribute information of the voice segment corresponding to each of the video segments; and generate description information including the text information and the voice attribute information.
[0174] Optionally, as an embodiment, the processor 910 is also used to obtain a source image sequence corresponding to the first video to be edited; perform image feature recognition on the video frames in the source image sequence, and cluster the recognition results to obtain multiple video clips, wherein the video frames contained in each of the video clips have the same image features.
[0175] Optionally, as an embodiment, the processor 910 is further configured to select, for each of the video clips, a video frame from the video clip as a representative image; and generate description information including the image features and the representative image.
[0176] Optionally, as an embodiment, the processor 910 is further configured to, when the number of the video segments corresponding to the target description information is two, use the earlier video segment as the cropping start point and the later video segment as the cropping end point in chronological order, and intercept the video from the cropping start point to the cropping end point in the first video to obtain the second video; or,
[0177] intercepting the video segments corresponding to the target description information from the first video, and splicing the video segments corresponding to the target description information to obtain a second video; or,
[0178] The video segment corresponding to the target description information is intercepted from the first video, and the remaining video segments in the first video are spliced to obtain a second video.
[0179] It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0180] The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0181] The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.
[0182] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned video editing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0183] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0184] An embodiment of the present application also provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned video editing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0185] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0186] The embodiment of the present application also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned video editing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0187] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0188] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0189] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A video editing method, characterized in that: The method comprises: Divide the first video into a plurality of video segments according to multimedia information of the first video to be edited, wherein the multimedia information includes: one or more of voice information, image information, and text information; Generate multiple description information corresponding to the multiple video clips, wherein one video clip corresponds to one description information; Display the multiple description information; receiving a first input; In response to the first input, selecting at least one piece of description information from the plurality of description information as target description information; Using the video segment corresponding to the target description information as a cropping starting point, cropping the first video to obtain a second video; The step of dividing the first video to be edited into a plurality of video segments according to the multimedia information of the first video to be edited comprises: Acquire a source image sequence corresponding to the first video to be edited; Performing image feature recognition on the video frames in the source image sequence, and clustering the recognition results to obtain a plurality of video clips, wherein the video frames contained in each of the video clips have the same image features; The generating a plurality of description information corresponding to the plurality of video clips includes: For each of the video clips, selecting a video frame from the video clip as a representative image; Generate description information including the image features and the representative image.
2. The method according to claim 1, characterized in that The step of dividing the first video to be edited into a plurality of video segments according to the multimedia information of the first video to be edited comprises: Obtaining source audio corresponding to the first video to be edited; Segment the source audio to obtain a plurality of speech segments, wherein one speech segment corresponds to one sentence; According to the multiple voice segments, the first video is divided into multiple video segments, wherein one voice segment corresponds to one video segment.
3. The method according to claim 2, characterized in that The generating a plurality of description information corresponding to the plurality of video clips includes: For each of the voice segments corresponding to the video segments, identifying text information and voice attribute information of the voice segment; Generate description information including the text information and the voice attribute information.
4. The method according to claim 1, characterized in that The step of taking the video segment corresponding to the target description information as a cropping starting point and cropping the first video to obtain a second video includes: In the case that the number of the video segments corresponding to the target description information is two, the video segment earlier in time is used as the cropping start point, and the video segment later in time is used as the cropping end point in chronological order, and the video from the cropping start point to the cropping end point in the first video is intercepted to obtain the second video; or intercepting the video segments corresponding to the target description information from the first video, and splicing the video segments corresponding to the target description information to obtain a second video; or, The video segment corresponding to the target description information is captured from the first video, and the remaining video segments in the first video are spliced to obtain a second video.
5. A video editing device, characterized in that: The device comprises: A division module, configured to divide the first video to be edited into a plurality of video segments according to multimedia information of the first video, wherein the multimedia information includes: one or more of voice information, image information, and text information; A generating module, configured to generate a plurality of description information corresponding to the plurality of video clips, wherein one video clip corresponds to one piece of description information; A display module, used to display the multiple description information; A receiving module, configured to receive a first input; A selection module, configured to select at least one piece of description information from the plurality of description information as target description information in response to the first input; An editing module, configured to use the video segment corresponding to the target description information as a cropping starting point to crop the first video to obtain a second video; The division module comprises: A second acquisition submodule is used to acquire a source image sequence corresponding to the first video to be edited; A second recognition submodule is used to perform image feature recognition on video frames in the source image sequence; A third division submodule is used to cluster the recognition results to obtain a plurality of video clips, wherein the video frames contained in each of the video clips have the same image features; The generation module comprises: A selection submodule, configured to select, for each of the video clips, a video frame from the video clip as a representative image; The second generating submodule is used to generate description information including the image features and the representative image.
6. The device according to claim 5, characterized in that The division module comprises: A first acquisition submodule, used to acquire the source audio corresponding to the first video to be edited; A first segmentation submodule is used to perform voice sentence segmentation on the source audio to obtain a plurality of voice segments, wherein one voice segment corresponds to one sentence; The second division submodule is used to divide the first video into multiple video segments according to the multiple voice segments, wherein one voice segment corresponds to one video segment.
7. The device according to claim 6, characterized in that The generation module comprises: A first recognition submodule, configured to recognize text information and voice attribute information of the voice segment corresponding to each of the video segments; The first generating submodule is used to generate description information including the text information and the voice attribute information.
8. The device according to claim 6, characterized in that The editing module comprises: A first editing submodule is used for, when the number of the video segments corresponding to the target description information is two, taking the earlier video segment as the cropping start point and the later video segment as the cropping end point in chronological order, and intercepting the video from the cropping start point to the cropping end point in the first video to obtain a second video; or A second editing submodule is configured to capture the video segments corresponding to the target description information from the first video, and splice the video segments corresponding to the target description information to obtain a second video; or The third editing submodule is used to capture the video segment corresponding to the target description information from the first video, and splice the remaining video segments in the first video to obtain a second video.
