CN111757177B - Video clipping method and device - Google Patents

Video clipping method and device Download PDF

Info

Publication number
CN111757177B
CN111757177B CN202010555912.0A CN202010555912A CN111757177B CN 111757177 B CN111757177 B CN 111757177B CN 202010555912 A CN202010555912 A CN 202010555912A CN 111757177 B CN111757177 B CN 111757177B
Authority
CN
China
Prior art keywords
target video
video frame
parameter
user
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010555912.0A
Other languages
Chinese (zh)
Other versions
CN111757177A (en
Inventor
胡吉祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010555912.0A priority Critical patent/CN111757177B/en
Publication of CN111757177A publication Critical patent/CN111757177A/en
Application granted granted Critical
Publication of CN111757177B publication Critical patent/CN111757177B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47217End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The application discloses a video clipping method and device, and belongs to the technical field of communication. The method comprises the following steps: after receiving a positioning operation of a user on a target video, determining a target video frame corresponding to the target video in response to the positioning operation; receiving the editing operation of the user on the target video frame; determining a cropping parameter of the target video frame in response to the editing operation; and cutting the target video frame according to the cutting parameters to obtain a cut image. This application can realize that the user sets up the corresponding parameter of tailorring on one side dragging, broadcast video, has avoided tailorring the phenomenon of the main part in the partial picture, can improve the precision that the picture was tailor.

Description

Video clipping method and device
Technical Field
The application belongs to the technical field of communication, and particularly relates to a video clipping method and device.
Background
With the rapid development of the internet, a user can share videos by using application programs in electronic equipment, the videos uploaded by the user on each platform are limited on a social platform at present, and the user needs to cut the videos if the duration of the videos shot by the user exceeds a duration threshold value specified by the platform.
The existing video frame cutting method is usually fixed at a certain position of a video frame and then cuts from head to tail along with the playing of a video, which causes that when a main body of a picture moves in the picture, the main body in a part of the picture can be cut off, thereby causing that the video frame cutting is not accurate enough.
Disclosure of Invention
The embodiment of the application aims to provide a video clipping method and a video clipping device, and the method and the device can solve the problem that the existing video clipping method can cause the main body in a part of pictures to be clipped, so that the clipping of the video picture is not accurate enough.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a video cropping method, where the method includes:
after receiving a positioning operation of a user on a target video, determining a target video frame corresponding to the target video in response to the positioning operation;
receiving the editing operation of the user on the target video frame;
determining a cropping parameter of the target video frame in response to the editing operation;
and cutting the target video frame according to the cutting parameters to obtain a cut image.
In a second aspect, an embodiment of the present application provides a video cropping device, including:
the target video frame determining module is used for responding to the positioning operation after receiving the positioning operation of a user on a target video and determining a target video frame corresponding to the target video;
the editing operation receiving module is used for receiving the editing operation of the user on the target video frame;
a cropping parameter determining module, configured to determine a cropping parameter of the target video frame in response to the editing operation;
and the cutting image acquisition module is used for cutting the target video frame according to the cutting parameters to obtain a cutting image.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the video cropping method according to the first aspect.
In a fourth aspect, the present application provides a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the video cropping method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the video cropping method according to the first aspect.
In the embodiment of the application, after the positioning operation of a user on a target video is received, a target video frame corresponding to the target video is determined in response to the positioning operation, the editing operation of the user on the target video frame is received, a cutting parameter of the target video frame is determined in response to the editing operation, and the cutting processing is performed on the target video frame according to the cutting parameter to obtain a cut image. According to the method and the device, the cutting parameters of the positioning video frames are edited, so that a user can drag and play videos and set the corresponding cutting parameters at the same time, the phenomenon that a main body in a part of the picture is cut off is avoided, and the precision of cutting the picture can be improved.
Drawings
Fig. 1 is a flowchart illustrating steps of a trimming method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a timeline positioning according to an embodiment of the present application;
FIG. 3 is a diagram illustrating a crop box dragging operation according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a cutting device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application are capable of operation in sequences other than those illustrated or described herein, and that the terms "first," "second," etc. are generally used in a generic sense and do not limit the number of terms, e.g., a first term can be one or more than one. In addition, "and/or" in the specification means at least one of the connected objects, a character "/", and generally means that the former and latter related objects are in an "or" relationship.
The video cropping scheme provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Referring to fig. 1, a flowchart illustrating steps of a video cropping method provided in an embodiment of the present application is shown, and as shown in fig. 1, the video cropping method may specifically include the following steps:
step 101: after receiving a positioning operation of a user on a target video, determining a target video frame corresponding to the target video in response to the positioning operation.
The method and the device can be applied to the scene of positioning and editing the cutting parameters of the video frames in the cutting process of the video frames.
The target video refers to a video that needs to be subjected to video frame cropping, and in this embodiment, the target video may be a variety video, a sports video, or the like, and specifically, may be determined according to an actual situation, which is not limited in this embodiment.
The positioning operation refers to an operation performed by a user to position a target video at a position where a video frame is to be cut, and in a specific implementation, the positioning operation may be a click operation or a drag operation on a video progress bar corresponding to the target video, and specifically, the positioning operation may be determined according to a service requirement, which is not limited in this embodiment.
The target video frame refers to a video frame obtained by cropping a video frame according to the requirement of a target video positioned by a positioning operation, in this embodiment, the target video frame may be an ith frame (i is a positive integer greater than or equal to 1) of the target video, specifically, a user may set the target video frame according to the requirement of the user, which is not limited in this embodiment.
After receiving a positioning operation of a target video by a user, a target video frame corresponding to the target video may be determined according to the positioning operation, and specifically, the following detailed description may be given according to the following specific implementation manner.
In a specific implementation manner of the present application, the step 101 may include the following sub-steps:
substep A1: and receiving the click operation or the dragging operation of the user on the playing progress bar corresponding to the target video.
In this embodiment, the play progress bar refers to a fast-forward/fast-backward progress bar corresponding to the target video in the playing process, as shown in fig. 3, in the video playing process, a progress bar is displayed at a position below the display screen, and the progress bar is the play progress bar of the currently played video.
In the process of playing the target video, a positioning operation can be performed on the playing progress bar corresponding to the target video, that is, a clicking operation or a dragging operation is performed on the playing progress bar so as to position the playing position where the user needs to cut the video frame. As shown in fig. 2, a play progress bar (shown by a vertical line in fig. 2) is displayed below the play screen, and the target video can be positioned by controlling the play progress bar, specifically, a user can click a certain position to directly slide the play progress bar to the position where the user clicks, or the user drags the progress bar to drag the progress bar to a position where the user needs to position, and the like.
After receiving a click operation or a drag operation of the user on the playing progress bar corresponding to the target video, performing substep A2.
Substep A2: and determining the target playing time of the target video in response to the clicking operation or the dragging operation.
The target playing time refers to the playing time of the target video positioned by executing click operation or drag operation on the playing progress bar corresponding to the target video.
After receiving a click operation or a drag operation of a user on a playing progress bar corresponding to a target video, determining a target playing time corresponding to the target video according to a click position of the click operation or a drag stop position of the drag operation in response to the click operation or the drag operation.
After the target play time of the target video is determined, substep A3 is performed.
Substep A3: and determining the target video frame according to the target playing time.
After the target playing time corresponding to the target video is determined, the picture displayed on the screen of the target video is the picture corresponding to the target video frame of the target video, namely, the image frame is taken as the target video frame.
After determining the target video frame corresponding to the target video, step 102 is executed.
Step 102: and receiving the editing operation of the user on the target video frame.
The editing operation is an operation of editing the size of the cropping position of the target video frame by the user.
In this embodiment, the editing operation may be a resize and/or a frame rotation performed on the target video frame. Specifically, the user may drag the crop box, and enlarge or reduce the image corresponding to the target video frame, and during the editing process, the user may rotate the image to implement a rotation editing operation, which is described in detail with reference to the following specific implementation manner.
In a specific implementation manner of the present application, the step 102 may include the following sub-steps:
substep B1: receiving preset operation of the user corresponding to the cutting frame displayed on the interface where the target video frame is located; and/or
Substep B2: and receiving the rotation operation of the user on the target video frame.
In the present embodiment, the preset operation is at least one of a drag-possible operation and a zoom operation.
The dragging operation means that a cutting frame is displayed on a display picture of the target video frame in the process of editing the target video frame, and a user can drag the cutting frame to position the position of the picture.
The zooming operation refers to the zooming-out/enlarging operation executed on the cutting frame by a user, and the size of the cutting frame can be positioned through the zooming operation.
In this embodiment, in the process of editing the target video frame, the video frame corresponding to the target video frame may be rotated by dragging the play progress bar corresponding to the target video.
After receiving the editing operation of the target video frame by the user, step 103 is executed.
Step 103: determining a cropping parameter for the target video frame in response to the editing operation.
The cropping parameters refer to cropping parameters determined by an editing operation performed by a user on the target video frame.
In this embodiment, the cropping parameter may be one or more of a position parameter, a scaling parameter, and a rotation parameter.
After receiving an editing operation for the target video frame, a cropping parameter for the target video frame may be determined in accordance with the editing operation. In particular, the detailed description may be combined with the following specific implementations.
In a specific implementation manner of the present application, the step 103 may include the following sub-steps:
substep C1: responding to the preset operation, and determining a position parameter and/or a scaling parameter corresponding to the target video frame; and/or
And a substep C2: in response to the rotation operation, determining a rotation parameter corresponding to the target video frame;
and substep C3: and determining a cropping parameter of the target video frame according to at least one of the position parameter, the scaling parameter and the rotation parameter.
In this embodiment, after a preset operation of a user on a target video frame is received, a position parameter and/or a scaling parameter corresponding to the target video frame may be determined according to the preset operation, and a rotation parameter corresponding to the target video frame may be determined by combining with a rotation operation.
And determining a cutting parameter corresponding to the target video frame according to one or more of the position parameter, the scaling parameter and the rotation parameter.
After determining the cropping parameters corresponding to the target video frame according to the editing operation, step 104 is executed.
Step 104: and cutting the target video frame according to the cutting parameters to obtain a cut image.
After the cropping parameters corresponding to the target video frame are obtained, the target video frame can be cropped according to the cropping parameters to obtain a cropped image.
According to the embodiment, the user edits the video frame to determine the cutting parameters, so that the user can drag and play the video and set the corresponding cutting parameters at the same time, and the phenomenon that a main body in a part of the frame is cut off is avoided.
In this embodiment, two video frames may also be located, the cropping parameters of the two video frames are determined through the editing operation on the two video frames, and then the video frame located between the two video frames and needing to be subjected to video frame cropping is cropped by combining the two cropping parameters. In particular, the detailed description may be combined with the following specific implementations.
In a specific implementation manner of the present application, the step 101 may further include the following sub-steps:
substep D1: and receiving a first positioning operation and a second positioning operation of the user on the target video.
In this embodiment, the first positioning operation and the second positioning operation refer to operations performed by a user to position a video frame that needs to be cropped in a target video.
In the process of playing the target video, a first positioning operation and a second positioning operation for the target video may be received, and then, sub-step D2 is performed.
Substep D2: and responding to the first positioning operation and the second positioning operation, and determining a first target video frame and a second target video frame corresponding to the target video.
The first target video frame is a video frame corresponding to the first positioning operation.
The second target video frame is a video frame corresponding to the second positioning operation.
After receiving the first positioning operation and the second positioning operation of the target video by the user, determining a first target video frame and a second target video frame corresponding to the target video by combining the first positioning operation and the second positioning operation.
After the first target video frame and the second target video frame are acquired, editing operations may be performed on the first target video frame and the second target video frame, respectively, and specifically, the following specific implementation manner may be described in detail.
In another specific implementation manner of the present application, the step 102 may include the following sub-steps:
and a substep E: and receiving a first editing operation of the user on the first target video frame and a second editing operation of the user on the second target video frame.
In this embodiment, the first editing operation refers to an editing operation performed by a user on the first target video frame.
The second editing operation refers to an editing operation performed by the user on the second target video frame.
After the first target video frame and the second target video frame are located, a first editing operation may be performed on the first target video frame and a second editing operation may be performed on the second target video frame, respectively.
After the editing operation is performed on the first target video frame and the second target video frame, respectively, the cropping parameters corresponding to the first target video frame and the second target video frame, respectively, may be determined. In particular, the detailed description may be combined with the following specific implementations.
In another specific implementation manner of the present application, the step 103 may include the following sub-steps:
substep F1: determining a first cropping parameter for the first target video frame in response to the first editing operation;
substep F2: determining a second cropping parameter for the second target video frame in response to the second editing operation;
substep F3: and determining a third cropping parameter of a third target video frame between the first target video frame and the second target video frame in the target video according to the first cropping parameter and the second cropping parameter.
In this embodiment, the first cropping parameter refers to a cropping parameter corresponding to the first target video frame.
The second cropping parameter refers to a cropping parameter corresponding to the second target video frame index.
The third clipping parameter refers to a clipping parameter corresponding to a third target video frame located between the first target video frame and the second target video frame in the target video, and the third target video frame refers to a video frame located between the first target video frame and the second target video frame in the target video and needing video frame clipping.
After receiving editing operations respectively executed by a user on a first target video frame and a second target video frame, respectively obtaining a first clipping parameter corresponding to the first target video frame and a second clipping parameter corresponding to the second target video frame, and determining a clipping parameter of a third target video frame, namely a third clipping parameter, between the first target video frame and the second target video frame, by combining the first clipping parameter and the second clipping parameter, and the number of video frames needing to be subjected to video frame clipping between the first target video frame and the second target video frame in the target video, wherein the first target video frame is X, the frame is clipped and rotated, the clipping parameter is assumed to be a, the second target video frame is Y, the frame is clipped and rotated, and the clipping parameter is assumed to be b; and taking the linear change intermediate value of the parameters a-b as a third clipping parameter for the picture in the middle of X-Y.
After the first cropping parameter, the second cropping parameter, and the third cropping parameter are obtained, the first target video frame, the second target video frame, and the third target video frame may be respectively cropped according to the first cropping parameter, the second cropping parameter, and the third cropping parameter to respectively obtain corresponding cropped images, and specifically, the first target video frame may be cropped by using the first cropping parameter to obtain a cropped image corresponding to the first target video frame; cutting the second target video frame by adopting the second cutting parameter to obtain a cut image corresponding to the second target video frame; and cutting the third target video frame by adopting the third cutting parameter to obtain a cut image corresponding to the third target video frame.
After the cut image is acquired, the cut image may be restored and displayed when the cut image is previewed, and specifically, the detailed description may be provided in conjunction with the following specific implementation manner.
In another specific implementation manner of the present application, after the step 104, the method may further include:
step M1: and receiving image preview operation of the user on the cut image.
In the present embodiment, the image preview operation refers to a preview operation performed by the user on a cut image.
The image preview operation may be a play operation performed by the user on the cut image, such as an operation in which the user clicks on the cut image to play the cut image.
After receiving the image preview operation of the user on the cut image, step M2 is executed.
Step M2: and responding to the image preview operation, and performing linear interpolation processing on the current display parameters according to the original display parameters corresponding to the cut image to generate a processed image of the original display parameters.
After receiving an image preview operation for the cropped image, the image of the cropped image may be restored according to the image preview operation, and specifically, a linear difference processing may be performed on current display parameters of the cropped image according to original display parameters corresponding to the cropped image to generate a processed image of the original display parameters.
Step M3: and displaying the processed image of the original display parameter.
After the processed image of the original display parameters is generated, the processed image may be displayed.
According to the video clipping method provided by the embodiment of the application, after the positioning operation of a user on a target video is received, a target video frame corresponding to the target video is determined in response to the positioning operation, the editing operation of the user on the target video frame is received, clipping parameters of the target video frame are determined in response to the editing operation, and the target video frame is clipped according to the clipping parameters to obtain a clipped image. According to the method and the device, the cutting parameters of the positioning video frames are edited, so that a user can drag and play videos and set the corresponding cutting parameters at the same time, the phenomenon that a main body in a part of the picture is cut off is avoided, and the precision of cutting the picture can be improved.
It should be noted that, in the video cropping method provided in the embodiment of the present application, the execution main body may be a video cropping device, or a control module in the video cropping device for executing the video cropping method. The video clipping device provided by the embodiment of the present application is described by taking a video clipping device executing a video clipping method as an example.
Referring to fig. 4, a schematic structural diagram of a video cropping device provided in an embodiment of the present application is shown, and as shown in fig. 4, the video cropping device may specifically include the following modules:
the target video frame determining module 410 is configured to, after receiving a positioning operation of a target video by a user, determine a target video frame corresponding to the target video in response to the positioning operation;
an editing operation receiving module 420, configured to receive an editing operation of the target video frame by the user;
a cropping parameter determining module 430, configured to determine a cropping parameter of the target video frame in response to the editing operation;
and a cropping image obtaining module 440, configured to perform cropping processing on the target video frame according to the cropping parameters, so as to obtain a cropping image.
Optionally, the target video frame determination module 410 includes:
the dragging operation receiving unit is used for receiving the clicking operation or the dragging operation of the user on the playing progress bar corresponding to the target video;
a target time determining unit, configured to determine a target play time of the target video in response to the click operation or the drag operation;
and the target video frame determining unit is used for determining the target video frame according to the target playing time.
Optionally, the editing operation receiving module 420 includes:
the preset operation receiving unit is used for receiving the preset operation of the user on the cutting frame displayed on the interface where the target video frame is located; and/or
A rotation operation receiving unit, configured to receive a rotation operation of the target video frame by the user;
the cutting parameter determining module comprises:
the position parameter determining unit is used for responding to the preset operation and determining the position parameter and/or the scaling parameter corresponding to the target video frame; and/or
A rotation parameter determining unit, configured to determine, in response to the rotation operation, a rotation parameter corresponding to the target video frame;
a cropping parameter determining unit, configured to determine a cropping parameter of the target video frame according to the position parameter or at least one of the scaling parameter and the rotation parameter;
wherein the preset operation comprises at least one of a drag operation and a zoom operation.
Optionally, the target video frame determining module 410 includes:
a positioning operation receiving unit, configured to receive a first positioning operation and a second positioning operation of the user on the target video;
a first video frame determining unit, configured to determine a first target video frame and a second target video frame corresponding to the target video in response to the first positioning operation and the second positioning operation;
the editing operation receiving module 420 includes:
an editing operation receiving unit, configured to receive a first editing operation of the first target video frame by the user and a second editing operation of the second target video frame by the user;
the clipping parameter determining module 430 includes:
a first parameter determination unit, configured to determine a first cropping parameter of the first target video frame in response to the first editing operation;
a second parameter determination unit configured to determine a second cropping parameter of the second target video frame in response to the second editing operation;
a third parameter determining unit, configured to determine, according to the first clipping parameter and the second clipping parameter, a third clipping parameter of a third target video frame located between the first target video frame and the second target video frame in the target video;
the cropping image obtaining module 440 comprises:
and the cutting image acquisition unit is used for respectively cutting the first target video frame, the second target video frame and the third target video frame according to the first cutting parameter, the second cutting parameter and the third cutting parameter to respectively obtain corresponding cutting images.
Optionally, the method further comprises:
the preview operation receiving module is used for receiving the image preview operation of the user on the cut image;
the processing image generation module is used for responding to the image preview operation, performing linear interpolation processing on the current display parameter according to the original display parameter corresponding to the cut image and generating a processing image of the original display parameter;
and the processed image display module is used for displaying the processed image of the original display parameter.
According to the video clipping method provided by the embodiment of the application, after the positioning operation of a user on a target video is received, a target video frame corresponding to the target video is determined in response to the positioning operation, the editing operation of the user on the target video frame is received, clipping parameters of the target video frame are determined in response to the editing operation, and the target video frame is clipped according to the clipping parameters to obtain a clipped image. According to the method and the device, the cutting parameters of the positioning video frames are edited, so that a user can drag and play videos and set the corresponding cutting parameters at the same time, the phenomenon that a main body in a part of the picture is cut off is avoided, and the precision of cutting the picture can be improved.
The video cropping device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The video cropping device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The video clipping device provided in the embodiment of the present application can implement each process implemented in the embodiment of the method in fig. 1, and is not described here again to avoid repetition.
Optionally, as shown in fig. 5, an electronic device 500 is further provided in this embodiment of the present application, and includes a processor 501, a memory 502, and a program or an instruction stored in the memory 502 and executable on the processor 501, where the program or the instruction is executed by the processor 501 to implement each process of the above-mentioned video cropping method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing the embodiment of the present application.
The electronic device 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and the like.
Those skilled in the art will appreciate that the electronic device 600 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 610 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The radio frequency unit 601 is configured to, after receiving a positioning operation performed on a target video by a user, determine a target video frame corresponding to the target video in response to the positioning operation;
receiving the editing operation of the user on the target video frame;
determining a cropping parameter of the target video frame in response to the editing operation;
and cutting the target video frame according to the cutting parameters to obtain a cut image.
According to the method and the device, the cutting parameters of the positioning video frames are edited, so that a user can drag and play videos and set the corresponding cutting parameters at the same time, the phenomenon that a main body in a part of the picture is cut off is avoided, and the precision of cutting the picture can be improved.
Optionally, the radio frequency unit 601 is further configured to receive a click operation or a drag operation of the user on a play progress bar corresponding to the target video;
responding to the click operation or the drag operation, and determining the target playing time of the target video;
and determining the target video frame according to the target playing time.
Optionally, the receiving an editing operation of the user on the target video frame includes:
receiving preset operation of the user corresponding to the cutting box displayed on the interface where the target video frame is located; and/or
Receiving a rotation operation of the user on the target video frame;
the determining, in response to the editing operation, the cropping parameters of the target video frame comprises:
responding to the preset operation, and determining a position parameter and/or a scaling parameter corresponding to the target video frame; and/or
In response to the rotation operation, determining a rotation parameter corresponding to the target video frame;
determining a cropping parameter of the target video frame according to at least one of the position parameter, the scaling parameter and the rotation parameter;
wherein the preset operation comprises at least one of a drag operation and a zoom operation.
Optionally, after receiving a positioning operation of the user on a target video, determining, in response to the positioning operation, a target video frame corresponding to the target video includes:
receiving a first positioning operation and a second positioning operation of the user on the target video;
responding to the first positioning operation and the second positioning operation, and determining a first target video frame and a second target video frame corresponding to the target video;
the receiving of the editing operation of the user on the target video frame includes:
receiving a first editing operation of the user on the first target video frame and a second editing operation of the user on the second target video frame;
the determining, in response to the editing operation, the cropping parameters of the target video frame comprises:
determining a first cropping parameter of the first target video frame in response to the first editing operation;
determining a second cropping parameter for the second target video frame in response to the second editing operation;
determining a third cropping parameter of a third target video frame between the first target video frame and the second target video frame in the target video according to the first cropping parameter and the second cropping parameter;
the step of cutting the target video frame according to the cutting parameters to obtain a cut image comprises the following steps:
and respectively cutting the first target video frame, the second target video frame and the third target video frame according to the first cutting parameter, the second cutting parameter and the third cutting parameter to respectively obtain corresponding cutting images.
Optionally, after the performing the cropping processing on the target video frame according to the cropping parameter to obtain a cropped image, the method further includes:
receiving image preview operation of the user on the cut image;
responding to the image preview operation, and performing linear interpolation processing on the current display parameters according to the original display parameters corresponding to the cut image to generate a processed image of the original display parameters;
and displaying the processed image of the original display parameter.
It is to be understood that, in the embodiment of the present application, the input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics Processing Unit 6041 processes image data of a still picture or a video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 607 includes a touch panel 6071 and other input devices 6072. A touch panel 6071, also referred to as a touch screen. The touch panel 6071 may include two parts of a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 609 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 610 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored, and when the program or the instruction is executed by a processor, the program or the instruction implements the processes of the video cropping method embodiment, and can achieve the same technical effects, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above video cropping method embodiment, and can achieve the same technical effect, and is not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as a system-on-chip, or a system-on-chip.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (8)

1. A method of video cropping, comprising:
after receiving a positioning operation of a user on a target video, responding to the positioning operation, and determining a target video frame corresponding to the target video;
receiving the editing operation of the user on the target video frame;
determining a cropping parameter of the target video frame in response to the editing operation;
cutting the target video frame according to the cutting parameters to obtain a cut image;
after receiving a positioning operation of the user on a target video, determining a target video frame corresponding to the target video in response to the positioning operation, including:
receiving a first positioning operation and a second positioning operation of the user on the target video;
responding to the first positioning operation and the second positioning operation, and determining a first target video frame and a second target video frame corresponding to the target video;
the receiving of the editing operation of the user on the target video frame includes:
receiving a first editing operation of the user on the first target video frame and a second editing operation of the user on the second target video frame;
the determining, in response to the editing operation, the cropping parameters of the target video frame comprises:
determining a first cropping parameter of the first target video frame in response to the first editing operation;
determining a second cropping parameter for the second target video frame in response to the second editing operation;
determining a third clipping parameter of a third target video frame between the first target video frame and the second target video frame in the target video according to the first clipping parameter and the second clipping parameter;
the step of cutting the target video frame according to the cutting parameters to obtain a cut image comprises the following steps:
and respectively cutting the first target video frame, the second target video frame and the third target video frame according to the first cutting parameter, the second cutting parameter and the third cutting parameter to respectively obtain corresponding cutting images.
2. The method of claim 1, wherein after receiving a positioning operation of a target video by a user, determining a target video frame corresponding to the target video in response to the positioning operation comprises:
receiving click operation or drag operation of the user on a playing progress bar corresponding to the target video;
responding to the click operation or the drag operation, and determining a target playing time of the target video;
and determining the target video frame according to the target playing time.
3. The method of claim 1, wherein the receiving a user editing operation on the target video frame comprises:
receiving preset operation of the user corresponding to the cutting box displayed on the interface where the target video frame is located; and/or
Receiving a rotation operation of the user on the target video frame;
the determining, in response to the editing operation, the cropping parameters of the target video frame comprises:
responding to the preset operation, and determining a position parameter and/or a scaling parameter corresponding to the target video frame; and/or
In response to the rotation operation, determining a rotation parameter corresponding to the target video frame;
determining a cropping parameter of the target video frame according to at least one of the position parameter, the scaling parameter and the rotation parameter;
wherein the preset operation comprises at least one of a drag operation and a zoom operation.
4. The method according to claim 1, further comprising, after the cropping processing the target video frame according to the cropping parameter to obtain a cropped image:
receiving image preview operation of the user on the cut image;
responding to the image preview operation, performing linear interpolation processing on the current display parameters according to the original display parameters corresponding to the cut image, and generating a processed image of the original display parameters;
and displaying the processed image of the original display parameters.
5. A video cropping device, comprising:
the target video frame determining module is used for responding to the positioning operation after receiving the positioning operation of a user on a target video and determining a target video frame corresponding to the target video;
the editing operation receiving module is used for receiving the editing operation of the user on the target video frame;
a cropping parameter determining module for determining a cropping parameter of the target video frame in response to the editing operation;
the cutting image acquisition module is used for cutting the target video frame according to the cutting parameters to obtain a cutting image;
the target video frame determination module comprises:
a positioning operation receiving unit, configured to receive a first positioning operation and a second positioning operation of the user on the target video;
a first video frame determination unit, configured to determine, in response to the first positioning operation and the second positioning operation, a first target video frame and a second target video frame corresponding to the target video;
the editing operation receiving module comprises:
an editing operation receiving unit, configured to receive a first editing operation of the first target video frame by the user and a second editing operation of the second target video frame by the user;
the cutting parameter determining module comprises:
a first parameter determination unit configured to determine a first cropping parameter of the first target video frame in response to the first editing operation;
a second parameter determination unit, configured to determine a second cropping parameter of the second target video frame in response to the second editing operation;
a third parameter determining unit, configured to determine, according to the first clipping parameter and the second clipping parameter, a third clipping parameter of a third target video frame located between the first target video frame and the second target video frame in the target video;
the cropping image acquisition module comprises:
and the cutting image acquisition unit is used for respectively cutting the first target video frame, the second target video frame and the third target video frame according to the first cutting parameter, the second cutting parameter and the third cutting parameter to respectively obtain corresponding cutting images.
6. The apparatus of claim 5, wherein the target video frame determination module comprises:
the dragging operation receiving unit is used for receiving the clicking operation or the dragging operation of the user on the playing progress bar corresponding to the target video;
a target time determining unit, configured to determine a target play time of the target video in response to the click operation or the drag operation;
and the target video frame determining unit is used for determining the target video frame according to the target playing time.
7. The apparatus of claim 5, wherein the editing operation receiving module comprises:
the preset operation receiving unit is used for receiving the preset operation of the user on the cutting frame displayed on the interface where the target video frame is located; and/or
A rotation operation receiving unit, configured to receive a rotation operation of the target video frame by the user;
the cutting parameter determining module comprises:
the position parameter determining unit is used for responding to the preset operation and determining the position parameter and/or the scaling parameter corresponding to the target video frame; and/or
A rotation parameter determining unit, configured to determine, in response to the rotation operation, a rotation parameter corresponding to the target video frame;
a cropping parameter determining unit, configured to determine a cropping parameter of the target video frame according to at least one of the position parameter, the scaling parameter, and the rotation parameter;
wherein the preset operation comprises at least one of a drag operation and a zoom operation.
8. The apparatus of claim 5, further comprising:
the preview operation receiving module is used for receiving the image preview operation of the user on the cut image;
the processing image generation module is used for responding to the image preview operation, performing linear interpolation processing on the current display parameter according to the original display parameter corresponding to the cut image and generating a processing image of the original display parameter;
and the processed image display module is used for displaying the processed image of the original display parameter.
CN202010555912.0A 2020-06-17 2020-06-17 Video clipping method and device Active CN111757177B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010555912.0A CN111757177B (en) 2020-06-17 2020-06-17 Video clipping method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010555912.0A CN111757177B (en) 2020-06-17 2020-06-17 Video clipping method and device

Publications (2)

Publication Number Publication Date
CN111757177A CN111757177A (en) 2020-10-09
CN111757177B true CN111757177B (en) 2022-12-20

Family

ID=72674781

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010555912.0A Active CN111757177B (en) 2020-06-17 2020-06-17 Video clipping method and device

Country Status (1)

Country Link
CN (1) CN111757177B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887794B (en) * 2021-01-26 2023-07-18 维沃移动通信有限公司 Video editing method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102646258B (en) * 2011-02-21 2016-01-06 腾讯科技(深圳)有限公司 Image cropping method and system
US10176553B2 (en) * 2015-06-26 2019-01-08 Sony Corporation Image processing system with three-dimensional viewing and method of operation thereof
CN110248245B (en) * 2019-06-21 2022-05-06 维沃移动通信有限公司 Video positioning method and device, mobile terminal and storage medium
CN111263187B (en) * 2020-02-13 2021-07-13 腾讯科技(深圳)有限公司 Video clipping method and device, computer equipment and computer-readable storage medium

Also Published As

Publication number Publication date
CN111757177A (en) 2020-10-09

Similar Documents

Publication Publication Date Title
CN112887794B (en) Video editing method and device
CN112954193B (en) Shooting method, shooting device, electronic equipment and medium
CN112672061B (en) Video shooting method and device, electronic equipment and medium
CN112565868B (en) Video playing method and device and electronic equipment
CN113596555B (en) Video playing method and device and electronic equipment
WO2023030306A1 (en) Method and apparatus for video editing, and electronic device
CN113259743A (en) Video playing method and device and electronic equipment
CN114520876A (en) Time-delay shooting video recording method and device and electronic equipment
CN113852756B (en) Image acquisition method, device, equipment and storage medium
CN111757177B (en) Video clipping method and device
CN114466232A (en) Video processing method, video processing device, electronic equipment and medium
CN112181252B (en) Screen capturing method and device and electronic equipment
CN111835972B (en) Shooting method and device and electronic equipment
CN111885298B (en) Image processing method and device
CN112309449A (en) Audio recording method and device
CN114025237B (en) Video generation method and device and electronic equipment
CN113852757B (en) Video processing method, device, equipment and storage medium
CN113296661B (en) Image processing method, device, electronic equipment and readable storage medium
CN112399238B (en) Video playing method and device and electronic equipment
CN113873319A (en) Video processing method and device, electronic equipment and storage medium
CN113891018A (en) Shooting method and device and electronic equipment
CN113778300A (en) Screen capturing method and device
CN111756998B (en) Composition method, composition device and electronic equipment
CN114339073B (en) Video generation method and video generation device
CN110662104B (en) Video dragging bar generation method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant