CN112291627A - Video editing method and device, mobile terminal and storage medium - Google Patents

Video editing method and device, mobile terminal and storage medium Download PDF

Info

Publication number
CN112291627A
CN112291627A CN202011085438.6A CN202011085438A CN112291627A CN 112291627 A CN112291627 A CN 112291627A CN 202011085438 A CN202011085438 A CN 202011085438A CN 112291627 A CN112291627 A CN 112291627A
Authority
CN
China
Prior art keywords
video data
resolution
original
proxy
image data
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.)
Granted
Application number
CN202011085438.6A
Other languages
Chinese (zh)
Other versions
CN112291627B (en
Inventor
张硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bigo Technology Singapore Pte Ltd
Original Assignee
Guangzhou Baiguoyuan Information Technology 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 Guangzhou Baiguoyuan Information Technology Co Ltd filed Critical Guangzhou Baiguoyuan Information Technology Co Ltd
Priority to CN202011085438.6A priority Critical patent/CN112291627B/en
Publication of CN112291627A publication Critical patent/CN112291627A/en
Application granted granted Critical
Publication of CN112291627B publication Critical patent/CN112291627B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47217End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects

Abstract

The embodiment of the invention provides a video editing method, a video editing device, a mobile terminal and a storage medium, which are applied to the mobile terminal, wherein the method comprises the following steps: acquiring original video data; transcoding original video data into proxy video data adapted to the mobile terminal; receiving an editing operation; previewing the editing operation on the proxy video data; and if the confirmation operation aiming at the editing operation is received, processing the original video data according to the editing operation to generate the target video data. The resolution of original video data can be reduced through transcoding operation, proxy video data with lower resolution is obtained, and the effect of editing operation is previewed on the proxy video data, so that the resource occupation of a mobile terminal can be reduced, and the optimal previewing effect can be obtained when a user edits; after the preview effect is confirmed, the actual editing operation is completed on the original video data, the original resolution ratio is guaranteed, the whole technical framework is simple and clear, and the application universality and expandability in the mobile terminal are strong.

Description

Video editing method and device, mobile terminal and storage medium
Technical Field
The embodiment of the invention relates to the technical field of video editing, in particular to a video editing method, a video editing device, a mobile terminal and a storage medium.
Background
With the development of mobile terminals, the hardware quality and processing capability of the mobile terminals are continuously upgraded, and intelligent terminals have been widely used in work, life and study of people.
The current mobile terminal is equipped with a camera with higher resolution, and some cameras can even support recording high-definition video with 4K resolution (3840 × 2160 pixels).
In scenes such as making short videos, users can use the mobile terminal to import video data for editing, such as cutting, adding special effects, and the like, and the editing of the video data occupies a large amount of computing resources.
Under the condition of limited computing resources, transcoding operation is carried out on imported video data at present, the resolution ratio of the video data is reduced, if a user finishes editing, the transcoded video data is edited, and due to the fact that the video data are transcoded, the resolution ratio of the edited video data is generally low, quality loss is serious, and user experience is affected.
Disclosure of Invention
The embodiment of the invention provides a video editing method and device, a mobile terminal and a storage medium, and aims to solve the problem of poor quality of video data edited in the mobile terminal.
In a first aspect, an embodiment of the present invention provides a video editing method, which is applied to a mobile terminal, and the method includes:
acquiring original video data;
transcoding the original video data into proxy video data adapted to the mobile terminal;
receiving an editing operation;
previewing the editing operation on the proxy video data;
and if the confirmation operation aiming at the editing operation is received, processing the original video data according to the editing operation to generate target video data.
In a second aspect, an embodiment of the present invention further provides a video editing apparatus, which is applied to a mobile terminal, where the apparatus includes:
the original video data acquisition module is used for acquiring original video data;
the proxy video data acquisition module is used for transcoding the original video data into proxy video data adaptive to the mobile terminal;
the editing operation receiving module is used for receiving editing operation;
an editing operation preview module, configured to preview the editing operation on the proxy video data;
and the target video data generation module is used for processing the original video data according to the editing operation to generate target video data if the confirmation operation aiming at the editing operation is received.
In a third aspect, an embodiment of the present invention further provides a mobile terminal, where the mobile terminal includes:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the video editing method of the first aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the video editing method according to the first aspect.
In this embodiment, the original video data is obtained and transcoded into proxy video data adapted to the mobile terminal, because the original video data is usually obtained by a camera, the resolution ratio of the original video data is generally higher, the resolution ratio can be reduced by transcoding operation, that is, the resolution ratio of the proxy video data is generally lower, and the adaptation condition with the mobile terminal is considered during transcoding, the transcoded proxy video data can be clearly displayed on the screen of the mobile terminal, which not only can reduce the resource occupation of the mobile terminal, but also can ensure that a user can obtain the best preview effect during editing, solve the problems of limited processing performance and memory in the mobile terminal, receive editing operation, preview editing operation on the proxy video data, can reduce the consumption of computing resources, ensure the preview smoothness, realize the quick display of the video editing effect, and improve the user experience, if the confirmation operation aiming at the editing operation is received, the original video data is processed according to the editing operation to generate the target video data, the actual editing operation is completed on the original video data under the condition that the original resolution of the original video data is maintained, the original data information is reserved, the target video data with high resolution is manufactured, the requirement of a user for watching a high-definition video is met, and the user experience is improved.
Drawings
Fig. 1 is a flowchart of a video editing method according to an embodiment of the present invention;
fig. 2A is a schematic diagram of a video editing page applied to a mobile terminal according to an embodiment of the present invention;
fig. 2B is a schematic diagram of a video editing page applied to a mobile terminal according to a second embodiment of the present invention;
fig. 3A is a flowchart of a video editing method according to a second embodiment of the present invention;
fig. 3B is a schematic diagram of generating target video data according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a video editing apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a mobile terminal according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
Example one
Fig. 1 is a flowchart of a video editing method according to an embodiment of the present invention, where the present embodiment is applicable to a mobile terminal to perform preview editing operation on proxy video data and map the editing operation to a situation of original video data, and the method may be executed by a video editing apparatus, and the video editing apparatus may be implemented by software and/or hardware, and may be configured in the mobile terminal, for example, a mobile phone, a PDA (Personal Digital Assistant), a PAD (Portable Android Device, a tablet computer), an intelligent wearable Device (such as smart glasses, a smart watch, and the like), and the method specifically includes the following steps:
and S101, acquiring original video data.
In this embodiment, the mobile terminal is installed with operating systems such as Android (Android), iOS, windows, and the like, and the operating systems support running applications with editable video data, which may include professional video editing applications, and may also include applications with a video editing function, such as short video applications, live broadcast applications, and instant messaging tools.
Video data (video) has a plurality of frames of continuous image data, and when the continuous image data changes by more than 24 frames per second, human eyes cannot distinguish a single static picture according to the principle of persistence of vision, and the video data looks like a smooth continuous visual effect.
The format and form of the video data are different for different service scenarios, which is not limited in this embodiment.
Further, the format of the Video data may include MPEG (Moving Pictures Experts Group), RMVB (real media Variable Bitrate ), AVI (Audio Video Interleaved format), and the like.
The form of the video data may include short videos, live videos, movies, television shows, and the like.
In this embodiment, there are many ways to obtain original video data on the mobile terminal, for example, stored video data may be selected from a local video library of the mobile terminal as the original video data, or live video data is shot by using the mobile terminal as the original video data, for example, video data may be downloaded from a short video application or video playing software to a specified directory, or video data may be downloaded from a material library of video editing software, and video data obtained from different network channels may be used as the original video data to be edited, and the like, which is not limited in this embodiment.
S102, transcoding the original video data into proxy video data adapted to the mobile terminal.
Video Transcoding (Video Transcoding) refers to converting a Video code stream that has been compression-coded into another Video code stream to adapt to different network bandwidths, different terminal processing capabilities and different user requirements. Transcoding is a process of decoding first and then encoding, and thus, the code streams before and after conversion may or may not conform to the same video encoding standard.
Aiming at different service requirements, different transcoding schemes can be designed, so that the complexity of the original video data is reduced under the condition of multiplexing the information contained in the original video data as much as possible.
In this embodiment, information related to transcoding, such as an operating system, a screen size, a display resolution, a UI (User Interface) design rule, an encoding/decoding rule, a communication protocol, and the like of the mobile terminal, is queried, and according to requirements of the information related to transcoding, original video data is transcoded into proxy video data adapted to the mobile terminal.
The resolution ratio of the original video data is generally higher, and the resolution ratio can be reduced through transcoding operation, namely the resolution ratio of the proxy video data is generally lower, so that the response time of the proxy video data during preview can be ensured, and the best preview effect can be obtained during editing.
In specific implementation, the original video data can be decoded to obtain multi-frame image data, the image data is transcoded to target image data adapted to the mobile terminal, and the target image data is encoded again to obtain proxy video data.
The original video data are transcoded into the proxy video data adaptive to the mobile terminal, so that the optimal preview effect of the video data during editing can be ensured.
And S103, receiving an editing operation.
In this embodiment, the editing operation for proxy video data includes cutting, intercepting, rotating, mirroring, splitting, changing speed, adding a filter, adding a text, adding a special effect, adding an animation, setting a background, setting a transition, and the like, and the specific content of the editing operation is not limited in any way in the embodiment of the present invention.
In specific implementation, various styles of controls can be provided for a UI interface responsible for editing videos on a mobile terminal, and if a user triggers the controls through operations such as clicking, long-time pressing, dragging and the like, editing operations corresponding to the controls are received.
As shown in fig. 2A, a video editing page 200 is provided in the mobile terminal, and the video editing page 200 includes a screen preview area 210, a timeline 220, a video data display area 230, an editing operation selection area 240, a video data import icon 250, and a rendering export icon 260. The video data import icon 250 may be used to import original video data, the video data display area 230 is formed by arranging a plurality of frames of thumbnail image data (a plurality of frame thumbnail images) according to a timeline, and may be used to display transcoded proxy video data, the time progress bar 220 may present the time length of the proxy video data, the picture preview area 210 is used to display a certain frame of image data in the proxy video data, for example, when a cursor on the time progress bar 220 stays at a certain time point in the proxy video data, current image data corresponding to the time point may be displayed in the picture preview area 210, and the picture preview area 210 may display an effect that the current image data receives any editing operation.
In this embodiment, an editing operation sent by a user through a finger or a stylus in the mobile terminal is received, and the editing operation can be arbitrarily selected according to the requirement of the user. For example, as shown in fig. 2A, there are a plurality of icons in the editing operation selection area 240, and when the user clicks the "filter" icon in the editing operation selection area 240 with a finger, the current editing operation selection area 240 pops up a filter style selection floating layer, and the user can select any filter style in the filter style selection floating layer according to his own needs to meet the needs.
And S104, previewing and editing operation on the proxy video data.
In this embodiment, the proxy video data includes multiple frames of proxy image data, the screen preview area 210 shows a single frame of proxy image data extracted from the proxy video data, the proxy image data can be resized to a size corresponding to the screen preview area 210, and the current proxy image data is mapped in the screen preview area 210.
In a preview mode, after the mobile terminal receives a current editing selection instruction sent by a user through a finger or a touch pen, the current editing operation is previewed on proxy image data of proxy video data.
As shown in fig. 2A, the editing operation selection area 240 provides a plurality of editing operations, and each time one type of editing operation is selected, a floating page of selection related to specific content and specific mode of the editing operation is popped up for the editing operation, and under the floating page of selection of the current editing operation, the detailed content of the editing operation may be further determined, for example, clicking a "filter" icon, popping up a filter style selection floating layer, selecting a "freshness" mode in the floating layer, and attaching a layer of a "freshness" filter mode to the current proxy image data displayed in the screen preview area 210, so as to present a filter effect in the "freshness" mode.
In another preview mode, in the current editing state, a play instruction clicked by a user is received, proxy video data receiving editing operation is played, and the effect of the editing operation is previewed. The playing mode may be from the beginning, from the time selected by the user, or in a cyclic manner.
Note that the editing operation does not directly act on the proxy video data, but the proxy video data is processed in another manner, so that the same or similar effect as the editing operation is obtained. For example, performing a cut operation on the proxy video data, that is, when a preview is played, only playing the video content of which the cut operation acts from a starting point a to an end point B of the proxy video data, and shielding the video content before the point a and after the point B; for another example, an element is added to the proxy video data, that is, a layer (view or textview) is covered on the display screen of the proxy video data, and if the element acts on the entire play time length of the proxy video data, the layer is displayed from the start time of the play to the end time of the play when the proxy video data is subjected to a play preview.
And S105, if the confirmation operation aiming at the editing operation is received, processing the original video data according to the editing operation to generate target video data.
In this embodiment, the editing operation includes a first parameter related to transcoding and a second parameter unrelated to transcoding, if a confirmation operation for the editing operation is received, it is preferentially determined whether the editing operation is the first parameter or the second parameter, if the editing operation is the first parameter related to transcoding, the proxy video data needs to be mapped to the original video data, and the mapping needs to ensure that the effects in the two video data are the same or similar, and then the original video data can be edited; and if the editing operation is a second parameter which is irrelevant to transcoding, directly applying the second parameter to the original video data.
In the mobile terminal, a user previews the effect of the editing operation on the proxy video data, and when the user considers that the effect of the current editing operation on the proxy video data is feasible, a confirmation control on a UI (user interface) is triggered, and a confirmation signal aiming at the current editing operation is sent to the mobile terminal.
If the mobile terminal receives the confirmation operation of the user for the current editing operation, the editing information of the current editing operation is stored, and each confirmation operation corresponds to one time of storing the editing information.
When the user confirms the final preview effect of the proxy video data, the edit information of all confirmed edit operations has been stored in the local information base. At the moment, original video data corresponding to proxy video data of all editing operations are inquired and received, if only one original video data exists, all editing information is read from a local information base to process the original video data, and target video data are generated; if a plurality of original video data exist, reading the corresponding editing information from the local information base according to the import sequence of the original video data in the video editing page 200 and time sequentially, executing corresponding editing operation on the original video data according to the confirmed editing information, and splicing each section of edited original video data according to time to generate target video data.
The editing information includes, among others, an editing type (e.g., adding text, adding a sticker, etc.), an editing material (e.g., a background material selected at the time of background setting, a filter pattern selected at the time of filter addition, etc.), time information, position information, and the like. The time information comprises a time point of correspondingly processing the video data in each editing operation, and the time point is used for marking correspondingly processed single-frame image data in the video data; the position information includes a pixel position of the preview editing operation in the image data.
Referring to fig. 2A, when the user clicks the rendering export icon 260 in the video editing page 200, it indicates that the mobile terminal receives a confirmation operation of the user for the current editing operation, and at this time, the system background processes the original video data according to the editing operation to generate the target video data.
In this embodiment, after the target video data is generated, the target video data is exported to a specified directory, and if the export of the target video data is successful, the proxy video data is deleted.
In this embodiment, original video data is obtained and transcoded into proxy video data adapted to a mobile terminal, because the original video data is usually acquired by a camera, the resolution ratio of the original video data is generally higher, and the resolution ratio can be reduced by transcoding operation, that is, the resolution ratio of the proxy video data is generally lower, and the adaptation condition with the mobile terminal is considered during transcoding, the transcoded proxy video data can be clearly displayed on the screen of the mobile terminal, which not only can reduce the resource occupation of the mobile terminal, but also can ensure that a user can obtain the best preview effect during editing, solve the problems of limited processing performance and memory in the mobile terminal, receive editing operation, preview editing operation on the proxy video data, can reduce the consumption of computing resources, ensure smooth preview, realize quick display of video editing effect, and improve user experience, if the confirmation operation aiming at the editing operation is received, the original video data are processed according to the editing operation to generate the target video data, the actual editing operation is completed on the original video data, the original data information is reserved, the target video data with high resolution are manufactured, the requirement of a user for watching high-definition videos is met, the user experience is improved, meanwhile, the whole technical framework is simple and clear, the universality in application in the mobile terminal is high, and the expandability is high.
Example two
Fig. 3A is a flowchart of a video editing method according to a second embodiment of the present invention, where the present embodiment further details operations of transcoding original video data, previewing an editing operation on proxy video data, and performing an editing operation on the original video data based on the foregoing embodiment, and the method specifically includes the following steps:
s301, acquiring original video data.
In this embodiment, the raw video data may be captured by a camera or other shooting device of the mobile terminal.
As an example, as shown in fig. 2B, in the video editing page 200, a trigger signal of the video data import icon 250 is received, a storage list of original video data is popped up, the storage list includes a local photo video library of the mobile terminal, a selection confirmation signal of one or more original video data is received, and the selected original video data is imported into the video editing page 200 for video editing processing.
It should be noted that the video data display area 230 in the video editing page 200 is not limited to a display track with only one piece of video data, and in general, the display track occupied by the first imported original video data may be referred to as a main track, and on the basis of the main track, the original video data may be added again on the basis of the imported original video data according to the user requirement, or, in an editing state, one or more pieces of original video data may be imported again as an editing material and an effect display (for example, a "picture-in-picture" effect commonly used in video editing) of the first imported original video data, and the display track occupied by the second imported original video data in the editing state may be referred to as a sub track.
In this embodiment, the main track 231 and the sub track 232 are formed by arranging thumbnails of a plurality of frame pictures according to a time line, and the main track 231 and the sub track 232 display proxy video data obtained by transcoding original video data in an importing process.
As shown in fig. 2B, the video data display area 230 includes a main track 231 and a sub-track 232, wherein both the frame 211 in the main track 231 and the frame 212 in the sub-track 232 are presented in the picture preview area 210 according to the time sequence of video playing, both the frame 211 and the frame 212 can receive any editing operation provided in the editing operation selection area 240, for example, the size of each of the frame 211 and the frame 212 can be adjusted by the editing operation, and the frame 212 in the sub-track 232 can be a special effect picture in the frame 211 of the main track 231, but the size of any frame cannot exceed the fixed size of the picture preview area 210.
S302, determining the resolution of the adaptive mobile terminal as the terminal resolution.
Resolution is a parameter used to measure the number of pixels in image data.
In this embodiment, adapting the resolution of the mobile terminal refers to referring to the visual range of the mobile terminal, and the resolutions equal to or smaller than the visual range are all included in the adaptation scope, where the visual range may be the range of the screen resolution of the mobile terminal itself or a UI interface used by the mobile terminal to display the original video data; the resolution ratio adaptive to the mobile terminal is determined, so that the video data editing and previewing operations of the user can be ensured to be in the visual interface of the mobile terminal, and the effect display of the editing operations cannot be influenced.
In a specific implementation, a first interface used by the mobile terminal to display the original video data may be detected, and the resolution of the first interface is set to be adapted to the resolution of the mobile terminal, so as to obtain the terminal resolution. The first interface is a UI interface used for the mobile terminal to preview and display original video data, and the resolution of the UI interface can be obtained by obtaining the screen width and height and the screen resolution of the mobile terminal and calculating according to the UI design proportion. The screen resolution, i.e. the number of pixels displayed on the screen, for example, a screen resolution of 160 × 128 means that the number of horizontal pixels is 160, the number of vertical pixels is 128, and the higher the resolution is, the larger the number of pixels is, the more precise the image data sensed by the screen is.
Or, the model of the mobile terminal can be inquired to obtain the terminal resolution; if the model is the first model, inquiring the resolution set for the first model, and classifying mobile terminals with 2GB or less than 2GB existing in the equipment as the terminal resolution as the first model; if the model is the second model, detecting the second model for displaying a second interface in the original video data, setting the resolution of the second interface as the terminal resolution, and classifying the mobile terminal with the resolution of more than 2GB in the equipment as the second model. It should be noted that the present embodiment does not limit the manner of acquiring the resolution of the terminal at all.
And determining the resolution of the video data adaptively displayed by the mobile terminal as the terminal resolution, so that the best preview effect of the video data under the mobile terminal can be ensured. The terminal resolution is implanted into the mobile terminal in advance, and the terminal resolution is obtained by inquiring the model of the mobile terminal, so that the obtaining efficiency of the terminal resolution can be improved, and accurate obtaining is realized.
And S303, adjusting the resolution of the terminal to be adapted to the resolution of the original video data to be used as the target resolution.
The terminal resolution comprises a terminal horizontal resolution and a terminal vertical resolution, and the target resolution comprises a target horizontal resolution and a target vertical resolution.
The resolution of the video data refers to the number of pixels included in a certain area of the video data, for example, the resolution of the video data is 320 × 180, which refers to the number of effective pixels of the video in the horizontal direction (horizontal direction) and the vertical direction (vertical direction).
In the present embodiment, the resolution of the original video data is read as the original resolution, and the original resolution includes the original horizontal resolution, the original vertical resolution.
In one specific example, the original horizontal resolution is set to VWidth, the original vertical resolution is set to VHeight, the terminal horizontal resolution is set to MaxWidth, the terminal vertical resolution is set to MaxHeight, the target horizontal resolution is set to width, and the target vertical resolution is set to height.
And respectively comparing the original horizontal resolution and the original vertical resolution with the terminal horizontal resolution and the terminal vertical resolution according to a preset screening condition, and determining the target horizontal resolution and the target vertical resolution.
In this example, if the original horizontal resolution is smaller than the terminal horizontal resolution and the original vertical resolution is smaller than the terminal vertical resolution, it is determined that the original horizontal resolution is the target horizontal resolution and the original vertical resolution is the target vertical resolution; that is, when VWidth < maxfidth and VHeight < MaxHeight, width ═ VWidth and height ═ VHeight.
If the original horizontal resolution is larger than the terminal horizontal resolution and the original vertical resolution is smaller than the terminal vertical resolution, calculating a first ratio of the terminal horizontal resolution to the original horizontal resolution, taking the product of the first ratio and the original vertical resolution as a target vertical resolution, and taking the terminal horizontal resolution as the target horizontal resolution; that is, when VWidth > MaxWidth and vheigen < maxhight, width is MaxWidth and height is vheigen (MaxWidth/VWidth).
If the original horizontal resolution is smaller than the terminal horizontal resolution and the original vertical resolution is larger than the terminal vertical resolution, calculating a second ratio of the terminal vertical resolution to the original vertical resolution, taking the product of the second ratio and the original horizontal resolution as a target horizontal resolution, and taking the terminal vertical resolution as a target vertical resolution; that is, when VWidth < maxfidth and VHeight > maxhight, width ═ VWidth (maxhight/VHeight) and height ═ maxhight.
The resolution ratio of the original video data is compared with the current terminal resolution ratio confirmed by the mobile terminal, the best target resolution ratio adaptive to the mobile terminal can be quickly obtained, moreover, the calculation process is simple and convenient, the memory occupied by reading and accessing is small, the consumption of calculation resources is small, and the operation efficiency is high.
S304, transcoding the original video data to a target resolution ratio to obtain proxy video data adaptive to the mobile terminal.
In this embodiment, for original video data that needs to be imported into the video editing page 200 for editing, a target resolution of the original video data is determined, and in the process of importing the original video data, the original video data is transcoded to the target resolution, so as to obtain proxy video data adapted to the mobile terminal.
The video transcoding is to convert a video code stream which has been compressed and encoded into another video code stream so as to adapt to different network bandwidths, different terminal processing capabilities and different user requirements. Through transcoding operation, the problems of format conversion, bit rate reduction, time/spatial resolution reduction and the like existing in video editing and previewing in the mobile terminal can be solved.
In a specific implementation, video encoding and decoding in the transcoding task may be handled by multiple DSPs (Digital Signal Processing). Wherein transcoding the original video data to the target resolution comprises: one DSP decodes the original video data to generate reconstructed video frames, which are transmitted to the other DSP via the serial interface, and the other DSP encodes the reconstructed video frames to a target format, which includes a target resolution.
S305, receiving an editing operation.
After proxy video data adapted to the mobile terminal is obtained, an editing operation of the user in the video editing page 200 is received.
For example, the editing operation includes clipping proxy video data, splicing a plurality of pieces of proxy video data, setting a transition special effect at a joint of two pieces of proxy video data, adding a field special effect at the end of the current piece of proxy video data, and the like.
Since video data is composed of several frames of image data, most of editing operations for video data are to process image data in video data. The proxy video data includes proxy image data.
In a specific implementation manner, as shown in fig. 2B, when the cursor 221 in the time progress bar 220 moves to a certain time point in the proxy video data, it is determined that the proxy image data corresponding to the current time point is the image data to be edited, and in an editing state, an editing operation on the image data is received.
In another specific implementation manner, the confirmation cursor 221 selects the proxy video data displayed in the main track 231, receives a trigger signal of the video data import icon 250, enters a local photo video library of the mobile terminal, receives a confirmation addition instruction of new original video data, transcodes the new original video data, confirms the end position of the proxy video data where the current cursor 221 is located in the main track 231, and imports the proxy video data corresponding to the new original video data at the end position.
S306, extracting proxy image data from the proxy video data.
In the present embodiment, the preview editing operation on the proxy video data may be a preview editing operation on single-frame or multi-frame proxy image data, and therefore, it is necessary to extract proxy image data from the proxy video data. There are many methods for extracting image data, for example, an image extraction program may be written at a preset playback frame rate in the proxy video data, and the image extraction program may be called to extract the proxy image data from the proxy video data, or an image extraction algorithm in an OpenCV algorithm library may be used to extract the proxy image data from the proxy video data.
And S307, determining the proxy image data to be edited currently.
In the present embodiment, as shown in fig. 2B, a first time axis of proxy video data is displayed in the timeline 220, a time currently indicated on the time axis by the cursor 221 is determined, and proxy image data at the time is extracted as proxy image data to be edited. The proxy image data to be edited is a frame displayed in the image preview area 210.
And S308, displaying the proxy image data on an editing interface.
In this embodiment, the proxy image data is scaled to a size adapted to the mobile terminal, specifically, the size of the proxy image data may be scaled to a degree adapted to the size of a UI interface of a video preview area in a video editing interface of the mobile terminal by referring to the size of the UI interface; and if the zooming is finished, displaying the proxy image data on the editing interface.
S309, preview edit operation is performed on the proxy image data.
In this embodiment, after confirming that the preview confirmation instruction of the current editing operation is received, the proxy image data of the currently received editing operation is displayed in the screen preview area 210, and the static effect of the editing operation or the dynamic effect of the editing operation can be previewed on the proxy image data.
In a specific implementation manner, the screen preview area 210 may include a display floating layer, confirm editing information of the editing operation, store all editing information in a local information base, after receiving a preview confirmation instruction, sequentially read the editing information according to a time sequence, perform an editing operation matched with the current editing information on the display floating layer, confirm that the display floating layer completes all editing operations, and overlay the display floating layer on the proxy image data displayed in the screen preview area 210 to perform effect preview of the editing operation.
S310, determining a first time axis of the proxy video data.
In this embodiment, the video duration of the proxy video data is queried, and the start time and the end time of the proxy video data during playing are determined, so as to determine the time axis of the proxy video data as a first time axis; alternatively, the total duration displayed on the timeline 220 in the video editing interface 200 is read to confirm the time axis of the proxy video data in the current main track 231 as the first time axis. If multiple segments of proxy video data exist, the time axes of the multiple segments of video data can be used for cascade connection to judge the time axis of the full video, and the full video is edited at the moment.
And S311, determining a second time axis of the original video data.
In this embodiment, the video duration of the original video data is queried, and the start time and the end time of the original video data during playing are determined, so as to determine the time axis of the original video data as the second time axis. Correspondingly, if multiple sections of proxy video data exist, original video data corresponding to the proxy video data are inquired, the multiple sections of original video data are sequentially spliced in a cascade mode according to the time sequence when the multiple sections of original video data are imported, and the total video duration of all the original video data is obtained and serves as a second time axis.
And S312, inquiring the first time of the editing operation on the first time axis.
In this embodiment, the time information in the editing information may be read from the local information base, and the first time of the editing operation on the first time axis may be queried, where the time information records the position where the cursor 221 stays in the timeline 220 each time the editing operation is received, that is, the time matched with the current editing operation.
S313, a second time corresponding to the first time is located on the second time axis.
In this embodiment, the second time corresponding to the first time may be sequentially located on the second time axis from the start time, or the second time corresponding to the first time may be located on the second time axis by using a nearest neighbor search algorithm or a cluster analysis method.
And S314, at the second time, performing editing operation on the original video data to generate target video data.
The raw video data includes raw image data and the proxy video data includes proxy image data.
In this embodiment, at the second time, a first position where the editing operation acts on the proxy image data is determined, a conversion relationship between the proxy image data and the original image data may be calculated according to a transcoding relationship of the proxy video data to the original video data (e.g., a ratio of resolutions, a normalization parameter of the original video data mapped to the proxy video data, etc.), the first position is mapped to a second position on the original image data according to the conversion relationship, and the editing operation is performed at the second position to generate the target video data.
In an example of this embodiment, at the second time, a first position where an editing operation acts on the proxy image data is determined, and since the transcoding operation is a process of decoding and re-encoding the video data, pixels of the original image data in the original video data are compressed in the transcoding process, that is, the proxy image data in the proxy video data is obtained, a resolution ratio between the original video data and the proxy video data can be obtained, the resolution ratio is used as a size ratio between the original image data and the proxy image data, and the size ratio can be used as a conversion relationship; or, the number of pixels of the original image data and the number of pixels of the proxy image data can be calculated, the ratio of the numbers of the pixels of the original image data and the proxy image data is used as a normalization parameter, the position ratio between the proxy image data and the original image data is calculated according to the normalization parameter, and the position ratio can be used as a conversion relation; or, obtaining the ratio and normalization parameter of the resolution, and reducing the editing operation related to transcoding received on the proxy image data to the actual editing operation for the original image data according to the ratio and normalization parameter of the resolution, for example, calculating the size ratio and the position relationship between the proxy image data and the original image data according to the ratio and normalization parameter of the resolution, and using the size ratio and the position relationship together as a conversion relationship; the first position is mapped to a second position on the original image data according to the conversion relation obtained by the calculation mode, and editing operation is performed at the second position to generate target video data.
In one particular implementation of the present example, at the second time, it is determined that the editing operation of the add element acts on a first location on the proxy image data, a size ratio between the proxy image data and the original image data is calculated, the first location is mapped to a second location on the original image data according to the size ratio, and the editing operation is performed at the second location to generate the target video data. For example, referring to fig. 3B, the proxy video data receives an editing operation of adding a pentagram, the pentagram 321 is added at a first position in the proxy image data 320, the pentagram 321 is reduced to the pentagram 331 according to a size ratio, and the pentagram 331 is added at a second position in the original image data.
In another specific implementation of the present example, at the second time, it is determined that the editing operation of the added element acts on a first position on the proxy image data, a position ratio between the proxy image data and the original image data is calculated, the first position is mapped to a second position on the original image data according to the position ratio, and the editing operation is performed at the second position to generate the target video data. For example, referring to fig. 3B, a first position of the pentagon 321 on the proxy image data is determined, a left margin between the first position of the pentagon 321 and the left boundary of the proxy image data 320 and an upper margin between the first position of the pentagon 321 and the upper boundary of the proxy image data 320 are counted, wherein both the left margin and the upper margin can be converted into the number of pixels from the origin of the upper left corner of the proxy image data 320, a ratio of the number of pixels in the left margin and a ratio of the number of pixels in the upper margin are used as normalization parameters, and the first position of the pentagon 321 is mapped to a second position of the pentagon 331 in the original image data 330 according to the normalization parameters.
In yet another particular implementation of the present example, at the second time, it is determined that the editing operation of the add element acts on a first location on the proxy image data, a size ratio and a location ratio between the proxy image data and the original image data are calculated, the first location is mapped to a second location on the original image data according to the size ratio and the location ratio, and the editing operation is performed at the second location to generate the target video data. For example, referring to fig. 3B, a first position of the pentagram 321 on the proxy image data is determined, the pentagram 321 in the proxy image data 320 is reduced to the pentagram 331 according to a size ratio, meanwhile, the number of pixels of the left margin of the first position of the pentagram 321 in the proxy image data 320 from the left boundary of the proxy image data 320 and the number of pixels of the upper margin from the upper boundary of the proxy image data 320 are counted, a ratio of the number of pixels in the left margin and a ratio of the number of pixels in the upper margin are used as normalization parameters, and the pentagram 331 with the adjusted size ratio is mapped to a second position of the original image data 330 according to the normalization parameters.
In the embodiment, the first time axis of the proxy video data is determined, the second time axis of the original video data is determined, the first time of the editing operation on the first time axis is inquired, the second time corresponding to the first time is positioned on the second time axis, the second time suitable for receiving the editing operation is conveniently and accurately positioned, the editing operation is executed on the original video data at the second time to generate the target video data, the effect achieved after the original video data is received and edited can be ensured to be the same as the effect of the proxy video data for receiving the previewing of the editing operation, the editing operation is reproduced according to the time sequence, and the method is simple and efficient, low in resource consumption and high in reliability.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a video editing apparatus according to a third embodiment of the present invention, where the apparatus may specifically include the following modules:
an original video data obtaining module 401, configured to obtain original video data;
a proxy video data obtaining module 402, configured to transcode the original video data into proxy video data adapted to the mobile terminal;
an editing operation receiving module 403, configured to receive an editing operation;
an editing operation preview module 404, configured to preview the editing operation on the proxy video data;
a target video data generating module 405, configured to, if a confirmation operation for the editing operation is received, process the original video data according to the editing operation to generate target video data.
In an embodiment of the present invention, the proxy video data obtaining module 402 includes:
a terminal resolution determining submodule for determining a resolution adapted to the mobile terminal as a terminal resolution;
a target resolution obtaining submodule, configured to adjust the terminal resolution to a resolution adapted to the original video data, and use the resolution as a target resolution;
and the proxy video data acquisition submodule is used for transcoding the original video data to the target resolution ratio to acquire proxy video data adaptive to the mobile terminal.
In an embodiment of the present invention, the terminal resolution determining sub-module includes:
the mobile terminal interface detection unit is used for detecting a first interface used by the mobile terminal for displaying the original video data;
a terminal resolution obtaining unit, configured to set a resolution of the first interface to a resolution adapted to the mobile terminal, so as to obtain a terminal resolution;
alternatively, the first and second electrodes may be,
the model inquiry unit is used for inquiring the model of the mobile terminal;
a first model resolution determination unit, configured to query, as a terminal resolution, a resolution set for a first model if the model is the first model;
and the second type resolution determining unit is used for detecting that the second type is used for displaying a second interface in the original video data if the type is the second type, and setting the resolution of the second interface as the terminal resolution.
In one embodiment of the present invention, the terminal resolution includes a terminal horizontal resolution and a terminal vertical resolution, and the target resolution includes a target horizontal resolution and a target vertical resolution; the target resolution acquisition sub-module includes:
an original resolution obtaining unit, configured to read a resolution of the original video data as an original resolution, where the original resolution includes an original horizontal resolution and an original vertical resolution;
a first target resolution obtaining unit, configured to determine that an original horizontal resolution is a target horizontal resolution and an original vertical resolution is a target vertical resolution if the original horizontal resolution is smaller than the terminal horizontal resolution and the original vertical resolution is smaller than the terminal vertical resolution;
a second target resolution obtaining unit, configured to calculate a first ratio between the terminal horizontal resolution and the original horizontal resolution if the original horizontal resolution is greater than the terminal horizontal resolution and the original vertical resolution is less than a terminal vertical resolution, use a product of the first ratio and the original vertical resolution as a target vertical resolution, and use the terminal horizontal resolution as a target horizontal resolution;
a third target resolution obtaining unit, configured to calculate a second ratio between the terminal vertical resolution and the original vertical resolution if the original horizontal resolution is smaller than the terminal horizontal resolution and the original vertical resolution is larger than the terminal vertical resolution, use a product of the second ratio and the original horizontal resolution as a target horizontal resolution, and use the terminal vertical resolution as a target vertical resolution.
In an embodiment of the present invention, the editing operation preview module 404 includes:
the proxy image data extraction submodule is used for extracting proxy image data from the proxy video data;
the proxy image data determining submodule is used for determining proxy image data to be edited currently;
the agent image data display submodule is used for displaying the agent image data on an editing interface;
and the editing operation preview sub-module is used for previewing the editing operation on the proxy image data.
In one embodiment of the present invention, the proxy image data determination sub-module includes:
a first time axis display unit for displaying a first time axis of the proxy video data;
a cursor determination unit for determining a time currently indicated by a cursor on the time axis;
and the proxy image data extraction unit is used for extracting the proxy image data positioned at the time as proxy image data to be edited.
In one embodiment of the present invention, the proxy image data display sub-module includes:
a size scaling unit for scaling the proxy image data to a size adapted to the mobile terminal;
and the display confirmation unit is used for displaying the proxy image data on an editing interface if the zooming is finished.
In one embodiment of the present invention, the target video data generation module 405 includes:
a first time axis determining submodule for determining a first time axis of the proxy video data;
a second time axis determining submodule for determining a second time axis of the original video data;
the first time inquiry submodule is used for inquiring the first time of the editing operation on the first time axis;
a second time positioning sub-module, configured to position a second time corresponding to the first time on the second time axis;
and the target video data generation sub-module is used for executing the editing operation on the original video data at the second time so as to generate target video data.
In one embodiment of the invention, the raw video data comprises raw image data and the proxy video data comprises proxy image data; the target video data generation submodule includes:
a first position determination unit configured to determine, at the second time, a first position at which the editing operation acts on the proxy image data;
a conversion relation calculation unit for calculating a conversion relation between the proxy image data and the original image data;
a second position determining unit for mapping the first position to a second position on the original image data according to the conversion relation;
an editing operation execution unit configured to execute the editing operation at the second position to generate target video data.
In one embodiment of the present invention, the conversion relation calculation unit includes:
a conversion relation calculating subunit, configured to calculate a size ratio and/or a position ratio between the proxy image data and the original image data;
a conversion relation determining subunit, configured to set the size ratio and/or the position ratio as a conversion relation between the proxy image data and the original image data.
In another embodiment of the present invention, the control device further includes:
the video data export module is used for exporting the target video data to a specified directory;
and the video data deleting module is used for deleting the proxy video data if the target video data is successfully exported.
The video editing device provided by the embodiment of the invention can execute the video editing method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 5 is a schematic structural diagram of a mobile terminal according to a fourth embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary mobile terminal 12 suitable for use in implementing embodiments of the present invention. The mobile terminal 12 shown in fig. 5 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 5, the mobile terminal 12 is embodied in the form of a general purpose computing device. The components of the mobile terminal 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The mobile terminal 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by mobile terminal 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The mobile terminal 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The mobile terminal 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the mobile terminal 12, and/or any device (e.g., network card, modem, etc.) that enables the mobile terminal 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the mobile terminal 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the mobile terminal 12 via the bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the mobile terminal 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, such as implementing a video editing method provided by an embodiment of the present invention, by running a program stored in the system memory 28.
EXAMPLE five
Fifth, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a video editing method.
The video editing method is applied to the mobile terminal and comprises the following steps:
acquiring original video data;
transcoding the original video data into proxy video data adapted to the mobile terminal;
receiving an editing operation;
previewing the editing operation on the proxy video data;
and if the confirmation operation aiming at the editing operation is received, processing the original video data according to the editing operation to generate target video data.
Of course, the computer program of the computer-readable storage medium provided in the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the video editing method provided in any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling a mobile terminal (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the video editing apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (14)

1. A video editing method is applied to a mobile terminal, and the method comprises the following steps:
acquiring original video data;
transcoding the original video data into proxy video data adapted to the mobile terminal;
receiving an editing operation;
previewing the editing operation on the proxy video data;
and if the confirmation operation aiming at the editing operation is received, processing the original video data according to the editing operation to generate target video data.
2. The method of claim 1, wherein transcoding the original video data into proxy video data adapted to the mobile terminal comprises:
determining the resolution adapted to the mobile terminal as the terminal resolution;
adjusting the resolution of the terminal to be adapted to the resolution of the original video data to be used as a target resolution;
transcoding the original video data to the target resolution to obtain proxy video data adapted to the mobile terminal.
3. The method according to claim 2, wherein the determining adapts the resolution of the mobile terminal as a terminal resolution comprises:
detecting a first interface used by the mobile terminal for displaying the original video data;
setting the resolution of the first interface to be adapted to the resolution of the mobile terminal, and obtaining the resolution of the terminal;
alternatively, the first and second electrodes may be,
inquiring the model of the mobile terminal;
if the model is a first model, inquiring the resolution set for the first model as the terminal resolution;
and if the type is a second type, detecting that the second type is used for displaying a second interface in the original video data, and setting the resolution of the second interface as the terminal resolution.
4. The method of claim 3, wherein the terminal resolution comprises a terminal horizontal resolution and a terminal vertical resolution, and wherein the target resolution comprises a target horizontal resolution and a target vertical resolution;
the adjusting the resolution of the terminal to adapt to the resolution of the original video data as a target resolution includes:
reading the resolution of the original video data as an original resolution, wherein the original resolution comprises an original horizontal resolution and an original vertical resolution;
if the original horizontal resolution is smaller than the terminal horizontal resolution and the original vertical resolution is smaller than the terminal vertical resolution, determining that the original horizontal resolution is the target horizontal resolution and the original vertical resolution is the target vertical resolution;
if the original horizontal resolution is greater than the terminal horizontal resolution and the original vertical resolution is less than the terminal vertical resolution, calculating a first ratio of the terminal horizontal resolution to the original horizontal resolution, taking the product of the first ratio and the original vertical resolution as a target vertical resolution, and taking the terminal horizontal resolution as a target horizontal resolution;
if the original horizontal resolution is smaller than the terminal horizontal resolution and the original vertical resolution is larger than the terminal vertical resolution, calculating a second ratio of the terminal vertical resolution to the original vertical resolution, taking the product of the second ratio and the original horizontal resolution as a target horizontal resolution, and taking the terminal vertical resolution as a target vertical resolution.
5. The method of claim 1, wherein previewing the editing operation on the proxy video data comprises:
extracting proxy image data from the proxy video data;
determining proxy image data to be edited currently;
displaying the proxy image data on an editing interface;
previewing the editing operation on the proxy image data.
6. The method of claim 5, wherein determining proxy image data currently to be edited comprises:
displaying a first timeline of the proxy video data;
determining a time currently indicated by a cursor on the time axis;
and extracting the proxy image data at the time as proxy image data to be edited.
7. The method of claim 5, wherein displaying the proxy image data on an editing interface comprises:
scaling the proxy image data to a size adapted to the mobile terminal;
and if the zooming is finished, displaying the proxy image data on an editing interface.
8. The method according to any one of claims 1 to 7, wherein the processing the original video data according to the editing operation to generate target video data if a confirmation operation for the editing operation is received comprises:
determining a first timeline of the proxy video data;
determining a second time axis of the original video data;
inquiring a first time of the editing operation on the first time axis;
locating a second time corresponding to the first time on the second timeline;
and at the second time, the editing operation is performed on the original video data to generate target video data.
9. The method of claim 8, wherein the raw video data comprises raw image data and the proxy video data comprises proxy image data;
the performing, at the second time, the editing operation on the original video data to generate target video data includes:
determining a first position on the proxy image data where the editing operation acts at the second time;
calculating a conversion relation between the proxy image data and the original image data;
mapping the first position to a second position on the original image data according to the conversion relation;
and executing the editing operation at the second position to generate target video data.
10. The method of claim 9, wherein the computing the translation relationship between the proxy image data and the raw image data comprises:
calculating a size ratio, and/or a position ratio, between the proxy image data and the original image data;
setting the size scale and/or the position scale as a conversion relationship between the proxy image data and the original image data.
11. The method of any of claims 1-7 or 9-10, further comprising:
exporting the target video data to a specified directory;
and if the target video data is successfully exported, deleting the proxy video data.
12. A video editing apparatus, applied to a mobile terminal, the apparatus comprising:
the original video data acquisition module is used for acquiring original video data;
the proxy video data acquisition module is used for transcoding the original video data into proxy video data adaptive to the mobile terminal;
the editing operation receiving module is used for receiving editing operation;
an editing operation preview module, configured to preview the editing operation on the proxy video data;
and the target video data generation module is used for processing the original video data according to the editing operation to generate target video data if the confirmation operation aiming at the editing operation is received.
13. A mobile terminal, characterized in that the mobile terminal comprises:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the video editing method of any of claims 1-11.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a video editing method according to any one of claims 1 to 11.
CN202011085438.6A 2020-10-12 2020-10-12 Video editing method and device, mobile terminal and storage medium Active CN112291627B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011085438.6A CN112291627B (en) 2020-10-12 2020-10-12 Video editing method and device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011085438.6A CN112291627B (en) 2020-10-12 2020-10-12 Video editing method and device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112291627A true CN112291627A (en) 2021-01-29
CN112291627B CN112291627B (en) 2022-12-09

Family

ID=74497914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011085438.6A Active CN112291627B (en) 2020-10-12 2020-10-12 Video editing method and device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112291627B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065021A (en) * 2021-03-19 2021-07-02 北京达佳互联信息技术有限公司 Video preview method, video preview device, electronic equipment, storage medium and program product
CN113115095A (en) * 2021-03-18 2021-07-13 北京达佳互联信息技术有限公司 Video processing method, video processing device, electronic equipment and storage medium
CN113657307A (en) * 2021-08-20 2021-11-16 北京市商汤科技开发有限公司 Data labeling method and device, computer equipment and storage medium
CN114125555A (en) * 2021-11-12 2022-03-01 深圳麦风科技有限公司 Method, terminal and storage medium for previewing edited data
CN114125553A (en) * 2021-12-31 2022-03-01 深圳市爱剪辑科技有限公司 Video editing system based on mobile terminal and application method thereof
CN114286159A (en) * 2021-12-28 2022-04-05 北京快来文化传播集团有限公司 Video editing method and device and electronic equipment
CN114286176A (en) * 2021-12-28 2022-04-05 北京快来文化传播集团有限公司 Video editing method and device and electronic equipment
CN114286177A (en) * 2021-12-28 2022-04-05 北京快来文化传播集团有限公司 Video splicing method and device and electronic equipment
CN114419198A (en) * 2021-12-21 2022-04-29 北京达佳互联信息技术有限公司 Frame sequence processing method and device, electronic equipment and storage medium
CN115049544A (en) * 2021-03-09 2022-09-13 上海擎感智能科技有限公司 Picture processing method and device and computer readable storage medium
CN115297272A (en) * 2022-08-01 2022-11-04 北京字跳网络技术有限公司 Video processing method, device, equipment and storage medium
CN115474002A (en) * 2021-04-30 2022-12-13 苹果公司 User interface for altering visual media
CN116095412A (en) * 2022-05-30 2023-05-09 荣耀终端有限公司 Video processing method and electronic equipment
US11895391B2 (en) 2018-09-28 2024-02-06 Apple Inc. Capturing and displaying images with multiple focal planes
US11962889B2 (en) 2023-03-14 2024-04-16 Apple Inc. User interface for camera effects

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101945278A (en) * 2010-09-15 2011-01-12 中国科学院深圳先进技术研究院 Video self-adaptive transcoding method and system
CN103379363A (en) * 2012-04-19 2013-10-30 腾讯科技(深圳)有限公司 Video processing method and apparatus, mobile terminal and system
CN104796767A (en) * 2015-03-31 2015-07-22 北京奇艺世纪科技有限公司 Method and system for editing cloud video
CN104853224A (en) * 2015-05-05 2015-08-19 无锡天脉聚源传媒科技有限公司 Method and device for processing video data
CN105262957A (en) * 2015-09-23 2016-01-20 新奥特(北京)视频技术有限公司 Video image processing method and device
CN107395692A (en) * 2017-07-04 2017-11-24 广州云测信息技术有限公司 Terminal screen methods of exhibiting and device
CN109862410A (en) * 2017-11-30 2019-06-07 腾讯科技(深圳)有限公司 Recommendation information insertion method, device and storage medium
CN110971957A (en) * 2018-09-30 2020-04-07 阿里巴巴集团控股有限公司 Video editing method and device and mobile terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101945278A (en) * 2010-09-15 2011-01-12 中国科学院深圳先进技术研究院 Video self-adaptive transcoding method and system
CN103379363A (en) * 2012-04-19 2013-10-30 腾讯科技(深圳)有限公司 Video processing method and apparatus, mobile terminal and system
CN104796767A (en) * 2015-03-31 2015-07-22 北京奇艺世纪科技有限公司 Method and system for editing cloud video
CN104853224A (en) * 2015-05-05 2015-08-19 无锡天脉聚源传媒科技有限公司 Method and device for processing video data
CN105262957A (en) * 2015-09-23 2016-01-20 新奥特(北京)视频技术有限公司 Video image processing method and device
CN107395692A (en) * 2017-07-04 2017-11-24 广州云测信息技术有限公司 Terminal screen methods of exhibiting and device
CN109862410A (en) * 2017-11-30 2019-06-07 腾讯科技(深圳)有限公司 Recommendation information insertion method, device and storage medium
CN110971957A (en) * 2018-09-30 2020-04-07 阿里巴巴集团控股有限公司 Video editing method and device and mobile terminal

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11895391B2 (en) 2018-09-28 2024-02-06 Apple Inc. Capturing and displaying images with multiple focal planes
CN115049544A (en) * 2021-03-09 2022-09-13 上海擎感智能科技有限公司 Picture processing method and device and computer readable storage medium
CN113115095A (en) * 2021-03-18 2021-07-13 北京达佳互联信息技术有限公司 Video processing method, video processing device, electronic equipment and storage medium
CN113115095B (en) * 2021-03-18 2022-09-09 北京达佳互联信息技术有限公司 Video processing method, video processing device, electronic equipment and storage medium
CN113065021A (en) * 2021-03-19 2021-07-02 北京达佳互联信息技术有限公司 Video preview method, video preview device, electronic equipment, storage medium and program product
CN113065021B (en) * 2021-03-19 2023-09-26 北京达佳互联信息技术有限公司 Video preview method, apparatus, electronic device, storage medium and program product
CN115474002A (en) * 2021-04-30 2022-12-13 苹果公司 User interface for altering visual media
CN113657307A (en) * 2021-08-20 2021-11-16 北京市商汤科技开发有限公司 Data labeling method and device, computer equipment and storage medium
CN114125555A (en) * 2021-11-12 2022-03-01 深圳麦风科技有限公司 Method, terminal and storage medium for previewing edited data
CN114125555B (en) * 2021-11-12 2024-02-09 深圳麦风科技有限公司 Editing data preview method, terminal and storage medium
CN114419198A (en) * 2021-12-21 2022-04-29 北京达佳互联信息技术有限公司 Frame sequence processing method and device, electronic equipment and storage medium
CN114286159A (en) * 2021-12-28 2022-04-05 北京快来文化传播集团有限公司 Video editing method and device and electronic equipment
CN114286177A (en) * 2021-12-28 2022-04-05 北京快来文化传播集团有限公司 Video splicing method and device and electronic equipment
CN114286176A (en) * 2021-12-28 2022-04-05 北京快来文化传播集团有限公司 Video editing method and device and electronic equipment
CN114125553A (en) * 2021-12-31 2022-03-01 深圳市爱剪辑科技有限公司 Video editing system based on mobile terminal and application method thereof
CN116095412A (en) * 2022-05-30 2023-05-09 荣耀终端有限公司 Video processing method and electronic equipment
CN116095412B (en) * 2022-05-30 2023-11-14 荣耀终端有限公司 Video processing method and electronic equipment
CN115297272A (en) * 2022-08-01 2022-11-04 北京字跳网络技术有限公司 Video processing method, device, equipment and storage medium
CN115297272B (en) * 2022-08-01 2024-03-15 北京字跳网络技术有限公司 Video processing method, device, equipment and storage medium
US11962889B2 (en) 2023-03-14 2024-04-16 Apple Inc. User interface for camera effects

Also Published As

Publication number Publication date
CN112291627B (en) 2022-12-09

Similar Documents

Publication Publication Date Title
CN112291627B (en) Video editing method and device, mobile terminal and storage medium
EP2127368B1 (en) Concurrent presentation of video segments enabling rapid video file comprehension
CA2253124C (en) Video searching method and apparatus, video information producing method, and storage medium for storing processing program thereof
CN101051515B (en) Image processing device and image displaying method
CN109936763B (en) Video processing and publishing method
US8925004B2 (en) Techniques to provide an enhanced video replay
KR20210069711A (en) Courseware recording and playback methods, devices, smart interactive tablets and storage media
US20040221322A1 (en) Methods and systems for video content browsing
US11438510B2 (en) System and method for editing video contents automatically technical field
WO2019105467A1 (en) Method and device for sharing information, storage medium, and electronic device
KR20140139859A (en) Method and apparatus for user interface for multimedia content search
JP2004173280A (en) Video thumbnail and method of generating video thumbnail
KR20060025518A (en) Methods and apparatus for interactive point-of-view authoring of digital video content
US20140193138A1 (en) System and a method for constructing and for exchanging multimedia content
EP3024223B1 (en) Videoconference terminal, secondary-stream data accessing method, and computer storage medium
Brenneis Final Cut Pro 3 for Macintosh
CN113115095B (en) Video processing method, video processing device, electronic equipment and storage medium
CN1921610B (en) Client-based video stream interactive processing method and processing system
US20050198067A1 (en) Multi-resolution feature extraction for video abstraction
KR100878528B1 (en) Method for editing and apparatus thereof
KR20080104415A (en) System and method of editing moving picture and recording medium having the method embodied program
CN114374872A (en) Video generation method and device, electronic equipment and storage medium
KR20010035099A (en) Streaming Hypervideo System using Automatic Scene Change Detection and Controlling Method
CN113784169A (en) Video recording method and device with bullet screen
CN113873319A (en) Video processing method and device, electronic equipment and storage medium

Legal Events

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

Effective date of registration: 20231008

Address after: 31a, 15 / F, building 30, maple mall, bangrang Road, Brazil, Singapore

Patentee after: Baiguoyuan Technology (Singapore) Co.,Ltd.

Address before: Floor 4, 5, 6, 13, 14, 15, 16, Jisheng business center, 278 Xingtai Road, Shiqiao street, Panyu District, Guangzhou, Guangdong 510000

Patentee before: GUANGZHOU BAIGUOYUAN NETWORK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right