A video processing method, apparatus, device, storage medium, and product
Patent Information
- Application Number
- CN202210602314.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2042-05-30
AI Technical Summary
实践发现,各个分镜的封面图像通常是在视频编辑过程中,按照预设频率进行更新,实时性较差
[0073] In this embodiment, whenever a target element in the video is edited, the first application provides the second application with the time information of the target element. The second application renders the target image frame to obtain a rendered image, and determines the target storyboard that needs to be updated by using the time information of the target element and the temporal relationship between the presentation time of each storyboard. Based on the rendered image and the target storyboard identifier returned by the second application, the first application updates the cover of the target storyboard to the rendered image, thereby realizing the real-time update of the cover of the storyboard to which the edited target element belongs.
Smart Images

Figure CN117201892B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a video processing method, apparatus, device, storage medium, and product. Background Technology
[0002] With advancements in technology, video production has become increasingly convenient. During video production, it's common to break down a video into one or more scenes. To help producers quickly identify which scenes need editing, video editing applications typically display cover images for each scene during production. However, in practice, these cover images are usually updated at a preset frequency during video editing, resulting in poor real-time performance. Summary of the Invention
[0003] This invention provides a video processing method, apparatus, device, and computer-readable storage medium that can update the cover of the storyboard to which the target element being edited in the video belongs in real time.
[0004] On one hand, embodiments of this application provide a video processing method, including:
[0005] Receive the time information of the target element sent by the first application; the target element is the element being edited in the target image frame of the video; the video contains at least one shot, and each shot corresponds to a presentation period;
[0006] Render the target image frame to obtain the rendered image;
[0007] Based on the temporal relationship between time information and the presentation time of each scene, the target scene to which the rendered image belongs is determined;
[0008] Return the rendered image and the identifier of the target storyboard to the first application so that the first application can render the rendered image based on the identifier of the target storyboard.
[0009] In this embodiment, the system receives the time information of the target element sent by the first application, renders the target image frame to obtain a rendered image, and determines the target storyboard to which the rendered image belongs based on the temporal relationship between the time information and the presentation time periods of each storyboard. The rendered image and the identifier of the target storyboard are then returned to the first application, enabling the first application to present the rendered image under the target storyboard based on its identifier. Thus, on the one hand, when the target element in the target image frame is edited, the target image frame is rendered to obtain a rendered image; on the other hand, the storyboard cover to be updated is determined through the time information of the target element and its temporal relationship with the presentation time periods of each storyboard; thereby achieving real-time updating of the storyboard cover to which the edited target element belongs.
[0010] On one hand, embodiments of this application provide a video processing method, including:
[0011] When editing of a target element in a target image frame of a video is detected, the timing information of the target element is obtained. The video contains at least one shot, and each shot corresponds to a presentation period.
[0012] Send time information to the second application so that the second application can render the target image frame to obtain the rendered image, and make the second application determine the target scene to which the rendered image belongs based on the time information and the temporal relationship between the presentation time of each scene.
[0013] Receive the rendered image and target storyboard identifier returned by the second application;
[0014] Based on the identifier of the target storyboard, a rendered image is presented under the target storyboard.
[0015] In this embodiment, when editing of a target element in a target image frame of a video is detected, the time information of the target element is obtained and sent to the second application. The second application then renders the target image frame to obtain a rendered image. Based on the temporal relationship between the time information and the presentation time of each scene, the second application determines the target scene to which the rendered image belongs. The application receives the rendered image and the identifier of the target scene returned by the second application. Based on the identifier of the target scene, the rendered image is presented under the target scene. Therefore, whenever a target element in the video is edited, the time information of the edited target element is provided to the second application, enabling the second application to determine the target scene corresponding to the rendered image based on the time information. Based on the rendered image and the target scene identifier returned by the second application, the cover of the scene to which the edited target element belongs is updated in real time.
[0016] On one hand, embodiments of this application provide a video processing apparatus, which includes:
[0017] The receiving unit is used to receive the time information of the target element sent by the first application; the target element is the element being edited in the target image frame of the video; the video contains at least one shot, and each shot corresponds to a presentation period.
[0018] The processing unit is used to render the target image frame to obtain the rendered image;
[0019] And to determine the target scene to which the rendered image belongs based on the temporal relationship between time information and the presentation period of each scene;
[0020] And an identifier for returning a rendered image and a target storyboard to a first application, so that the first application renders the rendered image based on the identifier of the target storyboard.
[0021] In one implementation, if the editing process of the target element requires the use of new resources, the receiving unit is further configured to:
[0022] Receive new resources sent by the first application;
[0023] The processing unit is used to render the target image frame to obtain a rendered image, specifically for:
[0024] Based on the newly added resources, the target image frame is rendered to obtain the rendered image.
[0025] In one implementation, the processing unit is configured to determine the target scene to which the rendered image belongs based on the temporal relationship between time information and the presentation periods of each scene, specifically configured to:
[0026] Obtain the presentation time of each shot in the video, and the presentation time of each shot does not overlap;
[0027] Determine the target presentation period associated with the time information, and identify the storyboard corresponding to the target presentation period as the target storyboard to which the rendered image belongs.
[0028] In one implementation, the processing unit is configured to acquire the presentation time periods of each scene in the video, specifically for:
[0029] Obtain the initial rendering time and duration of each shot in the video;
[0030] The presentation period of each scene is determined based on its initial presentation time and duration.
[0031] In one implementation, the processing unit is configured to render the target image frame to obtain a rendered image, specifically for:
[0032] Obtain the display rules of each element in the target image frame. The display rules of each element are used to indicate the display status of the element during the rendering process.
[0033] If there are implicit elements in the target image frame that are hidden, then during the rendering process of the target image frame, the implicit elements are hidden to obtain the rendered image.
[0034] In one implementation, the processing unit is configured to, if there are implicit elements in the target image frame that are hidden in a hidden state, hide the implicit elements during the rendering process of the target image frame to obtain a rendered image, specifically configured to:
[0035] Display the target image frame;
[0036] The target image frame is rendered to obtain the image frame to be processed. If there are implicit elements in the image frame to be processed that are hidden, then the implicit elements are hidden, and the rendered image is obtained and presented; or,
[0037] If there are implicit elements in the target image frame that are hidden, then the implicit elements are hidden to obtain an intermediate image frame. The intermediate image frame is then rendered to obtain and present the rendered image.
[0038] In one embodiment, the processing unit is further configured to:
[0039] In response to the implicit element's display state meeting the switching condition, the implicit element's display state is switched to be rendered.
[0040] Display implicit elements in the rendered image.
[0041] In one implementation, the processing unit is configured to render the target image frame to obtain a rendered image, specifically for:
[0042] Acquire the target image frame;
[0043] Render the target image frame to obtain the image to be edited;
[0044] The image to be edited is preprocessed to obtain the rendered image;
[0045] The preprocessing methods include at least one of the following: scaling and cropping.
[0046] In one embodiment, the processing unit is further configured to:
[0047] If the format of the rendered image is different from the preset format, the rendered image will be converted to obtain the converted rendered image.
[0048] Based on a preset path, the rendered image is stored in a preset folder, and the data in the preset folder will not be reclaimed by the operating system.
[0049] In one embodiment, the receiving unit is configured to acquire the target image frame, specifically for:
[0050] Obtain the target image frame sent by the first application; or,
[0051] The target image frame is determined from the video based on the time information.
[0052] In one embodiment, the processing unit is further configured to:
[0053] Store time information in the message management class;
[0054] Among them, the message management class belongs to the second application. The message management class exists during the existence of the second application, and the second application can obtain time information from the message management class at any time during its existence.
[0055] On one hand, embodiments of this application provide a video processing apparatus, which includes:
[0056] The transceiver unit is used to obtain the time information of the target element when it is detected that the target element in the target image frame of the video is being edited. The video contains at least one shot, and each shot corresponds to a presentation period.
[0057] And for sending time information to the second application, so that the second application can render the target image frame to obtain a rendered image, and for the second application to determine the target scene to which the rendered image belongs based on the time information and the temporal relationship between the presentation time of each scene;
[0058] And identifiers for receiving rendered images and target storyboards returned by the second application;
[0059] The processing unit is used to render images in the target storyboard based on the identifier of the target storyboard.
[0060] In one implementation, if the editing process of the target element requires the use of new resources, the transceiver unit is further configured to:
[0061] Send the new resources to the second application, so that the second application can render the target image frame based on the new resources to obtain the rendered image.
[0062] In one embodiment, the processing unit is further configured to:
[0063] When the message synchronization condition is detected, the second application sends the scene information of at least one scene. The scene information of each scene includes the initial presentation time and the duration of the scene.
[0064] The message synchronization conditions include any of the following: the current time is consistent with the preset message synchronization time, a segment information retrieval request is received from the second application, or at least one segment has been edited.
[0065] In one embodiment, the processing unit is further configured to:
[0066] The transceiver unit receives the updated image and the target scene identifier returned by the second application. The updated image is obtained by the second application rendering the rendered image. The target scene identifier is determined by the second application based on the temporal relationship between the time information of the elements being edited in the rendered image and the presentation time of each scene.
[0067] Replace the rendered image with the updated image.
[0068] Accordingly, this application provides a computer device comprising:
[0069] A processor is used to load and execute computer programs;
[0070] A memory containing a computer program, which, when executed by a processor, implements the aforementioned video processing method.
[0071] Accordingly, this application provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and executed by the above-described video processing method.
[0072] Accordingly, this application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned video processing method.
[0073] In this embodiment, whenever a target element in the video is edited, the first application provides the second application with the time information of the target element. The second application renders the target image frame to obtain a rendered image, and determines the target storyboard that needs to be updated by using the time information of the target element and the temporal relationship between the presentation time of each storyboard. Based on the rendered image and the target storyboard identifier returned by the second application, the first application updates the cover of the target storyboard to the rendered image, thereby realizing the real-time update of the cover of the storyboard to which the edited target element belongs. Attached Figure Description
[0074] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0075] Figure 1 An architecture diagram of a video processing system provided in this application embodiment;
[0076] Figure 2 A flowchart illustrating a video processing method provided in an embodiment of this application;
[0077] Figure 3 A flowchart illustrating another video processing method provided in this application embodiment;
[0078] Figure 4A schematic diagram of a rendering process provided in an embodiment of this application;
[0079] Figure 5 A flowchart illustrating another video processing method provided in this application embodiment;
[0080] Figure 6 A flowchart illustrating yet another video processing method provided in this application embodiment;
[0081] Figure 7a An application interface diagram provided for an embodiment of this application;
[0082] Figure 7b A schematic diagram of a video processing flow provided in an embodiment of this application;
[0083] Figure 8 This is a schematic diagram of the structure of a video processing apparatus provided in an embodiment of this application;
[0084] Figure 9 This is a schematic diagram of another video processing apparatus provided in an embodiment of this application;
[0085] Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0086] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0087] Please see Figure 1 , Figure 1 This is an architecture diagram of a video processing system provided in an embodiment of this application. Figure 1As shown, the video processing system may include a first application 101 and a second application 102. One video processing method provided in this application embodiment can be executed by the first application 101, and another video processing method can be executed by the second application 102. The first application 101 may include an interface development toolkit, and the second application 102 may include a cross-platform engine. In practical applications, the first application 101 and the second application 102 can be simultaneously installed on the same device, for example, the first application 101 and the second application 102 can be simultaneously installed on a terminal device or a server; the first application 101 and the second application 102 can also be installed on different devices, for example, the first application 101 can be installed on a terminal device, and the second application 102 can be installed on a server; or, the first application 101 can be installed on a server, and the second application 102 can be installed on a terminal device. Terminal devices include, but are not limited to, smartphones (such as Android phones, iOS phones, etc.), tablet computers, portable personal computers, smart home appliances, in-vehicle terminals, and other smart devices; this application embodiment does not limit the specific type of terminal device. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. This application does not limit this.
[0088] It should be noted that when the first application 101 and the second application 102 are mounted on different devices, the devices can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions on this. The correspondence between the devices can be one-to-one, one-to-many, or many-to-many.
[0089] The general principles of video processing solutions are as follows:
[0090] (1) When the first application 101 detects that the target element in the target image frame of the video is being edited, the time information of the target element is obtained.
[0091] The target element can be an element already existing in the target image frame, or an element to be added to the target image frame. The target element can be a background, a character, a character's expression, a character's action, etc., and this application does not impose any restrictions. Editing can include adding, modifying, and deleting. Modification can specifically include scaling, shifting, flipping, etc. The timing information of the target element can include at least one of the following: the time the target element was edited in the video, and the start time the target element was presented in the video. For example, suppose an object shifts item A (i.e., the target element) at 1 minute and 15 seconds into the video, and item A is presented in the video at 1 minute and 2 seconds. Then the timing information of item A can include at least one of the following: the time item A was edited in the video at 1 minute and 15 seconds, and the start time item A was presented in the video at 1 minute and 2 seconds.
[0092] In addition, the video contains at least one shot, each shot corresponding to a segment of time in the video; a shot refers to the arrangement of a frame in the video, usually by breaking down consecutive image frames into units of one camera movement. For example, the video contains three shots: the first shot is presented from 0 minutes 0 seconds to 1 minute 15 seconds, the second shot is presented from 1 minute 16 seconds to 3 minutes 20 seconds, and the third shot is presented from 3 minutes 21 seconds to 5 minutes 18 seconds.
[0093] (2) The first application 101 sends the target element time information to the second application 102; in one embodiment, if new resources are needed during the editing process of the target element, the first application 101 will also send the new resources to the second application 102. The new resources can be obtained by the first application 101 from a resource database, downloaded by the first application from the network, or uploaded by the object. The ways in which the first application 101 sends the new resources to the second application 102 include: the first application 101 directly sends the new resources to the second application 102, or the first application 101 sends the path to obtain the new resources (such as the folder where the new resources are stored, the URL for downloading the new resources, etc.) to the second application 102.
[0094] (3) The second application 102 receives the time information sent by the first application 101. In one embodiment, the second application 102 can store the time information of the target element in a message management class. The message management class exists throughout the existence of the second application 102 and will not be destroyed, so that the second application 102 can read the time information of the target element from the message management class at any time.
[0095] After receiving the time information sent by the first application 101, the second application 102 renders the target image frame according to the editing operation to obtain a rendered image. For example, if the target element is a character and the editing operation is a scaling operation, then rendering the target image frame can be understood as scaling the character in the target image frame according to the scaling operation to obtain a rendered image. In one embodiment, if the editing process of the target element requires the use of new resources, the second application 102 will also receive new resources sent by the first application 101. The second application renders the target image frame based on the new resources to obtain a rendered image. For example, if the new resource is a new background (target element), then rendering the target image frame based on the new resources to obtain a rendered image can be understood as rendering the new background into the target image frame to obtain a rendered image.
[0096] On the other hand, the second application 102 determines the target scene to which the rendered image belongs based on the temporal relationship between the time information and the presentation periods of each scene. The presentation periods of each scene are determined by the second application 102 based on the scene information synchronized from the first application 101. The scene information for each scene includes its initial presentation time and duration. For example, assuming the target element is person A, the time information includes the start time of person A's presentation in the video at 1 minute 20 seconds. The video contains three scenes: the first scene's presentation period is from 0 minutes 0 seconds to 1 minute 15 seconds, the second scene's presentation period is from 1 minute 16 seconds to 3 minutes 20 seconds, and the third scene's presentation period is from 3 minutes 21 seconds to 5 minutes 18 seconds. Since the start time of person A's presentation in the video at 1 minute 20 seconds belongs to the presentation period of the second scene, the second application 102 determines the second scene as the target scene to which the rendered image belongs.
[0097] (4) The second application 102 returns the rendered image and the identifier of the target storyboard to the first application 101. The second application 102 returns the rendered image to the first application 101 in the following ways: the second application 102 directly returns the rendered image to the first application 101; or, the second application 102 returns the path to obtain the rendered image to the first application 101.
[0098] (5) The first application 101 receives the rendered image and the identifier of the target storyboard returned by the second application 102, determines the target storyboard to which the rendered image belongs based on the identifier of the target storyboard, and presents the rendered image as the cover of the target storyboard.
[0099] In this embodiment, whenever a target element in the video is edited, the first application provides the second application with the time information of the target element. The second application renders the target image frame to obtain a rendered image, and determines the target storyboard that needs to be updated by using the time information of the target element and the temporal relationship between the presentation time of each storyboard. Based on the rendered image and the target storyboard identifier returned by the second application, the first application updates the cover of the target storyboard to the rendered image, thereby realizing the real-time update of the cover of the storyboard to which the edited target element belongs.
[0100] Based on the above video processing scheme, this application proposes a more detailed video processing method. The video processing method proposed in this application will be described in detail below with reference to the accompanying drawings.
[0101] Please see Figure 2 , Figure 2 This is a flowchart illustrating a video processing method provided in an embodiment of this application. The video processing method can be executed by a computer device, which can be a terminal device or a server. The computer device is equipped with... Figure 1 The second application 102 is shown. (As shown) Figure 2 As shown, the video processing method may include the following steps S201-S204:
[0102] S201, Receive the time information of the target element sent by the first application.
[0103] The target element is the element being edited in the target image frame of the video. Specifically, the target element can be an element that already exists in the target image frame, or an element that needs to be added to the target image frame. The target element can be a background, a character, a character's expression, a character's action, etc., and this application does not impose any restrictions. Editing can include adding, modifying, and deleting. Modification can specifically include scaling, shifting, flipping, etc. The timing information of the target element can include at least one of the following: the time when the target element is edited in the video, and the start time when the target element is presented in the video. For example, suppose that an object shifts item A (i.e., the target element) at 1 minute and 15 seconds into the video, and the start time when item A is presented in the video is 1 minute and 2 seconds, then the timing information of item A can include at least one of the following: the time when item A is edited in the video is 1 minute and 15 seconds, and the start time when item A is presented in the video is 1 minute and 2 seconds.
[0104] In addition, the video contains at least one shot, each shot corresponding to a segment of time in the video; a shot refers to the arrangement of a frame in the video, usually by breaking down consecutive image frames into units of one camera movement. For example, the video contains three shots: the first shot is presented from 0 minutes 0 seconds to 1 minute 15 seconds, the second shot is presented from 1 minute 16 seconds to 3 minutes 20 seconds, and the third shot is presented from 3 minutes 21 seconds to 5 minutes 18 seconds.
[0105] In one implementation, if the editing process of the target element requires the use of new resources, the computer device will also receive new resources sent by the first application. These new resources are used to render the target image frame. For example, the need to use new resources during the editing process of the target element may be: adding a new background, character, etc., to the target image frame, or replacing the original elements in the target image frame with new elements.
[0106] S202. Render the target image frame to obtain the rendered image.
[0107] Computer devices render target image frames based on editing operations to obtain a rendered image. Editing operations can include adding, modifying, and deleting. Modifications can specifically include scaling, shifting, flipping, etc. For example, if the editing of a target element is to move the target element, then rendering the target image frame to obtain a rendered image means moving the target element to the position indicated by the editing operation.
[0108] In one implementation, if the editing process of the target element requires the use of new resources, the computer device renders the target image frame based on the acquired new resources to obtain a rendered image. For example, if the editing of the target element involves adding a character A to the target image frame, then rendering the target image frame to obtain a rendered image means: rendering the acquired resources of character A (i.e., the new resources) into the target image frame to obtain a rendered image.
[0109] S203. Based on the temporal relationship between time information and the presentation time of each scene, determine the target scene to which the rendered image belongs.
[0110] The presentation period of a storyboard refers to the time period during which the storyboard is presented in the video; for example, the presentation period of storyboard 1 is from 1 minute 15 seconds to 3 minutes 23 seconds, which means that the content of storyboard 1 is presented from 1 minute 15 seconds to 3 minutes 23 seconds in the video.
[0111] In one implementation, the computer device acquires the presentation time periods of each shot in the video, and the presentation time periods of each shot do not overlap. After obtaining the presentation time periods of each shot in the video, the computer device determines the target presentation time period associated with the time information of the target element, and identifies the shot corresponding to the target presentation time period as the target shot to which the rendered image belongs. For example, assuming that the time information of the target element includes the time when the target element is edited in the video (1 minute 58 seconds), and the video contains 3 shots, the presentation time period of the first shot is from 0 minutes 0 seconds to 1 minute 15 seconds, the presentation time period of the second shot is from 1 minute 16 seconds to 3 minutes 20 seconds, and the presentation time period of the third shot is from 3 minutes 21 seconds to 5 minutes 18 seconds; then the target presentation time period associated with the time information of the target element is from 1 minute 16 seconds to 3 minutes 20 seconds, and based on this, the computer device identifies the second shot as the target shot to which the rendered image belongs.
[0112] S204. Return the rendered image and the identifier of the target storyboard to the first application.
[0113] The target storyboard identifier is used to indicate the storyboard to which the rendered image belongs. After receiving the rendered image and the target storyboard identifier, the first application can present the rendered image under the target storyboard based on the target storyboard identifier; for example, the rendered image can be presented as the cover of the target storyboard.
[0114] In one implementation, the computer device can directly return the rendered image and the identifier of the target storyboard to the first application. In another implementation, the computer device can return the path of the rendered image and the identifier of the target storyboard to the first application, so that the first application can obtain the rendered image based on the path of the rendered image.
[0115] In this embodiment, the system receives the time information of the target element sent by the first application, renders the target image frame to obtain a rendered image, and determines the target storyboard to which the rendered image belongs based on the temporal relationship between the time information and the presentation time periods of each storyboard. The rendered image and the identifier of the target storyboard are then returned to the first application, enabling the first application to present the rendered image under the target storyboard based on its identifier. Thus, on the one hand, when the target element in the target image frame is edited, the target image frame is rendered to obtain a rendered image; on the other hand, the storyboard cover to be updated is determined through the time information of the target element and its temporal relationship with the presentation time periods of each storyboard; thereby achieving real-time updating of the storyboard cover to which the edited target element belongs.
[0116] Please see Figure 3 , Figure 3 This flowchart illustrates another video processing method provided in an embodiment of the present application. This video processing method can be executed by a computer device, which may be a terminal device or a server. The computer device is equipped with... Figure 1The second application 102 is shown. (As shown) Figure 3 As shown, the video processing method may include the following steps S301-S307:
[0117] S301, Receive the time information of the target element sent by the first application.
[0118] For a detailed implementation of step S301, please refer to Figure 2 The implementation method of step S201 will not be described in detail here.
[0119] S302. Store the time information in the message management class.
[0120] The message management class belongs to the second application, and it persists throughout the lifespan of the second application. "Persistence" can be understood as not being cleaned up or terminated by the operating system; the persistence of the message management class during the lifespan of the second application can be further understood as follows: if the second application is not terminated, the message management class will not be cleaned up by the operating system. Based on this, the second application can retrieve the time information of the target element from the message management class at any time during its lifespan.
[0121] In one implementation, the message management class has one and only one instance, which will not be destroyed during the life of the second application; the instance can be understood as a database engine, and the computer device can obtain the time information of the target element at any time based on the instance.
[0122] S303. Render the target image frame to obtain the rendered image.
[0123] The computer device acquires the target image frame; specifically, the target image frame may be provided directly to the computer device by the first application; or, the time information of the target element includes the time when the target element is edited in the video, and the computer device may determine the target image frame from the video based on the time when the target element is edited in the video.
[0124] In one implementation, after acquiring the target image frame, the computer device can obtain the display rules of each element in the target image frame. The display rules of each element are used to indicate the display state of the element during the rendering process. In one implementation, the display rules of each element can be indicated by the element's attributes; for example, the display rules of an element can be indicated by the active attribute. When the value of the active attribute is a valid value (such as true, 1, etc.), it indicates that the element will be presented during the rendering process; when the value of the active attribute is a valid value (such as false, 0, etc.), it indicates that the element will not be presented during the rendering process.
[0125] Furthermore, if there are implicit elements in the target image frame that are hidden, the computer device will hide the implicit elements during the rendering process of the target image frame to obtain the rendered image. The implicit elements may include, but are not limited to, element editing boxes, reference lines, dialogue, etc. The specific settings can be made according to actual needs.
[0126] In one implementation, the computer device displays a target image frame, renders the target image frame to obtain a frame to be processed; if the frame to be processed contains implicit elements that are hidden, these implicit elements are hidden to obtain a rendered image. In another implementation, the computer device displays a target image frame; if the target image frame contains implicit elements that are hidden, these implicit elements are hidden to obtain an intermediate image frame, which is then rendered to obtain a rendered image. After obtaining the rendered image, the computer device can display the rendered image to demonstrate the rendering effect. It is understood that elements not rendered during the rendering process are not included in the rendered image.
[0127] Figure 4 This is a schematic diagram of a rendering process provided in an embodiment of this application. Figure 4 As shown, the target image frame 401 includes a background, a character edit box 4011, a character 4012, and dialogue 4013; among which, the character edit box 4011 and dialogue 4013 are implicit elements. The computer device hides the implicit elements in the target image frame 401 to obtain an intermediate image frame 402. In the intermediate image frame 402, the character 4012 is retained, while the character edit box 4011 and dialogue 4013 are hidden. The intermediate image frame 402 is then rendered according to the newly added resources to obtain a rendered image 403.
[0128] Furthermore, in response to the implicit element's display state meeting the switching conditions (such as the rendering image being confirmed, the rendering image being completed and saved, etc.), the computer device switches the implicit element's display state to presentation and displays the implicit element in the rendered image; for example, displaying dialogue, element editing boxes, etc. in the rendered image.
[0129] In another implementation, after acquiring the target image frame, the computer device can render the target image frame to obtain the image to be edited, and preprocess the image to be edited to obtain a rendered image; wherein the preprocessing method includes at least one of the following: scaling processing and cropping processing. For example, after obtaining the image to be edited, the computer device can scale the image to be edited to a preset scale to obtain a rendered image; as another example, the computer device can use a cover extraction model to perform cover feature extraction processing on the image to be edited to obtain a rendered image, which can be a cropped image of the image to be edited.
[0130] It is understood that the two implementation methods described above can be executed simultaneously during the rendering process, or only one implementation method can be executed.
[0131] Optionally, the computer device can also detect the format of the rendered image. If the format of the rendered image is different from the preset format, the computer device can perform format conversion processing on the rendered image to obtain a rendered image with the preset format.
[0132] S304. Based on the preset path, store the rendered image in the preset folder.
[0133] Data in the preset folder will not be reclaimed by the operating system on the computer device. In other words, the rendered images can be stored on the computer device indefinitely so that a second application can retrieve the rendered images at any time.
[0134] S305. Obtain the presentation time of each scene in the video.
[0135] In one implementation, the presentation time of each scene in the video can be obtained directly from the first application by the computer device.
[0136] In another implementation, the presentation period of each shot in the video can be determined by a computer device based on the acquired shot information of each shot, which can be synchronously obtained by the computer device from a first application. The shot information for each shot includes its initial presentation time and duration. The computer device can determine the presentation period of each shot based on its initial presentation time and duration; for example, if the initial presentation time of shot 3 is 3 minutes and 20 seconds and its duration is 2 minutes, then the presentation period of shot 3 is from 3 minutes and 20 seconds to 5 minutes and 20 seconds.
[0137] S306. Determine the target presentation period associated with the time information, and determine the storyboard corresponding to the target presentation period as the target storyboard to which the rendered image belongs.
[0138] The timing information of a target element may include at least one of the following: the time the target element was edited in the video, or the start time the target element was presented in the video. The target presentation period associated with the timing information of the target element refers to either the time the target element was edited in the video, or the start time the target element was presented in the video being included in the target presentation period. For example, suppose the target element is person A, and the timing information includes the time person A was edited in the video at 1 minute and 30 seconds. The video contains three shots: the first shot is presented from 0 minutes and 0 seconds to 1 minute and 15 seconds, the second shot from 1 minute and 16 seconds to 3 minutes and 20 seconds, and the third shot from 3 minutes and 21 seconds to 5 minutes and 18 seconds. Since the time person A was edited in the video at 1 minute and 30 seconds is included in the presentation period of the second shot, the computer device determines the presentation period of the second shot as the target presentation period associated with the timing information of the target element.
[0139] Furthermore, after determining the target presentation period associated with the time information of the target element, the computer device can identify the storyboard corresponding to the target presentation period as the target storyboard to which the rendered image belongs.
[0140] In one implementation, each shot has only one background, and the initial presentation time of this background in the video is less than or equal to the initial presentation time of all other elements in the shot; the duration of this background is greater than or equal to the sum of the durations of all other elements in the shot. Based on this, the computer device can determine the presentation period of each shot by the initial presentation time and duration of the background in the video. In this implementation, no additional fields are needed to determine the presentation period of each shot, saving computational resources and improving communication efficiency. Furthermore, the computer device can use the identifier of the background corresponding to each shot as the identifier of that shot.
[0141] S307. Return the rendered image and the identifier of the target storyboard to the first application.
[0142] For a detailed implementation of step S307, please refer to Figure 2 The implementation method of step S204 will not be described in detail here.
[0143] The embodiments of this application are as follows: Figure 2Building upon the previous implementation, storing the time information of the target element in a message management class reduces the risk of losing this information, allowing the second application to retrieve it from the message management class at any time. By hiding implicit elements within the target image frame during rendering, the rendered image better highlights the elements of interest to the target. Preprocessing the rendered image allows the first application to more easily present it within the target storyboard. Storing the rendered image in a preset path reduces the risk of loss, allowing the first application to retrieve it from the preset path at any time, further improving the real-time performance and reliability of storyboard cover updates.
[0144] Please see Figure 5 , Figure 5 This is a flowchart illustrating another video processing method provided in an embodiment of this application. This video processing method can be executed by a computer device, which can be a terminal device or a server. The computer device is equipped with... Figure 1 The first application 101 is shown in the figure. Figure 5 As shown, the video processing method may include the following steps S501-S504:
[0145] S501. When it is detected that a target element in the target image frame of the video is being edited, the time information of the target element is obtained.
[0146] The target element is the element being edited in the target image frame of the video. Specifically, the target element can be an element that already exists in the target image frame, or an element that needs to be added to the target image frame. The target element can be a background, a character, a character's expression, a character's action, etc., and this application does not impose any restrictions. Editing can include adding, modifying, and deleting. Modification can specifically include scaling, shifting, flipping, etc. For example, when the computer device detects that an object is shifting a character (i.e., the target element) in the target image frame, the time when the character is shifted in the video is obtained as the character's time information. As another example, when the computer device detects that an object is adding a background (i.e., the target element) to the target image frame, the initial presentation time of the background in the video is obtained as the background's time information.
[0147] The timing information of the target element may include at least one of the following: the time when the target element was edited in the video, and the start time when the target element was presented in the video. For example, suppose an object moves item A (i.e., the target element) at 1 minute and 15 seconds into the video, and item A is presented in the video at 1 minute and 2 seconds. Then the timing information of item A may include at least one of the following: the time when item A was edited in the video, 1 minute and 15 seconds, and the start time when item A was presented in the video, 1 minute and 2 seconds.
[0148] In addition, the video contains at least one shot, each shot corresponding to a segment of time in the video; a shot refers to the arrangement of a frame in the video, usually by breaking down consecutive image frames into units of one camera movement. For example, the video contains three shots: the first shot is presented from 0 minutes 0 seconds to 1 minute 15 seconds, the second shot is presented from 1 minute 16 seconds to 3 minutes 20 seconds, and the third shot is presented from 3 minutes 21 seconds to 5 minutes 18 seconds.
[0149] S502, Send time information to the second application.
[0150] The computer device sends the time information of the target element to the second application, enabling the second application to render the target image frame to obtain a rendered image. Based on the time information and the temporal relationship between the time information and the presentation periods of each scene, the second application determines the target scene to which the rendered image belongs. For specific implementation details, please refer to the above. Figure 2 and Figure 3 The implementation methods described herein will not be elaborated here.
[0151] In one implementation, if new resources are required during the editing process of the target element, the computer device will also send the new resources to the second application so that the second application can render the target image frame based on the new resources to obtain a rendered image.
[0152] S503, Receive the rendered image and target storyboard identifier returned by the second application.
[0153] The second application can return either the rendered image itself or a path to obtain the rendered image; if the second application returns a path to obtain the rendered image, the computer device can obtain the rendered image based on that path. In one embodiment, data in the folder indicated by the path will not be reclaimed by the operating system.
[0154] Optionally, the computer device can also preprocess the rendered image according to actual needs to obtain the cover of the target storyboard; the preprocessing method includes at least one of the following: scaling processing and cropping processing. For example, after obtaining the rendered image, the computer device can scale the rendered image to a preset scale to obtain the cover; as another example, the computer device can use a cover extraction model to perform cover feature extraction processing on the rendered image to obtain a cover image, which can be a cropped image of the rendered image.
[0155] S504. Based on the identifier of the target storyboard, render the image under the target storyboard.
[0156] The computer equipment determines the target storyboard corresponding to the rendered image based on the target storyboard's identifier, and uses the rendered image as the cover of the target storyboard for presentation.
[0157] In this embodiment, when editing of a target element in a target image frame of a video is detected, the time information of the target element is obtained and sent to the second application. The second application then renders the target image frame to obtain a rendered image. Based on the temporal relationship between the time information and the presentation time of each scene, the second application determines the target scene to which the rendered image belongs. The application receives the rendered image and the identifier of the target scene returned by the second application. Based on the identifier of the target scene, the rendered image is presented under the target scene. Therefore, whenever a target element in the video is edited, the time information of the edited target element is provided to the second application, enabling the second application to determine the target scene corresponding to the rendered image based on the time information. Based on the rendered image and the target scene identifier returned by the second application, the cover of the scene to which the edited target element belongs is updated in real time.
[0158] Please see Figure 6 , Figure 6 This is a flowchart illustrating another video processing method provided in an embodiment of this application. The video processing method can be executed by a computer device, which can be a terminal device or a server. The computer device is equipped with... Figure 1 The first application 101 is shown in the figure. Figure 6 As shown, the video processing method may include the following steps S601-S607:
[0159] S601. When the message synchronization condition is detected, send at least one segmentation information to the second application.
[0160] Each scene's scene information includes its initial presentation time and duration. The message synchronization conditions include any of the following: the current time matches the preset message synchronization time, a scene information retrieval request is received from a second application, or at least one scene has been edited.
[0161] In one implementation, each shot has only one background, and the initial presentation time of this background in the video is less than or equal to the initial presentation time of all other elements in the shot; the duration of this background is greater than or equal to the sum of the durations of all other elements in the shot. Based on this, the computer device can determine the presentation period of each shot by the initial presentation time and duration of the background in the video. In this implementation, the initial presentation time of the background in the video can be used as the initial presentation time of the shot, and the duration of the background in the video can be used as the duration of the shot. No additional fields are needed to determine the presentation period of each shot, saving computational resources and improving communication efficiency. Furthermore, the computer device can also use the identifier of the background corresponding to each shot as the identifier of that shot.
[0162] It should be noted that step S601 can be executed after steps S602 and S603, or it can be executed in parallel with steps S602 and S603. This application does not impose any restrictions on this.
[0163] S602. When it is detected that a target element in the target image frame of the video is being edited, the time information of the target element is obtained.
[0164] S603, Send the time information of the target element to the second application.
[0165] S604. Receive the rendered image and target storyboard identifier returned by the second application.
[0166] S605. Based on the identifier of the target storyboard, render the image under the target storyboard.
[0167] For detailed implementation methods of steps S602-S605, please refer to... Figure 5 The implementation methods in steps S501-S504 will not be described again here.
[0168] S606, Receive the updated image and target storyboard identifier returned by the second application.
[0169] The updated image is obtained by the second application rendering the rendered image. The target storyboard identifier is determined by the second application based on the temporal relationship between the time information of the elements being edited in the rendered image and the presentation time of each storyboard. For a detailed implementation of the second application rendering the rendered image to obtain the updated image, and obtaining the updated image and the target storyboard identifier based on the time information of the elements being edited in the rendered image, please refer to the above. Figure 2 and Figure 3 The embodiments described herein will not be repeated here.
[0170] S607. Replace the rendered image with the updated image.
[0171] After obtaining the updated image of the target storyboard, the computer device updates the rendered image under the target storyboard to the updated image; that is, the updated image is used as the new cover of the target storyboard.
[0172] In one specific implementation, the second application can be embedded within the first application. The first application includes a UI development kit, and the second application includes a cross-platform engine. The UI development kit can be used to create cross-platform mobile applications, and the cross-platform engine can be used to develop cross-platform applications (such as games).
[0173] Figure 7a This is an application interface diagram provided for an embodiment of this application. For example... Figure 7aAs shown, the application interface 701 can be the application interface of a first application. The application interface 701 includes an element editing area 7011, a video operation bar 7014, a storyboard operation bar 7015, and a storyboard information display area 7016. The element editing area 7011 is used to edit elements in the current video frame (such as scaling, moving, flipping, etc.). The element editing area 7011 may include an element editing box 7012 and an element 7013. The element editing box 7012 is used to edit element 7013 (such as scaling element 7013). In one embodiment, when the first application detects that element 7013 is being edited, it can send the time information of element 7013 to a second application embedded in the first application. The video operation bar 7014 is used to operate on the video. The video operation bar 7014 may include: video playback time, a play / stop button, an undo button, a redo button, and a full-screen button; the undo button is used to undo the previous editing operation, and the redo button is used to redo the previously undone editing operation. The storyboard operation bar 7015 is used to edit one or more storyboards contained in the video (such as adding storyboards, deleting storyboards, managing the order of storyboards, etc.). The storyboard operation bar 7015 may include a storyboard add button and a storyboard management button. When the storyboard management button is triggered, the storyboard management page can be displayed. The storyboard information display area 7016 is used to display relevant information about the storyboard and to add new elements to the storyboard. The application interface 701 may include one or more storyboard information display areas. The storyboard information display area 7016 includes a cover display area 7017 for the storyboard, which displays the cover image of the storyboard. In addition, the storyboard information display area 7016 may also include a storyboard identifier, relevant information about the elements contained in the storyboard (such as characters, backgrounds, lines, etc.), and an element delete button and an element add button. The element delete button is used to delete elements in the storyboard, and the element add button is used to add elements to the storyboard.
[0174] Figure 7b This is a schematic diagram of a video processing flow provided in an embodiment of this application. The following is an example of... Figure 7b The video processing method provided in this application will be further explained using an example. Combined with... Figure 7a and Figure 7b :
[0175] S7021. When the first application detects that the target element in the target image frame of the video is being edited, it obtains the time information of the target element and provides the time information of the target element to the second application; for example, after the object moves the target element in the target image frame, the first application provides the second application with the time when the target element is moved in the video.
[0176] S7022, the second application renders the target image frame to obtain a rendered image. When the second application is embedded in the first application, the rendered image can be presented through the aforementioned element editing area 7011. It can be understood that the rendered image is obtained after the second application renders the target image frame based on editing operations.
[0177] S7023. The second application hides implicit elements whose display state is hidden based on the display state of each element in the rendered image. The display state of each element can be indicated by the element's attribute information. It is understood that step S7023 can also be executed before step S7022, that is, the second application can first hide implicit elements whose display state is hidden based on the display state of each element in the target image frame, and then render the target image frame after hiding to obtain the rendered image.
[0178] S7024. The second application scales the hidden image to obtain the cover image. In one embodiment, the second application can read the content in the element editing area 7011 to obtain the hidden image, and scale the image according to a preset scale to obtain the cover image; for example, the second application reads the content in the element editing area 7011 to obtain a hidden image with a scale of 1920*1080, and the second application compresses the image to obtain a cover image with a scale of 432*243.
[0179] S7025. The second application stores the cover image in a preset path. In one implementation, the preset path is: Application.persistentDataPath + fileName; for example, on an iOS device, the preset path could be: / var / mobile / Containers / Data / Application / APP / Documents / fileName, and on an Android device, the preset path could be / storage / emulated / 0 / Android / data / APP / files / fileName. It should be noted that the contents of the folder indicated by this preset path will not be reclaimed or deleted by the operating system during the computer device's operation and can be permanently retained on the computer device.
[0180] Optionally, if the format of the cover image is different from the preset format, the second application can also perform format conversion processing on the cover image before storing the cover image to the preset path to obtain the cover image of the preset format.
[0181] S7026. The second application determines the identifier of the target storyboard to which the cover image belongs by using the time information of the target element. In one implementation, whenever the first application detects that an element in the video has been edited, or a new element has been added to the video, the first application synchronizes the start time (startTime) of the element being edited in the video and the duration (duration) of the element in the video to the second application to ensure that the relevant information of all elements stored in the first and second applications is consistent.
[0182] Furthermore, each element in the video belongs to a shot within the video, and each shot has only one background. The initial presentation time of this background in the video is less than or equal to the initial presentation time of all other elements in the shot; the duration of this background is greater than or equal to the sum of the durations of all other elements in the shot. Based on this, the computer device can determine the presentation period of each shot by the initial presentation time and duration of the background in each shot. In this implementation, there is no need to add extra fields to determine the presentation period of each shot, saving computing resources and improving communication efficiency. Furthermore, the computer device can use the identifier of the background corresponding to each shot as the identifier of that shot.
[0183] The second application, based on the temporal relationship between the time information of the target element and the presentation time of each scene, can determine the target scene to which the cover image belongs, and thus identify the target scene. Specifically, the second application can determine the background corresponding to the target element based on the relationship between the time information of the target element and the time information of the background of each scene, and thus determine the target scene corresponding to the target element, which is the scene to which the cover image belongs. For example, let A.startTime be the start time when target element A is edited in the video, background.startTime be the initial presentation time of the background of the target scene in the video, and background.duration be the duration of the background of the target scene in the video; then A.startTime ≥ background.startTime, and A.startTime ≤ background.startTime + background.duration.
[0184] The second application can use the background identifier (backgroundId) as the identifier of the target storyboard and return the cover image and the identifier of the target storyboard to the first application; for example, the second application can return the storage path of the cover image and the background identifier (backgroundId) to the first application.
[0185] S7027. After obtaining the cover image and the identifier of the target storyboard, the first application displays the cover image below the target storyboard; for example, assuming the target storyboard is... Figure 7a The storyboard 1 shown displays the cover image in the cover display area 7017.
[0186] S7028. After obtaining the cover image, the hidden implicit elements can be redisplayed in the rendered image. It is understood that step S7028 can be performed before any of steps S7025-S7027, or in parallel with any of steps S7025-S7027.
[0187] The embodiments of this application are as follows: Figure 5 Based on the previous embodiment, by sending the storyboard information to the second application, the first application can determine the target storyboard to which the rendered image belongs based on the temporal relationship between the target element's time information and the storyboard information, thereby reducing the risk of errors in the correspondence between the rendered image and the storyboard. By receiving the updated image returned by the second application, the cover image of the target storyboard is updated, realizing real-time updates to the cover of the storyboard to which the edited target element belongs.
[0188] The methods of the embodiments of this application have been described in detail above. In order to facilitate better implementation of the above solutions of the embodiments of this application, the apparatus of the embodiments of this application is provided below.
[0189] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a video processing device provided in an embodiment of this application. Figure 8 The video processing apparatus shown can be used to perform the above. Figure 2 and Figure 3 Some or all of the functionality described in the method embodiments. Please refer to [link / reference]. Figure 8 The video processing device includes:
[0190] The receiving unit 801 is used to receive the time information of the target element sent by the first application; the target element is the element being edited in the target image frame of the video; the video contains at least one scene, and each scene corresponds to a presentation period.
[0191] Processing unit 802 is used to render the target image frame to obtain a rendered image;
[0192] And to determine the target scene to which the rendered image belongs based on the temporal relationship between time information and the presentation period of each scene;
[0193] And an identifier for returning a rendered image and a target storyboard to a first application, so that the first application renders the rendered image based on the identifier of the target storyboard.
[0194] In one implementation, if the editing process of the target element requires the use of new resources, the receiving unit 801 is further configured to:
[0195] Receive new resources sent by the first application;
[0196] Processing unit 802 is used to render the target image frame to obtain a rendered image, specifically for:
[0197] Based on the newly added resources, the target image frame is rendered to obtain the rendered image.
[0198] In one embodiment, the processing unit 802 is configured to determine the target scene to which the rendered image belongs based on the temporal relationship between time information and the presentation periods of each scene, specifically configured to:
[0199] Obtain the presentation time of each shot in the video, and the presentation time of each shot does not overlap;
[0200] Determine the target presentation period associated with the time information, and identify the storyboard corresponding to the target presentation period as the target storyboard to which the rendered image belongs.
[0201] In one embodiment, the processing unit 802 is configured to acquire the presentation time periods of each scene in the video, specifically for:
[0202] Obtain the initial rendering time and duration of each shot in the video;
[0203] The presentation period of each scene is determined based on its initial presentation time and duration.
[0204] In one embodiment, the processing unit 802 is configured to render the target image frame to obtain a rendered image, specifically for:
[0205] Obtain the display rules of each element in the target image frame. The display rules of each element are used to indicate the display status of the element during the rendering process.
[0206] If there are implicit elements in the target image frame that are hidden, then during the rendering process of the target image frame, the implicit elements are hidden to obtain the rendered image.
[0207] In one embodiment, the processing unit 802 is configured to, if there are implicit elements in the target image frame that are hidden in a hidden state, hide the implicit elements during the rendering process of the target image frame to obtain a rendered image, specifically configured to:
[0208] Display the target image frame;
[0209] The target image frame is rendered to obtain the image frame to be processed. If there are implicit elements in the image frame to be processed that are hidden, then the implicit elements are hidden, and the rendered image is obtained and presented; or,
[0210] If there are implicit elements in the target image frame that are hidden, then the implicit elements are hidden to obtain an intermediate image frame. The intermediate image frame is then rendered to obtain and present the rendered image.
[0211] In one embodiment, the processing unit 802 is further configured to:
[0212] In response to the implicit element's display state meeting the switching condition, the implicit element's display state is switched to be rendered.
[0213] Display implicit elements in the rendered image.
[0214] In one embodiment, the processing unit 802 is configured to render the target image frame to obtain a rendered image, specifically for:
[0215] Acquire the target image frame;
[0216] Render the target image frame to obtain the image to be edited;
[0217] The image to be edited is preprocessed to obtain the rendered image;
[0218] The preprocessing methods include at least one of the following: scaling and cropping.
[0219] In one embodiment, the processing unit 802 is further configured to:
[0220] If the format of the rendered image is different from the preset format, the rendered image will be converted to obtain the converted rendered image.
[0221] Based on a preset path, the rendered image is stored in a preset folder, and the data in the preset folder will not be reclaimed by the operating system.
[0222] In one embodiment, the receiving unit 801 is configured to acquire a target image frame, specifically for:
[0223] Obtain the target image frame sent by the first application; or,
[0224] The target image frame is determined from the video based on the time information.
[0225] In one embodiment, the processing unit 802 is further configured to:
[0226] Store time information in the message management class;
[0227] Among them, the message management class belongs to the second application. The message management class exists during the existence of the second application, and the second application can obtain time information from the message management class at any time during its existence.
[0228] According to one embodiment of this application, Figure 2 and Figure 3 The video processing method shown may involve some steps that can be derived from... Figure 8 The video processing apparatus shown is executed by each unit. For example, Figure 2 Step S201 shown can be performed by Figure 8 The receiving unit 801 shown executes the steps S202-S204, which can be performed by... Figure 8 The processing unit 802 shown executes the operation; Figure 3 Steps S301 and S305 shown can be derived from... Figure 8 The receiving unit 801 shown executes steps S302-S304, S306, and S307, which can be performed by... Figure 8 The processing unit 802 shown is executed. Figure 8 The various units in the video processing apparatus shown can be individually or entirely combined into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the video processing apparatus may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.
[0229] According to another embodiment of this application, a general-purpose computing device, such as a computer device including processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), can perform operations such as... Figure 2 and Figure 3 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 8 The video processing apparatus shown herein, and the video processing method for implementing the embodiments of this application, are described. A computer program may be recorded on, for example, a computer-readable recording medium, loaded onto the aforementioned computing device via the computer-readable recording medium, and executed therein.
[0230] Based on the same inventive concept, the principle and beneficial effects of the video processing device provided in the embodiments of this application in solving the problem are similar to the principle and beneficial effects of the video processing method in the embodiments of this application in solving the problem. Please refer to the principle and beneficial effects of the implementation of the method. For the sake of brevity, they will not be repeated here.
[0231] Please see Figure 9 , Figure 9 This is a schematic diagram of another video processing apparatus provided in an embodiment of this application. Figure 9 The video processing apparatus shown can be used to perform the above. Figure 5 and Figure 6 Some or all of the functionality described in the method embodiments. Please refer to [link / reference]. Figure 9 The video processing device includes:
[0232] The transceiver unit 901 is configured to: acquire time information of the target element when it is detected that the target element in the target image frame of the video is being edited, wherein the video contains at least one scene and each scene corresponds to a presentation period; send time information to a second application so that the second application renders the target image frame to obtain a rendered image, and determines the target scene to which the rendered image belongs based on the time information and the temporal relationship between the presentation periods of each scene; and receive the rendered image and the identifier of the target scene returned by the second application.
[0233] The processing unit 902 is used to render a rendered image under the target storyboard according to the identifier of the target storyboard.
[0234] In one implementation, if the editing process of the target element requires the use of new resources, the transceiver unit 901 is further configured to:
[0235] Send the new resources to the second application, so that the second application can render the target image frame based on the new resources to obtain the rendered image.
[0236] In one embodiment, the processing unit 902 is further configured to:
[0237] When the message synchronization condition is detected, the second application sends the scene information of at least one scene. The scene information of each scene includes the initial presentation time and the duration of the scene.
[0238] The message synchronization conditions include any of the following: the current time is consistent with the preset message synchronization time, a segment information retrieval request is received from the second application, or at least one segment has been edited.
[0239] In one embodiment, the processing unit 902 is further configured to:
[0240] The transceiver unit 901 receives the updated image and the target storyboard identifier returned by the second application. The updated image is obtained by the second application rendering the rendered image. The target storyboard identifier is determined by the second application based on the temporal relationship between the time information of the elements being edited in the rendered image and the presentation time of each storyboard.
[0241] Replace the rendered image with the updated image.
[0242] According to one embodiment of this application, Figure 5 and Figure 6 The video processing method shown may involve some steps that can be derived from... Figure 9 The video processing apparatus shown is executed by each unit. For example, Figure 5 Steps S501-S503 shown can be derived from... Figure 9 The transceiver unit 901 shown executes step S504, which can be performed by... Figure 9 The processing unit 902 shown executes. Figure 6 Steps S601-S604 and S606 shown can be derived from... Figure 9 The transceiver unit 901 shown executes steps S605 and S607, which can be performed by... Figure 9 The processing unit 902 shown executes. Figure 9 The various units in the video processing apparatus shown can be individually or entirely combined into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the video processing apparatus may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.
[0243] According to another embodiment of this application, a general-purpose computing device, such as a computer device including processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), can perform operations such as... Figure 5 and Figure 6 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 9 The video processing apparatus shown herein, and the video processing method for implementing the embodiments of this application, are described. A computer program may be recorded on, for example, a computer-readable recording medium, loaded onto the aforementioned computing device via the computer-readable recording medium, and executed therein.
[0244] Based on the same inventive concept, the principle and beneficial effects of the video processing device provided in the embodiments of this application in solving the problem are similar to the principle and beneficial effects of the video processing method in the embodiments of this application in solving the problem. Please refer to the principle and beneficial effects of the implementation of the method. For the sake of brevity, they will not be repeated here.
[0245] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device may be a terminal device or a server. Figure 10 As shown, the computer device includes at least a processor 1001, a communication interface 1002, and a memory 1003. The processor 1001, communication interface 1002, and memory 1003 can be connected via a bus or other means. The processor 1001 (or Central Processing Unit, CPU) is the computing and control core of the computer device. It can parse various instructions within the computer device and process various data. For example, the CPU can parse power-on / off commands issued by objects to the computer device and control the computer device to perform power-on / off operations; it can also transmit various interactive data between internal structures of the computer device, and so on. The communication interface 1002 may optionally include a standard wired interface or a wireless interface (such as Wi-Fi, mobile communication interface, etc.), and can be used to send and receive data under the control of the processor 1001; the communication interface 1002 can also be used for data transmission and interaction within the computer device. The memory 1003 is the storage device in the computer device, used to store programs and data. It is understood that the memory 1003 here may include the built-in memory of the computer device, or it may include the extended memory supported by the computer device. The memory 1003 provides storage space for storing the operating system of the computer device, which may include, but is not limited to, Android, iOS, Windows Phone, etc., and this application does not limit this.
[0246] This application embodiment also provides a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the processing system of the computer device. Furthermore, the storage space also stores computer programs suitable for loading and execution by the processor 1001. It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device; optionally, it can also be at least one computer-readable storage medium located remotely from the aforementioned processor.
[0247] In one embodiment, the computer device is equipped with Figure 1 The second application 102 is shown. The processor 1001 performs the following operations by running a computer program in memory 1003:
[0248] The time information of the target element sent by the first application is received through the communication interface 1002; the target element is the element being edited in the target image frame of the video; the video contains at least one shot, and each shot corresponds to a presentation period.
[0249] Render the target image frame to obtain the rendered image;
[0250] Based on the temporal relationship between time information and the presentation time of each scene, the target scene to which the rendered image belongs is determined;
[0251] Return the rendered image and the identifier of the target storyboard to the first application so that the first application can render the rendered image based on the identifier of the target storyboard.
[0252] As an optional embodiment, if new resources are required during the editing process of the target element, the processor 1001, by running the computer program in the memory 1003, also performs the following operations:
[0253] Receive new resources sent by the first application through communication interface 1002;
[0254] The processor 1001 renders the target image frame to obtain the rendered image. A specific implementation example is as follows:
[0255] Based on the newly added resources, the target image frame is rendered to obtain the rendered image.
[0256] As an optional embodiment, the processor 1001 determines the target scene to which the rendered image belongs based on the temporal relationship between time information and the presentation time periods of each scene.
[0257] The presentation time of each shot in the video is obtained through the communication interface 1002, and the presentation time of each shot does not overlap.
[0258] Determine the target presentation period associated with the time information, and identify the storyboard corresponding to the target presentation period as the target storyboard to which the rendered image belongs.
[0259] As an optional embodiment, a specific implementation of obtaining the presentation time periods of each scene in the video through the communication interface 1002 is as follows:
[0260] Obtain the initial rendering time and duration of each shot in the video;
[0261] The presentation period of each scene is determined based on its initial presentation time and duration.
[0262] As an optional embodiment, the processor 1001 renders the target image frame to obtain a rendered image. A specific embodiment of this is as follows:
[0263] Obtain the display rules of each element in the target image frame. The display rules of each element are used to indicate the display status of the element during the rendering process.
[0264] If there are implicit elements in the target image frame that are hidden, then during the rendering process of the target image frame, the implicit elements are hidden to obtain the rendered image.
[0265] As an optional embodiment, if there are implicit elements in the target image frame that are hidden, then during the rendering process of the target image frame, the implicit elements are hidden to obtain a rendered image. A specific embodiment of the processor 1001 hiding implicit elements during the rendering process of the target image frame to obtain a rendered image is as follows:
[0266] Display the target image frame;
[0267] The target image frame is rendered to obtain the image frame to be processed. If there are implicit elements in the image frame to be processed that are hidden, then the implicit elements are hidden, and the rendered image is obtained and presented; or,
[0268] If there are implicit elements in the target image frame that are hidden, then the implicit elements are hidden to obtain an intermediate image frame. The intermediate image frame is then rendered to obtain and present the rendered image.
[0269] As an optional embodiment, the processor 1001, by running a computer program in the memory 1003, also performs the following operations:
[0270] In response to the implicit element's display state meeting the switching condition, the implicit element's display state is switched to be rendered.
[0271] Display implicit elements in the rendered image.
[0272] As an optional embodiment, the processor 1001 renders the target image frame to obtain a rendered image. A specific embodiment of this is as follows:
[0273] Acquire the target image frame;
[0274] Render the target image frame to obtain the image to be edited;
[0275] The image to be edited is preprocessed to obtain the rendered image;
[0276] The preprocessing methods include at least one of the following: scaling and cropping.
[0277] As an optional embodiment, the processor 1001, by running a computer program in the memory 1003, also performs the following operations:
[0278] If the format of the rendered image is different from the preset format, the rendered image will be converted to obtain the converted rendered image.
[0279] Based on a preset path, the rendered image is stored in a preset folder, and the data in the preset folder will not be reclaimed by the operating system.
[0280] As an optional embodiment, the processor 1001 acquires the target image frame in the following specific embodiment:
[0281] The target image frame sent by the first application is obtained through communication interface 1002; or...
[0282] The target image frame is determined from the video based on the time information.
[0283] As an optional embodiment, the processor 1001, by running a computer program in the memory 1003, also performs the following operations:
[0284] Store time information in the message management class;
[0285] Among them, the message management class belongs to the second application. The message management class exists during the existence of the second application, and the second application can obtain time information from the message management class at any time during its existence.
[0286] In another embodiment, the computer device is equipped with Figure 1 The first application 101 is shown. The processor 1001 performs the following operations by running a computer program stored in memory 1003:
[0287] When editing of a target element in a target image frame of a video is detected, the timing information of the target element is obtained. The video contains at least one shot, and each shot corresponds to a presentation period.
[0288] The second application sends time information through the communication interface 1002, so that the second application renders the target image frame to obtain the rendered image, and the second application determines the target scene to which the rendered image belongs based on the time information and the temporal relationship between the presentation time of each scene.
[0289] The system receives the rendered image and target scene identifier returned by the second application through the communication interface 1002.
[0290] Based on the identifier of the target storyboard, a rendered image is presented under the target storyboard.
[0291] As an optional embodiment, if new resources are required during the editing process of the target element, the processor 1001, by running the computer program in the memory 1003, also performs the following operations:
[0292] The new resource is sent to the second application through the communication interface 1002, so that the second application can render the target image frame based on the new resource to obtain the rendered image.
[0293] As an optional embodiment, the processor 1001, by running a computer program in the memory 1003, also performs the following operations:
[0294] When the message synchronization condition is detected, the segmentation information of at least one segment is sent to the second application through the communication interface 1002. The segmentation information of each segment includes the initial presentation time and duration of the segment.
[0295] The message synchronization conditions include any of the following: the current time is consistent with the preset message synchronization time, a segment information retrieval request is received from the second application, or at least one segment has been edited.
[0296] As an optional embodiment, the processor 1001, by running a computer program in the memory 1003, also performs the following operations:
[0297] The updated image and the target storyboard identifier returned by the second application are received through the communication interface 1002. The updated image is obtained by the second application rendering the rendered image, and the target storyboard identifier is determined by the second application based on the temporal relationship between the time information of the elements being edited in the rendered image and the presentation time of each storyboard.
[0298] Replace the rendered image with the updated image.
[0299] Based on the same inventive concept, the principle and beneficial effects of the computer device provided in the embodiments of this application in solving the problem are similar to the principle and beneficial effects of the video processing method in the embodiments of this application in solving the problem. Please refer to the principle and beneficial effects of the implementation of the method. For the sake of brevity, they will not be repeated here.
[0300] This application also provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and to execute the video processing method described in the above method embodiments.
[0301] This application also provides a computer program product, which includes a computer program adapted to be loaded by a processor and execute the video processing method described in the above method embodiments.
[0302] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the video processing method described above.
[0303] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.
[0304] The modules in the device of this application embodiment can be merged, divided, and deleted according to actual needs.
[0305] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.
[0306] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Those skilled in the art will understand that all or part of the processes for implementing the above embodiments and equivalent variations made in accordance with the claims of this application are still within the scope of this application.
Claims
1. A video processing method, characterized in that, The method includes: The system receives time information of a target element sent by a first application; the target element is an element being edited in a target image frame of a video; the video contains at least one scene, each scene corresponding to a presentation period; the time information of the target element includes the time when the target element is edited in the video, or the start time when the target element is presented in the video. The target image frame is rendered to obtain a rendered image; Based on the temporal relationship between the time information and the presentation time of each scene, the target scene to which the rendered image belongs is determined; The rendered image and the identifier of the target storyboard are returned to the first application so that the first application can render the rendered image based on the identifier of the target storyboard.
2. The method as described in claim 1, characterized in that, If the editing process of the target element requires the use of new resources, the method further includes: Receive new resources sent by the first application; The process of rendering the target image frame to obtain a rendered image includes: Based on the newly added resources, the target image frame is rendered to obtain a rendered image.
3. The method as described in claim 1 or 2, characterized in that, The step of determining the target scene to which the rendered image belongs based on the temporal relationship between the time information and the presentation time periods of each scene includes: The presentation time of each shot in the video is obtained, and the presentation time of each shot does not overlap; The target presentation period associated with the time information is determined, and the storyboard corresponding to the target presentation period is determined as the target storyboard to which the rendered image belongs.
4. The method as described in claim 3, characterized in that, The process of obtaining the presentation time of each scene in the video includes: Obtain the initial rendering time and duration of each scene in the video; The presentation period of each scene is determined based on its initial presentation time and duration.
5. The method as described in claim 1, characterized in that, The process of rendering the target image frame to obtain a rendered image includes: The display rules of each element in the target image frame are obtained, and the display rules of each element are used to indicate the display status of the element during the rendering process; If there are implicit elements in the target image frame that are hidden, then during the rendering process of the target image frame, the implicit elements are hidden to obtain the rendered image.
6. The method as described in claim 5, characterized in that, If the target image frame contains implicit elements that are hidden in a displayed state, then during the rendering process of the target image frame, the implicit elements are hidden to obtain the rendered image, including: Display the target image frame; The target image frame is rendered to obtain a processing image frame. If the processing image frame contains implicit elements that are hidden, these implicit elements are hidden, and the rendered image is obtained and presented; or... If there are implicit elements in the target image frame that are hidden, then the implicit elements are hidden to obtain an intermediate image frame. The intermediate image frame is then rendered to obtain and present a rendered image.
7. The method as described in claim 6, characterized in that, The method further includes: In response to the implicit element's display state satisfying the switching condition, the implicit element's display state is switched to be displayed; The implicit element is displayed in the rendered image.
8. The method as described in claim 1, characterized in that, The process of rendering the target image frame to obtain a rendered image includes: Acquire the target image frame; The target image frame is rendered to obtain the image to be edited; The image to be edited is preprocessed to obtain a rendered image; The preprocessing method includes at least one of the following: scaling and cropping.
9. The method as described in claim 8, characterized in that, The method further includes: If the format of the rendered image is different from the preset format, the rendered image is converted to obtain the converted rendered image. Based on a preset path, the rendered image is stored in a preset folder, and the data in the preset folder will not be reclaimed by the operating system.
10. The method as described in claim 8, characterized in that, The acquisition of the target image frame includes: Obtain the target image frame sent by the first application; or, The target image frame is determined from the video based on the time information.
11. The method as described in claim 1, characterized in that, The method further includes: The time information is stored in the message management class; The message management class belongs to the second application and exists during the existence of the second application. During the existence of the second application, the second application can obtain the time information from the message management class at any time.
12. A video processing method, characterized in that, The method includes: When it is detected that a target element in a target image frame of a video is being edited, the time information of the target element is obtained. The video contains at least one scene, and each scene corresponds to a presentation period. The time information of the target element includes the time when the target element is edited in the video, or the start time when the target element is presented in the video. The time information is sent to the second application, which then renders the target image frame to obtain a rendered image. Based on the time information and the temporal relationship between the time information and the presentation time of each scene, the second application determines the target scene to which the rendered image belongs. Receive the rendered image and the identifier of the target storyboard returned by the second application; The rendered image is presented under the target scene according to the identifier of the target scene.
13. The method as described in claim 12, characterized in that, If the editing process of the target element requires the use of new resources, the method further includes: The newly added resources are sent to the second application, enabling the second application to render the target image frame based on the newly added resources to obtain a rendered image.
14. The method as described in claim 12, characterized in that, The method further includes: When the message synchronization condition is detected to be met, the segment information of the at least one segment is sent to the second application. The segment information of each segment includes the initial presentation time and the duration of the segment. The message synchronization conditions include any one of the following: the current time is consistent with the preset message synchronization time, a segment information retrieval request sent by the second application is received, or at least one segment has been edited.
15. The method as described in claim 12, characterized in that, The method further includes: The system receives an updated image and the identifier of the target storyboard returned by the second application. The updated image is obtained by the second application rendering the rendered image. The identifier of the target storyboard is determined by the second application based on the temporal relationship between the time information of the elements being edited in the rendered image and the presentation time of each storyboard. Replace the rendered image with the updated image.
16. A video processing apparatus, characterized in that, The video processing device includes: A receiving unit is configured to receive time information of a target element sent by a first application; the target element is an element being edited in a target image frame of a video; the video contains at least one scene, each scene corresponding to a presentation period; the time information of the target element includes the time when the target element is edited in the video, or the start time when the target element is presented in the video; The processing unit is configured to render the target image frame to obtain a rendered image; and to determine the target scene to which the rendered image belongs based on the temporal relationship between the time information and the presentation time of each scene; and to return the identifier of the rendered image and the identifier of the target scene to the first application, so that the first application can present the rendered image under the target scene based on the identifier of the target scene.
17. A video processing apparatus, characterized in that, The video processing device includes: The transceiver unit is configured to: acquire time information of the target element when editing of a target element in a target image frame of a video is detected, wherein the video contains at least one scene, and each scene corresponds to a presentation period; send the time information to a second application, enabling the second application to render the target image frame to obtain a rendered image, and enabling the second application to determine the target scene to which the rendered image belongs based on the temporal relationship between the time information and the presentation periods of each scene; and receive the rendered image and the identifier of the target scene returned by the second application; wherein the time information of the target element includes the time when the target element is edited in the video, or the start time when the target element is presented in the video; A processing unit is configured to render the image under the target scene according to the identifier of the target scene.
18. A computer device, characterized in that, include: Memory and processor; A memory, wherein a computer program is stored; A processor is configured to load the computer program to implement the video processing method as described in any one of claims 1-11; or to load the computer program to implement the video processing method as described in any one of claims 12-15.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed as described in any one of claims 1-11; or loaded and executed as described in any one of claims 12-15.
20. A computer program product, characterized in that, The computer program product includes a computer program adapted to be loaded by a processor and execute the video processing method as described in any one of claims 1-11; or to be loaded and execute the video processing method as described in any one of claims 12-15.
Citation Information
Patent Citations
Antiperspirant salts for enhanced cosmetic products
AU2002224395A1
Automated storyboarding based on natural language processing and 2d / 3d pre-visualization
CN109783659A