Video processing method and apparatus, and device and storage medium

By identifying and cropping target objects in video footage, and intelligently cropping and adjusting the layout based on their display position information, the problem of low efficiency in screen layout during video editing is solved, improving user experience and display effect.

WO2026002059A1PCT designated stage Publication Date: 2026-01-02BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/103522
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-26
Filing Date
2025-06-25
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Current video editing technologies suffer from low efficiency in adjusting the layout of video footage, resulting in a poor user experience and subpar video content display.

Method used

By identifying whether the video material contains target video frames that meet the quantity requirements, the video is cropped according to the display position information of the target object, and the cropped video is displayed on the canvas with a preset cropping strategy. It supports switching and adjusting multiple screen layouts.

Benefits of technology

It enables intelligent cropping and display of video footage, enriches video editing methods, and enhances the user's editing experience and the display effect of video content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025103522_02012026_PF_FP_ABST
    Figure CN2025103522_02012026_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a video processing method and apparatus, and a device and a storage medium. The method comprises: in response to a trigger operation for a video material, performing recognition on the video material, so as to obtain a recognition result of the video material; and then, if it is determined that the recognition result of the video material indicates that the video material includes a first target video frame picture which meets a quantity condition, cropping the video material according to a preset cropping policy, and presenting, on target canvas in a picture layout mode corresponding to the preset cropping policy, a cropping result video corresponding to the video material.
Need to check novelty before this filing date? Find Prior Art

Description

Video processing method, device, apparatus and storage medium

[0001] Cross-reference to Related Applications

[0002] The present application claims priority to the Chinese Patent Application No. 202410842252.2, filed on June 26, 2024, and entitled "A Video Processing Method, Device, Apparatus and Storage Medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present disclosure relates to the field of data processing, and particularly relates to a video processing method, device, apparatus and storage medium. BACKGROUND

[0004] With the continuous development of video editing technology, the demand of users for video editing related interactive functions is more and more diversified. SUMMARY

[0005] In order to solve the above technical problems, the embodiments of the present disclosure provide a video processing method, device, apparatus and storage medium.

[0006] In a first aspect, the present disclosure provides a video processing method, comprising:

[0007] In response to a trigger operation for a video material, the video material is identified to obtain an identification result of the video material; the identification result includes whether the video material contains a first target video frame picture meeting a quantity condition, and the first target video frame picture contains a target object;

[0008] In response to the identification result indicating that the video material contains the first target video frame picture meeting the quantity condition, the video material is cropped according to a preset cropping strategy, and a cropped result video corresponding to the video material is displayed on a target canvas in a picture layout mode corresponding to the preset cropping strategy; wherein the preset cropping strategy is to crop the video material according to display position information of the target object on the first target video frame picture, the cropped result video includes a second target video frame picture corresponding to the first target video frame picture, and the target object is contained in a target display area in the second target video frame picture.

[0009] In an optional implementation, the identification result further includes a quantity of the target objects contained in the first target video frame picture; and in response to the identification result indicating that the video material contains the first target video frame picture satisfying the quantity condition, the video material is cropped according to a preset cropping strategy, and a cropped result video corresponding to the video material is displayed on a target canvas in a picture layout mode corresponding to the preset cropping strategy, including:

[0010] In response to the identification result indicating that the video material contains the first target video frame picture satisfying the quantity condition, and the quantity of the target objects contained in the first target video frame picture being multiple, the video material is cropped according to a preset cropping strategy for each target object contained in the first target video frame picture, to obtain a cropped result video corresponding to each target object respectively.

[0011] The cropped result video corresponding to each target object is displayed on a target canvas in a first picture layout mode corresponding to the preset cropping strategy; and the first picture layout mode is to display the cropped result video corresponding to each target object in different canvas regions on the target canvas respectively.

[0012] In an optional implementation, in response to the identification result indicating that the video material contains the first target video frame picture satisfying the quantity condition, the video material is cropped according to a preset cropping strategy, and a cropped result video corresponding to the video material is displayed on a target canvas in a picture layout mode corresponding to the preset cropping strategy, including:

[0013] In response to the identification result indicating that the video material contains the first target video frame picture satisfying the quantity condition, and the quantity of the target objects contained in the first target video frame picture being one, the video material is cropped according to a preset cropping strategy for the target object contained in the first target video frame picture, to obtain a cropped result video corresponding to the target object.

[0014] The cropped result video corresponding to the target object is displayed on the target canvas in a second picture layout mode corresponding to the preset cropping strategy; and the second picture layout mode is to display the cropped result video corresponding to the target object on the target canvas in full screen.

[0015] In an alternative implementation, the method further comprises: in response to the identification result indicating that the first target video frame picture satisfying the quantity condition is not contained in the video material, displaying the video material on the target canvas in a third picture layout mode according to width information of the video material and width information of the target canvas; and wherein the third picture layout mode is to adaptively display the video material on the target canvas according to the width information of the video material relative to the width information of the target canvas.

[0016] In an alternative implementation, the method further comprises:

[0017] In response to a trigger operation of switching from the first picture layout mode to the second picture layout mode for the video material, determining a first target object from each target object contained in the first target video frame picture based on a preset strategy, and displaying a cropping result video corresponding to the first target object on the target canvas in the second picture layout mode.

[0018] In an alternative implementation, the method further comprises:

[0019] In response to a trigger operation of switching from the second picture layout mode to a third picture layout mode for the video material, displaying the video material on the target canvas in the third picture layout mode according to width information of the video material and width information of the target canvas.

[0020] In an alternative implementation, the method further comprises:

[0021] In response to a trigger operation of switching from the third picture layout mode to the second picture layout mode for the video material, determining a virtual target object based on a target center point of a video frame picture in the video material, cropping the video material according to the preset cropping strategy for the virtual target object, and displaying a cropping result video corresponding to the virtual target object on the target canvas in the second picture layout mode.

[0022] In an alternative implementation, the cropping of the video material according to the preset cropping strategy comprises:

[0023] Determining a display position of the target object on the first target video frame picture;

[0024] Determining a cropping area corresponding to the video material based on the display position, and cropping the video material according to the cropping area to obtain a cropping result video corresponding to the video material.

[0025] In an optional implementation, the identifying the video material in response to the triggering operation on the video material comprises:

[0026] In response to the triggering operation on the video material, the video material is subjected to frame extraction processing to obtain an extracted frame result video;

[0027] The extracted frame result video is subjected to object identification to obtain an object identification result corresponding to the extracted frame result video;

[0028] The object identification result is used to determine an identification result of the video material.

[0029] In an optional implementation, after the video corresponding to the cropped result video of the video material is displayed on the target canvas in the picture layout mode corresponding to the preset cropping strategy, the method further comprises:

[0030] A target video corresponding to the video material is generated based on the cropped result video; and a time length of the target video is less than a time length of the video material.

[0031] In a second aspect, the disclosure also provides a video processing device, which comprises:

[0032] A first identification module is configured to identify the video material in response to a triggering operation on the video material to obtain an identification result of the video material; the identification result comprises whether the video material contains a first target video frame picture meeting a quantity condition, and the first target video frame picture contains a target object.

[0033] A first cropping module is configured to, in response to the identification result indicating that the video material contains the first target video frame picture meeting the quantity condition, crop the video material according to a preset cropping strategy, and display a cropped result video corresponding to the video material on a target canvas in a picture layout mode corresponding to the preset cropping strategy; the preset cropping strategy is to crop the video material according to display position information of the target object on the first target video frame picture, the cropped result video comprises a second target video frame picture corresponding to the first target video frame picture, and the target object is contained in a target display area in the second target video frame picture.

[0034] In a third aspect, the disclosure provides a computer readable storage medium, which stores instructions, when the instructions run on a terminal device, the terminal device implements the method described above.

[0035] In a fourth aspect, the present disclosure provides a video processing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described above when executing the computer program.

[0036] In a fifth aspect, the present disclosure provides a computer program product, comprising computer programs / instructions, wherein the computer programs / instructions implement the method described above when executed by a processor. BRIEF DESCRIPTION OF DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure, together with the description.

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure or the prior art, the drawings required to be used in the embodiments or prior art description will be briefly introduced as follows, and obviously, other drawings can also be obtained by those of ordinary skill in the art without creative labor based on these drawings.

[0039] FIG. 1 is a flowchart of a video processing method according to an embodiment of the present disclosure;

[0040] FIG. 2 is a display schematic diagram of a picture layout according to an embodiment of the present disclosure;

[0041] FIG. 3 is a display schematic diagram of a picture layout according to an embodiment of the present disclosure;

[0042] FIG. 4 is a display schematic diagram of a picture layout according to an embodiment of the present disclosure;

[0043] FIG. 5 is a schematic diagram of switching a first picture layout mode to a second picture layout mode and a third picture layout mode according to an embodiment of the present disclosure;

[0044] FIG. 6 is a schematic diagram of switching a second picture layout mode to a third picture layout mode according to an embodiment of the present disclosure;

[0045] FIG. 7 is a schematic diagram of switching a third picture layout mode to a second picture layout mode according to an embodiment of the present disclosure;

[0046] FIG. 8 is a structural schematic diagram of a video processing device according to an embodiment of the present disclosure;

[0047] FIG. 9 is a structural schematic diagram of a video processing device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0048] In order to enable a more clear understanding of the above-mentioned objects, features and advantages of the present disclosure, the schemes of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0049] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present disclosure, but the present disclosure can also be implemented in other manners different from those described herein; obviously, the embodiments described in the specification are only a part of the embodiments of the present disclosure, and not all the embodiments.

[0050] As mentioned above, with the continuous development of video editing technology, the user's demand for video editing related interactive functions is becoming more and more diversified. Therefore, how to enrich the related interactive mode of video editing processing to meet the growing diversified needs of users has become a technical problem to be solved at present.

[0051] Picture layout adjustment refers to adjusting the content display position, length-width ratio, etc. of the video material on the video editing interface, so that the video material is displayed in the canvas in a better way. At present, in the video editing technology, no matter what size the video material is, it will be displayed in the canvas according to the picture layout mode of the original material, which may have the problem of poor video content display effect.

[0052] In addition, when the user is editing a video, if the picture layout of the video material is adjusted, the user usually needs to manually adjust the picture layout of the video material based on the video editing software, which leads to low video editing efficiency and poor user experience.

[0053] Therefore, the embodiments of the present disclosure provide a video processing method. Specifically, first, in response to a trigger operation on a video material, the video material is identified to obtain an identification result of the video material; wherein the identification result includes whether the video material contains a first target video frame picture that meets a quantity condition, and the first target video frame picture contains a target object. Then, if it is determined that the identification result of the video material indicates that the video material contains a first target video frame picture that meets a quantity condition, the video material is cropped according to a preset cropping strategy, and the cropped result video corresponding to the video material is displayed on a target canvas in a picture layout mode corresponding to the preset cropping strategy, wherein the preset cropping strategy is to crop the video material according to the display position information of the target object on the first target video frame picture, the cropped result video includes a second target video frame picture corresponding to the first target video frame picture, and the target object is contained in a target display area in the second target video frame picture.

[0054] It can be seen that the embodiment of the present disclosure can intelligently crop the video material with the target object as the content subject, and display the cropped result video of the video material on the canvas in the corresponding picture layout mode. It can be seen that the embodiment of the present disclosure enriches the video editing processing mode and improves the user's video editing experience.

[0055] To this end, the present disclosure provides a video processing method. Referring to FIG. 1, a flowchart of a video processing method provided by an embodiment of the present disclosure, specifically comprising:

[0056] S101: In response to a trigger operation for a video material, identifying the video material to obtain an identification result of the video material.

[0057] The identification result includes whether the video material contains a first target video frame picture meeting a quantity condition, and the first target video frame picture contains a target object.

[0058] The video material in the embodiment of the present disclosure can be any video material imported by the user, for example, the video material can be a horizontal video with a picture width greater than a height, the video material can also be a vertical video with a picture width less than a height, etc. The content type contained in the video material is not limited, for example, the video material can be a video material with a person as the content subject, and can also be a video material with an animal as the content subject.

[0059] The video material in the embodiment of the present disclosure can be a video material containing a first target video frame picture meeting a quantity condition, and the first target video frame picture refers to a video frame picture containing a target object. The quantity condition is used to represent the quantity proportion of the first target video frame in the total video frame picture. By judging whether the quantity proportion of the first target frame picture in the video material meets the quantity condition, it can be judged whether the video material belongs to a specific type of video, for example, a video with a person as the content subject type.

[0060] In addition, the first target video frame picture is a video frame picture containing a target object, and the quantity of the target object contained in the first target video frame picture can be one or more. The target object can be a portrait, an animal, etc.

[0061] In an optional implementation, when the trigger operation for the video material is received, the video material can be subjected to frame extraction processing, object recognition processing, etc. to determine whether the video material contains a first target video frame picture meeting a quantity condition.

[0062] Specifically, when receiving a trigger operation for a video material, frame extraction processing is performed on the video material to obtain a frame extraction result video frame, and the frame extraction result video frame includes part of the video frames in the video material. Then, based on the frame extraction result video frame, object recognition is performed on the frame extraction result video frame using an object recognition technology to obtain an object recognition result corresponding to the frame extraction result video frame, and the object recognition result is used to determine the recognition result of the video material. Since the object recognition result corresponding to the frame extraction result video frame includes whether the frame extraction result video frame contains a first target video frame picture that meets the quantity condition, the object recognition result is determined as the recognition result of the video material, which can be used to reflect whether the video material contains a first target video frame picture that meets the quantity condition.

[0063] In the embodiment of the present disclosure, the frame extraction processing on the video material can refer to extracting a certain number of video frames from the video frame sequence in the video material according to a preset frequency to form a frame extraction result video frame.

[0064] The trigger operation for the video material in the embodiment of the present disclosure is used to trigger intelligent picture layout processing on the imported video material. For the trigger operation for the video material, it can include triggering long press, single click, double click, etc. operation for the selected video material after the selection operation for the imported video material, and it can also include clicking the intelligent picture layout control for the selected video material, and then performing picture layout processing for the video material, etc.

[0065] S102: In response to the recognition result indicating that the video material contains the first target video frame picture that meets the quantity condition, the video material is cropped according to a preset cropping strategy, and a cropped result video corresponding to the video material is displayed on a target canvas in a picture layout mode corresponding to the preset cropping strategy.

[0066] In the embodiment of the present disclosure, the preset cropping strategy is to crop the video material according to the display position information of the target object on the first target video frame picture, and the cropped result video includes a second target video frame picture corresponding to the first target video frame picture, and the target object is included in a target display area in the second target video frame picture.

[0067] In the embodiment of the present disclosure, the cropped result video is cropped based on the display position information of the target object on the first target video frame picture in the video material, and the cropped result video includes a second target video frame picture, and the picture content in the second target video frame picture includes the picture content of the first target video picture. Specifically, the target object is included in a target display area in the second target video frame picture.

[0068] The target display region can be any display region in the second target video frame picture. Specifically, the target display region can be a central display region in the second target video frame picture.

[0069] In an optional implementation, after it is indicated based on the recognition result that the video material contains the first target video frame picture satisfying the quantity condition, the video material is cropped according to the preset cropping strategy for each target object, and then the cropping result video corresponding to each target object is obtained.

[0070] The cropping strategy can specifically include determining the display positions of the target objects contained in the first target video frame picture, taking each target object as a center point, adjusting the length-width information of the video material on the target canvas, and then obtaining the adjusted video material. Then, based on the adjusted video material, the video pictures of the adjusted video material that exceed the display area of the target canvas are cropped, and the cropping result video corresponding to the video material is obtained.

[0071] In actual application, since the recognition result of the video material also includes the quantity of the target objects contained in the first target video frame picture, when the recognition result indicates that the video material contains the first target video frame picture satisfying the quantity condition, the quantity of the target objects contained in the first target video frame picture can be further determined based on the recognition result.

[0072] In an application scenario, when it is indicated based on the recognition result that the video material contains the first target video frame picture satisfying the quantity condition, and the quantity of the target objects contained in the first target video frame picture is multiple, the video material is cropped according to the preset cropping strategy for each target object contained in the first target video frame picture, and the cropping result video corresponding to each target object is obtained.

[0073] In addition, the video material is cropped according to the preset cropping strategy for each target object contained in the first target video frame picture, and the cropping result video corresponding to each target object is obtained. Specifically, based on the display position of each target object on the first target video frame picture, the display position of each target object is taken as a center position, the cropping size of each target object is adjusted based on the length-width information of the target canvas, and then the cropping result video corresponding to each target object is cropped from the video material.

[0074] After the cropping result video of each target object is obtained, the cropping result video corresponding to each target object is displayed on the target canvas in the first picture layout mode corresponding to the preset cropping strategy.

[0075] The first picture layout mode is a preset picture layout mode, and is used to determine a display layout mode of the first target video frame picture in which multiple target objects exist on the target canvas. Specifically, the first picture layout mode is to respectively display the respective target objects in different canvas regions on the target canvas.

[0076] In addition, the respective target objects are respectively displayed in different picture regions on the target canvas. Specifically, the target canvas can be divided into multiple picture regions, and each picture region corresponds to a target object. The picture region can be any display region on the target canvas. Specifically, the target canvas can be evenly divided based on the number of target objects to obtain the picture region corresponding to each target object. The target object is displayed at the center of the picture region on the target canvas. For example, assuming that the first target video frame picture contains two target objects, the target canvas can be evenly divided into two upper and lower picture regions, and the center of each picture region displays the cropped result video of the corresponding target object. As shown in FIG. 2, a display diagram of a picture layout is provided in an embodiment of the present disclosure. Assuming that the video material A contains a first target video frame picture that meets the quantity condition, and the number of target objects contained in the first target video frame picture is multiple, the video material A is cropped according to a preset strategy to obtain the cropped result video corresponding to each target object, and then the cropped result video corresponding to each target object is respectively displayed in the upper and lower picture regions on the target canvas.

[0077] In another application scenario, when the recognition result indicates that the video material contains a first target video frame picture that meets the quantity condition, and the number of target objects contained in the first target video frame picture is one, the video material can be cropped based on the target object contained in the first target video frame picture according to a preset cropping strategy to obtain the cropped result video corresponding to the target object.

[0078] Specifically, the target object is taken as a display center, the length-width information of the target object on the target canvas is adjusted, and then the cropped result video corresponding to the target object is cropped from the video material.

[0079] After obtaining the cropped result video corresponding to the target object, the cropped result video corresponding to the target object is displayed in a second picture layout mode corresponding to the preset cropping strategy. The second picture layout mode is different from the first picture layout mode, and the second picture layout mode is used to determine a display layout mode of the video material with one target object on the target canvas. Specifically, the second picture layout mode is a mode of displaying the video frame corresponding to the target object based on magnification to fill the entire target canvas, that is, the cropped result video corresponding to the target object is displayed on the target canvas in full screen.

[0080] As shown in FIG. 3, it is a display schematic diagram of a picture layout provided by an embodiment of the present disclosure. It is assumed that the video material B contains the first target video frame picture satisfying the quantity condition, and the number of target objects contained in the first target video frame picture is one. Then, the video material B is cropped according to the preset strategy, the cropped result video corresponding to the target object is obtained, and the cropped result video corresponding to the target object is displayed on the target canvas in full screen.

[0081] In actual application, if the recognition result indicates that the video material does not contain the first target video frame picture satisfying the quantity condition, the intelligent layout function for the video material is supported in the rich video processing related mode.

[0082] In an optional implementation, when the recognition result indicates that the video material does not contain the first target video frame picture satisfying the quantity condition, the video material is displayed on the target canvas in a third picture layout mode according to the width information of the video material and the width information of the target canvas.

[0083] The third picture layout mode is to adaptively display the video material on the target canvas according to the width information of the video material relative to the width information of the target canvas. That is, the width of the video material is adjusted based on the width information of the video material to adapt to the width of the target canvas. The width adjustment of the video material to adapt to the width of the target canvas can be to proportionally adjust the width and length of the video material, and to display the main content of the video material in the center of the target canvas. In addition, in the process of displaying the main content of the video material on the target canvas, information related to the video material can also be filled in the blank display area of the target canvas, which can be title information of the video material, and other display effects can also be added to the blank display area, such as blur display effect.

[0084] As shown in FIG. 4, it is a display schematic diagram of a picture layout provided by an embodiment of the present disclosure. It is assumed that the video material C does not contain the first target video frame picture satisfying the quantity condition, and the width of the video material is adjusted so that the width information of the video material is adapted to the width information of the target canvas.

[0085] Based on the above embodiments, after the video material corresponding to the preset cropping strategy is displayed on the target canvas, the disclosure embodiment can also support other video editing operations for the cropped result video.

[0086] In an application scenario, assuming that the video material is a video material with a long playing time, a target video corresponding to the video material can be generated based on the cropped result video displayed on the target canvas, wherein the playing time of the target video is less than the playing time of the video material, that is, the playing time of the target video is shorter. The corresponding target video is generated based on the cropped result video. Specifically, the target video generation operation can be triggered for the cropped result video.

[0087] In the video processing method provided by the disclosure embodiment, in response to the trigger operation for the video material, the video material is identified to obtain an identification result of the video material. The identification result includes whether the video material contains a first target video frame picture that meets a quantity condition, and the first target video frame picture contains a target object. Then, if it is determined that the identification result of the video material indicates that the video material contains a first target video frame picture that meets a quantity condition, the video material is cropped according to a preset cropping strategy, and a cropped result video corresponding to the video material is displayed on a target canvas in a picture layout mode corresponding to the preset cropping strategy. The preset cropping strategy is to crop the video material according to the display position information of the target object on the first target video frame picture. The cropped result video includes a second target video frame picture corresponding to the first target video frame picture, and the target object is contained in a target display area in the second target video frame picture.

[0088] As can be seen, the disclosure embodiment can intelligently crop the video material with the target object as the content subject, and display the cropped result video of the video material on the canvas in the corresponding picture layout mode. As can be seen, the disclosure embodiment enriches the video editing processing mode and improves the user's video editing experience.

[0089] In actual application, on the basis of the above intelligent adjustment of the picture layout for the video material, in order to meet the user's demand for adjusting the picture layout, the disclosure embodiment also supports switching of the picture layout mode. The trigger operation for switching the picture layout mode can include setting a shortcut switching picture layout control, and triggering the switching from the current picture layout mode to the target picture layout mode by triggering the switching picture layout control.

[0090] In an application scenario, when a trigger operation of switching a video material from a first picture layout mode to a second picture layout mode is received, a first target object is determined from each target object included in a first target video frame picture included in the video material based on a preset strategy, and the video material is cropped according to a preset cropping strategy to obtain a cropped result video corresponding to the first target object, and the cropped result video corresponding to the first target object is displayed on a target canvas in the second picture layout mode.

[0091] The preset strategy is used to determine the first target object from each target object included in the first target video frame picture included in the video material. Specifically, the preset strategy can include a random strategy, that is, a target object is randomly selected from each target object included in the first target video frame picture as the first target object; the preset strategy also includes that the first target object is a target object with more occurrence times in the first target video frame picture.

[0092] As shown in FIG. 5, it is a schematic diagram of switching the first picture layout mode to the second picture layout mode and the third picture layout mode provided by the embodiment of the disclosure.

[0093] On the basis of the above, the first picture layout mode can also be switched to the third picture layout mode. Specifically, when a trigger operation of switching a video material from a first picture layout mode to a third picture layout mode is received, a first target object is determined from each target object included in a first target video frame picture included in the video material based on a preset strategy, and the video material is cropped according to a preset cropping strategy to obtain a cropped result video corresponding to the first target object, and then according to the width information of the cropped result video and the width information of the target picture, the cropped result video corresponding to the first target object is displayed on the target picture in the third picture layout mode.

[0094] As shown in FIG. 5, it is a schematic diagram of switching the first picture layout mode to the third picture layout mode.

[0095] In actual application, since the cropped result video corresponding to the target object is displayed on the target canvas in the second picture layout mode, the number of the target object is one, therefore, the second picture layout mode can only be switched to the third picture layout mode.

[0096] In an application scenario, the second picture layout is switched to the third picture layout mode. Specifically, when a trigger operation of switching a video material from a second picture layout mode to a third picture layout mode is received, the video material is displayed on a target canvas in the third picture layout mode according to the width information of the video material and the width information of the target canvas.

[0097] As shown in FIG. 6, a schematic diagram of switching a second picture layout mode to a third picture layout mode is provided in the embodiment of the present disclosure.

[0098] In another application scenario, since the video material displayed on the target canvas in the third picture layout mode does not contain the first target video frame picture satisfying the quantity condition, i.e., the video material does not contain the target object, the video material displayed in the third picture layout mode can be switched to the second picture layout mode to be displayed on the target canvas. Specifically, when receiving a trigger operation of switching the video material from the third picture layout mode to the second picture layout mode, a virtual target object is determined based on the target center point of the video frame picture in the video material, and a cropped result video corresponding to the virtual target object is cropped from the video material according to a preset cropping strategy. Then, the cropped result video corresponding to the virtual target object is displayed on the target canvas in the second picture layout mode.

[0099] As shown in FIG. 7, a schematic diagram of switching a third picture layout mode to a second picture layout mode is provided in the embodiment of the present disclosure.

[0100] In the embodiment of the present disclosure, the picture layout mode of the video material is switched, which enriches the video editing processing mode and improves the user video editing experience.

[0101] On the basis of the above-mentioned embodiment, after switching the picture layout mode of the video material and displaying it on the target canvas, the present disclosure can also generate a target video based on the video material displayed in the current picture layout mode.

[0102] The embodiment of the present disclosure can intelligently crop the video material with the target object as the content subject and display the cropped result video of the video material on the canvas in the corresponding picture layout mode. It can be seen that the embodiment of the present disclosure enriches the video editing processing mode and improves the user's video editing experience.

[0103] Based on the above-mentioned method embodiment, the present disclosure further provides a video processing device. Referring to FIG. 8, a structural schematic diagram of a video processing device is provided in the embodiment of the present disclosure. The device comprises:

[0104] The first identification module 801 is configured to identify the video material in response to a trigger operation of the video material, to obtain an identification result of the video material. The identification result includes whether the video material contains a first target video frame picture satisfying a quantity condition, and the first target video frame picture contains a target object.

[0105] The first cropping module 802 is configured to, in response to the identification result indicating that the video material contains the first target video frame picture meeting the quantity condition, crop the video material according to a preset cropping strategy, and display a cropping result video corresponding to the video material on a target canvas in a picture layout mode corresponding to the preset cropping strategy. The preset cropping strategy is to crop the video material according to display position information of the target object on the first target video frame picture. The cropping result video includes a second target video frame picture corresponding to the first target video frame picture, and the target object is contained in a target display area in the second target video frame picture.

[0106] In an optional implementation, the identification result further includes a quantity of the target objects contained in the first target video frame picture. The first cropping module includes:

[0107] The first cropping sub-module is configured to, in response to the identification result indicating that the video material contains the first target video frame picture meeting the quantity condition and the quantity of the target objects contained in the first target video frame picture being multiple, crop the video material according to the preset cropping strategy for each target object contained in the first target video frame picture, to obtain a cropping result video corresponding to each target object.

[0108] The first display sub-module is configured to display the cropping result video corresponding to each target object on the target canvas in a first picture layout mode corresponding to the preset cropping strategy. The first picture layout mode is to display the cropping result video corresponding to each target object in different canvas regions on the target canvas.

[0109] In an optional implementation, the first cropping module includes:

[0110] The second cropping sub-module is configured to, in response to the identification result indicating that the video material contains the first target video frame picture meeting the quantity condition and the quantity of the target objects contained in the first target video frame picture being one, crop the video material according to the preset cropping strategy for the target object contained in the first target video frame picture, to obtain a cropping result video corresponding to the target object.

[0111] The second display sub-module is configured to display the cropping result video corresponding to the target object on the target canvas in a second picture layout mode corresponding to the preset cropping strategy. The second picture layout mode is to display the cropping result video corresponding to the target object on the target canvas in full screen.

[0112] In an alternative implementation, the apparatus further includes:

[0113] The first display module is configured to, in response to the identification result indicating that the first target video frame picture satisfying the quantity condition is not contained in the video material, display the video material on the target canvas in a third picture layout manner according to the width information of the video material and the width information of the target canvas, wherein the third picture layout manner is to adaptively display the video material on the target canvas according to the width information of the video material relative to the width information of the target canvas.

[0114] In an alternative implementation, the apparatus further includes:

[0115] The second display module is configured to, in response to a trigger operation of switching from the first picture layout manner to the second picture layout manner for the video material, determine a first target object from the target objects contained in the first target video frame picture based on a preset strategy, and display a cropping result video corresponding to the first target object on the target canvas in the second picture layout manner.

[0116] In an alternative implementation, the apparatus further includes:

[0117] The first switching display module is configured to, in response to a trigger operation of switching from the second picture layout manner to a third picture layout manner for the video material, display the video material on the target canvas in the third picture layout manner according to the width information of the video material and the width information of the target canvas.

[0118] In an alternative implementation, the apparatus further includes:

[0119] The cropping display module is configured to, in response to a trigger operation of switching from the third picture layout manner to the second picture layout manner for the video material, determine a virtual target object based on a target center point of a video frame picture in the video material, crop the video material according to the preset cropping strategy based on the virtual target object, and display a cropping result video corresponding to the virtual target object on the target canvas in the second picture layout manner.

[0120] In an alternative implementation, the first cropping module includes:

[0121] The first determination module is configured to determine a display position of the target object on the first target video frame picture.

[0122] The third clipping sub-module is configured to determine a clipping region corresponding to the video material based on the display position, and clip the video material according to the clipping region to obtain a clipping result video corresponding to the video material.

[0123] In an optional implementation, the first identification module comprises:

[0124] The frame extraction processing module is configured to perform frame extraction processing on the video material in response to a trigger operation on the video material to obtain a frame extraction result video frame.

[0125] The identification result module is configured to perform object identification on the frame extraction result video frame to obtain an object identification result corresponding to the frame extraction result video frame.

[0126] The second determination module is configured to determine an identification result of the video material based on the object identification result.

[0127] In an optional implementation, the apparatus further comprises:

[0128] The generation module is configured to generate a target video corresponding to the video material based on the clipping result video, wherein the target video has a time length less than that of the video material.

[0129] In the video processing apparatus provided by the embodiments of the present disclosure, in response to a trigger operation on a video material, the video material is identified to obtain an identification result of the video material. The identification result includes whether the video material contains a first target video frame picture meeting a quantity condition, and the first target video frame picture contains a target object. Then, if it is determined that the identification result of the video material indicates that the video material contains the first target video frame picture meeting the quantity condition, the video material is clipped according to a preset clipping strategy, and a clipping result video corresponding to the video material is displayed on a target canvas in a picture layout mode corresponding to the preset clipping strategy. The preset clipping strategy is to clip the video material according to display position information of the target object on the first target video frame picture. The clipping result video includes a second target video frame picture corresponding to the first target video frame picture, and the target object is contained in a target display region in the second target video frame picture.

[0130] The embodiments of the present disclosure can intelligently clip a video material taking a target object as a content subject, and display a clipping result video of the video material on a canvas in a corresponding picture layout mode. It can be seen that the embodiments of the present disclosure enrich the video editing processing mode and improve the video editing experience of users.

[0131] In addition to the method and device described above, the embodiment of the present disclosure further provides a computer readable storage medium, which stores instructions, and when the instructions are run on a terminal device, the terminal device implements the video processing method provided by the embodiment of the present disclosure.

[0132] The embodiment of the present disclosure further provides a computer program product, which comprises computer programs / instructions, and when the computer programs / instructions are executed by a processor, the video processing method provided by the embodiment of the present disclosure is implemented.

[0133] In addition, the embodiment of the present disclosure further provides a video processing device, as shown in FIG. 9, which can include:

[0134] The processor 901, the memory 902, the input device 903 and the output device 904. The number of processors 901 in the video processing device can be one or more, and FIG. 9 takes one processor as an example. In some embodiments of the present disclosure, the processor 901, the memory 902, the input device 903 and the output device 904 can be connected through a bus or other means, and FIG. 9 takes the connection through the bus as an example.

[0135] The memory 902 can be used to store software programs and modules, and the processor 901 executes various functional applications and data processing of the video processing device by running the software programs and modules stored in the memory 902. The memory 902 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required by a function, etc. In addition, the memory 902 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. The input device 903 can be used to receive input digital or character information, and generate signal input related to the user settings and function control of the video processing device.

[0136] Specifically in the present embodiment, the processor 901 will load the executable file corresponding to the process of one or more application programs into the memory 902 according to the following instructions, and run the application program stored in the memory 902 by the processor 901, thereby realizing the various functions of the video processing device described above.

[0137] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0138] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A video processing method, comprising: in response to a trigger operation for a video material, performing identification on the video material to obtain an identification result of the video material; the identification result comprises whether the video material contains a first target video frame picture satisfying a quantity condition, the first target video frame picture containing a target object; in response to the identification result indicating that the video material contains the first target video frame picture satisfying the quantity condition, performing cropping on the video material according to a preset cropping strategy, and displaying a cropping result video corresponding to the video material on a target canvas in a picture layout mode corresponding to the preset cropping strategy; wherein the preset cropping strategy is to perform cropping processing on the video material according to display position information of the target object on the first target video frame picture, the cropping result video includes a second target video frame picture corresponding to the first target video frame picture, and the target object is contained in a target display area in the second target video frame picture.

2. The method of claim 1, wherein the identification result further comprises a quantity of the target objects contained in the first target video frame picture; and the response to the identification result indicating that the video material contains the first target video frame picture satisfying the quantity condition, performing cropping on the video material according to a preset cropping strategy, and displaying a cropping result video corresponding to the video material on a target canvas in a picture layout mode corresponding to the preset cropping strategy comprises: in response to the identification result indicating that the video material contains the first target video frame picture satisfying the quantity condition, and the quantity of the target objects contained in the first target video frame picture being multiple, performing cropping on the video material according to a preset cropping strategy for each target object contained in the first target video frame picture to obtain a cropping result video corresponding to each target object respectively; displaying the cropping result video corresponding to each target object respectively on a target canvas in a first picture layout mode corresponding to the preset cropping strategy; wherein the first picture layout mode is to display the cropping result video corresponding to each target object respectively in different canvas regions on the target canvas.

3. The method of claim 2, wherein in response to the identification result indicating that the first target video frame picture satisfying the quantity condition is contained in the video material, the video material is cropped according to a preset cropping strategy, and a cropped result video corresponding to the video material is displayed on a target canvas in a picture layout mode corresponding to the preset cropping strategy, including, comprises: in response to the identification result indicating that the video material contains the first target video frame picture satisfying the quantity condition, and the quantity of the target objects contained in the first target video frame picture being one, performing cropping on the video material according to a preset cropping strategy for the target object contained in the first target video frame picture to obtain a cropping result video corresponding to the target object; displaying the cropping result video corresponding to the target object on the target canvas in a second picture layout mode corresponding to the preset cropping strategy; wherein the second picture layout mode is to display the cropping result video corresponding to the target object on the target canvas in full screen.

4. The method of any one of claims 1-3, further comprising: in response to the identification result indicating that the first target video frame picture satisfying the quantity condition is not contained in the video material, displaying the video material on the target canvas in a third picture layout mode according to width information of the video material and width information of the target canvas; wherein the third picture layout mode is to adaptively display the video material on the target canvas according to the width information of the video material relative to the width information of the target canvas.

5. The method of claim 3, further comprising: in response to a trigger operation of switching from the first picture layout mode to the second picture layout mode for the video material, determining a first target object from each target object contained in the first target video frame picture based on a preset strategy, and displaying a cropping result video corresponding to the first target object on the target canvas in the second picture layout mode.

6. The method of claim 4, further comprising: in response to a trigger operation of switching from the second picture layout mode to a third picture layout mode for the video material, displaying the video material on the target canvas in the third picture layout mode according to width information of the video material and width information of the target canvas.

7. The method of claim 4, further comprising: in response to a trigger operation of switching from the third picture layout mode to the second picture layout mode for the video material, determining a virtual target object based on target center points of video frame pictures in the video material, cropping the video material according to the preset cropping strategy for the virtual target object, and displaying a cropping result video corresponding to the virtual target object on the target canvas in the second picture layout mode.

8. The method of claim 1, wherein the cropping the video material according to the preset cropping strategy comprises: determining a display position of the target object on the first target video frame picture; determining a cropping region corresponding to the video material based on the display position, and cropping the video material according to the cropping region to obtain a cropping result video corresponding to the video material.

9. The method of claim 1, wherein the identifying the video material in response to a trigger operation of the video material to obtain an identification result of the video material comprises: in response to a trigger operation of the video material, performing frame extraction processing on the video material to obtain an extracted frame result video; performing object identification on the extracted frame result video to obtain an object identification result corresponding to the extracted frame result video; determining the identification result of the video material based on the object identification result.

10. The method of claim 1, wherein after the displaying the cropping result video corresponding to the video material on the target canvas in the picture layout mode corresponding to the preset cropping strategy, the method further comprises: generating a target video corresponding to the video material based on the cropping result video; wherein a time length of the target video is less than a time length of the video material.

11. A video processing apparatus, comprising: The first identification module is configured to identify the video material in response to a trigger operation for the video material, and obtain an identification result of the video material. The identification result includes whether the video material contains a first target video frame picture meeting a quantity condition, and the first target video frame picture contains a target object. The first cropping module is configured to, in response to the identification result indicating that the video material contains the first target video frame picture meeting the quantity condition, crop the video material according to a preset cropping strategy, and display a cropping result video corresponding to the video material on a target canvas in a picture layout mode corresponding to the preset cropping strategy. The preset cropping strategy is to crop the video material according to display position information of the target object on the first target video frame picture. The cropping result video includes a second target video frame picture corresponding to the first target video frame picture, and the target object is contained in a target display area in the second target video frame picture.

12. A computer-readable storage medium, the computer-readable storage medium storing instructions, when the instructions are run on a terminal device, causing the terminal device to implement the method of any one of claims 1-10.

13. A video processing device comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1-10 when executing the computer program.

14. A computer program product, the computer program product comprising computer programs / instructions, which, when executed by a processor, implement the method of any one of claims 1-10.

Citation Information

Patent Citations

  • Video processing method, device and equipment and storage medium

    CN112492388A

  • Character tracking display method and electronic equipment

    CN113536866A

  • Video processing method and device, computing equipment and storage medium

    CN113840169A

  • Video content display method and device, electronic equipment and storage medium

    CN114666623A

  • Microphone-connected video display method and device, equipment and medium

    CN116366871A