Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method for rendering video content, which can effectively reduce the process of adjusting engineering files and configuration parameters one by one, improve the working efficiency and reduce the error generation.
The application provides a method for rendering video content, which comprises the following steps:
receiving multimedia content through a remote scheduling service, and sending the multimedia content to a multimedia synthesis script, wherein the multimedia synthesis script is generated based on a multimedia synthesis template;
embedding the multimedia content into the multimedia synthesis template based on the multimedia synthesis script, performing rendering processing and outputting video;
And providing the output video for the remote scheduling service, and uploading and publishing the output video through the remote scheduling service.
In one aspect, the step of embedding the multimedia content into the multimedia composition template based on the multimedia composition script, performing rendering processing and outputting video includes:
Inserting the multimedia content into corresponding layers and time axis positions of the multimedia composition template, and/or inserting a transition animation of the multimedia content between a plurality of sub-mirrors, wherein the transition animation comprises fade-in fade-out, a mask or a dynamic key frame animation;
And calling a rendering engine or a third party tool built in the multimedia synthesis template to export the output video in the specified format.
In one aspect, the step of embedding the multimedia content into the multimedia composition template based on the multimedia composition script, performing rendering processing and outputting video further includes:
The remote scheduling service monitors the execution state, the error log and the rendering progress of the multimedia synthesis script in real time;
when an execution abnormality or rendering failure is detected, a standby flow is triggered or multimedia content is regenerated and a new rendering task is started.
In one aspect, the remote scheduling service further comprises:
An instruction queue is established to support scheduling management and priority allocation of batch tasks;
Rendering tasks are coordinated through parallel processing or distributed tasks.
In one aspect, the step of embedding the multimedia content into the multimedia composition template based on the multimedia composition script, performing rendering processing and outputting video further includes:
When the multi-window picture-in-picture effect is nested in the output video, automatically adjusting the target position, the scaling and the key frame animation based on the multimedia synthesis script;
and carrying out personalized configuration of typesetting rules according to the business strategy or user behavior analysis.
In one aspect, before the step of receiving the multimedia content through the remote scheduling service, the method comprises:
generating multimedia content through an AI model, wherein the multimedia content at least comprises one of text, images, video and audio;
And performing format conversion, resolution adjustment or frame rate adaptation on the generated multimedia content so as to meet the compatibility of the multimedia synthesis template.
In one aspect, the step of embedding the multimedia content into the multimedia composition template based on the multimedia composition script, and performing rendering processing and outputting video includes:
And deploying the multimedia synthesis script in a remote access environment, and configuring security rights to cooperate with the call of the remote scheduling service.
In one aspect, the step of generating the multimedia composition script based on the multimedia composition template includes:
The multimedia composition script supports full-flow operations on the multimedia composition template, including opening the template, loading the composition sequence, dynamically replacing content, adding transition animation, and triggering rendering output.
In addition, in order to solve the above problems, the present application also provides a system for rendering video content, including:
The calling module is used for receiving the multimedia content through the remote scheduling service and sending the multimedia content to the multimedia synthesis script, wherein the multimedia synthesis script is generated based on the multimedia synthesis template;
the rendering module is used for rendering the multimedia content based on the multimedia synthesis script and outputting a video;
the calling module is also used for providing the output video for the remote scheduling service, and uploading and publishing the output video through the remote scheduling service.
Furthermore, in order to solve the above-mentioned problems, the present application also provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method as described above.
The method has the beneficial effects that the multimedia template generates the multimedia synthesis script, the function of the multimedia synthesis script can be called through the multimedia synthesis script, when the video is remotely rendered, the multimedia content is rendered through the multimedia synthesis script after the multimedia content is received through the remote scheduling service, the multimedia content is directly embedded into the multimedia synthesis template, and the video is output. Therefore, the process of adjusting the engineering files and the configuration parameters one by one can be reduced, the working efficiency is improved, and the error generation is reduced.
Detailed Description
Embodiments of the technical scheme of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are only for more clearly illustrating the technical aspects of the present invention, and thus are merely examples, and are not intended to limit the scope of the present invention.
It is noted that unless otherwise indicated, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs.
As shown in fig. 1 and 9, the present application provides a method of rendering video content, the method comprising:
In step S10, the remote scheduling service receives the multimedia content and sends the multimedia content to the multimedia composition script, wherein the multimedia composition script is generated based on the multimedia composition template, the remote scheduling service can receive the rendering instruction and send the multimedia content to the multimedia composition script, and the remote scheduling service can be a Node service, for example, a Node. Js service is set up on a server and is used for receiving the instruction request of an external client (or a management end). Multimedia Content is generally referred to as (AI GENERATED Content, AIGC). The multimedia composition template may be an AE-provided video template. The multimedia composition script is a script generated based on AE, and functions of AE can be called by the multimedia composition script.
Step S20, embedding the multimedia content into the multimedia synthesis template based on the multimedia synthesis script, rendering and outputting the video, so that the workload of adjusting the multimedia content can be reduced, the process of adjusting the engineering files and the configuration parameters one by one is reduced, and the working efficiency is improved.
And step S30, providing the output video to a remote scheduling service, and uploading and publishing the output video through the remote scheduling service. After rendering is completed, the output video (such as MP4 file) is uploaded to the media platform through the remote scheduling service, and can also be returned to download and link to the user.
In this embodiment, the multimedia template generates a multimedia composition script, and the multimedia composition script can invoke the function of the multimedia composition template, and when the video is remotely rendered, the multimedia content is rendered by the multimedia composition script after the remote scheduling service receives the multimedia content, and the multimedia content is directly embedded into the multimedia composition template, and the video is output. Therefore, the process of adjusting the engineering files and the configuration parameters one by one can be reduced, the working efficiency is improved, and the error generation is reduced.
As shown in fig. 2, in an embodiment of the present application, the steps of embedding multimedia content into a multimedia composition template based on a multimedia composition script, performing rendering processing, and outputting video include:
In step S210, the multimedia content is inserted into the corresponding layer and time axis positions of the multimedia composition template, and/or a transition animation of the multimedia content is inserted between the multiple sub-mirrors, where the transition animation includes a fade, a mask, or a dynamic key frame animation, for example, a fade effect is inserted between the sub-mirrors, or the dynamic mask animation is defined by the key frame. A "radial erase" transition was added between the partial mirror 1 and the partial mirror 2 for a duration of 0.5 seconds. The target layer (e.g. "minute 1-background image") and the time axis position (e.g. 5 th to 10 th seconds) are determined, and the picture of the multimedia content is inserted into the specified position. On the AE time axis, commodity pictures of multimedia content are inserted into the picture layer of "minute mirror 2", and key frames are automatically aligned.
Step S220, a rendering engine or a third party tool built in the multimedia composition template is called to export the output video in the specified format. And configuring an output format by using an AE built-in rendering queue or a third party tool, and starting a rendering task.
As shown in fig. 3, in an embodiment of the present application, the steps of embedding multimedia content into a multimedia composition template based on a multimedia composition script, performing rendering processing, and outputting video further include:
And step S230, the remote scheduling service monitors the execution state, the error log and the rendering progress of the multimedia synthesis script in real time, and the remote scheduling service integrates the monitoring system to acquire the CPU/memory occupation and the rendering progress (such as the completed frame number/total frame number) of the script in real time. For example, when a script process is detected to be stuck (30 seconds no response), an error log is recorded.
Step S240, when detecting abnormal execution or rendering failure, triggering a standby flow or regenerating multimedia content and starting a new rendering task. If the rendering fails, the service automatically switches to the standby template to re-execute the task or invokes to regenerate the multimedia content. For example, after the first rendering fails due to 4K material incompatibility, the service is downgraded to 1080p templates and retried. By the method, the rendering process can be monitored in real time, and the rendering process is guaranteed to be normally carried out.
As shown in fig. 4, in an embodiment of the present application, the remote scheduling service further includes:
Step S110, an instruction queue is established, scheduling management and priority allocation of batch tasks are supported, and priority labels are supported, for example, rendering tasks of VIP clients are executed in preference to common tasks.
Step S120, coordinating the rendering task by parallel processing or distributed task. Splitting batch tasks into a plurality of rendering nodes, and improving throughput by coordinating task allocation. For example, 100 short video rendering requests are processed simultaneously, with an average time consumption of from 10 minutes/bar down to 2 minutes/bar.
As shown in fig. 5, in an embodiment of the present application, the steps of embedding the multimedia content into the multimedia composition template based on the multimedia composition script, performing rendering processing, and outputting video further include:
Step S250, when the multi-window picture-in-picture effect is nested in the output video, the target position, the scaling and the key frame animation are automatically adjusted based on the multimedia synthesis script, the script reads the target position (such as X=80% and Y=80% in the lower right corner coordinates) and the scaling (such as 30%) in the configuration file, and the key frame animation is bound through the AE expression. For example, a small comment window is nested in the playback video and automatically follows the main picture switching position.
Step S260, according to business strategy or user behavior analysis, personalized configuration of typesetting rules is carried out. And dynamically adjusting the layout rule of the template according to the user behavior data, such as clicking hot zone analysis. For example, the e-commerce platform automatically generates promotion videos with different typesetting styles according to user preferences.
As shown in fig. 6, in an embodiment of the present application, before the step of receiving multimedia content through the remote scheduling service, it includes:
in step S01, the multimedia content is generated by an AI model, where the multimedia content includes at least one of text, image, video, and audio, and the AI model may be AE, that is, the multimedia content is generated by AE. In addition, other large models of labor are also possible.
Step S02, format conversion, resolution adjustment or frame rate adaptation is carried out on the generated multimedia content so as to meet the compatibility of the multimedia synthesis template. Through format conversion and adaptation, the multimedia content can be ensured to be embedded into the multimedia synthesis template.
As shown in fig. 7, in an embodiment of the present application, the steps of embedding multimedia content into a multimedia composition template based on a multimedia composition script, performing rendering processing and outputting video include:
and S03, deploying the multimedia synthesis script in a remote access environment, and configuring security rights to cooperate with the call of the remote scheduling service. Thereby ensuring that the remote scheduling service can access the multimedia composition script.
As shown in fig. 8, in an embodiment of the present application, the step of generating a multimedia composition script based on a multimedia composition template includes:
Step S100, the multimedia synthesis script supports full-flow operation on the multimedia synthesis template, wherein the full-flow operation comprises template opening, synthesis sequence loading, dynamic content replacement, transition animation addition and rendering output triggering.
As shown in fig. 10, the present application also provides a system for rendering video content, comprising a calling module 100 and a rendering module 200.
The calling module 100 is configured to receive the multimedia content through the remote scheduling service, and send the multimedia content to a multimedia composition script, where the multimedia composition script is generated based on a multimedia composition template.
The rendering module 200 is used for rendering the multimedia content based on the multimedia composition script and outputting the video, and the calling module is also used for providing the output video for the remote scheduling service and uploading and publishing the output video through the remote scheduling service.
The specific embodiments and beneficial effects of the system for rendering video content in the present application refer to the method for rendering video content described above, and are not described herein again.
The application also provides a computer readable storage medium storing a computer program which when executed by a processor implements a method as above.
The specific embodiments and advantageous effects of the computer readable storage medium in the present application refer to the above method for rendering video content, and are not described herein.
It should be noted that the above embodiments are only used to illustrate the technical solution of the present invention, but not to limit the technical solution of the present invention, and although the detailed description of the present invention is given with reference to the above embodiments, it should be understood by those skilled in the art that the technical solution described in the above embodiments may be modified or some or all technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiments of the present invention, and all the modifications or substitutions are included in the scope of the claims and the specification of the present invention.