Video processing method, device, computer storage medium and electronic device

By drawing new controls on the video frame image and generating control configuration information, and generating videos in combination with video data packets, the problem of lack of flexibility and diversity in video processing in the prior art is solved, and a richer video playback effect is achieved.

CN113873294BActive Publication Date: 2025-04-18SHENZHEN ZHUIYI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111214909.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-19
Publication Date
2025-04-18
Estimated Expiration
2041-10-19

AI Technical Summary

Technical Problem

The existing video processing technology lacks flexibility and diversity in the video production process, and cannot meet users' growing video playback effect needs.

Method used

By obtaining control settings requests, displaying the control panel and video preview artboard, obtaining user operation instructions, using CANVAS to draw new controls on the video frame image, and generating control configuration information, collecting all control configuration information to generate graphic data packets, and finally generating videos based on the video data packet and graphic data packets.

Benefits of technology

It improves the flexibility and diversity of video playback effects and meets users' diverse needs for video playback effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113873294B_ABST
    Figure CN113873294B_ABST
Patent Text Reader

Abstract

The present invention provides a video processing method, device, computer storage medium and electronic device, which obtain a control setting request; trigger a control setting response based on the control setting request, display a control panel and a video preview drawing board, and obtain a user's operation instruction for the control; use CANVAS to draw a new control on a video frame image and generate control configuration information corresponding to the new control; collect all control configuration information to generate a graphic data packet; and generate a video according to a video data packet of a video to be produced and the graphic data packet. In this solution, CANVAS is used to draw a new control on a video frame image and generate control configuration information corresponding to the new control, and then a video with the corresponding control added is obtained according to the video data packet corresponding to the video to be produced and the graphic data packet generated based on the new control, thereby improving the video playback effect and achieving the purpose of satisfying the user's demand for video playback effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a video processing method, device, computer storage medium and electronic equipment. Background Art

[0002] With the widespread application of video processing technology, in the current production process of various types of videos, one video is mostly processed by editing or reorganization, and multiple different videos are mostly processed by splicing, so as to obtain the video required by the user.

[0003] However, the video playback effect obtained based on the above method is relatively simple, inflexible, and lacks diversity, and cannot meet the users' growing demand for video playback effects. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a video editing method, a video editor, a computer storage medium and an electronic device to achieve the purpose of satisfying the user's demand for video playback effect.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] A first aspect of an embodiment of the present invention discloses a video processing method, the method comprising:

[0007] Get control settings request;

[0008] Triggering a control setting response based on the control setting request, displaying a control panel and a video preview drawing board, wherein the video preview drawing board is used to display a video frame image of a control to be added in the video to be produced, and the control panel is used to display the control;

[0009] Obtaining a user's operation instruction for the control;

[0010] Based on the operation instruction, a new control is drawn on the video frame image using CANVAS, and control configuration information corresponding to the new control is generated;

[0011] Gather all control configuration information to generate a graphics data package;

[0012] A video is generated according to the video data packet of the video to be produced and the graphic data packet.

[0013] Preferably, based on the operation instruction, a new control is drawn on the video frame image using CANVAS, and control configuration information is generated, including:

[0014] In response to triggering a drag instruction of the control, confirming the type of the control;

[0015] If the control is a rich text control, obtain pixel information of the rich text control, and use CANVAS to draw a new control on the video frame image of the current control to be added according to the pixel information;

[0016] A configuration operation instruction for the new control is obtained, and control configuration information of the new control is generated based on the configuration operation instruction.

[0017] Preferably, it also includes:

[0018] If the control is a multimedia control, extract pixel point information of any video frame image in the multimedia control, and use CANVAS to draw a preview graphic corresponding to the multimedia control on the video frame image of the current control to be added as a new control according to the pixel point information;

[0019] A configuration operation instruction for the new control is obtained, and control configuration information of the new control is generated based on the configuration operation instruction.

[0020] Preferably, the control setting interface also includes a control configuration panel, which obtains configuration operation instructions for the new control and generates control configuration information of the new control based on the configuration operation instructions, including:

[0021] Obtain the starting and ending mouse coordinates of dragging the new control on the video frame image of the current control to be added;

[0022] Calculate the drag coordinates based on the start and end mouse coordinates;

[0023] The position of the new control on the video frame image of the current control to be added is set according to the dragging coordinates, the position configuration information of the new control is obtained, and the dragging coordinates are displayed on the control configuration panel.

[0024] Preferably, the control setting interface further includes a control configuration panel, which obtains configuration operation instructions for the new control and generates control configuration information of the new control based on the configuration operation instructions, including:

[0025] Determine a rectangular coordinate system of the new control on the video frame image of the current control to be added, with the center point of the new control as the origin;

[0026] Obtain the starting and ending mouse coordinates of rotating the new control based on the rectangular coordinate system;

[0027] Determine the quadrant where the current mouse coordinates are located in the rectangular coordinate system based on the start and end mouse coordinates;

[0028] Calculate the rotation angle of the new control according to the current mouse coordinates and the quadrant in which the mouse is located;

[0029] The display angle of the new control on the video frame image of the current control to be added is set based on the rotation angle to obtain angle configuration information of the new control.

[0030] Preferably, the control setting interface further includes a control configuration panel, which obtains configuration operation instructions for the new control and generates control configuration information of the new control based on the configuration operation instructions, including:

[0031] Acquire style setting parameters for the new control set by the user based on the control configuration panel, wherein the style setting parameters include at least one or more combinations of width, height, length, transparency, line shape, fill color, display effect, and border style;

[0032] Based on the style setting parameters, style configuration information of the new control is generated.

[0033] Preferably, the control setting interface further includes a video time window, the video time window includes a timeline, a video track and a control track, the video track is used to display the video frame images constituting the video to be produced in the order of the timeline, the control track is used to set the duration of the new control, and the acquiring of the configuration operation instruction for the new control and generating the control configuration information of the new control based on the configuration operation instruction includes:

[0034] Determine that the starting position of the new control on the control track corresponds to the starting time point of the time axis, and obtain the display time of the new control;

[0035] Obtain the time period corresponding to the time axis when dragging the new control from the starting position to the ending position, and obtain the duration of the new control;

[0036] Time configuration information is generated based on the display time of the new control and the duration.

[0037] Preferably, the control setting interface further includes an action panel, the action panel is used to input target object action description information, the video time window further includes an action track, and the method further includes:

[0038] Acquire the target object action description information, wherein the target object action description information at least includes the target object and the action description information performed by the target object;

[0039] Determine the position of the video frame image where the target object is located on the time axis, and display the action description information performed by the target object on the action track corresponding to the position;

[0040] Based on the action description information performed by the target object, the video frame image where the target object is located is edited to obtain a video frame data packet corresponding to a new video frame image;

[0041] The video data packet of the video to be produced is updated according to the video frame data packet.

[0042] A second aspect of an embodiment of the present invention discloses a video processing device, the device comprising:

[0043] A first acquisition module, used to acquire a control setting request;

[0044] A response module, used to trigger a control setting response based on the control setting request, display a control panel and a video preview drawing board, wherein the video preview drawing board is used to display a video frame image of a control to be added in the video to be produced, and the control panel is used to display the control;

[0045] A second acquisition module is used to acquire the user's operation instruction for the control;

[0046] A drawing module, used for drawing a new control on the video frame image using CANVAS based on the operation instruction, and generating control configuration information corresponding to the new control;

[0047] The collection module is used to collect all the control configuration information to generate a graphic data package;

[0048] A generating module is used to generate a video according to the video data packet of the video to be produced and the graphic data packet.

[0049] A third aspect of an embodiment of the present invention discloses a computer storage medium, wherein the storage medium includes a storage program, wherein when the program is running, the device where the storage medium is located is controlled to execute the video processing method disclosed in the first aspect of the embodiment of the present invention.

[0050] A fourth aspect of an embodiment of the present invention discloses an electronic device, which is used to run a program, wherein the program executes the video processing method disclosed in the first aspect of the embodiment of the present invention when running.

[0051] Based on the above-mentioned embodiment of the present invention, a video processing method, device, computer storage medium and electronic device are provided, by obtaining a control setting request; triggering a control setting response based on the control setting request, displaying a control panel and a video preview board, the video preview board is used to display the video frame image of the current control to be added in the video to be produced, and the control panel is used to display the control; obtaining the user's operation instruction for the control; based on the operation instruction, using CANVAS to draw a new control on the video frame image, and generating control configuration information corresponding to the new control; collecting all the control configuration information to generate a graphic data packet; generating a video according to the video data packet of the video to be produced and the graphic data packet. In this scheme, CANVAS is used to draw a new control on the video frame image and generate the control configuration information corresponding to the new control, and then the video with the corresponding control added is obtained according to the video data packet corresponding to the video to be produced and the graphic data packet generated based on the new control, thereby improving the video playback effect and achieving the purpose of satisfying the user's demand for video playback effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] 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, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0053] Figure 1 A schematic diagram of an application environment disclosed in an embodiment of the present invention and applicable to an embodiment of the present application;

[0054] Figure 2 A schematic diagram of a flow chart of a video processing method disclosed in an embodiment of the present invention;

[0055] Figure 3 A schematic diagram of a process of constructing a control disclosed in an embodiment of the present invention;

[0056] Figure 4 A schematic flow chart of a method for setting control position configuration information disclosed in an embodiment of the present invention;

[0057] Figure 5 A schematic diagram of an application scenario for setting control position configuration information disclosed in an embodiment of the present invention;

[0058] Figure 6 A schematic flow chart of a method for setting control angle configuration information disclosed in an embodiment of the present invention;

[0059] Figure 7 A schematic diagram of an application scenario for setting control angle configuration information disclosed in an embodiment of the present invention;

[0060] Figure 8 A schematic flow chart of a method for setting control style configuration information disclosed in an embodiment of the present invention;

[0061] Fig. 9 A schematic diagram of a control configuration panel disclosed in an embodiment of the present invention;

[0062] Fig.10 A schematic flow chart of a method for setting the display duration of a new control disclosed in an embodiment of the present invention;

[0063] Fig.11 A flowchart of another video processing method disclosed in an embodiment of the present invention;

[0064] Fig.12 A schematic diagram of the structure of a video processing device disclosed in an embodiment of the present invention;

[0065] Fig.13 A schematic diagram of an application of video production disclosed in an embodiment of the present invention;

[0066] Fig.14 The present invention is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0068] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0069] As can be seen from the background technology, the new video playback effects obtained based on the existing video production methods are single, inflexible, lack of diversity, and can no longer meet the users' growing demand for video playback effects.

[0070] Therefore, the embodiment of the present invention discloses a video processing method, device, computer storage medium and electronic device, which uses CANVAS to draw a new control on a video frame image and generate control configuration information corresponding to the new control, and then obtains a video with the corresponding control added according to the video data packet corresponding to the video to be produced and the graphic data packet generated based on the new control, thereby improving the video playback effect and achieving the purpose of satisfying the user's demand for video playback effect. The following embodiments are specifically described in detail.

[0071] See also Figure 1 , shows a schematic diagram of an application environment applicable to the embodiment of the present application. The video processing method provided in the embodiment of the present application can be used for Figure 1 The interactive system 100 shown in FIG. 1 includes a terminal device 101 and a server 102, and the server 102 is in communication connection with the terminal device 101. The server 102 may be a traditional server or a cloud server, which is not specifically limited here.

[0072] The terminal device 101 may be any electronic device having a display screen, a data processing module, a camera, audio input / output and other functions, and supporting data input, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, a self-service terminal and a wearable electronic device, etc. Specifically, data input may be based on voice input through a voice module on the electronic device, character input through a character input module, etc.

[0073] Optionally, the terminal device may integrate corresponding input devices, such as a radio device, a touch device, etc. The terminal device 101 may also be connected to a peripheral device separately, and input operations are performed through the peripheral device. For example, the peripheral device may be an input device such as a writing board and a mouse.

[0074] Among them, the terminal device 101 may be installed with a client application, and the user may use the client application (such as APP, WeChat applet, etc.), wherein the video editor involved in this embodiment is also a client application configured in the terminal device 101. The user may register a user account on the server 102 based on the client application, or may use a temporary user account as a visitor, and communicate with the server 102 based on the user account, for example, the user logs in to the user account on the client application, and inputs through the client application based on the user account, and may input text information or voice information, etc., or may perform corresponding input operations such as click or drag based on the peripheral device. After receiving the information input by the user, the client application may send the information to the server 102, so that the server 102 may receive the information and process and store it, and the server 102 may also receive the information and return a corresponding output information to the terminal device 101 according to the information.

[0075] In some embodiments, the device for processing the video data to be processed may also be set on the terminal device 101, so that the terminal device 101 can interact with the user without relying on the server 102 to establish communication. In this case, the interactive system 100 may only include the terminal device 101.

[0076] See also Figure 2 , shows a schematic flow chart of a video processing method. The video processing method mainly includes:

[0077] S201: Obtain a control setting request.

[0078] S202: triggering a control setting response based on the control setting request, and displaying a control panel and a video preview drawing board.

[0079] In S202, the control panel and the video preview panel are located on a control setting interface.

[0080] The video preview drawing board is used to display the video frame image of the control to be added in the video to be produced.

[0081] In one embodiment, after the user selects a video frame image to which a control needs to be added in the video to be produced, the video frame image is displayed on the video preview canvas.

[0082] The video preview board has the CANVAS board function, and also has the play and pause functions.

[0083] The control panel is used to display controls. The controls include but are not limited to specific text, picture, shape and other controls. Corresponding controls can also be added according to user needs, such as rich text controls and multimedia controls.

[0084] S203: Acquire the user's operation instruction for the control.

[0085] In the specific implementation of S203, the operation instruction at least includes an operation instruction for triggering the control, and may optionally include a configuration operation instruction for the triggered control.

[0086] The configuration operation instructions include but are not limited to position configuration operation instructions, angle configuration operation instructions, style configuration operation instructions and time configuration operation instructions.

[0087] S204: Based on the operation instruction, draw a new control on the video frame image using CANVAS, and generate control configuration information corresponding to the new control.

[0088] In the specific implementation of S204, based on the operation instruction, the bitmap of the control, that is, the pixel points, is obtained. CANVAS is used to draw the corresponding pixel points on the video preview canvas according to the obtained pixel points of the control, so that the control finally drawn can be displayed on the video frame image on the video preview canvas. If the operation instruction also carries a configuration operation instruction, the control configuration information of the control is generated according to the configuration operation instruction carried in the operation instruction.

[0089] S205: Gather all the control configuration information to generate a graphic data package.

[0090] In the specific implementation of S205, pixel information of all controls drawn by CANVAS and control configuration information corresponding to the controls are collected to generate a graphic data packet.

[0091] Optionally, the new control is drawn based on CANVAS, and the control configuration information is also set based on the video preview canvas, so the control configuration data packet can be output as a graphic data packet.

[0092] S206: Generate a video according to the video data packet of the video to be produced and the graphic data packet.

[0093] In the specific implementation of S206, video rendering is performed based on the control configuration information of all new controls contained in the graphic data packet and each video frame image in the video data packet corresponding to the video to be produced, and finally a video containing the display effect of the new controls is obtained.

[0094] In the video processing method disclosed in the embodiment of the present invention, CANVAS is used to draw a new control on a video frame image and generate control configuration information corresponding to the new control, and then a video with the corresponding control added is obtained based on a video data packet corresponding to the video to be produced and a graphic data packet generated based on the new control, thereby improving the video playback effect and achieving the purpose of satisfying the user's demand for video playback effect.

[0095] Based on the video processing method disclosed in the above embodiment of the present invention, Figure 2 The disclosed S204 uses CANVAS to draw a new control on the video frame image based on the operation instruction and generates a specific implementation method of control configuration information, such as Figure 3 As shown, it mainly includes:

[0096] S301: In response to triggering a drag instruction of the control, confirming the type of the control.

[0097] In the specific implementation of S301, in response to the user dragging a control on the control panel to the video preview canvas using a device such as a mouse or a touch pad, the type of the control currently being dragged is confirmed.

[0098] S302: If the control is a rich text control, obtain pixel information of the rich text control, and use CANVAS to draw a new control on the video frame image of the current control to be added according to the pixel information.

[0099] In S302, the rich text control includes controls of various formats such as a text control, an image control, a shape control, a table control, and a list control.

[0100] S303: If the control is a multimedia control, extract pixel point information of any video frame image in the multimedia control, and use CANVAS to draw a preview graphic corresponding to the multimedia control on the video frame image of the current control to be added as a new control according to the pixel point information.

[0101] In S303, the multimedia controls include controls such as videos and animated pictures.

[0102] S304: Acquire a configuration operation instruction for the new control, and generate control configuration information of the new control based on the configuration operation instruction.

[0103] In one embodiment, in combination with the video processing method disclosed in the above embodiment of the present invention, if the control setting interface also includes a control configuration panel for specifically configuring the control, Figure 3 S304 shown in FIG. 1 obtains a configuration operation instruction for the new control, and generates control configuration information of the new control based on the configuration operation instruction. The specific implementation method is as follows: Figure 4 As shown, it mainly includes:

[0104] S401: Obtain the starting and ending mouse coordinates of dragging the new control on the video frame image of the current control to be added.

[0105] In the specific implementation of S401, the starting mouse coordinates generated when the mouse is dragging the new control are obtained, and when the dragging operation stops, the ending mouse coordinates generated when the dragging of the new control stops are obtained.

[0106] S402: Calculate the drag coordinates based on the start and end mouse coordinates.

[0107] In S402, drag coordinates=end mouse coordinates-start mouse coordinates.

[0108] The starting and ending mouse coordinates are relative coordinates, so the dragging coordinates can also be the current mouse coordinates and the coordinates of the mouse moving relative to the original position of the control.

[0109] S403: Setting the position of the new control on the video frame image of the control to be added according to the dragging coordinates, obtaining position configuration information of the new control, and displaying the dragging coordinates on the control configuration panel.

[0110] In the process of implementing S403, the position configuration information of the new control can be obtained according to the dragging coordinates, and the dragging coordinates are displayed on the control configuration panel. On the one hand, the user can intuitively understand the position of the new control on the video frame image. On the other hand, the user can refer to the dragging coordinates displayed on the control configuration panel to initiate a dragging operation to determine whether to adjust the position of the new control again.

[0111] It should be noted that the coordinate display area on the control configuration panel can display the current mouse coordinates in real time during the mouse dragging process.

[0112] like Figure 5 As shown, Figure 5 5 is a control setting interface 500 including a space panel 501, a video preview drawing board 502 and a control configuration panel 503. The control panel 501 displays circular controls, square controls and rounded corner controls.

[0113] A video frame image of a control to be added and a circular control constructed by the HTML engine are displayed on the video preview drawing board 502 .

[0114] The user executes a drag command on the circular control on the video preview drawing board 502, first obtaining the starting mouse coordinates of the circular control. Figure 5 The starting position of the circular control is indicated by a dotted line. When the dragging operation stops, the ending mouse coordinates generated when the circular control stops dragging are obtained. Figure 5The end position of the circular control is indicated by a solid line. Then, the drag coordinates of the control are obtained based on the starting position and the end position of the mouse, and then the position configuration information of the circular control is obtained based on the drag coordinates. If the drag coordinates finally obtained are coordinates X: 525 and coordinates Y: 108, the above coordinate values ​​are displayed in the control configuration panel 503.

[0115] In an embodiment of the present invention, the dragging coordinates of the new control are determined based on the mouse coordinates corresponding to the control before and after dragging the control, that is, the starting mouse coordinates to determine the position configuration information of the new control, thereby determining the position of the new control on the video frame image.

[0116] In one embodiment, in combination with the video processing method disclosed in the above embodiment of the present invention, if the control setting interface also includes a control configuration panel for specifically configuring the control, Figure 3 S304 shown in FIG. 1 obtains a configuration operation instruction for the new control, and generates control configuration information of the new control based on the configuration operation instruction. The specific implementation method is as follows: Figure 6 As shown, it mainly includes:

[0117] S601: Determine a rectangular coordinate system of the new control on the video frame image of the current control to be added, with the center point of the new control as the origin.

[0118] In S601 , the rectangular coordinate system is composed of an X-axis and a Y-axis, and has four quadrants: quadrant 1, quadrant 2, quadrant 3, and quadrant 4.

[0119] S602: Obtain the start and end mouse coordinates of rotating the new control based on the rectangular coordinate system.

[0120] S603: Determine the quadrant in which the current mouse coordinates are located in the rectangular coordinate system based on the start and end mouse coordinates.

[0121] In the specific implementation of S604, the current mouse coordinates are determined according to the start and end mouse coordinates, and then the quadrant of the current mouse coordinates in the rectangular coordinate system is determined.

[0122] It should be noted that the ending mouse coordinates may also be directly used as the current mouse coordinates.

[0123] S604: Calculate the rotation angle of the new control according to the current mouse coordinates and the quadrant in which the mouse is located.

[0124] In the specific implementation of S604, the rotation angle of the new control is calculated according to the current mouse coordinates and the quadrant where the mouse is located.

[0125] Among them, if the current mouse coordinates are in the first quadrant: the rotation angle = the angle between the current mouse coordinates and the X-axis.

[0126] If the current mouse coordinates are in the second quadrant: rotation angle = the angle between the current mouse coordinates and the Y axis + 90 degrees.

[0127] If the current mouse coordinates are in the third quadrant: rotation angle = the angle between the current mouse coordinates and the X-axis + 180 degrees.

[0128] If the current mouse coordinates are in the fourth quadrant: rotation angle = the angle between the current mouse coordinates and the Y axis + 270 degrees.

[0129] S605: Setting a display angle of the new control on the video frame image of the current control to be added based on the rotation angle, and obtaining angle configuration information of the new control.

[0130] It should be noted that in the angle display area on the control configuration panel, the rotation angle of the new control can be displayed in real time while the mouse is dragging the new control to rotate.

[0131] Combination Figure 5 To explain, Figure 7 As shown, Figure 7 502. A video frame image of a control to be added and a circular control constructed by an HTML engine are displayed on the video preview drawing board 502. Optionally, the position configuration information of the circular control on the video frame image displayed on the video preview drawing board 502 may also be a circular control with position configuration information set.

[0132] The user executes a rotation instruction for the circular control on the video preview drawing board 502, firstly obtaining the starting mouse coordinates for rotating the circular control. Figure 7 The starting position of the circular control before rotation is indicated by a solid origin. When the drag operation stops, the ending mouse coordinates generated when the rotation of the circular control stops are obtained. Figure 7 The final position of the circular control after rotation is represented by a hollow origin. Then, the quadrant in which the current mouse coordinates are located in the rectangular coordinate system is determined based on the start and end mouse coordinates. The rotation angle of the new control is calculated based on the current mouse coordinates and the quadrant in which they are located, and the display angle of the new control on the video frame image of the current control to be added is set based on the rotation angle to obtain the angle configuration information of the new control. If the final rotation angle is 180 degrees, the above rotation angle is displayed in the control configuration panel 503.

[0133] In the embodiment of the present invention, a rectangular coordinate system is established with the center point of the new control as the origin. According to the current mouse coordinates corresponding to the control determined after the control is rotated and the quadrant in which the mouse coordinates are located, the rotation angle of the new control is determined, the angle configuration information of the new control is obtained, and then the angle of the new control on the video frame image is determined.

[0134] In one embodiment, in combination with the video processing method disclosed in the above embodiment of the present invention, if the control setting interface also includes a control configuration panel for specifically configuring the control, Figure 3 S304 shown in FIG. 1 obtains a configuration operation instruction for the new control, and generates control configuration information of the new control based on the configuration operation instruction. The specific implementation method is as follows: Figure 8 As shown, it mainly includes:

[0135] S801: Acquire style setting parameters for the new control set by the user based on the control configuration panel.

[0136] The style setting parameters include at least one or more combinations of width, height, length, transparency, line shape, fill color, display effect and border style.

[0137] S802: Generate style configuration information of the new control based on the style setting parameters.

[0138] like Fig. 9 As shown, the Fig. 9 It is a control configuration panel 503. It includes input boxes for width, height, length, transparency, line shape, fill color, and display effect.

[0139] In the embodiment of the present invention, the style parameters of the new control can be freely set through the input boxes or selection boxes of various style setting parameters provided by the control configuration panel, thereby making the style of the new control displayed on the video frame image more diverse.

[0140] In one embodiment, in combination with the video processing method disclosed in the above embodiment of the present invention, if the control setting interface also includes a video time window, the video time window includes a timeline, a video track and a control track, the video track is used to display the video frame images constituting the video to be produced in the order of the timeline, and the control track is used to set the duration of the new control, Figure 3 S304 shown in FIG. 1 obtains a configuration operation instruction for the new control, and generates control configuration information of the new control based on the configuration operation instruction. The specific implementation method is as follows: Fig.10 As shown,

[0141] S1001: Determine that the starting position of the new control on the control track corresponds to the starting time point of the time axis, and obtain the display time of the new control.

[0142] In the process of implementing S1001, from the time axis, the closer to the left side of the time axis, the earlier the control appears; the closer to the right side of the time axis, the later the control appears.

[0143] S1002: Obtain the time period corresponding to the time axis when the new control is dragged from the starting position to the ending position, and obtain the duration of the new control.

[0144] In the specific implementation of S1002 , the button may be dragged to the left or to the right with reference to the time axis and the starting time point.

[0145] If you drag to the right, the time period on the time axis between the time point corresponding to the end position and the start time point is the duration of the new control.

[0146] If you drag to the left, the time point corresponding to the end position is the actual time point when the control appears, that is, dragging the control to the left advances its appearance time. Similarly, the time period on the time axis between the time point corresponding to the end position and the original start time point is the duration of the new control's appearance.

[0147] It should be noted that by stretching the above-determined time period, the duration of the new control can be adjusted again, wherein stretching increases the duration of the new control, and compression reduces the duration of the new control.

[0148] S1003: Generate time configuration information based on the display time of the new control and the duration.

[0149] It should be noted that controls that conflict with each other in display time are located in different control layers, that is, layers or panel layers.

[0150] In the embodiment of the present invention, the appearance duration of the new control can be flexibly adjusted or set based on the time axis, so that the display of the control on the video frame image is more flexible and not limited to one video frame image.

[0151] In one embodiment, in combination with the video processing method disclosed in the above embodiment of the present invention, if the control setting interface also includes an action panel, the action panel is used to input the target object action description information, and the video time window also includes an action track, the video processing method, such as Fig.11 As shown, it also includes:

[0152] S1101: Obtain the target object action description information.

[0153] In S1101, the target object action description information includes at least the target object and the action description information performed by the target object.

[0154] S1102: Determine the position of the video frame image where the target object is located on the time axis, and display the action description information performed by the target object on the action track corresponding to the position.

[0155] S1103: Edit the video frame image where the target object is located based on the action description information performed by the target object, and obtain a video frame data packet corresponding to a new video frame image.

[0156] S1104: Update the video data packet of the video to be produced according to the video frame data packet.

[0157] In an embodiment of the present invention, by setting the target object action description information, the action of the target object in the video to be produced can be set, thereby changing the original video frame image, and replacing the original video frame data packet with the video frame data packet corresponding to the new video frame image, thereby making the video display effect more diverse and not based on the original video material.

[0158] Based on the video processing method disclosed in the above embodiment of the present invention, the embodiment of the present invention also discloses a video processing device, see Fig.12 The present invention is a schematic diagram of the structure of a video processing device disclosed in an embodiment of the present invention.

[0159] The video processing device 1200 includes: a first acquisition module 1201 , a response module 1202 , a second acquisition module 1203 , a drawing module 1204 , a collection module 1205 and a generation module 1206 .

[0160] The first acquisition module 1201 is used to acquire a control setting request.

[0161] The response module 1202 is used to trigger a control setting response based on the control setting request, display a control panel and a video preview board, the video preview board is used to display the video frame image of the control to be added in the video to be produced, and the control panel is used to display the control.

[0162] The second acquisition module 1203 is used to acquire the user's operation instruction for the control.

[0163] The drawing module 1204 is used to draw a new control on the video frame image using CANVAS based on the operation instruction, and generate control configuration information corresponding to the new control.

[0164] The collection module 1205 is used to collect all the control configuration information to generate a graphic data package.

[0165] The generating module 1206 is used to generate a video according to the video data packet of the video to be produced and the graphic data packet.

[0166] In one embodiment, the drawing module 1204 includes:

[0167] The type confirmation module is used to confirm the type of the control in response to triggering the drag instruction of the control.

[0168] The rich text module is used to obtain the pixel information of the rich text control if the control is a rich text control, and use CANVAS to draw a new control on the video frame image of the current control to be added according to the pixel information.

[0169] The multimedia module is used to extract the pixel point information of any video frame image in the multimedia control if the control is a multimedia control, and use CANVAS to draw a preview graphic corresponding to the multimedia control as a new control on the video frame image of the current control to be added according to the pixel point information.

[0170] The configuration module is used to obtain a configuration operation instruction for the new control and generate control configuration information of the new control based on the configuration operation instruction.

[0171] In one embodiment, the configuration module is specifically used to: obtain the start and end mouse coordinates of dragging the new control on the video frame image of the current control to be added; calculate the drag coordinates based on the start and end mouse coordinates; set the position of the new control on the video frame image of the current control to be added according to the drag coordinates, obtain the position configuration information of the new control, and display the drag coordinates on the control configuration panel.

[0172] In one embodiment, the configuration module is specifically used to: determine a rectangular coordinate system established with the new control's own center point as the origin on the video frame image of the current control to be added; obtain the start and end mouse coordinates of rotating the new control based on the rectangular coordinate system; determine the quadrant in the rectangular coordinate system where the current mouse coordinates are located based on the start and end mouse coordinates; calculate the rotation angle of the new control based on the current mouse coordinates and the quadrant where they are located; set the display angle of the new control on the video frame image of the current control to be added based on the rotation angle, and obtain the angle configuration information of the new control.

[0173] In one embodiment, the configuration module is specifically used to: obtain the style setting parameters of the new control set by the user based on the control configuration panel, wherein the style setting parameters include at least one or more combinations of width, height, length, transparency, line shape, fill color, display effect and border style; and generate style configuration information of the new control based on the style setting parameters.

[0174] In one embodiment, if the control setting interface also includes a video time window, the video time window includes a timeline, a video track and a control track, the video track is used to display the video frame images constituting the video to be produced in order of the timeline, and the control track is used to set the duration of the new control. The configuration module is specifically used to: determine that the starting position of the new control on the control track corresponds to the starting time point of the timeline, and obtain the display time of the new control; obtain the time period corresponding to the timeline when dragging the new control from the starting position to the end position, and obtain the duration of the new control; generate time configuration information based on the display time of the new control and the duration.

[0175] In one embodiment, if the control setting interface also includes an action panel, the action panel is used to input the target object action description information, and the video time window also includes an action track, the device also includes an action setting module, the action setting module is used to obtain the target object action description information, the target object action description information at least includes the target object and the action description information performed by the target object; determine the position of the video frame image where the target object is located on the timeline, and display the action description information performed by the target object on the action track corresponding to the position. Edit the video frame image where the target object is located based on the action description information performed by the target object, and obtain a video frame data packet corresponding to the new video frame image; update the video data packet of the video to be produced according to the video frame data packet.

[0176] In the video processing device disclosed in the embodiment of the present invention, CANVAS is used to draw a new control on a video frame image and generate control configuration information corresponding to the new control, and then a video with the corresponding control added is obtained according to a video data packet corresponding to the video to be produced and a graphic data packet generated based on the new control, thereby improving the video playback effect and achieving the purpose of satisfying the user's demand for the video playback effect.

[0177] Based on the video processing method and device disclosed in the above embodiments of the present invention, please refer to Fig.13 , is a schematic diagram of an application of video production disclosed in an embodiment of the present invention, which is suitable for a video editor 1300.

[0178] The video editor 1300 at least includes a basic content setting interface 1301 and a control setting interface 1302 .

[0179] The basic content setting interface 1301 and the control setting interface 1302 are displayed in a tab manner, and the corresponding interface is displayed when the corresponding operation is triggered.

[0180] The basic content setting interface 1301 is used to display components for setting the basic content of the video.

[0181] The control setting interface 1302 includes at least a control panel 13011 , a video preview drawing board 13012 , a control configuration panel 13013 and a video time window 13014 .

[0182] The control panel 13011 is used to display controls, which include but are not limited to text, pictures and shapes, and corresponding controls can be added according to user needs, such as adding multimedia controls.

[0183] The video preview drawing board 13012 is used to display the video frame image of the control to be added in the video to be produced.

[0184] The control configuration panel 13013 is used to display components for setting the name, style, display effect, appearance time, etc. of the control.

[0185] In the specific process of video production, in response to the triggering of the control setting request, the control setting interface 1302 is displayed.

[0186] On the video time window 13014, a timeline is displayed, and based on the timeline, each video frame image constituting the video to be produced is displayed on the main video track.

[0187] The user executes the video processing method disclosed in the above-mentioned embodiment of the present invention based on the control panel 13011, the video preview canvas 13012, the control configuration panel 13013 and the video time window 13014, adds rich text control 1, rich text control 2 and multimedia control 1 to the video frame image of the video to be produced, and displays the corresponding configuration information on the control track corresponding to the control layer of the video time window 13014 and on the action track corresponding to the action layer.

[0188] Based on the video processing device disclosed in the above embodiment of the present disclosure, the above modules can be implemented by a hardware device composed of a processor and a memory. Specifically, the above modules are stored in the memory as program units, and the processor executes the above program units stored in the memory to implement thread control.

[0189] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the database capacity can be expanded by adjusting the kernel parameters.

[0190] The embodiment of the present disclosure provides a computer storage medium, wherein the storage medium includes a storage program, wherein when the program is executed, a device where the storage medium is located is controlled to execute the video processing method disclosed in the embodiment of the present disclosure.

[0191] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0192] An embodiment of the present disclosure provides an electronic device, which is used to run a program, wherein the program executes the video processing method disclosed in the above embodiment of the present disclosure when running.

[0193] like Fig.14 , which is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure.

[0194] The electronic device 1400 in the embodiment of the present disclosure may be a server, a PC, a PAD, a mobile phone, etc.

[0195] The electronic device 1400 includes at least one processor 1401 , at least one memory 1402 connected to the processor, and a bus 1403 .

[0196] The processor 1401 and the memory 1402 communicate with each other via the bus 1403 .

[0197] The processor 1401 is used to execute the program stored in the memory.

[0198] The memory 1402 is used to store a program, which is at least used to:

[0199] Obtain a control setting request; trigger a control setting response based on the control setting request, display a control panel and a video preview canvas, the video preview canvas is used to display the video frame image of the control to be added in the video to be produced, and the control panel is used to display the control; obtain the user's operation instruction for the control; based on the operation instruction, use CANVAS to draw a new control on the video frame image, and generate control configuration information corresponding to the new control; gather all the control configuration information to generate a graphic data packet; generate a video according to the video data packet of the video to be produced and the graphic data packet.

[0200] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.

[0201] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.

[0202] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0203] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0204] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A video processing method, characterized in that: The method comprises: Get control settings request; Triggering a control setting response based on the control setting request, displaying a control panel and a video preview drawing board, wherein the video preview drawing board is used to display a video frame image of a control to be added in the video to be produced, and the control panel is used to display controls, wherein the controls include rich text controls and multimedia controls; Obtaining a user's operation instruction for the control, wherein the operation instruction carries a configuration operation instruction; Based on the operation instruction, the pixel points of the control are obtained, and the corresponding pixel points are drawn on the video frame image according to the obtained pixel points of the space using CANVAS to obtain a new control, and the control configuration information corresponding to the new control is generated based on the configuration operation instruction; The pixel information of all controls drawn by CANVAS and the control configuration information corresponding to the controls are collected to generate a graphic data packet; Generate a video according to the video data packet of the video to be produced and the graphic data packet; Wherein, generating a video according to the video data packet of the video to be produced and the graphic data packet comprises: Performing video rendering based on the control configuration information of all new controls contained in the graphic data packet and each video frame image in the video data packet corresponding to the video to be produced, to obtain a video containing the display effect of the new controls; Wherein, based on the operation instruction, using CANVAS to draw a new control on the video frame image and generate control configuration information includes: In response to triggering a drag instruction of the control, confirming the type of the control; If the control is a rich text control, obtain pixel information of the rich text control, and use CANVAS to draw a new control on the video frame image of the current control to be added according to the pixel information; Acquire a configuration operation instruction for the new control, and generate control configuration information of the new control based on the configuration operation instruction; If the control is a multimedia control, extract pixel point information of any video frame image in the multimedia control, and use CANVAS to draw a preview graphic corresponding to the multimedia control on the video frame image of the current control to be added as a new control according to the pixel point information; A configuration operation instruction for the new control is obtained, and control configuration information of the new control is generated based on the configuration operation instruction.

2. The method according to claim 1, characterized in that The control setting interface also includes a control configuration panel, which obtains configuration operation instructions for the new control and generates control configuration information of the new control based on the configuration operation instructions, including: Obtain the starting and ending mouse coordinates of dragging the new control on the video frame image of the current control to be added; Calculate the drag coordinates based on the start and end mouse coordinates; The position of the new control on the video frame image of the current control to be added is set according to the dragging coordinates, the position configuration information of the new control is obtained, and the dragging coordinates are displayed on the control configuration panel.

3. The method according to claim 1, characterized in that The control setting interface also includes a control configuration panel, which obtains configuration operation instructions for the new control and generates control configuration information of the new control based on the configuration operation instructions, including: Determine a rectangular coordinate system of the new control on the video frame image of the current control to be added, with the center point of the new control as the origin; Obtain the starting and ending mouse coordinates of rotating the new control based on the rectangular coordinate system; Determine the quadrant where the current mouse coordinates are located in the rectangular coordinate system based on the start and end mouse coordinates; Calculate the rotation angle of the new control according to the current mouse coordinates and the quadrant in which the mouse is located; The display angle of the new control on the video frame image of the current control to be added is set based on the rotation angle to obtain angle configuration information of the new control.

4. The method according to claim 1, characterized in that The control setting interface also includes a control configuration panel, which obtains configuration operation instructions for the new control and generates control configuration information of the new control based on the configuration operation instructions, including: Acquire style setting parameters for the new control set by the user based on the control configuration panel, wherein the style setting parameters include at least one or more combinations of width, height, length, transparency, line shape, fill color, display effect, and border style; Based on the style setting parameters, style configuration information of the new control is generated.

5. The method according to claim 1, characterized in that The control setting interface also includes a video time window, the video time window includes a timeline, a video track and a control track, the video track is used to display the video frame images constituting the video to be produced in the order of the timeline, the control track is used to set the duration of the new control, and the configuration operation instruction for the new control is obtained, and the control configuration information of the new control is generated based on the configuration operation instruction, including: Determine that the starting position of the new control on the control track corresponds to the starting time point of the time axis, and obtain the display time of the new control; Obtain the time period corresponding to the time axis when dragging the new control from the starting position to the ending position, and obtain the duration of the new control; Time configuration information is generated based on the display time of the new control and the duration.

6. The method according to claim 5, characterized in that The control setting interface further includes an action panel, the action panel is used to input target object action description information, the video time window further includes an action track, and the method further includes: Acquire the target object action description information, wherein the target object action description information at least includes the target object and the action description information performed by the target object; Determine the position of the video frame image where the target object is located on the time axis, and display the action description information performed by the target object on the action track corresponding to the position; Based on the action description information performed by the target object, the video frame image where the target object is located is edited to obtain a video frame data packet corresponding to a new video frame image; The video data packet of the video to be produced is updated according to the video frame data packet.

7. A video processing device, characterized in that: The device comprises: A first acquisition module, used for acquiring a control setting request; A response module, used to trigger a control setting response based on the control setting request, display a control panel and a video preview drawing board, the video preview drawing board is used to display a video frame image of a control to be added in the video to be produced, and the control panel is used to display controls, including rich text controls and multimedia controls; A second acquisition module is used to acquire the user's operation instruction for the control, wherein the operation instruction carries a configuration operation instruction; A drawing module, used to obtain pixel points of the control based on the operation instruction, use CANVAS to draw corresponding pixel points on the video frame image according to the obtained pixel points of the space to obtain a new control, and generate control configuration information corresponding to the new control based on the configuration operation instruction; The collection module is used to collect pixel information of all controls drawn by CANVAS and control configuration information corresponding to the controls to generate a graphic data packet; A generating module, used for generating a video according to the video data packet of the video to be produced and the graphic data packet; Wherein, generating a video according to the video data packet of the video to be produced and the graphic data packet comprises: Performing video rendering based on the control configuration information of all new controls contained in the graphic data packet and each video frame image in the video data packet corresponding to the video to be produced, to obtain a video containing the display effect of the new controls; The drawing module comprises: A type confirmation module, configured to confirm the type of the control in response to triggering a drag instruction of the control; A rich text module, for obtaining pixel information of the rich text control if the control is a rich text control, and drawing a new control on the video frame image of the current control to be added according to the pixel information by using CANVAS; A multimedia module, for extracting pixel information of any video frame image in the multimedia control if the control is a multimedia control, and using CANVAS to draw a preview graphic corresponding to the multimedia control on the video frame image of the control to be added as a new control according to the pixel information; The configuration module is used to obtain a configuration operation instruction for the new control and generate control configuration information of the new control based on the configuration operation instruction.

8. A computer storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the video processing method according to any one of claims 1 to 6 is implemented.

9. An electronic device comprising a memory, a processor and a program stored in the memory, characterized in that: The processor executes the program to implement the video processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for adding visual object into video, electronic equipment and storage medium

    CN110636382A