Video processing method and device, electronic equipment and storage medium
By responding to the scaling operation in the video clip interface, synchronous scaling of the video preview screen and the canvas is achieved, which solves the user experience problems caused by changes in the video preview screen, and ensures that the quality of the exported video is consistent with user expectations.
Patent Information
- Application Number
- CN202311416287.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2025-04-29
AI Technical Summary
During the video editing process, the zoom operation of the video preview screen will cause changes in the picture size, content and position, making it difficult for users to return to the previous picture state, affecting the quality of video export and user experience.
A video processing method is provided, in which the video preview screen and the canvas are controlled to perform synchronous scaling processing in response to the operation of the scaling component in the video clip interface, and display the viewport component to indicate the screen offset and the scaling magnification when the scaling magnification is greater than or equal to 1.
Make sure that the video preview screen will not exceed the canvas after zooming, and can be completely filled with the canvas, ensuring that the exported video screen is consistent with the content expected by the user and improving the user experience.
Smart Images

Figure CN119906850A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of video processing technology, and in particular to a video processing method, device, electronic device and storage medium. Background Art
[0002] With the increasing abundance of Internet information, watching videos has become an entertainment activity in people's daily lives. In order to improve users' viewing experience, video editing is an important step before publishing various videos.
[0003] During the video editing process, creators can add special effects, filters, texts, stickers, color adjustments, etc. to the video preview screen based on the functions provided by the video editing tools to package the video material and make the edited video to be released have better effects.
[0004] In the process of packaging the video preview screen as described above, it is sometimes necessary to scale the video preview screen so as to better view the packaging effect of the video preview screen. However, in the related art, during the scaling of the video preview screen, the size, content and position of the video preview screen are also edited, resulting in changes to the final video preview screen. Thus, after viewing the packaging effect of the video preview screen, on the one hand, it is difficult to return to the previous video preview screen, and on the other hand, it is easy to forget to return to the previous video preview screen, which ultimately results in the exported video being different from the video screen expected by the user, affecting the user experience. Summary of the invention
[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a video processing method, device, electronic device and storage medium.
[0006] A first aspect of an embodiment of the present disclosure provides a video processing method, the method comprising: displaying a video editing interface, the video editing interface displaying a monitor, a material area and a timeline area; when the monitor displays a video preview screen, in response to a first trigger operation on a zoom component in the monitor, controlling the video preview screen and a canvas corresponding to the video preview screen to perform a zoom processing corresponding to the first trigger operation, the video preview screen being a preview screen of the material in the material area or an edited preview screen of the material in the timeline area.
[0007] In some embodiments of the present application, after the video preview screen and the canvas corresponding to the video preview screen are controlled to perform a zoom process corresponding to the first trigger operation, the method further includes: when the zoom ratio of the zoom component is greater than or equal to 1, displaying a visual window component on the monitor, the visual window component is used to indicate the screen offset and the zoom ratio of the zoom component, and the screen offset is used to indicate the position of the screen content that can currently be displayed on the monitor in the canvas after the zoom process.
[0008] In some embodiments of the present application, when the zoom ratio of the zoom component is greater than or equal to 1, after displaying the visual window component on the monitor, the method further includes: in response to a second trigger operation on the visual window component, obtaining the screen offset corresponding to the second trigger operation; and updating the currently displayable screen content based on the screen offset corresponding to the second trigger operation.
[0009] In some embodiments of the present application, the visual window component includes an outer window element and an inner window element, and the second trigger operation includes at least one of the following: a dragging operation on the inner window element in the outer window element; a scrolling operation of the mouse wheel when the mouse pointer is located in the area where the visual window component is located; a scrolling operation of the mouse wheel when the mouse pointer is located in the display area of the monitor; a dragging operation of the mouse pointer when the mouse pointer is located in the display area of the monitor and the mouse pointer is in a preset form; a sliding operation on the touch pad when the mouse pointer is located in the area where the visual window component is located; a sliding operation on the touch pad when the mouse pointer is located in the display area of the monitor.
[0010] In some embodiments of the present application, the visual window component includes an outer window element and an inner window element, the ratio of the first side length of the outer window element to the first side length of the inner window element is used to indicate the zoom factor of the zoom component, the offset of the reference point of the inner window element relative to the reference point of the outer window element is the screen offset, the size of the outer window element remains unchanged, the aspect ratio of the outer window element is the same as the window ratio of the canvas, the ratio of the size of the inner window element to the size of the outer window element is used to indicate the ratio of the size of the currently displayable screen content to the current size of the canvas; the first side length is the length of the longer side of the canvas.
[0011] In some embodiments of the present application, when the zoom ratio of the zoom component is greater than or equal to 1, after displaying the visual window component on the monitor, the method further includes: when the video editing interface is canceled from being displayed, saving the correspondence between the screen offset, the zoom ratio and the editing draft corresponding to the video editing interface.
[0012] In some embodiments of the present application, the control of the video preview screen and the canvas corresponding to the video preview screen performs a zoom processing corresponding to the first trigger operation, including: when the operation duration of the first trigger operation is greater than or equal to a duration threshold, refreshing the video preview screen in real time based on the current zoom ratio corresponding to the first trigger operation within the operation duration; periodically refreshing the canvas according to a preset period within the operation duration based on the zoom ratio of the current period corresponding to the first trigger operation, and refreshing the canvas based on the zoom ratio corresponding to the end of the first trigger operation when the first trigger operation ends; the duration threshold is greater than the preset period.
[0013] In some embodiments of the present application, the zoom ratio of the zoom component when the monitor is used to display the editing preview screen corresponding to the material in the timeline area is saved independently from the zoom ratio of the zoom component when the monitor is used to display the preview screen corresponding to the material in the material area.
[0014] In some embodiments of the present application, the first trigger operation includes at least one of the following: when the zoom component includes a sliding bar element and a slider element, the operation of dragging the slider element to slide along the sliding bar element; when the zoom component includes a sliding bar element and a slider element, the operation of clicking any position of the sliding bar element; when the zoom component includes a magnification element and a reduction element, the operation of clicking the magnification element or the reduction element; when the mouse pointer is located in the area where the zoom component is located, the operation of rolling the mouse wheel; when the mouse pointer is located in the display area of the monitor and a preset button is pressed, the operation of rolling the mouse wheel; when the mouse pointer is located in the area where the zoom component is located, the right-click restoration operation of the mouse; when the mouse pointer is located in the area where the zoom component is located, the zoom operation on the touchpad; when the mouse pointer is located in the display area of the monitor, the zoom operation on the touchpad.
[0015] In some embodiments of the present application, the zoom component includes the sliding bar element and the slider element, the zoom interval corresponding to the sliding bar element is greater than or equal to the first zoom threshold and less than or equal to the second zoom threshold, the first zoom threshold is greater than or equal to 0 and less than 1, and the second zoom threshold is greater than 1; the position corresponding to the zoom magnification of 1 in the sliding bar element includes an adsorption line element, and the adsorption line element is used to adsorb the slider element to the position of the adsorption line when the absolute value of the difference between the zoom magnification corresponding to the position of the slider element on the sliding bar element and 1 is less than or equal to the difference threshold.
[0016] According to a second aspect of an embodiment of the present disclosure, a video processing device is provided, which includes: a display module for displaying a video editing interface, which displays a monitor, a material area and a timeline area; a processing module for, when the monitor displays a video preview screen, responding to a first trigger operation on a zoom component in the monitor, controlling the video preview screen and a canvas corresponding to the video preview screen to perform a zooming process corresponding to the first trigger operation, wherein the video preview screen is a preview screen of the material in the material area or an editing preview screen of the material in the timeline area.
[0017] In some embodiments of the present application, the display module is also used to display a visual window component on the monitor after controlling the video preview screen and the canvas corresponding to the video preview screen to perform a zoom processing corresponding to the first trigger operation, when the zoom ratio of the zoom component is greater than or equal to 1, and the visual window component is used to indicate the screen offset and the zoom ratio of the zoom component, and the screen offset is used to indicate the position of the screen content that can currently be displayed on the monitor in the canvas after the zoom processing.
[0018] In some embodiments of the present application, the device also includes: an acquisition module for acquiring the screen offset corresponding to the second trigger operation on the visual window component after the visual window component is displayed on the monitor when the zoom ratio of the zoom component is greater than or equal to 1; an update module for updating the currently displayable screen content based on the screen offset corresponding to the second trigger operation.
[0019] In some embodiments of the present application, the visual window component includes an outer window element and an inner window element, and the second trigger operation includes at least one of the following: a dragging operation on the inner window element in the outer window element; a scrolling operation of the mouse wheel when the mouse pointer is located in the area where the visual window component is located; a scrolling operation of the mouse wheel when the mouse pointer is located in the display area of the monitor; a dragging operation of the mouse pointer when the mouse pointer is located in the display area of the monitor and the mouse pointer is in a preset form; a sliding operation on the touch pad when the mouse pointer is located in the area where the visual window component is located; a sliding operation on the touch pad when the mouse pointer is located in the display area of the monitor.
[0020] In some embodiments of the present application, the visual window component includes an outer window element and an inner window element, the ratio of the first side length of the outer window element to the first side length of the inner window element is used to indicate the zoom factor of the zoom component, the offset of the reference point of the inner window element relative to the reference point of the outer window element is the screen offset, the size of the outer window element remains unchanged, the aspect ratio of the outer window element is the same as the window ratio of the canvas, the ratio of the size of the inner window element to the size of the outer window element is used to indicate the ratio of the size of the currently displayable screen content to the current size of the canvas; the first side length is the length of the longer side of the canvas.
[0021] In some embodiments of the present application, the device further includes: a saving module, which is used to save the correspondence between the screen offset, the zoom ratio and the editing draft corresponding to the video editing interface when the zoom ratio of the zoom component is greater than or equal to 1, after the visual window component is displayed on the monitor, and when the display of the video editing interface is canceled. In some embodiments of the present application, the processing module is specifically used to refresh the video preview screen in real time based on the current zoom ratio corresponding to the first trigger operation within the operation duration when the operation duration of the first trigger operation is greater than or equal to the duration threshold; periodically refresh the canvas based on the zoom ratio of the current period corresponding to the first trigger operation according to a preset period within the operation duration; and refresh the canvas based on the zoom ratio corresponding to the end of the first trigger operation when the first trigger operation ends; the duration threshold is greater than the preset period.
[0022] In some embodiments of the present application, the zoom ratio of the zoom component when the monitor is used to display the editing preview screen corresponding to the material in the timeline area is saved independently from the zoom ratio of the zoom component when the monitor is used to display the preview screen corresponding to the material in the material area.
[0023] In some embodiments of the present application, the first trigger operation includes at least one of the following: when the zoom component includes a sliding bar element and a slider element, the operation of dragging the slider element to slide along the sliding bar element; when the zoom component includes a sliding bar element and a slider element, the operation of clicking any position of the sliding bar element; when the zoom component includes a magnification element and a reduction element, the operation of clicking the magnification element or the reduction element; when the mouse pointer is located in the area where the zoom component is located, the operation of rolling the mouse wheel; when the mouse pointer is located in the display area of the monitor and a preset button is pressed, the operation of rolling the mouse wheel; when the mouse pointer is located in the area where the zoom component is located, the right-click restoration operation of the mouse; when the mouse pointer is located in the area where the zoom component is located, the zoom operation on the touchpad; when the mouse pointer is located in the display area of the monitor, the zoom operation on the touchpad.
[0024] In some embodiments of the present application, the zoom component includes the sliding bar element and the slider element, the zoom interval corresponding to the sliding bar element is greater than or equal to the first zoom threshold and less than or equal to the second zoom threshold, the first zoom threshold is greater than or equal to 0 and less than 1, and the second zoom threshold is greater than 1; the position corresponding to the zoom magnification of 1 in the sliding bar element includes an adsorption line element, and the adsorption line element is used to adsorb the slider element to the position of the adsorption line when the absolute value of the difference between the zoom magnification corresponding to the position of the slider element on the sliding bar element and 1 is less than or equal to the difference threshold.
[0025] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the video processing method as described in the first aspect.
[0026] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the video processing method described in the first aspect is implemented.
[0027] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, wherein the computer program product includes a computer program. When the computer program product runs on a processor, the processor executes the computer program to implement the video processing method as described in the first aspect.
[0028] According to a sixth aspect of an embodiment of the present disclosure, a chip is provided. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run program instructions to implement the video processing method as described in the first aspect.
[0029] Compared with the prior art, the technical solution provided by the embodiment of the present disclosure has the following advantages: displaying a video editing interface, which displays a monitor, a material area and a timeline area; when the monitor displays a video preview screen, in response to a first trigger operation on the zoom component in the monitor, the video preview screen and the canvas corresponding to the video preview screen are controlled to perform a zoom process corresponding to the first trigger operation, and the video preview screen is a preview screen of the material in the material area or an edit preview screen of the material in the timeline area. In the related art, the zooming in the editing process of the video preview screen is to zoom the video preview screen while keeping the canvas size unchanged, so that the video preview screen may exceed the canvas or cannot completely fill the entire canvas area, and then only the screen within the canvas range is saved in the exported video, so the video screen of the exported video changes with the content of the video preview screen before the zooming, and the zooming scheme provided in the embodiment of the present application is to perform a zoom process corresponding to the first trigger operation on both the video preview screen and the canvas, so that the video preview screen does not exceed the canvas when the video is finally exported, and can completely fill the canvas, and then the video screen of the exported video does not change with the content of the video preview screen before the zooming, and is the same as the video screen expected by the user, which can improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0032] Figure 1 A schematic diagram of a flow chart of a video processing method provided by an embodiment of the present disclosure;
[0033] Figure 2 A schematic diagram of an interface of a video processing method provided by an embodiment of the present disclosure;
[0034] Figure 3 A schematic diagram of a scaling component of a video processing method provided by an embodiment of the present disclosure;
[0035] Figure 4 A schematic diagram of scaling a canvas of a video processing method provided by an embodiment of the present disclosure;
[0036] Figure 5 One of the schematic diagrams of the relationship between the player and the visual window component provided in the embodiment of the present disclosure;
[0037] Figure 6 A second schematic diagram of the relationship between a player and a visual window component provided in an embodiment of the present disclosure;
[0038] Figure 7 A structural block diagram of a video processing device provided by an embodiment of the present disclosure;
[0039] Figure 8 A structural block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0040] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0041] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0042] The terms "first", "second", etc. in the specification and claims of the present disclosure are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable when appropriate, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0043] The electronic device in the embodiments of the present disclosure may be a mobile electronic device or a non-mobile electronic device. The mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA); the non-mobile electronic device may be a personal computer (PC), a television (TV), a teller machine, or an automated machine; the embodiments of the present disclosure do not specifically limit this.
[0044] In some embodiments of the present application, a video editing interface is displayed, and the video editing interface displays a monitor, a material area, and a timeline area; when the monitor displays a video preview screen, in response to a first trigger operation of a zoom component in the monitor, the video preview screen and the canvas corresponding to the video preview screen are controlled to perform a zoom process corresponding to the first trigger operation, and the video preview screen is a preview screen of the material in the material area or an edit preview screen of the material in the timeline area. In the related art, the zooming in the editing process of the video preview screen is to zoom the video preview screen while keeping the canvas size unchanged, so that the video preview screen may exceed the canvas or cannot completely fill the entire canvas area, and then only the screen that falls within the canvas range is saved in the exported video, so the video screen of the exported video changes from the content of the video preview screen before the zooming. The zooming scheme provided in the embodiment of the present application is to perform a zooming process corresponding to the first trigger operation on both the video preview screen and the canvas, so that the video preview screen does not exceed the canvas when the video is finally exported, and can completely fill the canvas, and then the video screen of the exported video does not change from the content of the video preview screen before the zooming, and is the same as the video screen expected by the user, which can improve the user experience.
[0045] The executor of the video processing method provided in the embodiments of the present disclosure may be the above-mentioned electronic device (including mobile electronic devices and non-mobile electronic devices), or may be a functional module and / or functional entity in the electronic device that can implement the video processing method. The specific execution subject may be determined based on actual usage requirements, and the embodiments of the present disclosure are not limited thereto.
[0046] The video processing method provided by the embodiment of the present disclosure is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0047] like Figure 1 As shown, the embodiment of the present disclosure provides a video processing method, which may include the following steps 101 to 102.
[0048] 101. Display a video editing interface, which includes a monitor, a material area, and a timeline area.
[0049] Among them, the material area displays multiple material type options, including transition options, special effects options, filter options, text options, sticker options, material library options, etc. The specific options can be determined based on actual conditions and are not limited here.
[0050] When different material options are in a selected state, the material area displays multiple material identifiers corresponding to the selected material options.
[0051] 102. When the monitor displays a video preview screen, in response to a first trigger operation on a zoom component in the monitor, control the video preview screen and a canvas corresponding to the video preview screen to perform a zoom process corresponding to the first trigger operation.
[0052] The video preview screen is a preview screen of the material in the material area or an edit preview screen of the material in the timeline area.
[0053] In some embodiments of the present application, the first trigger operation includes at least one of the following: when the zoom component includes a slide bar element and a slider element, drag the slider element to slide along the slide bar element; when the zoom component includes a slide bar element and a slider element, click any position of the slide bar element; when the zoom component includes a zoom-in element and a zoom-out element, click the zoom-in element or the zoom-out element; when the mouse pointer is located in the area where the zoom component is located, scroll the mouse wheel; when the mouse pointer is located in the display area of the monitor and a preset button is pressed, scroll the mouse wheel; when the mouse pointer is located in the area where the zoom component is located, right-click the mouse to restore the operation; when the mouse pointer is located in the area where the zoom component is located, zoom the touchpad; when the mouse pointer is located in the display area of the monitor, zoom the touchpad. The first trigger operation can also be other feasible operations, which can be determined according to actual conditions and are not limited here.
[0054] Among them, the preset key can be a Ctrl key, a Shift key, etc., which is not limited here.
[0055] Among them, the zoom operation can be a two-finger sliding operation; the sliding operation along any direction within the first direction range can be a zoom-out operation, and the sliding operation along any direction within the second direction range can be a zoom-in operation; it can also be other zoom operations, which are not limited here.
[0056] The first direction range and the second direction range are different, and there is no intersection between the two.
[0057] In the embodiment of the present application, by providing a variety of different trigger operations for zooming in and out of the video preview screen and the canvas, the user can determine the appropriate zoom operation according to the actual usage scenario, which increases the convenience and diversity of the operation and improves the user experience.
[0058] The display area of the monitor is the area of the monitor where the display window for displaying the video preview screen is located.
[0059] In some embodiments of the present application, before receiving the first trigger operation, the size of the video preview screen is the same as the canvas size, and when the first trigger operation ends, the size of the scaled video preview screen is the same as the scaled canvas size.
[0060] In an embodiment of the present application, the video preview screen is a complete video frame in the video material. When the video preview screen is scaled based on the first trigger operation, the size of the video preview screen changes, but the screen content included in the video preview screen remains unchanged.
[0061] It can be understood that since the display area of the monitor is limited by the size of the display window, when the size of the scaled video preview screen is larger than the size of the display window, the screen content that can be displayed in the display area is the portion of the scaled video preview screen that falls within the display window, that is, the display area of the monitor cannot fully display the video preview screen at this time.
[0062] In the related art, the scaling in the editing process of the video preview screen is to scale the video preview screen while keeping the canvas size unchanged. In this way, the video preview screen may exceed the canvas or cannot completely fill the entire canvas area, and then the exported video only saves the screen that falls within the canvas range. Therefore, the video screen of the exported video is different from the content of the video preview screen before scaling. The scaling scheme provided in the embodiment of the present application is to perform scaling processing on both the video preview screen and the canvas corresponding to the first trigger operation. Therefore, the video preview screen of the finally exported video does not exceed the canvas and can completely fill the canvas. Therefore, the video screen of the exported video is the same as the video screen expected by the user, which can improve the user experience.
[0063] In the related art, when the video preview screen is enlarged, the canvas size remains unchanged, which will cause the clarity of the displayed screen content to decrease and the screen to be blurred. In the embodiment of the present application, when the video preview screen is enlarged, the canvas is also enlarged, so the clarity of the displayed screen content can be guaranteed and the screen remains clear.
[0064] In some embodiments of the present application, the zoom component includes the sliding bar element and the slider element, the zoom interval corresponding to the sliding bar element is greater than or equal to the first zoom threshold and less than or equal to the second zoom threshold, the first zoom threshold is greater than or equal to 0 and less than 1, and the second zoom threshold is greater than 1; the position corresponding to the zoom magnification of 1 in the sliding bar element includes an adsorption line element, and the adsorption line element is used to adsorb the slider element to the position of the adsorption line when the absolute value of the difference between the zoom magnification corresponding to the position of the slider element on the sliding bar element and 1 is less than or equal to the difference threshold.
[0065] In the embodiment of the present application, the zoom component includes a sliding bar element and a slider element. By locating the slider element at different positions of the sliding bar element, different zoom ratios are mapped to provide the user with an intuitive experience.
[0066] The first scaling threshold and the second scaling threshold can be determined according to actual conditions and are not limited here. For example, the first scaling threshold is 0.5 and the second scaling threshold is 4.
[0067] In the embodiment of the present application, the normal (standard) display screen (the video preview screen that has not been zoomed in) is a screen in which the longer side of the canvas covers the entire display area. In this case, the corresponding zoom ratio is 1, and the zoom interval corresponding to the slider element is set to include an area less than 1 and an area greater than 1, so that the normal display screen can be reduced or enlarged, giving the user different zoom options to meet the user's different zoom needs, thereby improving the user experience.
[0068] In the embodiment of the present application, an adsorption line is set in the slider element corresponding to the position of the zoom magnification of 1. When the user needs to return to the normal display screen, the slider element can be adjusted to a position near the position of the zoom magnification of 1 in the slider element by triggering the zoom control. The slider element is automatically adsorbed to the position of the zoom magnification of 1 in the slider element through the adsorption line, so that the normal display screen can be accurately displayed. In this way, it can ensure that the video preview screen that has not been zoomed in is returned to display quickly and accurately, reducing the difficulty of user operation and improving user experience.
[0069] For example, Figure 2 As shown, it is a video editing interface, wherein the mark “21” indicates a monitor, the mark “22” indicates a zoom control, the mark “23” indicates a material area, and the mark “24” indicates a timeline area.
[0070] Among them, Figure 2 As shown, the monitor carries the player, the player is displayed in the monitor, and the video preview screen is displayed in the player.
[0071] For example, Figure 3 As shown, Figure 2 An enlarged view of the zoom control in , wherein the label “31” indicates a sliding bar component, the label “32” indicates a slider component, the label “33” indicates an adsorption line component, the label “34” indicates a zoom-in component, and the label “35” indicates a zoom-out component.
[0072] In the related art, the slider element is divided into n-1 segments in equal proportion according to the number of elements in the degree table (degreeTable), and is not segmented according to the value of the element, while in the embodiment of the present application, the slider element needs to be linearly divided according to the value of the element. In the related art, there are adsorption lines at both ends of the slider element, while in the embodiment of the present application, the adsorption lines at both ends of the slider element need to be cancelled. Therefore, in order not to change the original function of the slider component composed of the slider element and the slider element, in the embodiment of the present application, three attributes are added to the slider component: whether the slider element segmentation is based on the value of the element (true) or the number of elements (false), whether to hide the head adsorption line, and whether to hide the tail adsorption line. By setting the slider element segmentation to be based on the value of the element, hiding the head adsorption line, and hiding the tail adsorption line, it can divide the adsorption lines according to the value of the element in the degreeTable, and the adsorption lines at both ends can be hidden according to the set attributes.
[0073] In some embodiments of the present application, the operation duration of the first trigger operation may not be considered, and in response to the first trigger operation, based on the real-time zoom ratio corresponding to the first trigger operation, the video preview screen and the canvas may be controlled to be zoomed synchronously. In this way, the video preview screen and the canvas may be ensured to be the same size in real time.
[0074] In some embodiments of the present application, whether to control the video preview screen and the canvas to be scaled synchronously can also be determined based on the operation duration of the first trigger operation, which can be determined specifically based on actual conditions.
[0075] In some embodiments of the present application, when the operation duration of the first trigger operation is greater than or equal to a duration threshold, and the duration threshold is greater than a preset period, the above step 102 can be implemented by the following steps 102a and 102b.
[0076] 102a. When the operation duration of the first trigger operation is greater than or equal to the duration threshold, the video preview screen is refreshed in real time based on the current zoom ratio corresponding to the first trigger operation within the operation duration.
[0077] 102b. Refresh the canvas periodically according to a preset period within the operation duration based on the zoom factor of the current period corresponding to the first trigger operation, and refresh the canvas based on the zoom factor corresponding to the end of the first trigger operation when the first trigger operation ends.
[0078] In some embodiments of the present application, in response to a first trigger operation, the zoom control obtains a zoom ratio corresponding to the first trigger operation, and then sends the zoom ratio to a monitor, and the monitor zooms the video preview screen and the canvas based on the zoom ratio.
[0079] The duration threshold and the preset period can be determined according to actual conditions and are not limited here. For example, the preset period can be 0.5 seconds.
[0080] It can be understood that when the operation duration of the first trigger operation is greater than or equal to the duration threshold, during the operation of the first trigger operation, it is necessary to control the video preview screen to perform multiple zooming processes, and it is also necessary to control the canvas to perform multiple zooming processes. However, if the canvas is zoomed and the canvas size is refreshed each time the video preview screen is zoomed, and the canvas is refreshed frequently, a jamming phenomenon may occur. Therefore, it is set that within the operation duration of the first trigger operation, the canvas is periodically refreshed according to a preset period based on the zoom ratio corresponding to the current period, and in order to ensure that when the first trigger operation ends, the size of the video preview screen is the same as the size of the canvas, therefore, when the first trigger operation ends, the canvas is refreshed based on the zoom ratio corresponding to the end of the first trigger operation.
[0081] In the embodiment of the present application, through the above-mentioned steps 102a and 102b, when the first trigger operation is completed, the size of the video preview screen and the canvas are the same, and during the first trigger operation, the impact on the display of the video preview screen is also very small, and the refresh rate of the canvas can be reduced to avoid the occurrence of lag, which can improve the user experience.
[0082] In some embodiments of the present application, when the first trigger operation can only control the video preview screen to perform a zoom process once, in response to the first trigger operation, the video preview screen and the canvas are controlled to be zoomed synchronously according to the zoom ratio corresponding to the first trigger operation. In this way, the sizes of the video preview screen and the canvas can be ensured to be the same.
[0083] In some embodiments of the present application, when the operation duration of the first trigger operation is less than the duration threshold and less than the preset period, no matter whether the first trigger operation controls the video preview screen to perform one or multiple zooming processes, the canvas is refreshed only when the first trigger operation ends, based on the zoom ratio corresponding to the end of the first trigger operation. In this way, the size of the video preview screen and the canvas can be ensured to be the same.
[0084] In some embodiments of the present application, before the normal display is scaled, the size of the player carried by the monitor is smaller than the size of the monitor. In this case, before the player fills the entire monitor range (the player size is equal to the monitor size), it is necessary to zoom in and out the player window to achieve the zooming of the video preview screen, that is, it is necessary to call the interface of zooming the player to achieve the zooming of the video preview screen; when the player fills the entire monitor range, the player can no longer be zoomed, so it is necessary to call the interface of zooming the video preview screen to achieve the zooming of the video preview screen.
[0085] In some embodiments of the present application, the size of the player carried by the monitor is the same as the size of the monitor. In this way, the player always covers the entire monitor range. Therefore, the scaling of the video preview screen is achieved by calling the interface for scaling the video preview screen. The logic is simple, and there is no need to scale the player to achieve scaling of the video preview screen. This can avoid multiple updates to the zoom ratio due to triggering operations, which leads to multiple updates to the position and size of the player window, thereby causing freezes and screen flickering problems on some devices.
[0086] In some embodiments of the present application, the zoom ratio of the zoom component when the monitor is used to display the editing preview screen corresponding to the material in the timeline area is saved independently from the zoom ratio of the zoom component when the monitor is used to display the preview screen corresponding to the material in the material area.
[0087] It can be understood that when the video preview screen currently displayed on the monitor is switched from the editing preview screen corresponding to the material in the timeline area to the corresponding preview screen of the material in the material area, the zoom ratio corresponding to the zoom component is updated to the zoom ratio of the last preview screen corresponding to the material in the material area displayed on the monitor (the zoom ratio of the preview screen corresponding to the material in the material area saved last time), and the zoom ratio of the preview screen corresponding to the material in the material area is saved at the same time; when the video preview screen currently displayed on the monitor is switched from the preview screen corresponding to the material in the material area to the editing preview screen corresponding to the material in the timeline area, the zoom ratio corresponding to the zoom component is updated to the zoom ratio of the last editing preview screen corresponding to the material in the timeline area displayed on the monitor (the zoom ratio of the editing preview screen corresponding to the material in the timeline area saved last time), and the zoom ratio of the editing preview screen corresponding to the material in the timeline area is saved at the same time.
[0088] That is to say, when the video preview screen currently displayed on the monitor switches between the editing preview screen corresponding to the material in the timeline area and the preview screen corresponding to the material in the material area, the zoom ratio corresponding to the zoom component changes with the zoom ratio of the area to which the monitor currently displays the material.
[0089] It can be understood that the zoom information of the material in the timeline area and the material in the material area needs to be independent. For example, the zoom ratio of the material in the material area is 1, and the zoom ratio of the material in the timeline area is 4. When switching from the material in the timeline area to the material in the material area, the zoom ratio needs to be updated to 1, and vice versa. In this way, the user can display the materials in different areas at different magnifications, which can improve the user experience.
[0090] In some embodiments of the present application, after the above step 102, the video processing method provided by the embodiment of the present application may further include the following step 103.
[0091] 103. When the zoom ratio of the zoom component is greater than or equal to 1, display the visual window component on the monitor.
[0092] The visual window component is used to indicate the image offset and the zoom ratio of the zoom component. The image offset is used to indicate the position of the image content currently displayed by the monitor in the canvas after the zoom processing.
[0093] The image offset is the offset of the reference point of the image content currently displayable by the monitor relative to the reference point of the canvas after the scaling process.
[0094] Among them, the currently displayable screen content is the part of the screen content that is visible to the user at the current moment in the video preview screen, that is, the screen content that can be seen by the human eye through the monitor at the current moment.
[0095] The reference point can also be called an anchor point.
[0096] Exemplarily, the reference point may be a center point, and accordingly, the image offset is an offset of the center point of the image content currently displayable by the monitor relative to the center point of the canvas.
[0097] In some embodiments of the present application, the zoom ratio and screen offset can be directly displayed in the visual window component, or can be indirectly indicated by other means. The specific method can be determined based on actual conditions and is not limited here.
[0098] In some embodiments of the present application, when the zoom ratio of the zoom component is less than 1, the video preview screen does not exceed the display area of the monitor, the video preview screen is the same as the currently displayable screen content, the video preview screen size is the same as the canvas size, and the screen offset is 0.
[0099] In some embodiments of the present application, when the zoom ratio of the zoom component is greater than or equal to 1, the visual window component is displayed on the monitor. In particular, when the player always fills the monitor, the screen offset may be 0 or not, and the video preview screen is the same size as the canvas. Therefore, displaying the visual window component can better show which part of the video preview screen the currently displayable screen content is, thereby improving the user experience.
[0100] In some embodiments of the present application, after the above step 103, the video processing method provided by the embodiment of the present application may further include the following steps 104 and 105.
[0101] 104. In response to a second trigger operation on the visual window component, obtain the screen offset corresponding to the second trigger operation.
[0102] 105. Update the currently displayable screen content based on the screen offset corresponding to the second trigger operation.
[0103] In some embodiments of the present application, in response to the second trigger operation, the visual window component obtains the screen offset corresponding to the second trigger operation, and then sends the screen offset to the monitor, and the monitor updates the currently displayable screen content based on the screen offset.
[0104] In some embodiments of the present application, the second trigger operation includes at least one of the following: a drag operation on the inner window element in the outer window element; a rolling mouse wheel operation when the mouse pointer is located in the area where the visual window component is located; a rolling mouse wheel operation when the mouse pointer is located in the display area of the monitor; a drag operation on the mouse pointer when the mouse pointer is located in the display area of the monitor and the mouse pointer is in a preset form; a sliding operation on the touchpad when the mouse pointer is located in the area where the visual window component is located; a sliding operation on the touchpad when the mouse pointer is located in the display area of the monitor. The second trigger operation can also be other feasible operations, which can be determined according to actual conditions and are not limited here.
[0105] Among them, the sliding operation can be a two-finger parallel sliding operation, a single-finger sliding operation with the sliding direction within a preset direction range, a three-finger sliding operation, or other sliding operations, which can be determined according to actual conditions.
[0106] The preset direction range can be determined according to actual conditions and is not limited here.
[0107] In some embodiments of the present application, when the mouse pointer is located in the area where the visible window component is located or the display area of the monitor, the display form of the mouse pointer can be changed, such as from an "arrow" form to an "open hand" form, etc. When the mouse pointer is located in the area where the visible window component is located or the display area of the monitor, and the left button of the mouse peripheral is pressed, the display form of the mouse pointer can also be changed, such as from an "open hand" form to a "clenched fist" form, etc.
[0108] In the embodiment of the present application, by providing a variety of different trigger operations for changing the screen offset, the user can determine the appropriate trigger operation for changing the screen offset according to the actual usage scenario, which increases the convenience and diversity of operation and improves the user experience.
[0109] In some embodiments of the present application, the visual window component includes an outer window element and an inner window element, and the ratio of the first side length of the outer window element to the first side length of the inner window element is used to indicate the zoom ratio of the zoom component, and the first side length is the length of the longer side of the canvas. That is, the zoom ratio of the zoom component is indirectly indicated by the ratio of the first side length of the outer window element to the first side length of the inner window element, which is also the zoom ratio of the video preview screen and the canvas. In this way, the zoom ratio can be determined according to the visual window component without checking the zoom component, which can provide users with a more intuitive visual experience.
[0110] In some embodiments of the present application, the offset of the reference point of the inner window element relative to the reference point of the outer window element is the picture offset, that is, the picture offset is determined by the offset of the reference point of the inner window element relative to the reference point of the outer window element, which can provide users with a more intuitive visual experience.
[0111] The reference point may be an anchor point.
[0112] Exemplarily, the reference point is the center point, and accordingly, the picture offset is the offset of the center point of the inner window element relative to the center point of the outer window element. Similarly, the picture offset is the offset of the center point of the picture content currently displayable by the monitor relative to the center point of the canvas.
[0113] In some embodiments of the present application, the size of the outer window element remains unchanged, the aspect ratio of the outer window element is the same as the window ratio of the canvas, and the ratio of the size of the inner window element to the size of the outer window element is used to indicate the ratio of the size of the currently displayable screen content to the current size of the canvas. That is, the outer window element is similar to the canvas, so the aspect ratio of the canvas can be known based on the aspect ratio of the outer window element. The size of the outer window element remains unchanged, and the inner window element changes according to the change in the size of the currently displayable screen content, so according to the relative size of the inner window element and the outer window element, the relative size of the currently displayable screen content and the canvas (video preview screen) can be known. Combined with the offset of the reference point of the inner window element relative to the reference point of the outer window element as the screen offset, the relative position relationship between the currently displayable screen content and the canvas (video preview screen) can be determined based on the relative position relationship between the inner window element and the outer window element.
[0114] In the embodiment of the present application, the position of the inner window element in the outer window element is used to indicate the position of the picture content displayed on the monitor in the canvas. In other words, the picture offset and the zoom ratio of the zoom component can be determined according to the position of the inner window element in the outer window element.
[0115] In some embodiments of the present application, if the visual window component is the above-mentioned component, then in response to the first trigger operation, after the scaling component sends the scaling ratio corresponding to the first trigger operation to the monitor, the monitor forwards the scaling ratio to the visual window component, and the visual window component updates the size of the inner window element based on the scaling ratio.
[0116] In some embodiments of the present application, after the above step 103, the video processing method provided by the embodiment of the present application may further include the following step 106.
[0117] 106. When the video editing interface is canceled from being displayed, the corresponding relationship between the screen offset, the zoom ratio, and the editing draft corresponding to the video editing interface is saved.
[0118] It can be understood that when saving the editing draft, the zoom ratio and screen offset of the editing preview screen of the material in the latest timeline area before closing, and the correspondence between the editing draft and the editing draft are saved. In this way, it can be ensured that when the editing draft is viewed next time, the editing preview screen of the material in the timeline area in the editing draft displayed on the video editing interface will be displayed with the zoom ratio and screen offset in the saved correspondence, which can improve the user experience.
[0119] In the embodiment of the present application, canceling the display of the video editing interface may be done manually, or due to a program not responding, or due to a power outage of the device.
[0120] In some embodiments of the present application, the monitor can be dragged out from the video editing interface by a drag operation, that is, the monitor is displayed floating above the video editing interface.
[0121] In some embodiments of the present application, the size of the monitor window may also be changed by triggering an operation on the border of the monitor.
[0122] In some embodiments of the present application, when the monitor is updated from non-full screen display to full screen display, the zoom ratio is updated from the zoom ratio corresponding to the non-full screen display to 1, and when the monitor is updated from full screen display to non-full screen display, the zoom ratio is restored from 1 to the zoom ratio corresponding to the non-full screen display. That is, the zoom ratio of the monitor is 1 when it is updated from full screen display.
[0123] In some embodiments of the present application, when a new editing draft is created and the video editing interface is initialized (init), it is necessary to obtain the canvas size and the size information of the monitor display window to set the size of each part of the visual window component. The canvas size at initialization, that is, the canvas size when the zoom ratio is 1 (in other words, the canvas size is actually restricted by the player window size). The offset passed in is the actual distance percentage between the center of the window and the center of the canvas.
[0124] In some embodiments of the present application, when the zoom ratio is switched, an update function needs to be called to update the view (the currently displayable screen content). The relative position of the currently displayable screen content in the canvas after zooming can be calculated based on the screen offset of the visible window component.
[0125] Different interfaces can be called at different stages of monitor scaling to achieve monitor scaling. For example, when the player window size ratio does not change, that is, it is not limited by the panel size, only the first interface needs to be called (the second interface can also be called at this time). If it changes, try to call the second interface, and the second parameter is the size of the player window. Monitor scaling also has a third interface, which is used to change the monitor window size in a static state.
[0126] For example, it is assumed that the anchor point is the center point. In the embodiment of the present application, the anchor point is calculated according to the details: Here is an extremely important idea that helps us understand its principle: state A is the standard initial state (1 times), state B and state C are other states (greater than or less than 1), if a state transition algorithm is transitive, that is, the effect of B->C is equivalent to B->A->C, then only the method from A to other states can be considered, thereby effectively reducing the amount of calculation and complexity.
[0127] It should be noted that the algorithm we propose below is a transitive algorithm.
[0128] 1. Ordinary scaling (not involving changes in the size of the playback window (the bold solid frame including the vertices of point O)) (Algorithm 1).
[0129] At this time, you only need to do a simple linear scaling based on the anchor point position. The size of the dotted box is calculated only based on the before and after scaling values, and the position of the gray box vertex (point B) is calculated according to the equation at the bottom of the figure below. Figure 4 As shown, before the longer side of the canvas fills the display area of the monitor and when the zoom ratio is less than 1, the following formula is satisfied during the process of shrinking from the dotted line frame including point B to the non-bold solid line frame including point A:
[0130] |PB| / Zoom_value=|PA| / new_Zoom_value, where Zoom_value is the zoom ratio corresponding to the dotted line frame, and new_Zoom_value is the zoom ratio corresponding to the non-bold solid line frame.
[0131] 2. When zooming, the size of the playback window (bold solid frame) changes simultaneously (Algorithm 2).
[0132] When the canvas is enlarged, the window in the panel must be enlarged, so the displayable content in the monitor should also be enlarged. Therefore, the size of the non-bold dashed frame (BDD'B') indicated by the mark "51" changes to the size of the non-bold solid frame indicated by the mark "52". Here, according to the change in the zoom ratio and the length and width, it is calculated which side's length will not change. (eg in Figure 5 In the example, since it is enlarged and the aspect ratio is reduced, the horizontal side is fixed and the vertical side is enlarged. ).
[0133] The problem is transformed into: given |BB'|, |CC'|, P, find the coordinates of point C.
[0134] It should be noted here that |CB| is not necessarily equal to |B'C'|. The ratio of their lengths is related to the position of the anchor point (P). Point P' is the projection point of P on BB'. Note that CP' / C'P'=BP' / B'P'=CB / B'C', so CP' / BP'=CC' / BB'. This formula is the formula for calculating the coordinates of point C.
[0135] When the canvas is scaled a few times, one side of the canvas often does not occupy the corresponding side of the window. At this time, the height of the scaled inner window component in the visible window component should be exactly equal to the height of the outer window component.
[0136] like Figure 6 As shown, it is proved that the above algorithm can meet this requirement (a).
[0137] Figure 6 We will only demonstrate the case where the zoom ratio changes directly from less than 1 to a few points, because this case is the most complicated.
[0138] The meaning of each part is as follows:
[0139] Box OFZG marked "61": for the player, it is the initial window size; for the visual window component, it is the outer window component.
[0140] The large box B'H'MD marked as "62" (the small box BHXD marked as "63"): for the player, it is the canvas size before (after) scaling; for the visual window component, it is the inner window component before (after) scaling when resizing is not considered.
[0141] The large box C'I'QE' marked with "64": for the player, it is the visible range of the scaled canvas; it has no meaning for the viewport component.
[0142] The small box CIYE marked with "65" is meaningless to the player; for the visual window component, it is the inner window component that is scaled when resizing is considered.
[0143] Note that point C is not taken from the edge of the box OFZG marked as “61”, its position is calculated according to Algorithm 2.
[0144] You can look at the player and the visual window component separately, then overlap the initial window of the player and the initial outer window component of the visual window component to get the above picture.
[0145] B' is the vertex position of the scaled canvas, and C' is the vertex of the scaled canvas within the visible range of the window. The meanings of points B and C are similar to those in the above figure.
[0146] The determination of the position of point C and point I has nothing to do with the box marked "61"! It cannot be understood as the intersection of C'P and BH.
[0147] Note that B'P / OP=OP / BP, and the two rectangles corresponding to the large box C'I'QE' marked "64" and the small box CIYE marked "65" are similar.
[0148] If requirement (a) is met, then we should have OC / / B'C'. In other words, it proves that |CI|=h0.
[0149] Note the following equation:
[0150] w / w'=b / b',h0 2 =bb',w0 2= ww'
[0151]
[0152] Therefore, our algorithm is correct. The cases of shrinking and anchor point not being in the center are similar and will not be elaborated here.
[0153] In the embodiment of the present application, two actions of the touch panel are required: pinching and flicking.
[0154] Among them, Flick refers to sliding two fingers in parallel, similar to turning pages on a web page.
[0155] Pinch refers to two-finger zooming, which is similar to the zooming operation of the map software on the mobile phone.
[0156] The flick and pinch of the touchpad are almost equivalent to the mouse wheel events.
[0157] But please note that when using the visual window component interface to drag, you need to explicitly call the three functions of dragging inner window components, dragging inner window components, and dragging inner window components. However, the scroll wheel event is discrete, or a horizontally triggered event, and such discrete events / signals need to be converted into edge-triggered events / signals.
[0158] During the flick event, a drag start coordinate (0, 0) is maintained and passed to the drag start function. During the flick process, the drag offset is passed to the drag function of the visible window component. At the end, the end function of the visible window component drag is called.
[0159] Pinch event, PinchArea cannot be used in some systems, so it can only be handled by using the wheel event. When the laptop touchpad of this type of system is zoomed, you can distinguish between flick and pinch actions by judging whether (wheel.modifiers&Qt.ControlModifier) is true in the onWheel slot function. If the value is true, it is a pinch action. At this time, you can only judge whether the current pinch action is zooming in or out based on whether the wheel.angleDelta.y value is greater than 0.
[0160] Note that the absolute value of wheel.angleDelta.y is always 120, and the current zoom action size cannot be distinguished.
[0161] Some systems use PinchArea to implement the zoom function. When zooming, pinch.scale always starts from 1. If you zoom from the center of the touchpad to the edge, its value is 1->50; if you zoom from the edge to the center, its value is 1->0.02. Referring to the zoom method in the timeline, we save the current zoom factor current_val when we start zooming; during the zooming process, the value passed in is current_val*pinch.scale. However, since the value of pinch.area is too large or too small, we need to find a function f(x) such that f(1)=1, f(50)=5, f(0.02)=0.2, Obviously, f(x) is a homomorphic function on the multiplication group, so we can get a function that meets the requirements: Therefore, the value passed in when zooming becomes current_val*f(pinch.scale).
[0162] Figure 7 FIG. 1 is a structural block diagram of a video processing device according to an embodiment of the present disclosure. Figure 7 As shown, it includes: a display module 701, which is used to display a video editing interface, and the video editing interface displays a monitor, a material area and a timeline area; a processing module 702, which is used to control the video preview screen and the canvas corresponding to the video preview screen to perform a zooming process corresponding to the first triggering operation in response to a first triggering operation on a zoom component in the monitor when the monitor displays a video preview screen, and the video preview screen is a preview screen of the material in the material area or an editing preview screen of the material in the timeline area.
[0163] In some embodiments of the present application, the first trigger operation includes at least one of the following: when the zoom component includes a sliding bar element and a slider element, the operation of dragging the slider element to slide along the sliding bar element; when the zoom component includes a sliding bar element and a slider element, the operation of clicking any position of the sliding bar element; when the zoom component includes a magnification element and a reduction element, the operation of clicking the magnification element or the reduction element; when the mouse pointer is located in the area where the zoom component is located, the operation of rolling the mouse wheel; when the mouse pointer is located in the display area of the monitor and a preset button is pressed, the operation of rolling the mouse wheel; when the mouse pointer is located in the area where the zoom component is located, the right-click restoration operation of the mouse; when the mouse pointer is located in the area where the zoom component is located, the zoom operation on the touchpad; when the mouse pointer is located in the display area of the monitor, the zoom operation on the touchpad.
[0164] In some embodiments of the present application, the zoom component includes the sliding bar element and the slider element, the zoom interval corresponding to the sliding bar element is greater than or equal to the first zoom threshold and less than or equal to the second zoom threshold, the first zoom threshold is greater than or equal to 0 and less than 1, and the second zoom threshold is greater than 1; the position corresponding to the zoom magnification of 1 in the sliding bar element includes an adsorption line element, and the adsorption line element is used to adsorb the slider element to the position of the adsorption line when the absolute value of the difference between the zoom magnification corresponding to the position of the slider element on the sliding bar element and 1 is less than or equal to the difference threshold.
[0165] In some embodiments of the present application, the processing module 702 is specifically used to refresh the video preview screen in real time based on the current zoom ratio corresponding to the first trigger operation within the operation duration when the operation duration of the first trigger operation is greater than or equal to a duration threshold; to periodically refresh the canvas according to a preset period within the operation duration based on the zoom ratio of the current period corresponding to the first trigger operation; and to refresh the canvas based on the zoom ratio corresponding to the end of the first trigger operation when the first trigger operation ends; the duration threshold is greater than the preset period.
[0166] In some embodiments of the present application, the zoom ratio of the zoom component when the monitor is used to display the editing preview screen corresponding to the material in the timeline area is saved independently from the zoom ratio of the zoom component when the monitor is used to display the preview screen corresponding to the material in the material area.
[0167] In some embodiments of the present application, the display module 701 is also used to display a visual window component on the monitor after controlling the video preview screen and the canvas corresponding to the video preview screen to perform a zoom processing corresponding to the first trigger operation, when the zoom ratio of the zoom component is greater than or equal to 1. The visual window component is used to indicate the screen offset and the zoom ratio of the zoom component, and the screen offset is used to indicate the position of the screen content that can be currently displayed by the monitor in the canvas after the zoom processing.
[0168] In some embodiments of the present application, the device also includes: an acquisition module for acquiring the screen offset corresponding to the second trigger operation on the visual window component after the visual window component is displayed on the monitor when the zoom ratio of the zoom component is greater than or equal to 1; an update module for updating the currently displayable screen content based on the screen offset corresponding to the second trigger operation.
[0169] In some embodiments of the present application, the visual window component includes an outer window element and an inner window element, and the second trigger operation includes at least one of the following: a dragging operation on the inner window element in the outer window element; a scrolling operation of the mouse wheel when the mouse pointer is located in the area where the visual window component is located; a scrolling operation of the mouse wheel when the mouse pointer is located in the display area of the monitor; a dragging operation of the mouse pointer when the mouse pointer is located in the display area of the monitor and the mouse pointer is in a preset form; a sliding operation on the touch pad when the mouse pointer is located in the area where the visual window component is located; a sliding operation on the touch pad when the mouse pointer is located in the display area of the monitor.
[0170] In some embodiments of the present application, the visual window component includes an outer window element and an inner window element, the ratio of the first side length of the outer window element to the first side length of the inner window element is used to indicate the zoom factor of the zoom component, the offset of the reference point of the inner window element relative to the reference point of the outer window element is the screen offset, the size of the outer window element remains unchanged, the aspect ratio of the outer window element is the same as the window ratio of the canvas, the ratio of the size of the inner window element to the size of the outer window element is used to indicate the ratio of the size of the currently displayable screen content to the current size of the canvas; the first side length is the length of the longer side of the canvas.
[0171] In some embodiments of the present application, the device also includes: a saving module, which is used to save the correspondence between the screen offset, the zoom ratio and the editing draft corresponding to the video editing interface when the zoom ratio of the zoom component is greater than or equal to 1, after the visual window component is displayed on the monitor, and when the video editing interface is canceled.
[0172] In the embodiments of the present disclosure, each module can implement the video processing method provided by the above method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0173] Figure 8 The structural diagram of an electronic device provided in the embodiment of the present disclosure is used to exemplarily illustrate the electronic device that implements any video processing method in the embodiment of the present disclosure, and should not be understood as a specific limitation on the embodiment of the present disclosure.
[0174] like Figure 8 As shown, the electronic device 800 may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0175] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although an electronic device 800 having various devices is shown, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.
[0176] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processor 801, the functions defined in any video processing method provided in the embodiment of the present disclosure can be executed.
[0177] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0178] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0179] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0180] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: displays a video editing interface, which displays a monitor, a material area and a timeline area; when the monitor displays a video preview screen, in response to a first trigger operation on a zoom component in the monitor, controls the video preview screen and the canvas corresponding to the video preview screen to perform a zoom processing corresponding to the first trigger operation, and the video preview screen is a preview screen of the material in the material area or an editing preview screen of the material in the timeline area.
[0181] In embodiments of the present disclosure, computer program codes for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the computer, partially on the computer, as an independent software package, partially on the computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0182] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0183] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0184] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0185] In the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a computer-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0186] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0187] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0188] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A video processing method, characterized in that: The method comprises: Displaying a video editing interface, wherein the video editing interface displays a monitor, a material area, and a timeline area; When the monitor displays a video preview screen, in response to a first trigger operation on a zoom component in the monitor, the video preview screen and the canvas corresponding to the video preview screen are controlled to perform a zoom processing corresponding to the first trigger operation, and the video preview screen is a preview screen of the material in the material area or an editing preview screen of the material in the timeline area.
2. The method according to claim 1, characterized in that: After controlling the video preview screen and the canvas corresponding to the video preview screen to perform a zooming process corresponding to the first trigger operation, the method further includes: When the zoom ratio of the zoom component is greater than or equal to 1, a visual window component is displayed on the monitor, and the visual window component is used to indicate the screen offset and the zoom ratio of the zoom component, and the screen offset is used to indicate the position of the screen content that can be currently displayed by the monitor in the canvas after the zoom processing.
3. The method according to claim 2, characterized in that In the case where the zoom factor of the zoom component is greater than or equal to 1, after displaying the visible window component on the monitor, the method further includes: In response to a second trigger operation on the visual window component, acquiring the screen offset corresponding to the second trigger operation; Based on the screen offset corresponding to the second trigger operation, the currently displayable screen content is updated.
4. The method according to claim 3, characterized in that: The visual window assembly includes an outer window element and an inner window element, and the second trigger operation includes at least one of the following: a dragging operation on the inner window element in the outer window element; When the mouse pointer is located in the area where the visual window component is located, rolling the mouse wheel; When the mouse pointer is located in the display area of the monitor, the operation of rolling the mouse wheel; When the mouse pointer is located in the display area of the monitor and the mouse pointer is in a preset shape, a dragging operation on the mouse pointer; When the mouse pointer is located in the area where the visual window component is located, a sliding operation on the touch panel; When the mouse pointer is located in the display area of the monitor, a sliding operation is performed on the touch pad.
5. The method according to claim 2, characterized in that: The visual window component comprises an outer window component and an inner window component, the ratio of the first side length of the outer window component to the first side length of the inner window component is used to indicate the zoom factor of the zoom component, the offset of the reference point of the inner window component relative to the reference point of the outer window component is the screen offset, the size of the outer window component remains unchanged, the aspect ratio of the outer window component is the same as the window ratio of the canvas, and the ratio of the size of the inner window component to the size of the outer window component is used to indicate the ratio of the size of the currently displayable screen content to the current size of the canvas; The first side length is the length of the longer side of the canvas.
6. The method according to claim 2, characterized in that In the case where the zoom factor of the zoom component is greater than or equal to 1, after displaying the visible window component on the monitor, the method further includes: When the video editing interface is canceled from being displayed, the corresponding relationship between the screen offset, the zoom ratio and the editing draft corresponding to the video editing interface is saved.
7. The method according to claim 1, characterized in that The controlling the video preview screen and the canvas corresponding to the video preview screen to perform a zooming process corresponding to the first trigger operation includes: When the operation duration of the first trigger operation is greater than or equal to a duration threshold, refreshing the video preview screen in real time based on the current zoom ratio corresponding to the first trigger operation within the operation duration; Refreshing the canvas periodically according to a preset period within the operation duration and based on the zoom ratio of the current period corresponding to the first trigger operation, and refreshing the canvas based on the zoom ratio corresponding to the end of the first trigger operation when the first trigger operation ends; The duration threshold is greater than the preset period.
8. The method according to claim 1, characterized in that The zoom ratio of the zoom component when the monitor is used to display the editing preview screen corresponding to the material in the timeline area is saved independently from the zoom ratio of the zoom component when the monitor is used to display the preview screen corresponding to the material in the material area.
9. The method according to any one of claims 1 to 8, characterized in that The first trigger operation includes at least one of the following: In the case where the zoom component includes a slide bar element and a slider element, an operation of dragging the slider element to slide along the slide bar element; In the case where the zoom component includes a slide bar element and a slider element, an operation of clicking any position of the slide bar element; In the case where the zoom component includes a zoom-in element and a zoom-out element, an operation of clicking the zoom-in element or the zoom-out element; When the mouse pointer is located in the area where the zoom component is located, an operation of rolling the mouse wheel; When the mouse pointer is located in the display area of the monitor and a preset button is pressed, an operation of rolling the mouse wheel; When the mouse pointer is located in the area where the zoom component is located, the right button of the mouse restores the operation; When the mouse pointer is located in the area where the zoom component is located, a zoom operation on the touch panel; A zoom operation on the touchpad when the mouse pointer is located in the display area of the monitor.
10. The method according to claim 9, characterized in that The zoom component includes the slide bar element and the slider element, the zoom interval corresponding to the slide bar element is greater than or equal to a first zoom threshold and less than or equal to a second zoom threshold, the first zoom threshold is greater than or equal to 0 and less than 1, and the second zoom threshold is greater than 1; The position in the sliding bar element corresponding to the zoom magnification of 1 includes an adsorption line element, and the adsorption line element is used to adsorb the sliding bar element to the position where the adsorption line is located when the absolute value of the difference between the zoom magnification corresponding to the position of the sliding bar element on the sliding bar element and 1 is less than or equal to the difference threshold.
11. A video processing device, characterized in that: include: A display module, used to display a video editing interface, wherein the video editing interface displays a monitor, a material area, and a timeline area; A processing module is used to control the video preview screen and the canvas corresponding to the video preview screen to perform zoom processing corresponding to the first trigger operation in response to a first trigger operation on a zoom component in the monitor when the monitor displays a video preview screen, and the video preview screen is a preview screen of the material in the material area or an edited preview screen of the material in the timeline area.
12. An electronic device, characterized in that: include: A memory and a processor, the memory is used to store a computer program; the processor is used to execute the video processing method according to any one of claims 1 to 10 when calling the computer program.
13. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the video processing method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Long-focus shooting method and electronic equipment
CN114157804A
Canvas zooming method and device, electronic equipment and storage medium
CN114327213A
Video processing method and electronic equipment
CN116095412A
Image processing method and device, electronic equipment and storage medium
CN116171457A
Video clip page zooming method, device and equipment
CN116634224A