CN115942036A - Image processing method and device in video editing, electronic equipment and storage medium - Google Patents

Image processing method and device in video editing, electronic equipment and storage medium Download PDF

Info

Publication number
CN115942036A
CN115942036A CN202110949471.7A CN202110949471A CN115942036A CN 115942036 A CN115942036 A CN 115942036A CN 202110949471 A CN202110949471 A CN 202110949471A CN 115942036 A CN115942036 A CN 115942036A
Authority
CN
China
Prior art keywords
video
image
playing time
precision
edited
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.)
Pending
Application number
CN202110949471.7A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110949471.7A priority Critical patent/CN115942036A/en
Publication of CN115942036A publication Critical patent/CN115942036A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The application provides an image processing method, device and equipment in video editing and a computer readable storage medium; the method comprises the following steps: responding to an image acquisition instruction aiming at a frame image in a video to be edited, and acquiring a playing time point corresponding to each image display position on a time axis in a video editing interface; the video editing device comprises a video editing unit, a video display unit and a video editing unit, wherein the number of image display bits is multiple, and the image display bits are used for displaying frame images of corresponding playing time points in a video to be edited so as to form a frame image sequence; adjusting the playing time points corresponding to the image display positions to obtain target playing time points corresponding to the image display positions; wherein, the time interval of the adjacent target playing time points is larger than the time interval of the adjacent playing time points; acquiring frame images corresponding to each target playing time point in a video to be edited; and filling the acquired frame images to corresponding image display positions on a time axis for display. By the method and the device, the image acquisition speed and the image display efficiency in the video editing process can be improved.

Description

Image processing method and device in video editing, electronic equipment and storage medium
Technical Field
The present disclosure relates to video processing technologies, and in particular, to an image processing method and apparatus in video editing, an electronic device, and a computer-readable storage medium.
Background
In the process of editing the video, for different time axis display accuracies, the display image required by each frame in the time axis is intercepted. For example, a video with a frame rate of 30 frames/second and a duration of 10 seconds needs to capture 300 frames of images when the display precision is 1 frame, and needs 3000 frames of images when the video is 100 seconds. However, since the performance of the mobile terminal devices is different, when the images are displayed on a low-end computer model with higher precision, the acquisition speed and the display speed of the corresponding images are slower, so that image display may be jammed or even a screen is blank, which seriously hinders the video editing operation of the user.
Disclosure of Invention
The embodiment of the application provides an image processing method and device in video editing, an electronic device and a computer readable storage medium, which can improve the image acquisition speed and the image display efficiency in the video editing process.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides an image processing method in video editing, which comprises the following steps:
responding to an image acquisition instruction aiming at a frame image in a video to be edited, and acquiring a playing time point corresponding to each image display position on a time axis in a video editing interface;
the video editing device comprises a video to be edited, a plurality of image display bits and a plurality of image display bits, wherein the image display bits are in a plurality and are used for displaying frame images of corresponding playing time points in the video to be edited so as to form a frame image sequence;
adjusting the playing time points corresponding to the image display positions to obtain target playing time points corresponding to the image display positions; wherein, the time interval of the adjacent target playing time points is greater than the time interval of the adjacent playing time points;
acquiring frame images corresponding to each target playing time point in the video to be edited;
and filling the acquired frame images to corresponding image display positions on the time axis for display.
The embodiment of the application provides an image processing method in video editing, which comprises the following steps:
displaying a time axis corresponding to a video to be edited in a video editing interface;
displaying a plurality of frame images of the video to be edited in the time axis, the plurality of frame images constituting a frame image sequence;
updating the frame images shown in the time axis in response to an image update instruction for the frame images shown in the time axis;
and the target playing time point corresponding to the frame image in the updated time axis is obtained by adjusting the playing time point corresponding to each frame image in the frame image sequence, and the time interval of the adjacent target playing time points is greater than that of the adjacent playing time points.
An embodiment of the present application provides an image processing apparatus in video editing, including: .
The acquisition module is used for responding to an image acquisition instruction aiming at a frame image in a video to be edited and acquiring a playing time point corresponding to each image display position on a time axis in a video editing interface;
the video editing device comprises a plurality of image display bits and a plurality of video editing units, wherein the image display bits are used for displaying frame images of corresponding playing time points in the video to be edited so as to form a frame image sequence;
the adjusting module is used for adjusting the playing time points corresponding to the image display positions to obtain target playing time points corresponding to the image display positions; wherein, the time interval of the adjacent target playing time points is greater than the time interval of the adjacent playing time points;
the determining module is used for acquiring frame images corresponding to the target playing time points in the video to be edited;
and the filling module is used for filling the acquired frame images to the corresponding image display positions on the time axis for display.
In the above scheme, the image processing apparatus further includes a triggering module, where the triggering module is configured to present, in the video editing interface, a video import function item for importing the video to be edited; presenting a video selection page in response to a trigger operation for the video import function item; triggering the image acquisition instruction in response to the selection operation aiming at the video to be edited based on the video selection page; wherein the image acquisition instruction is used for indicating that a target number of frame images are acquired from the first frame image in the video to be edited, and the target number is the same as the number of the image display bits
In the above scheme, the obtaining module is further configured to obtain a default display precision corresponding to displaying of a frame image sequence by the time axis, where the display precision is used to indicate a video playing time corresponding to each image display position; and determining the playing time point corresponding to each image display position on the time axis according to the default display precision.
In the above scheme, the obtaining module is further configured to intercept, based on each target play time point, a frame image corresponding to each target play time point in the video to be edited.
In the above scheme, the trigger module is further configured to present the time axis in the video editing interface, and display, through the plurality of image display positions in the time axis, the frame image sequence of the video to be edited with a first display precision; the first display precision is used for indicating that the video playing time length corresponding to each image display position is a target time length; triggering the image acquisition instruction in response to a precision adjustment operation for adjusting a size of the first presentation precision.
In the foregoing solution, the obtaining module is further configured to receive a scaling operation for a frame image in the frame image sequence, and use the scaling operation as the precision adjustment operation.
In the above scheme, the obtaining module is further configured to present, in the video editing interface, an accuracy input box and a corresponding determination function item; receiving a second display precision input in the precision input box; receiving a trigger operation aiming at the determined function item based on the second display precision, and taking the trigger operation as the precision adjustment operation.
In the above scheme, the obtaining module is further configured to present, in the video editing interface, a precision adjustment control for adjusting the first display precision; and receiving the precision adjusting operation based on the precision adjusting control.
In the above aspect, the image processing apparatus further includes: a slide processing module configured to receive a slide operation for a frame image displayed on the time axis; with the execution of the sliding operation, sliding out the frame images in the frame image sequence along the sliding direction of the sliding operation, and determining a first playing time point corresponding to a target image display position needing frame image filling according to a third display precision; the third display precision is obtained by adjusting the first display precision; adjusting a first playing time point corresponding to the target image display position to obtain a second playing time point corresponding to each target image display position; and acquiring frame images corresponding to the second playing time points in the video to be edited, and filling the acquired frame images to corresponding target image display positions for displaying.
In the above scheme, the adjusting module is further configured to obtain a normalization accuracy corresponding to the playing time point, where the normalization accuracy is used to indicate a time interval between adjacent target time points; and normalizing the playing time points corresponding to the image display positions based on the normalization precision to obtain target playing time points corresponding to the image display positions.
In the above aspect, the image processing apparatus further includes: the setting module is used for presenting a setting interface corresponding to the normalization precision and presenting a normalization precision setting control in the setting interface; and receiving the set normalization precision based on the normalization precision setting control.
In the above scheme, the determining module is further configured to search, in an image cache pool for caching frame images, frame images corresponding to each of the target playing time points; when the frame image corresponding to the target playing time point exists in the image cache pool, acquiring a corresponding frame image from the image cache pool; and when the frame image corresponding to the target playing time point does not exist in the image cache pool, intercepting the frame image corresponding to the target playing time point in the video to be edited, and caching the frame image into the image cache pool.
In the above scheme, the filling module is further configured to obtain a mapping relationship between the playing time point and the target playing time point; respectively determining image display positions corresponding to the target playing time points on the time axis based on the mapping relation; and filling the acquired frame image to the corresponding image display position for display based on the target playing time point.
An embodiment of the present application provides an electronic device, including:
a memory for storing computer executable instructions;
and the processor is used for realizing the image processing method in video editing provided by the embodiment of the application when executing the computer executable instructions stored in the memory.
The embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions for causing a processor to execute the computer-readable storage medium, so as to implement the image processing method in video editing provided by the embodiment of the present application.
The embodiment of the application has the following beneficial effects:
in the video editing process, the target playing time point is obtained by adjusting the playing time point corresponding to each image display position on the time axis in the video editing interface, so that the frame image corresponding to each target playing time point in the video to be edited is obtained for displaying, and the time interval of the adjacent target playing time points is smaller than that of the adjacent playing time points, so that the number of the playing time points corresponding to each image display position on the time axis is reduced by adjusting, the number of the images required to be obtained is reduced, and compared with the method for directly obtaining the images of the playing time points corresponding to each image display position, the image obtaining speed and the image displaying efficiency are improved.
Drawings
Fig. 1 is a schematic structural diagram of an image processing system 100 in video editing provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a terminal 400 provided in an embodiment of the present application;
fig. 3 is a flowchart illustrating an image processing method in video editing according to an embodiment of the present application;
fig. 4 is an interface schematic diagram of an image processing method in video editing according to an embodiment of the present application;
fig. 5 is a schematic diagram illustrating an optional precision adjustment of an image processing method in video editing according to an embodiment of the present application;
fig. 6 is a schematic diagram illustrating an optional precision adjustment of an image processing method in video editing according to an embodiment of the present application;
fig. 7 is a schematic diagram illustrating an optional precision adjustment of an image processing method in video editing according to an embodiment of the present application;
fig. 8 is a schematic diagram illustrating an alternative precision adjustment of an image processing method in video editing according to an embodiment of the present application;
FIG. 9 is a schematic diagram of an alternative normalized precision adjustment of an image processing method in video editing according to an embodiment of the present application;
fig. 10 is an alternative schematic diagram of a play time point normalization process of an image processing method in video editing according to an embodiment of the present application;
fig. 11 is an alternative schematic diagram of a play time point normalization process of an image processing method in video editing according to an embodiment of the present application;
fig. 12 is a diagram illustrating an alternative example of an image processing method in video editing according to an embodiment of the present application;
fig. 13 is an alternative schematic diagram of an image processing method in video editing according to an embodiment of the present application;
fig. 14 is a flowchart illustrating an image processing method in video editing according to an embodiment of the present application;
fig. 15 is a flowchart illustrating an image processing method in video editing according to an embodiment of the present application;
fig. 16 is a schematic interface diagram of image processing in video editing provided by the related art;
fig. 17 is a flowchart illustrating an image processing method in video editing according to an embodiment of the present application;
fig. 18 is an interface schematic diagram of an image processing method in video editing according to an embodiment of the present application;
fig. 19 is an interface schematic diagram of an image processing method in video editing according to an embodiment of the present application;
fig. 20 is a schematic diagram illustrating precision adjustment of an image processing method in video editing according to an embodiment of the present application;
FIG. 21 is a schematic diagram illustrating an alternative image capture in video editing provided by an embodiment of the present application;
fig. 22 is an alternative image acquisition diagram in video editing provided by an embodiment of the present application.
Detailed Description
In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the attached drawings, the described embodiments should not be considered as limiting the present application, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first \ second \ third" are only to distinguish similar objects and do not denote a particular order, but rather the terms "first \ second \ third" are used to interchange specific orders or sequences, where appropriate, so as to enable the embodiments of the application described herein to be practiced in other than the order shown or described herein. In the following description, the term "plurality" referred to means at least two.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
Before further detailed description of the embodiments of the present application, terms and expressions referred to in the embodiments of the present application will be described, and the terms and expressions referred to in the embodiments of the present application will be used for the following explanation.
1) Time axis: a User Interface (UI) control in a video editing Interface of the mobile terminal; the method comprises the steps that a plurality of video frames arranged according to a time sequence in a video are displayed on a time axis, the video frames exist in the time axis in a video frame sequence, and a user can change the position of each video frame in the video frame sequence by operating the time axis, so that a certain frame of the video is positioned, and the video is quickly previewed and edited.
2) Time axis display precision (screenshot precision): the video playing time length corresponding to each frame image (video frame screenshot) displayed in the time axis is also the unit time length range represented by one frame image (video frame screenshot) in the time axis.
3) In response to the condition or state on which the performed operation depends, one or more of the performed operations may be in real-time or may have a set delay when the dependent condition or state is satisfied; there is no restriction on the order of execution of the operations performed unless otherwise specified.
Based on the above explanations of terms and terms involved in the embodiments of the present application, an image processing system in video editing provided by the embodiments of the present application is explained below. Referring to fig. 1, fig. 1 is a schematic structural diagram of an image processing system 100 in video editing according to an embodiment of the present disclosure. To support an exemplary application, the terminal 400 is connected to the server 200 via the network 300, and the terminal 400 is connected to the database 500, wherein the network 300 may be a wide area network or a local area network, or a combination thereof, and the data transmission is realized by using a wireless or wired link.
The terminal 400 is configured to send, in response to an import instruction for a video to be edited, an acquisition request for the video to be edited to the server 200;
the server 200 is configured to search for a video to be edited corresponding to the acquisition request and send the video to the terminal 400;
the terminal 400 is further configured to respond to an image acquisition instruction for a frame image in a video to be edited, and acquire a playing time point corresponding to each image display position on a time axis in a video editing interface;
the video editing device comprises a video editing unit, a video display unit and a video editing unit, wherein the number of image display bits is multiple, and the image display bits are used for displaying frame images of corresponding playing time points in a video to be edited so as to form a frame image sequence;
adjusting the playing time points corresponding to the image display positions to obtain target playing time points corresponding to the image display positions; wherein, the time interval of the adjacent target playing time points is larger than the time interval of the adjacent playing time points;
acquiring frame images corresponding to each target playing time point in a video to be edited;
and filling the acquired frame images into corresponding image display positions on a time axis for displaying.
In some embodiments, the server 200 may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform, where the cloud service may be a video editing service and is called by the terminal 400. The terminal 400 may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device, a smart speaker, and a smart watch), and the like. The terminal device and the server may be directly or indirectly connected through a wired or wireless communication manner, which is not limited in this embodiment of the present application. It should be noted that the video to be edited may be deployed locally at the terminal 400 in advance, or the video to be edited may be obtained from the database 500, or may also be a location such as a distributed file system or a block chain of the server 200, for example, and a storage location of the video to be edited is not limited in the embodiment of the present application.
Next, an electronic device that implements the image processing method in video editing according to the embodiment of the present application will be described. In practical application, the electronic device may be a server or a terminal shown in fig. 1, taking the electronic device provided in the embodiment of the present application as an example for explanation, referring to fig. 2, fig. 2 is a schematic structural diagram of a terminal 400 provided in the embodiment of the present application, and the terminal 400 shown in fig. 2 includes: at least one processor 410, memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal 400 are coupled together by a bus system 440. It is understood that the bus system 440 is used to enable communications among the components. The bus system 440 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 440 in fig. 2.
The Processor 410 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc., wherein the general purpose Processor may be a microprocessor or any conventional Processor, etc.
The user interface 430 includes one or more output devices 431, including one or more speakers and/or one or more visual displays, that enable the presentation of media content. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. Memory 450 optionally includes one or more storage devices physically located remote from processor 410.
The memory 450 includes either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a Random Access Memory (RAM). The memory 450 described in embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, memory 450 is capable of storing data, examples of which include programs, modules, and data structures, or a subset or superset thereof, to support various operations, as exemplified below.
An operating system 451, including system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and handling hardware-based tasks;
a network communication module 452 for communicating to other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: bluetooth, wireless compatibility authentication (WiFi), and Universal Serial Bus (USB), and the like;
a presentation module 453 for enabling presentation of information (e.g., user interfaces for operating peripherals and displaying content and information) via one or more output devices 431 (e.g., display screens, speakers, etc.) associated with user interface 430;
an input processing module 454 for detecting one or more user inputs or interactions from one of the one or more input devices 432 and translating the detected inputs or interactions.
In some embodiments, the apparatus provided in this embodiment may be implemented in software, and fig. 2 shows an image processing apparatus 455 in video editing stored in the memory 450, which may be software in the form of programs and plug-ins, and includes the following software modules: an obtaining module 4551, an adjusting module 4552, a determining module 4553 and a padding module 4554, which are logical and thus may be arbitrarily combined or further split depending on the functions implemented. The functions of the respective modules will be explained below.
In other embodiments, the apparatus provided in this embodiment of the present Application may be implemented in hardware, and as an example, the image processing apparatus in video editing provided in this embodiment of the present Application may be a processor in the form of a hardware decoding processor, which is programmed to execute the image processing method in video editing provided in this embodiment of the present Application, for example, the processor in the form of the hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, programmable Logic Devices (PLDs), complex Programmable Logic Devices (CPLDs), field Programmable Gate Arrays (FPGAs), or other electronic components.
Based on the above description of the image processing system and the electronic device in video editing provided by the embodiments of the present application, the following description will be given of an image processing method in video editing provided by the embodiments of the present application. In practical implementation, the image processing method in video editing provided by the embodiment of the present application may be implemented by a terminal alone, or implemented by a terminal and a server in cooperation, and the image processing method in video editing provided by the embodiment of the present invention is executed by the terminal 400 in fig. 1 alone as an example for description. Referring to fig. 3, fig. 3 is a schematic flowchart of an image processing method in video editing according to an embodiment of the present application, and will be described with reference to the steps shown in fig. 3.
Step 101, a terminal responds to an image acquisition instruction for a frame image in a video to be edited, and acquires a playing time point corresponding to each image display position on a time axis in a video editing interface.
It should be noted that the number of the image display bits is plural, and the image display bits are used for displaying the frame images at the corresponding playing time points in the video to be edited so as to form a frame image sequence.
The image obtaining instruction is used for obtaining images displayed on each image display bit in the time axis, and in actual implementation, before responding to an image obtaining instruction for a frame image in a video to be edited, the image obtaining instruction needs to be triggered.
In some embodiments, when the image obtaining instruction is triggered by an import operation of a video to be edited, specifically, the terminal may present a video import function item for importing the video to be edited in a video editing interface in the video editing interface; presenting a video selection page in response to a trigger operation for the video import function item; based on the video selection page, responding to the selection operation aiming at the video to be edited, presenting the video frame to be edited in the video editing interface, and triggering an image acquisition instruction; the image acquisition instruction is used for indicating that a target number of frame images are acquired from the first frame image in the video to be edited, wherein the target number is the same as the number of image display bits.
In actual implementation, the video to be edited may be pre-stored in the local terminal, may be acquired by the terminal from the outside (e.g., the internet), or may be acquired by the terminal in real time, for example, acquired by a camera of the terminal in real time. The terminal can present an import function option aiming at a video to be edited on a video editing interface, when the import function option is detected to be triggered, a video selection page is presented for a user to select the video required to be edited, and then after the user finishes selecting the video required to be edited, a video frame to be edited is presented in the video editing interface, so that an image acquisition instruction is triggered. The trigger operation is not limited in form in the embodiments of the present application, and may be, for example, a click operation or a long-press operation.
Here, after the video that needs to be edited is selected, the method further includes: presenting a confirmation prompt corresponding to the selected video to be edited; the above-described process of importing a video to be edited can be implemented in such a manner that: and importing the selected video to be edited in response to a confirmation operation for a confirmation prompt.
The user can quickly and accurately select the video to be edited by confirming the prompt. When the electronic equipment receives a confirmation operation aiming at the confirmation prompt, importing the selected video to be edited; and when a denial operation for the confirmation prompt is received, the import of the selected video to be edited is stopped, and the video selection page is returned to enable the user to reselect the video needing to be edited. Therefore, the video needing to be edited is determined by a man-machine interaction means, and the waste of computing resources can be reduced.
In actual implementation, when an image acquisition instruction is triggered by an import operation of a video to be edited, after the image acquisition instruction for a frame image in the video to be edited is triggered, in response to the image acquisition instruction, acquiring a default display precision (i.e., a default display precision) corresponding to a frame image sequence display performed by a time axis, where the display precision is used to indicate a video playing duration corresponding to each image display position, that is, each image display position may correspond to one video clip in the video to be edited, and a position, a play start time point, and a play end time point of the video clip corresponding to each image display position in the video to be edited may be located by the display precision, and of course, a position and a play time point of the frame image in each image display position in the video to be edited may also be located by the display precision; and determining the playing time point corresponding to each image display position on the time axis according to the default display precision.
Here, the default presentation precision may be a default time length of video playing corresponding to each image display position on a set time axis when a video to be edited is first imported in a development process of video editing software.
In other embodiments, when the image acquisition instruction is triggered by an editing operation on a displayed video image, specifically, a time axis is presented in a video editing interface, and a frame image sequence of a video to be edited is displayed with a first display precision through a plurality of image display bits in the time axis; for example, when the first display precision indicates that the unit duration represented by the frame image displayed by one image display bit of the time axis is 0.2 second, it indicates that the duration of the video clip in the video to be edited corresponding to the image display bit is 0.2 second, and further can locate the position, the play start time point and the play end time point of the corresponding video clip in the video to be edited by the sequence of the current image display bit, for example, the sequence of the current image display bit is the second image display bit, the play start time point of the corresponding video clip is 0.2 second, the play end time point is 0.4 second, and the play time point of the frame image in the current image display bit in the video to be edited is 0.2 second; continuing with fig. 4, fig. 4 is a schematic interface diagram of an image processing method in video editing according to an embodiment of the present application, for example, a frame rate of a current video is 30 seconds/frame, a display precision of a time axis of fig. 4 is 1 second frame image, and a frame image displayed by one image display bit represents a time range of 1 second; and triggering an image acquisition instruction in response to a precision adjusting operation for adjusting the size of the first display precision.
In actual implementation, the terminal presents a time axis in the video editing interface, and displays the frame image sequence of the video to be edited with the first display precision through a plurality of image display positions in the time axis, where reference is made to continue fig. 4, and the time axis presented in the video editing interface is a time axis control in a dashed frame region in fig. 4. The frame images of the video to be edited, which are close to the current frame, are displayed on the time axis to help the user quickly locate a certain frame, and then the frame images are edited, such as adding a filter or a special effect.
In practical implementation, the terminal adjusts the size of the first display precision in response to the received precision adjustment operation in the video editing process.
As an example, the terminal presents a video editing interface, and adjusts the size of the first presentation precision in response to a precision adjustment operation received on the video editing interface.
In practical applications, the precision adjustment operation is used to adjust the display precision of the time axis, and different implementations are possible, which are exemplarily described below.
In some embodiments, the terminal presents a time axis in the video editing interface, and displays, through a plurality of image display positions in the time axis, a frame image sequence of a video to be edited with a first display precision, and then receives a zoom operation for a frame image in the frame image sequence, and takes the zoom operation as a precision adjustment operation.
Here, the zooming operation may be to zoom the time axis outwards on the time axis according to the two fingers of the user to improve the display accuracy, referring to fig. 5, fig. 5 is an optional accuracy adjustment diagram of the image processing method in video editing provided by the embodiment of the present application, specifically, the frame image sequence of the time axis is stretched by the two fingers of the user, so as to improve the display accuracy of the frame image sequence of the video to be edited. Correspondingly, the zooming operation may also be to zoom the time axis inwards on the time axis according to the two fingers of the user to reduce the first display precision, referring to fig. 6, fig. 6 is an optional precision adjustment diagram of the image processing method in video editing provided by the embodiment of the present application, specifically, the frame image sequence of the time axis is shrunk by the two fingers of the user, so as to reduce the display precision of the frame image sequence of the video to be edited.
In some embodiments, the terminal presents a time axis in a video editing interface, and presents an accuracy input box and a corresponding determination function item in the video editing interface after displaying a frame image sequence of a video to be edited with a first display accuracy through a plurality of image display positions in the time axis; receiving a second display precision input in the precision input box; and receiving a trigger operation aiming at the determined function item based on the second display precision, and taking the trigger operation as a precision adjustment operation.
Here, the precision input box and the corresponding determination function item may be presented by long pressing or double-clicking the time axis, and then after receiving a click operation of the user on the determination function item, a second display precision input by the user in the precision input box is determined, so as to adjust the first display precision to the second display precision.
In some embodiments, the terminal presents a time axis in a video editing interface, and presents a precision adjusting control for adjusting first display precision in the video editing interface after displaying a frame image sequence of a video to be edited with the first display precision through a plurality of image display positions in the time axis; based on the precision adjustment control, a precision adjustment operation is received.
Here, the precision adjustment control may be presented at a position below the time axis by long pressing or double-clicking the time axis, referring to fig. 7, where fig. 7 is an optional precision adjustment schematic diagram of the image processing method in video editing provided by the embodiment of the present application, and specifically, the user increases the display precision of the frame image sequence of the video to be edited by clicking "+" in the dashed box or clicks "-" in the dashed box to decrease the display precision of the frame image sequence of the video to be edited.
In some embodiments, the terminal presents a time axis in the video editing interface, and presents a precision adjusting roller for adjusting the first display precision in the video editing interface after displaying the frame image sequence of the video to be edited with the first display precision through a plurality of image display positions in the time axis; based on the precision adjustment roller, a precision adjustment operation is received.
Here, the precision adjustment roller and the corresponding determination function item are presented by long-pressing or double-clicking the time axis, and the user adjusts the display precision by rolling the precision adjustment roller up and down or left and right. For example, the display precision is adjusted by scrolling up and down by the user, see fig. 8, where fig. 8 is an optional precision adjustment schematic diagram of the image processing method in video editing provided in the embodiment of the present application, specifically, the user adjusts the display precision by scrolling up and down through a roller in a dashed box displayed on the right side, and then, after receiving a click operation of the user on a determination function item, determines a second display precision determined by the user based on the precision adjustment roller, so as to adjust the first display precision to the second display precision.
It should be noted that, besides the implementation manners of the above-mentioned several receiving precision adjustment operations, there may be other manners of implementing precision adjustment, which is not limited in this application.
In actual implementation, when an image acquisition instruction is triggered by editing operation on a displayed video image, after the image acquisition instruction for a frame image in a video to be edited is triggered, responding to the image acquisition instruction, and acquiring current display precision corresponding to frame image sequence display of a time axis; and determining the playing time point corresponding to each image display position on the current time axis according to the current display precision.
In some embodiments, in addition to the two ways of triggering the image obtaining instruction, the image obtaining instruction may be triggered based on a sliding operation on a frame image sequence on a time axis in a video editing interface, where after the frame image sequence of the video to be edited is presented on the time axis, a fast preview of the frame image in the video to be edited is realized by the sliding operation on the frame image sequence, so that a user quickly positions a frame image to be edited based on an image displayed on the time axis, and then edits the frame image, for example, adds a filter or a special effect.
In practical implementation, for the case that the image acquisition instruction is triggered by a sliding operation on a frame image sequence on a time axis in a video editing interface, specifically, the current display precision corresponding to the frame image sequence display is performed by acquiring the time axis; and determining the playing time point corresponding to each image display position on the current time axis according to the current display precision.
It should be noted that, for the current display precision, when the frame image sequence on the time axis is not subjected to precision adjustment operation, the current display precision is the default display precision; when the frame image sequence on the time axis is subjected to the precision adjustment operation, the current display precision is the display precision after the first display precision is adjusted.
And 102, adjusting the playing time points corresponding to the image display positions to obtain target playing time points corresponding to the image display positions.
In some embodiments, the adjustment of the playing time points corresponding to the plurality of image display bits may be to perform normalization processing on the playing time points corresponding to the plurality of image display bits, that is, to perform mapping processing on the plurality of playing time points, so as to map the plurality of playing time points to a time range with a certain time point precision, that is, to normalize the plurality of playing time points. In actual implementation, before step 102, the normalization accuracy corresponding to the playing time point needs to be obtained first, where the normalization accuracy is used to indicate a time interval between adjacent target time points; and determining the playing time point corresponding to each image display position on the time axis according to the normalized precision.
The normalization accuracy may be set by a developer in the development process of the video editing software, or may also be set by a user autonomously in the video editing process, specifically, the user presents a setting interface corresponding to the normalization accuracy by clicking a setting option in the video editing software, and presents a normalization accuracy setting control in the setting interface; and setting a control based on the normalized precision, and receiving the set normalized precision.
A specific implementation of setting the normalized precision based on the normalized precision setting control is described below.
In some embodiments, after clicking a setting option in the video editing software, the user presents an interface containing a normalized precision adjustment control, where the normalized precision adjustment control contains a button for increasing the normalized precision and a button for decreasing the normalized precision, and the user increases the normalized precision by clicking the increase button for normalized precision or decreases the normalized precision by clicking the decrease button for normalized precision.
In some embodiments, after clicking a setting option in the video editing software, the user presents an interface including a normalized precision adjustment roller, see fig. 9, where fig. 9 is an optional normalized precision adjustment diagram of the image processing method in video editing provided by the embodiment of the present application, and specifically, the user sets the normalized precision by scrolling up and down through the roller in the dashed box displayed on the right side.
In some embodiments, after clicking a setting option in the video editing software, the user presents an interface containing a normalized precision input box through which the user sets the corresponding normalized precision and a corresponding determination function item.
It should be noted that, besides the above several implementation manners of setting the normalization accuracy by the user, there may be other manners of setting the normalization accuracy, which is not limited in the present application.
In actual implementation, after the normalization accuracy is determined, based on the normalization accuracy, the playing time points corresponding to the plurality of image display positions on the time axis are adjusted, that is, normalized, to obtain the target playing time point corresponding to each image display position, where the time interval between adjacent target playing time points is greater than the time interval between adjacent playing time points.
As an example, a video of a period of two seconds is edited, where the playing time points corresponding to a plurality of image display bits are [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0], and after the normalization processing is performed on the playing time points, referring to fig. 10, fig. 10 is an optional schematic diagram of the playing time point normalization processing of the image processing method in video editing provided by the embodiment of the present application, so as to obtain the target playing time points [0.0,0.2,0.4,0.6,0.8,1.0,1.2,1.4,1.6,1.8, 1.0.0, 1.2,1.4,1.6, 1.0.0 ]; or if the current normalization precision is 0.5 seconds, after the normalization processing is performed on the playing time point, referring to fig. 11, fig. 11 is an optional schematic diagram of the playing time point normalization processing of the image processing method in video editing provided by the embodiment of the present application, so as to obtain a target playing time point [0.0,0.5,1.0,1.5,2.0] corresponding to each image display bit.
In actual implementation, after the target playing time point corresponding to each image display position is obtained, the terminal captures the frame image corresponding to each target playing time point in the video to be edited based on each target playing time point. Therefore, by carrying out normalization processing on the playing time points, the sending acquisition requests of the frame images corresponding to the playing time points of the targets are reduced, so that the process that the terminal captures the images of the video to be edited to obtain the corresponding frame images is simplified, and the display speed is increased. In this way, although the display precision on the time axis is reduced, the content of the frame images adjacent to the video is changed less in the normal case, the playing time points of the plurality of video screenshots in the time axis are normalized by the normalized precision, that is, the plurality of playing time points are mapped, so that the plurality of playing time points are mapped to a time range with a certain time point precision, one frame image replaces the adjacent frame image with less content change, the number of images required to be acquired is reduced, and the balance between the display speed and the display precision is achieved.
And 103, acquiring frame images corresponding to each target playing time point in the video to be edited.
It should be noted that, because the trigger processes for acquiring the image acquisition instructions of the frame images in the video to be edited are different, the processes for acquiring the playing time points corresponding to the image display positions on the time axis in the video editing interface are also different, and therefore, the processes for acquiring the frame images corresponding to the target playing time points in the video to be edited are also different based on the difference in the trigger processes of the image acquisition instructions. Next, two processes of obtaining frame images corresponding to each target playing time point in a video to be edited will be specifically described.
In some embodiments, when the image obtaining instruction is triggered by an import operation of the video to be edited, the process of obtaining the frame image corresponding to each target playing time point in the video to be edited specifically includes that the terminal captures an original video based on default display precision, so as to obtain the frame image corresponding to each target playing time point.
In other embodiments, when the image obtaining instruction is triggered by an editing operation on the displayed video image, the process of obtaining the frame image corresponding to each target playing time point in the video to be edited specifically includes searching the frame image corresponding to each target playing time point in an image cache pool for caching the frame image; when the frame image corresponding to the target playing time point exists in the image cache pool, acquiring the corresponding frame image from the image cache pool; and when the frame image corresponding to the target playing time point does not exist in the image cache pool, intercepting the frame image corresponding to the target playing time point in the video to be edited.
In the following example, referring to fig. 12, fig. 12 is an alternative example of an image processing method in video editing provided by the embodiment of the present application, assuming that the normalized precision is 0.2 seconds, a frame image corresponding to a target playing time point [0.0,0.2,0.4,0.6,0.8,1.0,1.2,1.4,1.6,1.8,2.0] is searched in an image buffer pool, as an example, there is no frame image corresponding to 1.2 seconds in the image buffer pool, so that a frame image corresponding to a target playing time point [0.0,0.2,0.4,0.6,0.8,1.0,1.4,1.6,1.8,2.0] is obtained from the image buffer pool, and when the terminal receives a message that the frame image corresponding to 1.2 seconds fails to be searched, the video to be edited is processed by a screenshot device, and a screenshot corresponding to 1.2 seconds is generated.
It should be noted that, after acquiring the frame image at the corresponding target playing time point, the terminal may buffer the frame image into the image buffer pool, so as to facilitate the next direct acquisition.
With continued reference to fig. 12, after the 1.2 second frame image is acquired, the 1.2 second frame image is placed into the image buffer pool. Therefore, the frame images displayed on the time axis are cached, and when a new image acquisition request is made, the corresponding frame image is searched from the cache so as to improve the speed of image display.
And 104, filling the acquired frame images to corresponding image display positions on a time axis for display.
In actual implementation, after frame images corresponding to all target playing time points in a video to be edited are obtained, a mapping relation between the playing time points and the target playing time points is obtained; respectively determining image display positions corresponding to the target playing time points on a time axis based on the mapping relation; and filling the acquired frame image to the corresponding image display position for display based on the target playing time point.
Here, the mapping relationship between the playing time point and the target playing time point is determined by the normalized precision, and in the case that the normalized precision is 0.2 seconds, referring to fig. 10, the playing time points 0.0,0.1 correspond to the target playing time point 0.0, the playing time points 0.2,0.3 correspond to the target playing time point 0.2, the playing time points 0.4,0.5 correspond to the target playing time point 0.4, the playing time points 0.6,0.7 correspond to the target playing time point 0.6, the playing time points 0.8,0.9 correspond to the target playing time point 0.8, the playing time points 1.0,1.1 correspond to the target playing time point 1.0, the playing time points 1.2,1.3 correspond to the target playing time point 1.2, the playing time points 1.4,1.5 correspond to the target playing time point 1.4, the playing time points 1.6,1.7 correspond to the target playing time point 1.6, the playing time points 1.8,1.9, 1.2, and the target playing time points correspond to the target playing time points 1.2. Or if the normalized precision is 0.5 seconds, referring to fig. 11, the playing time points [0.0,0.1,0.2,0.3,0.4] correspond to the target playing time point 0.0, the playing time points [0.5,0.6,0.7,0.8,0.9] correspond to the target playing time point 0.5, the playing time points [1.0,1.1,1.2,1.3,1.4] correspond to the target playing time point 1.0, the playing time points [1.5,1.6,1.7,1.8,1.9] correspond to the target playing time point 1.5, and the playing time point 2.0 corresponds to the target playing time point 2.0.
In practical implementation, after obtaining the mapping relationship between the playing time point and the target playing time point, based on the mapping relationship, the process of determining the image display positions corresponding to the target playing time points on the time axis respectively is specifically, based on the image display positions corresponding to the playing time points on the time axis, filling the frame images of the target playing time points corresponding to the playing time points into the image display positions corresponding to the playing time points on the time axis.
In the following example, assuming that the normalized precision is 0.5 seconds, here referring to fig. 11, a frame image corresponding to 0.0 second in the video to be edited is filled in to an image display bit corresponding to the playing time point [0.0,0.1,0.2,0.3,0.4] on the time axis, a frame image corresponding to 0.5 second in the video to be edited is filled in to an image display bit corresponding to the playing time point [0.5,0.6,0.7,0.8,0.9] on the time axis, a frame image corresponding to 1.0 second in the video to be edited is filled in to an image display bit corresponding to the playing time point [1.0,1.1,1.2,1.3,1.4] on the time axis, a frame image corresponding to 1.5 second in the video to be edited is filled in to an image display bit corresponding to the playing time point [1.5,1.6,1.7,1.8,1.9] on the time axis, and an image display bit corresponding to the playing time point [ 0.0.0 second in the video to be edited is filled in the playing time point [ 1.0.0.1, 2.
In some embodiments, after step 104, further comprising: receiving a sliding operation for a frame image shown by a time axis; sliding out the frame images in the frame image sequence along the sliding direction of the sliding operation along with the execution of the sliding operation, and determining a first playing time point corresponding to a target image display position needing frame image filling according to the third display precision; the third display precision is obtained by adjusting the first display precision; then, adjusting a first playing time point corresponding to the target image display position to obtain a second playing time point corresponding to each target image display position; and acquiring frame images corresponding to each second playing time point in the video to be edited, and filling the acquired frame images to corresponding target image display positions for displaying.
It should be noted that, because the video editing interface is limited, the time axis displayed on the video editing interface only corresponds to a part of the entire time axis of the video to be edited, and based on this, after editing the frame images corresponding to the part of the time axis displayed on the video editing interface, the frame images in the remaining part of the frame image sequences are presented by sliding the time axis, referring to fig. 13, fig. 13 is an optional schematic diagram of the image processing method in video editing provided in the embodiment of the present application.
Then, adjusting a first playing time point corresponding to the target image display position to obtain a second playing time point corresponding to each target image display position; and acquiring frame images corresponding to each second playing time point in the video to be edited, and filling the acquired frame images to corresponding target image display positions for displaying. Here, the process of adjusting the first playing time point to obtain the frame image corresponding to each second playing time point for display may refer to the process of step 102 to step 104, which is not described herein again.
In actual implementation, a time axis of a frame sequence formed by a plurality of frame images of a video to be edited is presented in a video editing interface, so as to receive an image updating instruction of a user for the frame images displayed in the time axis, so as to adjust the playing time point corresponding to each frame image in the frame image sequence, obtain a target playing time point corresponding to the frame image in the adjusted time axis, and update the frame images displayed in the time axis based on the target playing time point.
By applying the embodiment of the application, in the video editing process, the target playing time point is obtained by adjusting the playing time point corresponding to each image display position on the time axis in the video editing interface, so that the frame image corresponding to each target playing time point in the video to be edited is obtained for displaying, and as the time interval of the adjacent target playing time points is smaller than that of the adjacent playing time points, the number of the playing time points corresponding to each image display position on the time axis is reduced by adjusting, so that the number of the images to be obtained is reduced, and compared with the situation that the image of the playing time point corresponding to each image display position is directly obtained, the speed of obtaining the image and the efficiency of displaying the image are improved.
Next, a description will be given of an example in which the terminal 400 in fig. 1 implements the image processing method in video editing according to the embodiment of the present application. Referring to fig. 14, fig. 14 is a schematic flowchart of an image processing method in video editing according to an embodiment of the present application, and will be described with reference to the steps shown in fig. 14.
Step 201, the terminal responds to a trigger operation for a video editing client, and presents a video editing interface containing a video import function item for importing a video to be edited.
In actual implementation, a video editing client is presented on the terminal, or the terminal presents a client with a video editing function, where, taking the video editing client as an example, when the client receives a trigger operation of a user, that is, the user runs the video editing client, the terminal presents a video editing interface including a video import function item for importing a video to be edited.
In step 202, in response to the click operation for the video import function item, a video selection page comprising a plurality of videos is presented.
In actual implementation, after a user clicks a video import item on a video editing interface, the terminal presents a video selection page including multiple videos, where the videos of the video selection page may be pre-stored locally in the terminal, may also be acquired by the terminal from the outside (such as the internet), and may also be acquired by the terminal in real time, for example, acquired by a camera of the terminal in real time.
Step 203, responding to the selection operation of the video to be edited in the video selection page, and presenting a confirmation prompt corresponding to the selected video to be edited.
In actual implementation, after the user selects the video to be edited, the terminal presents a confirmation prompt corresponding to the selected video to be edited so that the user confirms the video to be edited, the selected video to be edited is imported, and an image acquisition instruction is triggered.
And 204, acquiring default display precision corresponding to the frame image sequence display of the time axis in the video editing interface.
Step 205, determining the playing time point corresponding to each image display position on the time axis according to the default display precision.
It should be noted that, for the case that the image acquisition instruction is triggered by the import operation of the video to be edited, according to the default display precision, the play time point corresponding to each image display position on the time axis is determined to be the target play time point.
And step 206, performing screenshot on the video to be edited based on the default display precision to obtain frame images corresponding to each target playing time point.
Step 207, filling the received frame image to the corresponding image display position on the time axis for display.
Here, after the received frame images are filled in the corresponding image display positions on the time axis for display, the time axis in the video editing interface may present a frame image sequence of the video to be edited, so that the user edits the displayed video images based on the frame image sequence. Next, the description will be continued by taking as an example that the terminal 400 in fig. 1 implements the image processing method in video editing provided in the embodiment of the present application. Referring to fig. 15, fig. 15 is a flowchart illustrating an image processing method in video editing according to an embodiment of the present application, and will be described with reference to the steps shown in fig. 15.
Step 301, the terminal presents a time axis in a video editing interface, and presents a frame image sequence of a video to be edited by adopting a first presentation precision through a plurality of image display positions in the time axis.
In actual implementation, the first display accuracy is the default display accuracy. And the user adjusts the first display precision in the video editing interface through precision adjustment operation, and an image acquisition instruction for a frame image in the video to be edited is triggered.
In practical implementation, the precision adjustment operation may be a zoom operation performed by a user on a video editing interface for a frame image in a frame image sequence, display precision data input by the user based on a precision input box presented by a terminal, or an operation performed by the user to adjust the display precision through a precision adjustment control or a precision adjustment roller presented by the terminal.
Step 302, in response to the precision adjustment operation for adjusting the first display precision to the second display precision, obtaining the playing time point and the normalization precision corresponding to the image display position corresponding to the second display precision.
In practical implementation, the normalization precision may be set by a developer during development of video editing software, or may be set autonomously by a user during video editing.
Step 303, based on the normalization precision, normalizing the playing time points corresponding to the plurality of image display positions displayed according to the second display precision to obtain target playing time points corresponding to the image display positions.
And step 304, searching frame images corresponding to each target playing time point in an image cache pool for caching the frame images.
Step 3041, when there is a frame image corresponding to the target playing time point in the image buffer pool, obtaining the frame image corresponding to the target playing time point from the image buffer pool.
Step 3042, when there is no frame image corresponding to the target playing time point in the image buffer pool, capturing the frame image corresponding to the target playing time point in the video to be edited.
In practical implementation, after the terminal intercepts the frame image of the corresponding target playing time point, the frame image is cached in the image cache pool so as to be directly acquired next time.
Step 305, obtaining the mapping relationship between the playing time point and the target playing time point.
And step 306, respectively determining image display positions corresponding to the target playing time points on the time axis based on the mapping relation.
And 307, filling the acquired frame image to a corresponding image display position for display based on the target playing time point.
In actual implementation, after filling the frame images into the corresponding image display positions for display, the user performs a sliding operation on the frame image sequence displayed on the time axis.
And 308, responding to the sliding operation of the frame image sequence displayed by the time axis, displaying the frame images in the sliding frame image sequence by the terminal along the sliding direction of the sliding operation, and determining a first playing time point corresponding to a target image display position needing frame image filling according to the third display precision.
Here, the third display accuracy is the display accuracy obtained by adjusting the first display accuracy.
In actual implementation, the terminal captures a frame image at a corresponding time point obtained by a video to be edited based on a third display precision, so as to fill the obtained frame images to corresponding image display positions on a time axis, and then receives a precision adjustment operation of a user on a frame image sequence displayed on the time axis, so as to obtain an adjusted display precision, where the precision adjustment operation may refer to step 301, and then, based on the adjusted display precision, the terminal determines a play time point, i.e., a first play time point, corresponding to a target image display position where the frame image needs to be filled.
Step 309, normalizing the first playing time point corresponding to the target image display position to obtain a second playing time point corresponding to each target image display position.
Step 310, obtaining the frame image corresponding to each second playing time point in the image buffer pool.
In actual implementation, when the frame image corresponding to the target playing time point exists in the image cache pool, the frame image corresponding to the target playing time point is obtained from the image cache pool; and when the frame image corresponding to the target playing time point does not exist in the image cache pool, intercepting the frame image corresponding to the target playing time point in the video to be edited, wherein the frame image is cached to the image cache pool after the frame image corresponding to the target playing time point is intercepted by the terminal so as to be directly acquired next time.
And 311, filling the acquired frame image to a corresponding target image display position for display.
In actual implementation, after step 311, the process of step 308 to step 311 may be continued, which is not described in this embodiment of the present application.
By applying the embodiment of the application, in the video editing process, the target playing time point is obtained by adjusting the playing time point corresponding to each image display position on the time axis in the video editing interface, so that the frame image corresponding to each target playing time point in the video to be edited is obtained for displaying, and as the time interval of the adjacent target playing time points is smaller than the time interval of the adjacent playing time points, the number of the playing time points corresponding to each image display position on the time axis is reduced by the adjustment, so that the number of the images to be obtained is reduced, and compared with the method for directly obtaining the images of the playing time points corresponding to each image display position, the speed of obtaining the images and the efficiency of displaying the images are improved.
In the following, an exemplary application of the embodiments of the present invention in a practical application scenario will be described. Referring to fig. 16, fig. 16 is a schematic diagram of an interface of image processing in video editing provided by the related art. In fig. 16, in the conventional video editing technical solution, for different screenshot precision (i.e., time axis display precision) of a time axis, all the screenshots (i.e., display images) required by each frame in a time axis control are captured. For example, a video with a frame rate of 30 frames/second and a duration of 10 seconds needs to capture 300 screenshots when the screenshot precision is 1 frame, and needs 3000 screenshots when the video is 100 seconds. Because the performances of the mobile terminal devices are different, when the time axis control is displayed with higher screenshot precision on the low terminal machine model and the video duration of the user is longer, the screenshot is displayed very slowly, and the user is difficult to locate the current frame, as shown in fig. 15, which seriously hinders the video editing operation of the user.
In view of the above problems, the embodiment of the present application solves the problem that screenshot is generated slowly when a video is long in time and screenshot is performed with high screenshot precision on a middle-and-low-end mobile device through a normalization technology and a caching technology, where reference is made to fig. 17, where fig. 17 is a flowchart of an image processing method in video editing provided by the embodiment of the present application, and reference is made to fig. 17, where the image processing method in video editing according to the embodiment of the present application includes:
step 401, a user opens a video editing interface and imports a corresponding video to be edited.
In actual implementation, after the user opens the video editing interface, the user clicks the video import item presented by the video editing interface, at this time, the video editing interface presents a video selection page including multiple videos, where the multiple videos may be pre-stored in the local terminal, acquired by the terminal from the outside (such as the internet), or acquired by the terminal in real time, for example, acquired by a camera of the terminal in real time. And selecting the video needing to be edited on the presented video selection page by the user and importing the corresponding video for subsequent editing.
And 402, in a video editing interface, the terminal presents a time axis corresponding to the video to be edited according to the current screenshot precision.
In actual implementation, after a user imports a corresponding video, the terminal determines the current screenshot precision (namely default display precision), and performs screenshot on the video to be edited to obtain a plurality of corresponding frame images, so that the plurality of frame images form a frame image sequence to be displayed on a time axis.
As an example, with continued reference to fig. 4, the screenshot precision here is exemplarily 0.33 second and one frame, and after the user imports the corresponding video to be edited, the video editing interface including the corresponding timeline is presented as shown in fig. 4.
Step 403, the user performs precision adjustment operation based on the time axis corresponding to the video to be edited, and generates an original screenshot request time point a.
In actual implementation, a user adjusts the precision based on the time axis of the video editing interface, that is, adjusts the precision of the current screenshot, and generates an original screenshot request time point a (that is, a playing time point corresponding to each image display position on the time axis). Here, referring to fig. 18 and fig. 19, fig. 18 and fig. 19 are schematic interface diagrams of an image processing method in video editing according to an embodiment of the present application, where a user may adjust screenshot precision of a time axis by performing a double-finger zoom operation on the time axis, that is, the user may select screenshot precision desired by the user by performing the double-finger zoom operation. As shown in fig. 18, the user may perform precision adjustment based on the time axis of the video editing interface by zooming the time axis outwards on the time axis with two fingers to stretch and enlarge the screenshot precision, so as to generate an original screenshot request time point a; as shown in fig. 19, the user may perform the precision adjustment based on the time axis of the video editing interface by zooming the time axis inward on the time axis with two fingers to stretch and reduce the screenshot precision, so as to generate the original screenshot request time point a.
Following the above example, taking zooming in on the screenshot precision as an example, the user zooms out on the timeline to increase the screenshot precision, illustratively adjusting the screenshot precision of 0.33s to a screenshot precision of 0.1 s. Referring to fig. 20, fig. 20 is a schematic diagram illustrating precision adjustment of an image processing method in video editing according to an embodiment of the present disclosure. As shown in fig. 20, the screenshot precision of 0.33s is adjusted to the screenshot precision of 0.1s, that is, the playback time point [0.00,0.33,0.66,0.99,1.32,1.65,0.98,2.00] displayed on the time axis is adjusted to [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0], that is, the screenshot request time point a.
And step 404, normalizing the original screenshot request time point A according to the current normalization precision to generate a screenshot request time point B.
In actual implementation, after determining an original screenshot request time point a, the terminal first obtains a set normalization accuracy, and performs normalization processing on the screenshot request time point a according to the screenshot request normalization processing module to generate a new screenshot request time point B.
Continuing with the above example and with reference to FIG. 20, where the original screenshot request time point A is [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0], the normalized precision is illustratively 0.2 seconds, then the original screenshot request time point A is normalized to generate a new screenshot request time point B [0.0,0.2,0.4,0.6,0.8,1.0,1.2,1.4,1.6,1.8,2.0].
And step 405, reading screenshot cache from the screenshot cache pool according to the screenshot request time point B.
In practical implementation, the terminal firstly sends a cache searching request corresponding to the screenshot request time point B to a screenshot cache pool according to the screenshot request time point B, and if the screenshot of a certain time point exists in the screenshot cache pool (namely, an image cache pool), reads the screenshot of the corresponding time point from the screenshot cache pool; and if the screenshot of a certain time point does not exist in the cache pool, the terminal requests the screenshot from the screenshot device, so that the screenshot device captures the screenshot from the original video to obtain the image of the corresponding time point.
As for the above example, when there is a screenshot at a certain time point in the screenshot cache pool, here, referring to fig. 21, fig. 21 is a schematic diagram of an optional image capture in video editing provided by the embodiment of the present application. A screenshot request normalization processing module in the terminal sends a cache search request to a screenshot cache pool, searches a cache screenshot corresponding to a screenshot request time point B in the screenshot cache pool, and if an image with a time point of [0.2,0.4,0.6,0.8,1.0,1.2,1.4,1.6,1.8,2.0] exists in the cache pool at this time, and an image with a time point of 0.0s does not exist, the terminal can obtain the corresponding cache screenshot, and for an image with a time point of 0.0s that does not exist in the cache pool, here, refer to fig. 22, which is an optional image obtaining schematic diagram in video editing provided by the embodiment of the present application. When the 0.0s screenshot does not exist in the cache pool, if the 0.0s screenshot cache search fails, the screenshot request normalization processing module sends a screenshot request corresponding to the time point of 0.0s to the screenshot device, so that the screenshot device captures the original video to generate an image with the time point of 0.0 s. Therefore, the generation speed of the screenshot is improved by optimizing the screenshot of the time axis. According to the setting of different screenshot normalization precisions, the screenshot generating speed can be increased, and the user experience is greatly improved.
And step 406, filling the acquired screenshot into a time axis.
In actual implementation, when the terminal acquires the screenshot corresponding to the screenshot request time point B, the acquired screenshot is filled to the corresponding position on the time axis for display according to the mapping relation between the original screenshot request time point A and the screenshot request time point B. It should be noted that, for the case that there is no screenshot at a certain time point in the cache pool and the cache search fails, after the terminal captures the video to be edited to obtain a frame image corresponding to the target playing time point and fills the frame image in the time axis, the terminal also places the obtained screenshot in the screenshot cache pool so as to be directly obtained next time.
With continued reference to fig. 21 and fig. 22, after obtaining the corresponding screenshot, the terminal fills the obtained screenshot in the position corresponding to the time axis for display based on the mapping relationship between the original screenshot request time point a and the screenshot request time point B.
It should be noted that, because the video editing interface is limited, the time axis displayed on the video editing interface only corresponds to a part of the time axis of the entire video to be edited, and based on this, after step 306, the user may slide the time axis to present the frame images in the remaining frame image sequences, where continuing to refer to fig. 18 and fig. 19, as shown in fig. 18, the user drags the time axis with enlarged precision left and right by using a two-finger user to preview the video with more precise precision, or as shown in fig. 19, the user drags the time axis with reduced precision left and right by using a two-finger user to preview the video quickly with more blurred precision left and right.
By applying the embodiment of the application, in the video editing process, the target playing time point is obtained by adjusting the playing time point corresponding to each image display position on the time axis in the video editing interface, so that the frame image corresponding to each target playing time point in the video to be edited is obtained for displaying, and as the time interval of the adjacent target playing time points is smaller than that of the adjacent playing time points, the number of the playing time points corresponding to each image display position on the time axis is reduced by adjusting, so that the number of the images to be obtained is reduced, and compared with the situation that the image of the playing time point corresponding to each image display position is directly obtained, the speed of obtaining the image and the efficiency of displaying the image are improved.
Continuing with the exemplary structure of the image processing apparatus 455 in video editing provided by the embodiment of the present application implemented as software modules, in some embodiments, as shown in fig. 2, the software modules stored in the image processing apparatus 455 in video editing of the memory 450 may include:
an obtaining module 4551, configured to, in response to an image obtaining instruction for a frame image in a video to be edited, obtain a playing time point corresponding to each image display position on a time axis in a video editing interface; the number of the image display bits is multiple, and the image display bits are used for displaying the frame images of the corresponding playing time points in the video to be edited so as to form a frame image sequence.
An adjusting module 4552, configured to adjust the playing time points corresponding to the multiple image display positions to obtain target playing time points corresponding to the image display positions; and the time interval of the adjacent target playing time points is greater than that of the adjacent playing time points.
A determining module 4553, configured to acquire a frame image in the video to be edited, where the frame image corresponds to each target playing time point.
And a filling module 4554 configured to fill the acquired frame image into a corresponding image display bit on the time axis for display.
In some embodiments, the image processing device 455 further comprises: the triggering module is used for presenting a video import function item for importing the video to be edited in the video editing interface; presenting a video selection page in response to a trigger operation for the video import function item; triggering the image acquisition instruction in response to the selection operation aiming at the video to be edited based on the video selection page; the image acquisition instruction is used for indicating that a target number of frame images are acquired from the first frame image in the video to be edited, and the target number is the same as the number of the image display bits.
In some embodiments, the obtaining module 4551 is further configured to obtain a default display precision corresponding to frame image sequence display performed by the time axis, where the display precision is used to indicate a video playing time corresponding to each image display bit; and determining the playing time point corresponding to each image display position on the time axis according to the default display precision.
In some embodiments, the obtaining module 4551 is further configured to intercept, based on each of the target playing time points, a frame image in the video to be edited, where the frame image corresponds to each of the target playing time points.
In some embodiments, the trigger module is further configured to present the time axis in the video editing interface, and display, through a plurality of image display bits in the time axis, a frame image sequence of the video to be edited with a first display precision; the first display precision is used for indicating that the video playing time length corresponding to each image display position is a target time length; triggering the image acquisition instruction in response to a precision adjustment operation for adjusting a size of the first presentation precision.
In some embodiments, the obtaining module 4551 is further configured to receive a scaling operation for a frame image in the frame image sequence, and use the scaling operation as the precision adjustment operation.
In some embodiments, the obtaining module 4551 is further configured to present, in the video editing interface, an accuracy input box and a corresponding determination function item; receiving a second display precision input in the precision input box; receiving a trigger operation aiming at the determined function item based on the second display precision, and taking the trigger operation as the precision adjustment operation.
In some embodiments, the obtaining module 4551 is further configured to present, in the video editing interface, a precision adjustment control for adjusting the first display precision; and receiving the precision adjusting operation based on the precision adjusting control.
In some embodiments, the image processing device 455 further comprises: a slide processing module configured to receive a slide operation for a frame image displayed on the time axis; sliding out the frame images in the frame image sequence along the sliding direction of the sliding operation along with the execution of the sliding operation, and determining a first playing time point corresponding to a target image display position needing frame image filling according to a third display precision; the third display precision is obtained after the first display precision is adjusted; adjusting a first playing time point corresponding to the target image display position to obtain a second playing time point corresponding to each target image display position; and acquiring frame images corresponding to the second playing time points in the video to be edited, and filling the acquired frame images to corresponding target image display positions for displaying.
In some embodiments, the adjusting module 4552 is further configured to obtain a normalized precision corresponding to the playing time point, where the normalized precision is used to indicate a time interval between adjacent target time points; and normalizing the playing time points corresponding to the image display positions based on the normalization precision to obtain target playing time points corresponding to the image display positions.
In some embodiments, the image processing device 455 further comprises: the setting module is used for presenting a setting interface corresponding to the normalization precision and presenting a normalization precision setting control in the setting interface; and receiving the set normalization precision based on the normalization precision setting control.
In some embodiments, the determining module 4553 is further configured to search, in an image cache pool for caching frame images, a frame image corresponding to each of the target playing time points; when the frame image corresponding to the target playing time point exists in the image cache pool, acquiring a corresponding frame image from the image cache pool; and when the frame image corresponding to the target playing time point does not exist in the image cache pool, intercepting the frame image corresponding to the target playing time point in the video to be edited, and caching the frame image into the image cache pool.
In some embodiments, the filling module 4554 is further configured to obtain a mapping relationship between the playing time point and the target playing time point; respectively determining image display positions corresponding to the target playing time points on the time axis based on the mapping relation; and filling the acquired frame image to the corresponding image display position for display based on the target playing time point.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the image processing method in the video editing described above in the embodiment of the present application.
Embodiments of the present application provide a computer-readable storage medium storing executable instructions, which when executed by a processor, will cause the processor to perform the methods provided by embodiments of the present application, for example, the image processing method in video editing as illustrated in fig. 3, 14, 15, and 17. Note that the computer includes various computing devices including a terminal device and a server.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
In summary, the following technical effects can be achieved through the embodiments of the present application:
1) When the video to be edited is subjected to screenshot by using a normalization technology, normalizing the time point of the screenshot request, reducing the screenshot request of the screenshot control, and improving the screenshot speed;
2) And caching the generated screenshot on the time axis control by using a caching technology, and searching the screenshot from the cache when a new screenshot request is available so as to improve the screenshot speed.
The above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims (17)

1. An image processing method in video editing, the method comprising:
responding to an image acquisition instruction aiming at a frame image in a video to be edited, and acquiring playing time points corresponding to image display positions on a time axis in a video editing interface;
the video editing device comprises a plurality of image display bits and a plurality of video editing units, wherein the image display bits are used for displaying frame images of corresponding playing time points in the video to be edited so as to form a frame image sequence;
adjusting the playing time points corresponding to the image display positions to obtain target playing time points corresponding to the image display positions; wherein, the time interval of the adjacent target playing time points is greater than the time interval of the adjacent playing time points;
acquiring frame images corresponding to each target playing time point in the video to be edited;
and filling the acquired frame images to corresponding image display positions on the time axis for display.
2. The method of claim 1, further comprising:
presenting a video import function item for importing the video to be edited in the video editing interface;
presenting a video selection page in response to a trigger operation for the video import function item;
triggering the image acquisition instruction in response to the selection operation aiming at the video to be edited based on the video selection page;
the image acquisition instruction is used for indicating that a target number of frame images are acquired from the first frame image in the video to be edited, and the target number is the same as the number of the image display bits.
3. The method according to claim 2, wherein the obtaining of the playing time point corresponding to each image display position on the time axis in the video editing interface comprises:
acquiring default display precision corresponding to the frame image sequence display of the time axis, wherein the display precision is used for indicating the video playing time corresponding to each image display position;
and determining the playing time point corresponding to each image display position on the time axis according to the default display precision.
4. The method according to claim 3, wherein the obtaining of the frame image corresponding to each of the target playing time points in the video to be edited includes:
and intercepting frame images corresponding to the target playing time points in the video to be edited based on the target playing time points.
5. The method of claim 1, further comprising:
presenting the time axis in the video editing interface, and displaying the frame image sequence of the video to be edited by adopting first display precision through a plurality of image display positions in the time axis;
the first display precision is used for indicating that the video playing time length corresponding to each image display position is a target time length;
triggering the image acquisition instruction in response to a precision adjustment operation for adjusting a size of the first presentation precision.
6. The method of claim 5, further comprising:
and receiving a scaling operation aiming at the frame images in the frame image sequence, and taking the scaling operation as the precision adjustment operation.
7. The method of claim 5, further comprising:
presenting an accuracy input box and a corresponding determination function item in the video editing interface;
receiving a second display precision input in the precision input box;
receiving a trigger operation aiming at the determined function item based on the second display precision, and taking the trigger operation as the precision adjustment operation.
8. The method of claim 5, further comprising:
presenting, in the video editing interface, a precision adjustment control for adjusting the first display precision;
and receiving the precision adjusting operation based on the precision adjusting control.
9. The method according to claim 5, wherein after the filling the acquired frame images into the corresponding image display bits on the time axis for display, the method further comprises:
receiving a slide operation for a frame image shown by the time axis;
sliding out the frame images in the frame image sequence along the sliding direction of the sliding operation along with the execution of the sliding operation, and determining a first playing time point corresponding to a target image display position needing frame image filling according to a third display precision; the third display precision is obtained by adjusting the first display precision;
adjusting a first playing time point corresponding to the target image display position to obtain a second playing time point corresponding to each target image display position;
and acquiring frame images corresponding to the second playing time points in the video to be edited, and filling the acquired frame images to corresponding target image display positions for displaying.
10. The method according to claim 5, wherein the obtaining of the frame image corresponding to each of the target playing time points in the video to be edited includes:
searching frame images corresponding to each target playing time point in an image cache pool for caching the frame images;
when the frame image corresponding to the target playing time point exists in the image cache pool, acquiring a corresponding frame image from the image cache pool;
and when the frame image corresponding to the target playing time point does not exist in the image cache pool, intercepting the frame image corresponding to the target playing time point in the video to be edited, and caching the frame image into the image cache pool.
11. The method of claim 1, wherein the adjusting the playing time points corresponding to the plurality of image display bits to obtain the target playing time point corresponding to each image display bit comprises:
acquiring the normalization precision corresponding to the playing time point, wherein the normalization precision is used for indicating the time interval between the adjacent target time points;
and normalizing the playing time points corresponding to the image display positions based on the normalization precision to obtain target playing time points corresponding to the image display positions.
12. The method of claim 11, further comprising:
presenting a setting interface corresponding to the normalization precision, and presenting a normalization precision setting control in the setting interface;
and receiving the set normalization precision based on the normalization precision setting control.
13. The method according to claim 1, wherein the filling the acquired frame images into corresponding image display bits on the time axis for display comprises:
acquiring a mapping relation between the playing time point and the target playing time point;
respectively determining image display positions corresponding to the target playing time points on the time axis based on the mapping relation;
and filling the acquired frame image to the corresponding image display position for display based on the target playing time point.
14. An image processing method in video editing, the method comprising:
displaying a time axis corresponding to a video to be edited in a video editing interface;
displaying a plurality of frame images of the video to be edited in the time axis, the plurality of frame images constituting a frame image sequence;
updating the frame images shown in the time axis in response to an image update instruction for the frame images shown in the time axis;
and the target playing time point corresponding to the frame image in the updated time axis is obtained by adjusting the playing time point corresponding to each frame image in the frame image sequence, and the time interval of the adjacent target playing time points is greater than that of the adjacent playing time points.
15. An image processing apparatus in video editing, characterized in that the apparatus comprises:
the acquisition module is used for responding to an image acquisition instruction aiming at a frame image in a video to be edited and acquiring a playing time point corresponding to each image display position on a time axis in a video editing interface;
the video editing device comprises a video to be edited, a plurality of image display bits and a plurality of image display bits, wherein the image display bits are in a plurality and are used for displaying frame images of corresponding playing time points in the video to be edited so as to form a frame image sequence;
the adjusting module is used for adjusting the playing time points corresponding to the image display positions to obtain target playing time points corresponding to the image display positions; wherein, the time interval of the adjacent target playing time points is greater than that of the adjacent playing time points;
the determining module is used for acquiring frame images corresponding to each target playing time point in the video to be edited;
and the filling module is used for filling the acquired frame images into corresponding image display positions on the time axis for display.
16. An electronic device, comprising:
a memory for storing executable instructions;
a processor for implementing the image processing method in video editing according to any one of claims 1 to 14 when executing the executable instructions stored in the memory.
17. A computer-readable storage medium having stored thereon executable instructions for causing a processor to perform the method of image processing in video editing according to any one of claims 1 to 14 when executed.
CN202110949471.7A 2021-08-18 2021-08-18 Image processing method and device in video editing, electronic equipment and storage medium Pending CN115942036A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110949471.7A CN115942036A (en) 2021-08-18 2021-08-18 Image processing method and device in video editing, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110949471.7A CN115942036A (en) 2021-08-18 2021-08-18 Image processing method and device in video editing, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115942036A true CN115942036A (en) 2023-04-07

Family

ID=86699394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110949471.7A Pending CN115942036A (en) 2021-08-18 2021-08-18 Image processing method and device in video editing, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115942036A (en)

Similar Documents

Publication Publication Date Title
US11113448B2 (en) Presenting views of an electronic document
US9135228B2 (en) Presentation of document history in a web browsing application
RU2618910C2 (en) Method and device for displaying information
US8386955B1 (en) User-optimized content for web browsing windows
US20130151937A1 (en) Selective image loading in mobile browsers
US20130019159A1 (en) Mobile web browser for pre-loading web pages
CN104981800A (en) Delivery and display of page previews during page retrieval events
US20130212534A1 (en) Expanding thumbnail with metadata overlay
US20150106723A1 (en) Tools for locating, curating, editing, and using content of an online library
US20140245196A1 (en) User interface generation and preview
US10735793B1 (en) Recording and playing back image variations
US12008388B2 (en) Data transfers from memory to manage graphical output latency
US20150193117A1 (en) Changing Icons for a Web Page
CN110249324B (en) Maintaining session identifiers for content selection across multiple web pages
US20180356950A1 (en) System and method for application navigation
US11403653B2 (en) Distributing electronic surveys via third-party content
EP4080507A1 (en) Method and apparatus for editing object, electronic device and storage medium
WO2024011899A1 (en) Widget loading method and apparatus, device, and storage medium
US9824151B2 (en) Providing a portion of requested data based upon historical user interaction with the data
CN111831815A (en) Questionnaire display control method and device, storage medium and electronic equipment
CN112395027A (en) Widget interface generation method and device, storage medium and electronic equipment
KR102353797B1 (en) Method and system for suppoting content editing based on real time generation of synthesized sound for video content
US9304830B1 (en) Fragment-based multi-threaded data processing
US20150193393A1 (en) Dynamic Display of Web Content
CN115942036A (en) Image processing method and device in video editing, 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40085629

Country of ref document: HK