Video processing method and device
By adding tags to video frames and using artificial intelligence algorithms or user customization, theme-based video editing is realized, solving the problem of single editing methods in the existing technology, and improving the diversity and application scenarios of video editing.
Patent Information
- Application Number
- CN202411374824.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-31
AI Technical Summary
In the prior art, video editing can only be performed based on the time dimension, resulting in a single editing method and the inability to effectively utilize other features of video frames such as shooting locations, scenes and objects, limiting the diversity and application scenarios of video editing.
By adding tags to video frames such as shooting time, location, scene and audio content, using artificial intelligence algorithms or user customizations to generate video clips to achieve theme-based video editing.
It enriches the methods of video editing, expands the application scenarios, makes video editing no longer single, improves the output diversity and accuracy of video clips, and simplifies user operations.
Smart Images

Figure CN119233082A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of video editing technology, and specifically relates to a video processing method and device. Background Art
[0002] Usually, after a user uses an electronic device to shoot one or several videos, he needs to select the ideal video clip from multiple videos. For example, during an event, a user continuously shoots a certain activity scene, and after shooting, he needs to find the wonderful parts in the shot video. In the related art, when the video is in the editing state, the user needs to drag two pointers on the progress bar of the video multiple times, and finally the middle part of the position pointed by the two pointers is the cropped video clip. It can be seen that currently the video can only be edited based on the time dimension, resulting in a single video editing method. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a video processing method and device, which can solve the problem of a single editing method caused by the fact that the video can only be edited based on the time dimension in the related art.
[0004] In a first aspect, an embodiment of the present application provides a video processing method, the method comprising:
[0005] Obtain at least one tag of each video frame in the first video; wherein the tag includes at least one of the shooting time, shooting location, shooting scene, shooting object, and audio content of the video frame;
[0006] When the first video is in an editing state, video segments of the first video are output according to the labels of the respective video frames in the first video.
[0007] In a second aspect, an embodiment of the present application provides a video processing device, the device comprising:
[0008] An acquisition module, configured to acquire at least one tag of each video frame in the first video; wherein the tag includes at least one of the shooting time, shooting location, shooting scene, shooting object, and audio content of the video frame;
[0009] An output module is used to output video clips of the first video according to the labels of the respective video frames in the first video when the first video is in an editing state.
[0010] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps described in the first aspect are implemented.
[0011] 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.
[0012] 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.
[0013] 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.
[0014] In an embodiment of the present application, at least one label of each video frame in the first video is obtained; wherein the label includes at least one of the shooting time, shooting location, shooting scene, shooting object, and audio content of the video frame; when the first video is in an editing state, the video clips of the first video are output according to the labels of each video frame in the first video. It can be seen that in the embodiment of the present application, for any video, at least one label is added to each video frame of the video. Since each label can represent a shooting theme, it is possible to edit the video from the perspective of the shooting theme presented by the video frame in the video, and more video clips related to the shooting theme can be edited, so that the video editing method is no longer single, which enriches the video editing method and expands the application scenarios of video editing. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flow chart of a video processing method provided by some embodiments of the present application;
[0016] Figure 2 It is one of the flowcharts of an implementation of step 102 provided in some embodiments of the present application;
[0017] Figure 3 is one of the example diagrams of the video editing interface provided by some embodiments of the present application;
[0018] Figure 4 This is a second flowchart of an implementation of step 102 provided in some embodiments of the present application;
[0019] Figure 5 This is a second example diagram of a video editing interface provided by some embodiments of the present application;
[0020] Figure 6 This is a flowchart of a third implementation of step 102 provided in some embodiments of the present application;
[0021] Figure 7 This is a third example diagram of a video editing interface provided by some embodiments of the present application;
[0022] Figure 8 is a block diagram of a video processing device provided by some embodiments of the present application;
[0023] Fig. 9 is a schematic diagram of the hardware structure of an electronic device provided in some embodiments of the present application;
[0024] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in some embodiments of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings of the embodiments of the present application to clearly describe the technical solutions of the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present application belong to the scope of protection of this application.
[0026] 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 terms 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 a class, and the number of objects is not limited. For example, the target 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 before and after are in an "or" relationship.
[0027] The video processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0028] It should be noted that the video processing 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, or may also include: servers, computer equipment, etc., which are not limited in the embodiment of the present application.
[0029] Figure 1 is a flow chart of a video processing method provided by some embodiments of the present application, such as Figure 1 As shown, the method at least includes the following steps: step 101 and step 102;
[0030] In step 101, at least one tag of each video frame in a first video is obtained; wherein the tag includes at least one of the shooting time, shooting location, shooting scene, shooting object, and audio content of the video frame.
[0031] In an embodiment of the present application, the first video can be a video of a longer duration or a video of a shorter duration. In actual applications, the types of the first video include but are not limited to: videos shot by the local electronic device, videos shot by other electronic devices, post-synthesized videos, and videos produced by professional video producers, such as movies, TV series, and short dramas.
[0032] In the embodiment of the present application, a video frame may have only one label, or a video frame may have multiple labels.
[0033] In the embodiment of the present application, the shooting time may be the time in the time zone where the electronic device is currently located. The shooting location may be an administrative division location or a specific geographical location coordinate such as longitude and latitude coordinates. The shooting scene includes but is not limited to the shooting environment, the shooting depth of field such as long shot, panorama, mid shot, close shot, close-up, etc. The shooting objects include but are not limited to people, animals, plants, furniture, buildings, mountains and rivers, etc. The audio content includes but is not limited to: audio subtitles, audio timbre, etc.
[0034] In the embodiment of the present application, each tag can be used to summarize a shooting theme. In practical applications, the form of tags includes but is not limited to: descriptive text such as "player", "goal", etc., and strings with certain meanings, where different strings represent different tags.
[0035] In an embodiment of the present application, at a specific time, an artificial intelligence (AI) algorithm can be used to automatically perform content analysis and identification on the first video, for example, the shooting time, shooting location, shooting scene, shooting object, subtitles and audio of each frame of the first video can be analyzed to output labels for each video frame.
[0036] For example, if a public figure appears in a video frame, the name of the public figure is used as a label of the video frame. Or, if a person is wearing headphones in a video frame, listening to music is used as a label of the video frame. Or, if a person is taking a selfie in a video frame, taking a photo is used as a label of the video frame.
[0037] In an embodiment of the present application, the specific time may be when the electronic device is charging and the screen is turned off. Since the user will not use the electronic device temporarily when the screen is turned off, at this time, the labels of each video frame in the first video are generated by the AI algorithm, which can avoid energy consumption during the user's use of the electronic device and will not affect the user's normal use of other functions of the electronic device.
[0038] In an embodiment of the present application, a specific timing can be triggered by a user, such as a user clicking on a function control, or a user triggering it through a voice command, to meet the user's video processing needs.
[0039] In the embodiment of the present application, the specific timing may be when the system of the electronic device detects that a new video has been stored, so that the system is ready to execute subsequent steps at any time.
[0040] In some embodiments, in addition to using an AI algorithm to generate labels for video frames, the labels for video frames may also be customized by the user to meet the personalized needs of the user. Accordingly, the above step 101 may include the following steps: step 1011 and step 1012;
[0041] In step 1011, when any video frame in the first video is displayed, a fourth input of the video frame is received, wherein the fourth input is used to input custom information.
[0042] In the embodiment of the present application, the fourth input is used to input custom information for any video frame in the first video, wherein the custom information is a label of the video frame.
[0043] Exemplarily, the fourth input may be: during the playback of the first video, the user clicks on the pause option, at which time a video frame is displayed in the first video, the user long presses the video frame, and while displaying the label of the video frame, a custom label is displayed, the user clicks on the option of the custom label, an input box is displayed, and the user clicks on the input box and edits the custom information.
[0044] In step 1012, in response to the fourth input, the custom information input by the fourth input is determined as a label of the video frame.
[0045] Exemplarily, after the user clicks the input box and edits the custom information, the user clicks the Done option, and the tag generated based on the custom information is displayed in the tag list of the video frame.
[0046] In an embodiment of the present application, the label generated based on the custom information input by the user can be used as a supplement to AI recognition of the shooting subject.
[0047] It can be seen that in the embodiments of the present application, an entry for custom tags can be provided, so that in the process of outputting video clips, video clips can be output based on the user's custom tags, thereby not only achieving the output of diversified video clips based on rich tags, but also improving the accuracy of the output video clips, thereby increasing the probability of users retaining video clips.
[0048] It should be noted that the "input" in the embodiments of the present application, such as the first input, the second input, the third input, the fourth input, etc., includes but is not limited to: touch input of the user to the controls on the screen or the screen area through a touch device such as a finger or a stylus, or a voice command input by the user, or a specific gesture input by the user, or other feasible input, which can be determined according to actual usage requirements; among them, the specific gesture includes but is not limited to any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double-press gesture, and a double-click gesture; click input includes but is not limited to single-click input, double-click input or any number of click inputs, long press input or short press input, which is not limited in the embodiments of the present application.
[0049] In an embodiment of the present application, after generating labels for each video frame in the first video, the labels for each video frame of the first video can be stored in a database, in which there is a corresponding relationship between the label of each video frame and the first video in which it exists, so as to be applied in subsequent steps.
[0050] In step 102, when the first video is in an editing state, video segments of the first video are output according to labels of respective video frames in the first video.
[0051] In an embodiment of the present application, a video editing control may be provided, and a user operates the video editing control to trigger the first video to enter an editing state.
[0052] In an embodiment of the present application, when the first video is in an editing state, an editing interface of the first video can be displayed, and on the editing interface, video clips of the first video are output according to the labels of each video frame in the first video, so that the user can intuitively experience the entire video editing process and enhance the user's sense of participation.
[0053] Exemplarily, the first video is a video shot by the user using his own electronic device. The user clicks on the video editing option of the first video in the photo album of the electronic device to enter the editing state of the first video to display the editing interface of the first video.
[0054] In the embodiment of the present application, at least one video segment of the first video can be outputted intelligently according to the labels of each video frame in the first video. Alternatively, at least one video segment of the first video can be outputted in a personalized manner according to the labels of each video frame in the first video based on the user's input.
[0055] Exemplarily, in the editing interface of the first video, a prompt control is displayed, such as a "Try AI automatic extraction" control. After the user clicks the "Try AI automatic extraction" control, an automatic extraction interface is displayed. In this interface, at least one video clip of the first video is intelligently output based on the labels of each video frame in the first video.
[0056] As can be seen from the above embodiments, in this embodiment, at least one label of each video frame in the first video is obtained; wherein the label includes at least one of the shooting time, shooting location, shooting scene, shooting object, and audio content of the video frame; when the first video is in an editing state, the video clips of the first video are output according to the labels of each video frame in the first video. It can be seen that in the embodiments of the present application, for any video, at least one label is added to each video frame of the video. Since each label can represent a shooting theme, it is possible to edit the video from the perspective of the shooting theme presented by the video frames in the video, and more video clips related to the shooting theme can be edited, so that the video editing method is no longer single, which enriches the video editing method and expands the application scenarios of video editing.
[0057] In another embodiment provided in the present application, Figure 2 As shown, the above step 102 may include the following steps: step 201, step 202 and step 203;
[0058] In step 201, based on the tags, video frame groups corresponding to the respective tags in the first video are output respectively; wherein all video frames in the video frame group corresponding to any tag have the same tag.
[0059] In the embodiment of the present application, all video frames in the same video frame group have the same label, and the labels of video frames in different video frame groups are different.
[0060] In an embodiment of the present application, for each label of each video frame in the first video, all video frames with the same label can be summarized into a video frame group according to the label as the basis for classification, and the summarized video frame groups are output. Since one label can summarize a shooting theme, for each video frame group, the user can intuitively see all video frames with the same shooting theme expressed by the label of the video frame group in the video frame group, thereby facilitating the user to edit the video clips in the first video based on the label.
[0061] In an embodiment of the present application, for each video frame group, a representative video frame can be extracted from the video frame group, an icon of the video frame group is generated based on the screen content of the video frame, and the video frame group is output in the form of a display icon.
[0062] In an embodiment of the present application, when an icon of a video frame group is generated based on the picture content of a video frame, a thumbnail of the video frame can be used as the icon of the video frame group, or the main object of the video frame, such as a portrait, can be cropped and used as the icon of the video frame group.
[0063] In an embodiment of the present application, in addition to outputting each video frame group of the first video in the form of display icons, a label of the video frame group corresponding to the icon can also be displayed below each icon, so that the user can see the various shooting subjects of the first video at a glance.
[0064] For example, Figure 3 As shown, the screen of the electronic device 30 displays an editing interface 31 of the first video, which includes icons 32, 33, and 34, as well as a label "listening to music" corresponding to icon 32, a label "taking photos" corresponding to icon 33, and a label "star" corresponding to icon 34. Among them, icon 32 corresponds to the video frame group labeled "listening to music" in the first video, icon 33 corresponds to the video frame group labeled "taking photos" in the first video, and icon 34 corresponds to the video frame group labeled "star" in the first video. The user clicks any of the above icons to select the video frame group corresponding to the icon.
[0065] In step 202, a first input of a first video frame group among the video frame groups is received.
[0066] In the embodiment of the present application, the first input is used to select a first video frame group from various video frame groups of the first video, wherein the number of the first video frame groups may be one or more.
[0067] For example, the user clicks Figure 3 If the icon 34 on the editing interface 31 is shown, the electronic device 30 corresponds the icon 34 to the video frame group labeled "photograph" in the first video and determines it as the first video frame group.
[0068] For example, the user clicks Figure 3 As shown in the icon 32 and icon 33 on the editing interface 31, the electronic device 30 corresponds icon 32 to the video frame group labeled "listening to music" in the first video, and icon 33 to the video frame group labeled "taking photos" in the first video, and determines them as the first video frame group.
[0069] In step 203, in response to the first input, a video segment consisting of all video frames in the first video frame group is output.
[0070] In an embodiment of the present application, when the number of first video frame groups is 1, the final output video segment is composed of all video frames in the first video frame group, wherein the order of each video frame in the video segment can refer to the order of each video frame in the first video, or the order of each video frame in the video segment can also be randomly or custom adjusted.
[0071] In an embodiment of the present application, when the number of first video frame groups is greater than 1, all first video frame groups can be merged to output a merged video segment, wherein the order of individual video frames in the merged video segment in the video segment is the same as the order of individual video frames in the first video frame groups in the first video.
[0072] For example, the user clicks Figure 3 The electronic device 30 determines that the icon 34 corresponds to the video frame group labeled "photograph" in the first video as the first video frame group, and generates a video clip based on the video frame group labeled "photograph". After the video clip is generated, the video clip can be automatically played, or the video clip can be automatically stored in the photo album.
[0073] For example, the user clicks Figure 3 The electronic device 30 determines that icon 32 corresponds to the video frame group labeled "listening to music" in the first video and icon 33 corresponds to the video frame group labeled "taking photos" in the first video as the first video frame group, and generates a video clip based on the video frame group labeled "listening to music" and the video frame group labeled "taking photos". After the video clip is generated, the video clip can be automatically played, or the video clip can be automatically stored in the photo album.
[0074] It can be seen that in the embodiment of the present application, the video frames in the first video can be classified according to the labels, and the video frames with the same labels can be classified together and used as the output of a video clip. Video clips of different themes can be output, so that the output of video clips is diversified, more shooting themes can be expressed, and the user operation is simple.
[0075] In another embodiment provided in the present application, Figure 4 As shown, the above step 102 may include the following steps: step 401, step 402, step 403 and step 404;
[0076] In step 401 , while the respective tags are displayed, a second input for at least two tags is received.
[0077] In an embodiment of the present application, in order to intuitively show how many shooting subjects exist in the first video, each label of each video frame of the first video can be displayed.
[0078] In an embodiment of the present application, the second input is used to select at least two tags from the tags of each video frame of the first video to trigger the electronic device to output a video clip based on the at least two tags.
[0079] For example, Figure 5 As shown, the screen of the electronic device 50 displays an editing interface 51 of the first video, and the editing interface 51 includes three tags, namely "Xiao Ming", "Goal" and "Cheerleading Team". The user can click on any of the above tags to select the tag.
[0080] In the embodiment of the present application, the following situations may be considered: each video frame group is output on the video editing interface, and a label is displayed corresponding to each video frame group, and the user is not satisfied with these video frame groups. An edit box is displayed at the top of the interface, and the second input can be that the user clicks on the edit box, enters content in the edit box, and the content is based on at least two of the displayed labels, and then clicks on the completed option. For example, the two displayed labels are Xiao Ming and Goal, and the content entered by the user can be Xiao Ming Goal. Alternatively, the second input can be that the user long presses a video frame group indicator image and drags its shadow to another video frame group indicator image.
[0081] In an embodiment of the present application, an AI algorithm may be used to perform semantic understanding on the content input by the user, thereby analyzing at least two tags, namely, at least two tags associated with the second input.
[0082] In step 402, in response to the second input, video frame groups corresponding to respective labels of at least two labels in the first video are respectively obtained; wherein all video frames in the video frame group corresponding to any label have the same label.
[0083] In the embodiment of the present application, for at least two tags associated with the second input, a video frame group having any tag is obtained, so that at least two video frame groups can be obtained. The number of video frame groups obtained in this step is the same as the number of tags associated with the second input.
[0084] In step 403, video frames respectively appearing in each video frame group are determined.
[0085] In the embodiment of the present application, any video frame group is taken as a set, and each video frame in the video frame group is taken as a set object, so that the intersection of at least two sets can be taken, and all objects in the intersection appear in each set respectively.
[0086] In step 404, a video segment consisting of video frames is output.
[0087] In an embodiment of the present application, each object obtained by taking the intersection, that is, each video frame, is used as a component of the output video segment; wherein the sequence of each video frame in the video segment is the same as the sequence of each video frame in the first video.
[0088] It can be seen that in an embodiment of the present application, based on all the tags appearing in the first video, the user can combine at least two tags, so that the electronic device can combine the tags, and the video frames in the output video clip can express at least two shooting themes, thereby further enriching the output results of the video clip, and the output results meet the diverse themes expected by the user.
[0089] In another embodiment provided in the present application, Figure 6 As shown, the above step 102 may include the following steps: step 601, step 602 and step 603;
[0090] In step 601, each video frame in a first video is output.
[0091] In the embodiment of the present application, each video frame of the first video can be displayed under the trigger of user input.
[0092] For example, a trigger entry, such as a control, is provided at the bottom of the video editing interface, with a prompt message such as: "Don't have the theme you want? Try custom synthesis?" The user clicks the control, and a floating window is displayed in the remaining area of the video editing interface, or in a new editing interface, such as Figure 7 As shown, an editing interface 71 is displayed on the screen of the electronic device 70, and the editing interface 71 displays thumbnails of all video frames of the first video, namely, “thumbnail”, “ Figure 1 ", ... "thumbnail N", where N is the total number of video frames of the first video. A circular mark is displayed at the upper right corner of each thumbnail, which is used as a selection entry for the thumbnail and marks whether the thumbnail is in a selected state.
[0093] In the embodiment of the present application, the video frames of the first video are displayed in sequence according to their order from first to last in the first video.
[0094] In step 602, a third input of at least two video frames is received.
[0095] In the embodiment of the present application, the third input is used to select at least two of the output video frames and trigger the electronic device to output a segment based on the selected at least two video frames.
[0096] For example, the third input may be a user clicking Figure 7 At least two thumbnails in the display, wherein after the user clicks on the at least two thumbnails, the circular marks at the upper right corners of the at least two thumbnails change from a transparent background to a black background, indicating a selected state.
[0097] In step 603, in response to the third input, a video segment consisting of at least two video frames is output.
[0098] In the embodiment of the present application, the sequence of the at least two video frames in the video clip may be the same as the sequence of the at least two video frames in the first video. Alternatively, the sequence of the at least two video frames in the video clip may be the same as the sequence of the at least two video frames selected by the user through the third input.
[0099] For example, the user selects Figure 7 Thumbnail of video frame 1 in Figure 1 , video frame 3 thumbnail Figure 3 , video frame 5 thumbnail Figure 5 and video frame 6 thumbnail Figure 6 , the electronic device 70 generates a video segment including video frame 1, video frame 3, video frame 5 and video frame 6, in which video frame 1, video frame 3, video frame 5 and video frame 6 are displayed in sequence.
[0100] It can be seen that in the embodiment of the present application, all video frames of the first video can be freely selected and combined by the user to achieve maximum customization of the output video segments, thereby improving the output diversity of the video segments.
[0101] In summary, the purpose of the embodiments of the present application is to provide a method for automatically outputting video clips based on topic tags, wherein all video frames of a video are labeled according to the topic, so that each topic video clip can be quickly extracted according to the tag, helping users to quickly obtain video clips, improving the output efficiency of video clips, and users do not need to perform drag-and-drop editing or multi-segment splicing, simplifying user operations. In addition, the embodiments of the present application provide a path for segment synthesis of any video frame, which can flexibly output more possible segments and improve the efficiency of video segment output.
[0102] The video processing method provided in the embodiment of the present application can be executed by a video processing device. In the embodiment of the present application, the video processing device provided in the embodiment of the present application is described by taking the video processing method executed by the video processing device as an example.
[0103] Figure 8 is a block diagram of a video processing device provided by some embodiments of the present application, such as Figure 8As shown, the video processing device 800 may include: an acquisition module 801 and an output module 802;
[0104] The acquisition module 801 is used to acquire at least one tag of each video frame in the first video; wherein the tag includes at least one of the shooting time, shooting location, shooting scene, shooting object, and audio content of the video frame;
[0105] The output module 802 is used to output the video segments of the first video according to the labels of the respective video frames in the first video when the first video is in an editing state.
[0106] As can be seen from the above embodiments, in this embodiment, at least one label of each video frame in the first video is obtained; wherein the label includes at least one of the shooting time, shooting location, shooting scene, shooting object, and audio content of the video frame; when the first video is in an editing state, the video clips of the first video are output according to the labels of each video frame in the first video. It can be seen that in the embodiments of the present application, for any video, at least one label is added to each video frame of the video. Since each label can represent a shooting theme, it is possible to edit the video from the perspective of the shooting theme presented by the video frames in the video, and more video clips related to the shooting theme can be edited, so that the video editing method is no longer single, which enriches the video editing method and expands the application scenarios of video editing.
[0107] Optionally, as an embodiment, the output module 802 may include:
[0108] A first output submodule, configured to output, based on the labels, video frame groups corresponding to the respective labels in the first video; wherein all the video frames in the video frame group corresponding to any of the labels have the same label;
[0109] A first receiving submodule, configured to receive a first input of a first video frame group in the video frame groups;
[0110] The second output submodule is configured to output a video segment consisting of all the video frames in the first video frame group in response to the first input.
[0111] Optionally, as an embodiment, the output module 802 may include:
[0112] A second receiving submodule, configured to receive a second input for at least two of the tags while displaying each of the tags;
[0113] an acquisition submodule, configured to respectively acquire, in response to the second input, a video frame group corresponding to each of the at least two labels in the first video; wherein all the video frames in the video frame group corresponding to any of the labels have the same label;
[0114] A first determination submodule, used for determining the video frames respectively appearing in each of the video frame groups;
[0115] The third output submodule is used to output the video segments composed of the video frames.
[0116] Optionally, as an embodiment, the output module 802 may include:
[0117] A fourth output submodule, configured to output each of the video frames in the first video;
[0118] A third receiving submodule, configured to receive a third input of at least two of the video frames;
[0119] The fifth output submodule is configured to output a video segment consisting of at least two of the video frames in response to the third input.
[0120] Optionally, as an embodiment, the acquisition module 801 may include:
[0121] a fourth receiving submodule, configured to receive a fourth input of any video frame in the first video when displaying the video frame, wherein the fourth input is used to input custom information;
[0122] The second determining submodule is used to determine the custom information input by the fourth input as a label of the video frame in response to the fourth input.
[0123] The device in the embodiment of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be 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.
[0124] The device of the embodiment of the present application may be a device having an action system. The action system may be an Android action system, an iOS action system, or other possible action systems, which are not specifically limited in the embodiment of the present application.
[0125] The device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0126] Alternatively, if Fig. 9 As shown, an embodiment of the present application also provides an electronic device 900, including a processor 901, a memory 902, and a program or instruction stored in the memory 902 and executable on the processor 901. When the program or instruction is executed by the processor 901, each step of any of the above-mentioned video processing method embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0127] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0128] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in some embodiments of the present application.
[0129] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009 and a processor 1010 and other components.
[0130] Those skilled in the art will appreciate that the electronic device 1000 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 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 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.
[0131] Among them, the processor 1010 is used to obtain at least one label of each video frame in the first video; wherein the label includes at least one item of the shooting time, shooting location, shooting scene, shooting object, and audio content of the video frame; when the first video is in an editing state, the video clip of the first video is output according to the label of each video frame in the first video.
[0132] It can be seen that in the embodiments of the present application, for any video, at least one label is added to each video frame of the video. Since each label can represent a shooting subject, it is possible to edit the video from the perspective of the shooting subject presented by the video frames in the video. More video clips related to the shooting subject can be edited, so that the video editing method is no longer single, which enriches the video editing method and expands the application scenarios of video editing.
[0133] Optionally, as an embodiment, the processor 1010 is specifically configured to output, based on the tags, video frame groups corresponding to the respective tags in the first video; wherein all the video frames in the video frame group corresponding to any of the tags have the same tag;
[0134] A user input unit 1007, configured to receive a first input for a first video frame group in the video frame groups;
[0135] The processor 1010 is specifically configured to output, in response to the first input, a video segment consisting of all the video frames in the first video frame group.
[0136] Optionally, as an embodiment, when the display unit 1006 displays each of the tags, the user input unit 1007 is further configured to receive a second input for at least two of the tags;
[0137] Processor 1010 is specifically used to respond to the second input, respectively obtain video frame groups corresponding to each of the at least two tags in the first video; wherein all the video frames in the video frame groups corresponding to any of the tags have the same tag; determine the video frames that appear in each of the video frame groups; and output a video segment composed of the video frames.
[0138] Optionally, as an embodiment, the processor 1010 is specifically configured to output each of the video frames in the first video;
[0139] The user input unit 1007 is further configured to receive a third input of at least two of the video frames;
[0140] The processor 1010 is specifically configured to output a video segment consisting of at least two of the video frames in response to the third input.
[0141] Optionally, as an embodiment, when the display unit 1006 displays any video frame in the first video, the user input unit 1007 is further used to receive a fourth input of the video frame, wherein the fourth input is used to input custom information;
[0142] The processor 1010 is specifically configured to, in response to the fourth input, determine the custom information input by the fourth input as a label of the video frame.
[0143] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video image obtained by the image capture device (such as a camera) in the video image capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and an action rod, which will not be repeated here. The memory 1009 can be used to store software programs and various data, including but not limited to applications and action systems. The processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly processes the action system, user pages and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1010.
[0144] The memory 1009 can be used to store software programs and various data. The memory 1009 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 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 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 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0145] The processor 1010 may include one or more processing units; optionally, the processor 1010 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 1010.
[0146] 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, each process of the above-mentioned video processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0147] The processor is the processor in the electronic device 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.
[0148] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned video processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0149] 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.
[0150] An embodiment of the present application 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 processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0151] 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.
[0152] 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 a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0153] 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 processing method, characterized in that: The method comprises: Obtain at least one tag of each video frame in the first video; wherein the tag includes at least one of the shooting time, shooting location, shooting scene, shooting object, and audio content of the video frame; When the first video is in an editing state, video segments of the first video are output according to the labels of the respective video frames in the first video.
2. The method according to claim 1, characterized in that: The step of outputting a video segment of the first video according to the label of each of the video frames in the first video includes: Based on the labels, respectively outputting video frame groups corresponding to the respective labels in the first video; wherein all the video frames in the video frame group corresponding to any of the labels have the same label; Receiving a first input of a first video frame group among the video frame groups; In response to the first input, a video segment consisting of all the video frames in the first video frame group is output.
3. The method according to claim 1, characterized in that The step of outputting a video segment of the first video according to the label of each of the video frames of the first video includes: receiving a second input for at least two of the tags while displaying the tags; In response to the second input, respectively obtain video frame groups corresponding to each of the at least two labels in the first video; wherein all the video frames in the video frame group corresponding to any of the labels have the same label; Determining the video frames respectively appearing in each of the video frame groups; Output a video segment consisting of the video frames.
4. The method according to claim 1, characterized in that: The outputting the video segment of the first video includes: Outputting each of the video frames in the first video; receiving a third input of at least two of the video frames; In response to the third input, a video segment consisting of at least two of the video frames is output.
5. The method according to claim 1, characterized in that The obtaining of at least one label of each video frame in the first video includes: In a case where any video frame in the first video is displayed, receiving a fourth input of the video frame, wherein the fourth input is used to input custom information; In response to the fourth input, the custom information input by the fourth input is determined as a tag of the video frame.
6. A video processing device, characterized in that: The device comprises: An acquisition module, configured to acquire at least one tag of each video frame in the first video; wherein the tag includes at least one of the shooting time, shooting location, shooting scene, shooting object, and audio content of the video frame; An output module is used to output video clips of the first video according to the labels of the respective video frames in the first video when the first video is in an editing state.
7. The device according to claim 6, characterized in that The output module comprises: A first output submodule, configured to output, based on the labels, video frame groups corresponding to the respective labels in the first video; wherein all the video frames in the video frame group corresponding to any of the labels have the same label; A first receiving submodule, configured to receive a first input of a first video frame group in the video frame groups; The second output submodule is configured to output a video segment consisting of all the video frames in the first video frame group in response to the first input.
8. The device according to claim 6, characterized in that The output module comprises: A second receiving submodule, configured to receive a second input for at least two of the tags while displaying each of the tags; an acquisition submodule, configured to respectively acquire, in response to the second input, a video frame group corresponding to each of the at least two labels in the first video; wherein all the video frames in the video frame group corresponding to any of the labels have the same label; A first determination submodule, used for determining the video frames respectively appearing in each of the video frame groups; The third output submodule is used to output the video segments composed of the video frames.
9. The device according to claim 6, characterized in that The output module comprises: A fourth output submodule, configured to output each of the video frames in the first video; A third receiving submodule, configured to receive a third input of at least two of the video frames; The fifth output submodule is configured to output a video segment consisting of at least two of the video frames in response to the third input.
10. The device according to claim 6, characterized in that The acquisition module comprises: a fourth receiving submodule, configured to receive a fourth input of any video frame in the first video when displaying the video frame, wherein the fourth input is used to input custom information; The second determining submodule is used to determine the custom information input by the fourth input as a label of the video frame in response to the fourth input.
Citation Information
Patent Citations
Video label adding method and video label adding device
CN103780973A
Video splitting method and device, electronic equipment and storage medium
CN111541912A
Video search method and device, recommendation method, electronic equipment and storage medium
CN112115299A
Video tag type marking method and system
CN114332686A
Video processing method and device, equipment, storage medium and computer program product
CN117726964A
