CN113395541A - Video file generation method, device and system - Google Patents

Video file generation method, device and system Download PDF

Info

Publication number
CN113395541A
CN113395541A CN202010177660.2A CN202010177660A CN113395541A CN 113395541 A CN113395541 A CN 113395541A CN 202010177660 A CN202010177660 A CN 202010177660A CN 113395541 A CN113395541 A CN 113395541A
Authority
CN
China
Prior art keywords
video
content
rendering
template
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010177660.2A
Other languages
Chinese (zh)
Inventor
于炳瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mijinghefeng Technology Co ltd
Original Assignee
Beijing Mijinghefeng Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Mijinghefeng Technology Co ltd filed Critical Beijing Mijinghefeng Technology Co ltd
Priority to CN202010177660.2A priority Critical patent/CN113395541A/en
Publication of CN113395541A publication Critical patent/CN113395541A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Television Signal Processing For Recording (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a method, a device and a system for generating a video file, wherein the method comprises the following steps: acquiring video template information and video material information contained in a video generation request; generating a video rendering task corresponding to the video generation request according to the video template information and the video material information, and storing the generated video rendering task into a preset task queue; determining a video rendering task to be rendered according to the task queue, and loading video template content and video material content corresponding to the video rendering task to be rendered; and rendering the video material content according to the video template content to generate a video file corresponding to the video generation request. The method avoids the defect that the video editing mode is set for each material one by one, and greatly improves the processing efficiency.

Description

Video file generation method, device and system
Technical Field
The invention relates to the technical field of internet, in particular to a method, a device and a system for generating a video file.
Background
At present, video files need to be generated in many service scenes. In the prior art, a video file is generated as follows: firstly, acquiring a material file for generating a video, wherein the material file can be a picture or a dynamic video; then, a video editing process is performed on the material file to obtain a video file required for the service. The video editing process includes various modes, for example, various processes such as clipping, adding a special effect, adding a character, and the like can be performed on a material file.
However, the inventor finds that the above mode in the prior art has at least the following defects in the process of implementing the invention: the user needs to execute video editing processing one by one for each material file, and in the process, a corresponding processing mode needs to be set for each material file one by one and the processing is performed, so that the operation is complex and the efficiency is low.
Disclosure of Invention
In view of the above, the present invention has been made to provide a method, apparatus and system for generating a video file that overcome or at least partially solve the above problems.
According to an aspect of the present invention, there is provided a method for generating a video file, including:
acquiring video template information and video material information contained in a video generation request;
generating a video rendering task corresponding to the video generation request according to the video template information and the video material information, and storing the generated video rendering task into a preset task queue;
determining a video rendering task to be rendered according to the task queue, and loading video template content and video material content corresponding to the video rendering task to be rendered;
and rendering the video material content according to the video template content to generate a video file corresponding to the video generation request.
Optionally, the rendering the video material content according to the video template content includes:
dividing the video template content and/or the video material content into a plurality of partial contents;
starting a plurality of rendering threads which work in parallel, wherein each rendering thread corresponds to the video template content and/or the local content in the video material content;
each rendering thread respectively acquires local content in the video template content and/or the video material content, and performs rendering processing according to the acquired local content.
Optionally, the loading the video template content and the video material content corresponding to the video rendering task to be rendered includes: copying the acquired video template content and the video material content to a preset working area;
the step of respectively acquiring the local content in the video template content and/or the video material content by each rendering thread includes: and each rendering thread acquires the video template content and/or the local content in the video material content from the preset working area respectively.
Optionally, the determining a video rendering task to be rendered according to the task queue, and loading video template content and video material content corresponding to the video rendering task to be rendered includes:
and acquiring a plurality of video rendering tasks to be rendered from the task queue, and respectively loading video template contents and video material contents corresponding to the video rendering tasks to be rendered through a plurality of parallel processing processes.
Optionally, before the method is executed, the method further includes: the method comprises the steps of configuring a plurality of video templates in advance, and storing the video templates in a preset video template library;
the video template information in the video generation request is the template identification of the video template stored in the video template library;
and the loading the video template content and the video material content corresponding to the video rendering task to be rendered comprises: and loading the video template content and the video material content corresponding to the video rendering task to be rendered from the video template library.
Optionally, the video template is a project file in a video processing application, and the project file includes: a material subfile and a non-material subfile;
then the rendering the video material content according to the video template content includes:
and determining a material subfile contained in the video template content, and replacing the material subfile with the video material content to execute rendering processing.
Optionally, if the video generation request is sent by a client, after the generating a video file corresponding to the video generation request, the method further includes:
storing the video files into a preset video queue, and recording the mapping relation between each video file and a corresponding client in the video queue;
and pushing each video file in the video queue to a corresponding client according to the mapping relation.
According to still another aspect of the present invention, there is provided a video file generation apparatus including:
the acquisition module is suitable for acquiring video template information and video material information contained in the video generation request;
the task storage module is suitable for generating a video rendering task corresponding to the video generation request according to the video template information and the video material information and storing the generated video rendering task into a preset task queue;
the loading module is suitable for determining a video rendering task to be rendered according to the task queue and loading video template content and video material content corresponding to the video rendering task to be rendered;
and the rendering module is suitable for rendering the video material content according to the video template content so as to generate a video file corresponding to the video generation request.
Optionally, the rendering module is specifically adapted to:
dividing the video template content and/or the video material content into a plurality of partial contents;
starting a plurality of rendering threads which work in parallel, wherein each rendering thread corresponds to the video template content and/or the local content in the video material content;
each rendering thread respectively acquires local content in the video template content and/or the video material content, and performs rendering processing according to the acquired local content.
Optionally, the loading module is specifically adapted to: copying the acquired video template content and the video material content to a preset working area;
and the rendering threads respectively acquire the video template content and/or the local content in the video material content from the preset working area.
Optionally, the loading module is specifically adapted to:
and acquiring a plurality of video rendering tasks to be rendered from the task queue, and respectively loading video template contents and video material contents corresponding to the video rendering tasks to be rendered through a plurality of parallel processing processes.
Optionally, the apparatus further comprises: the template configuration module is suitable for pre-configuring a plurality of video templates and storing the video templates into a preset video template library;
the video template information in the video generation request is the template identification of the video template stored in the video template library;
and the loading module is specifically adapted to: and loading the video template content and the video material content corresponding to the video rendering task to be rendered from the video template library.
Optionally, the video template is a project file in a video processing application, and the project file includes: a material subfile and a non-material subfile;
the rendering module is specifically adapted to:
and determining a material subfile contained in the video template content, and replacing the material subfile with the video material content to execute rendering processing.
Optionally, the video generation request is sent by a client, and the rendering module is further adapted to:
storing the video files into a preset video queue, and recording the mapping relation between each video file and a corresponding client in the video queue;
and pushing each video file in the video queue to a corresponding client according to the mapping relation.
According to still another aspect of the present invention, there is provided a video file generation system including: the video file generation device and the client are provided.
According to still another aspect of the present invention, there is provided an electronic apparatus including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the video file generation method.
According to still another aspect of the present invention, there is provided a computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to execute operations corresponding to the video file generation method as described above.
According to the method, the device and the system for generating the video file, the corresponding video rendering task can be generated according to the video template information and the video material information contained in the video generation request, and accordingly, the video template content and the video material content corresponding to the video rendering task are automatically loaded, so that the rendering processing is realized. Therefore, the mode can uniformly process the generation process of the plurality of video files, each video rendering task is managed through the task queue, a user only needs to upload the template and the material corresponding to each video rendering task, the user does not need to render each video one by one in real time, and the video rendering efficiency is improved. In addition, the multiplexing of the video editing processing mode can be realized through the video template information, so that the defect that the video editing mode is set for each material one by one is avoided, and the processing efficiency is greatly improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 shows a flow diagram of a method of generating a video file according to an embodiment of the invention;
fig. 2 is a flowchart illustrating a method of generating a video file according to still another embodiment of the present invention;
fig. 3 is a schematic structural diagram showing a video file generation apparatus according to still another embodiment of the present invention;
fig. 4 shows a schematic structural diagram of an electronic device according to the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a flowchart illustrating a method for generating a video file according to an embodiment of the present invention, where the method includes:
step S110: and acquiring video template information and video material information contained in the video generation request.
Specifically, when a video generation request sent by a user is received, the video generation request is analyzed to obtain video template information and video material information contained in the video generation request. The video template information may be specific content of the video template, or may only be identification information of the video template. The video template is used for setting an editing processing mode of a video, and specifically comprises a video format, character information, special effect information and the like. The video material information is the original material to be processed, and may specifically be the specific content of the video material, or may only be the identification information of the video material.
Step S120: and generating a video rendering task corresponding to the video generation request according to the video template information and the video material information, and storing the generated video rendering task into a preset task queue.
Specifically, a video rendering task corresponding to the video generation request is generated, and corresponding video template information and video material information are recorded in the video rendering task. Since the number of the video generation requests may be multiple, in order to manage the video rendering tasks corresponding to the video generation requests, in this embodiment, a task queue is provided. The task queue is used for orderly storing each video rendering task so as to realize the orderly scheduling of each video rendering task.
Step S130: and determining a video rendering task to be rendered according to the task queue, and loading video template content and video material content corresponding to the video rendering task to be rendered.
Specifically, the video rendering tasks to be rendered may be sequentially obtained from the task queue in a first-in first-out order. Or different priorities can be set for each video rendering task, so that the video rendering tasks are acquired according to the priorities.
And determining corresponding video template information and video material information aiming at the video rendering task to be rendered, and correspondingly loading video template contents corresponding to the video template information and video material contents corresponding to the video material information.
Step S140: and rendering the video material content according to the video template content to generate a video file corresponding to the video generation request.
Specifically, a corresponding editing processing mode, such as special effects, characters and the like, is determined according to the content of the video template, and the content of the video material is rendered according to the content of the video template to obtain a video file corresponding to the content of the video material.
Therefore, the mode can uniformly process the generation process of the plurality of video files, each video rendering task is managed through the task queue, a user only needs to upload the template and the material corresponding to each video rendering task, the user does not need to render each video one by one in real time, and the video rendering efficiency is improved. In addition, the multiplexing of the video editing processing mode can be realized through the video template information, so that the defect that the video editing mode is set for each material one by one is avoided, and the processing efficiency is greatly improved.
Fig. 2 is a flowchart illustrating a method of generating a video file according to another embodiment of the present invention. As shown in fig. 2, the method includes:
step S200: the method comprises the steps of configuring a plurality of video templates in advance, and storing the video templates in a preset video template library.
The video template is used for setting a specific mode of executing editing processing on the video material, such as adding music, pictures, characters, animation and the like. In this embodiment, the video template may be a project file in a video processing application, where the project file includes: material subfiles and non-material subfiles. Wherein, the material subfile is used for providing pending material information, and non-material subfile is the file except that material information, includes: format files, special effects files, etc.
In this step, a plurality of video templates are configured in advance, each video template corresponds to a different editing processing mode, and types of video materials corresponding to the video templates may be different from each other. Accordingly, the corresponding video material types need to be configured for the respective video templates. And storing each video template into a preset video template library for subsequent calling. The video template can be used for multiplexing aiming at the editing processing mode, so that the processing efficiency is greatly improved.
Step S210: and acquiring video template information and video material information contained in the video generation request.
Specifically, a user may generate and send a video generation request through a client device. For example, the required video template is selected through a template selection entry shown in the client interface, and the required video material is uploaded through a material uploading entry shown in the client interface. In one specific example, a user sends a video generation request through an applet or application or the like of a client: and selecting a proper video template by a user on a front-end interface, and uploading corresponding small videos or pictures as video materials according to the material types adapted to the video template. And after the uploading is completed, calling the server interface to send to the server.
The video template information in the video generation request may be a template identifier of a video template stored in a video template library. Accordingly, the video template selected by the user through the template selection inlet is the template existing in the video template library. Or, the user may also create a video template in this step, and store the video template created by the user in the video template library to dynamically expand the video template library, which is not limited in the present invention.
Correspondingly, the execution main body of the step is the server, and when the server receives a video generation request sent by the client, the server analyzes the video generation request to acquire the video template information and the video material information contained in the video generation request. The video template information may be specific content of the video template, or may only be identification information of the video template. The video template is used for setting an editing processing mode of a video, and specifically comprises a video format, character information, special effect information and the like. The video material information is the original material to be processed, and may specifically be the specific content of the video material, or may only be the identification information of the video material.
Step S220: and generating a video rendering task corresponding to the video generation request according to the video template information and the video material information, and storing the generated video rendering task into a preset task queue.
Specifically, the server generates a video rendering task corresponding to the video generation request, and the video rendering task records corresponding video template information and video material information. Since the number of the video generation requests may be multiple, in order to manage the video rendering tasks corresponding to the video generation requests, in this embodiment, a task queue is provided. The task queue is used for orderly storing each video rendering task so as to realize the orderly scheduling of each video rendering task.
In a specific example, after receiving a video generation request, the server performs business logic processing such as warehousing so as to generate a video rendering task and push the video rendering task to a task queue.
Step S230: and determining a video rendering task to be rendered according to the task queue, and loading video template content and video material content corresponding to the video rendering task to be rendered.
Specifically, the video rendering tasks to be rendered may be sequentially obtained from the task queue in a first-in first-out order. Or different priorities can be set for each video rendering task, so that the video rendering tasks are acquired according to the priorities. And determining corresponding video template information and video material information aiming at the video rendering task to be rendered, and correspondingly loading video template contents corresponding to the video template information and video material contents corresponding to the video material information.
In this embodiment, in order to improve the task processing efficiency, the processing is performed in a multi-process parallel processing manner: and acquiring a plurality of video rendering tasks to be rendered from the task queue, and respectively loading video template contents and video material contents corresponding to the video rendering tasks to be rendered through a plurality of parallel processing processes. Specifically, in order to increase the processing speed, a plurality of video rendering tasks to be rendered are acquired at one time, and the plurality of video rendering tasks to be rendered can be directly acquired according to the storage sequence, or can be acquired by combining with the task priority. Correspondingly, a plurality of concurrent processing processes are started, and the concurrent processing of a plurality of rendering tasks is carried out in a multi-process processing mode. Each process is used for loading video template content and video material content corresponding to a video rendering task corresponding to the process.
Specifically, when loading the video template content and the video material content corresponding to the video rendering task, in order to increase the processing speed and prevent errors, in this embodiment, the obtained video template content and the obtained video material content are further copied to the preset work area. Wherein the preset working area is exclusively used for storing the video rendering task to be rendered.
In addition, in this step, the video template content and the video material content corresponding to the video rendering task to be rendered may be loaded from the video template library. Or, the video material content may be stored in the video material library in advance, so as to load the corresponding video material content from the video material library, and the specific details are not limited in the present invention.
Step S240: and rendering the video material content according to the video template content to generate a video file corresponding to the video generation request.
Specifically, a corresponding editing processing mode, such as special effects, characters and the like, is determined according to the content of the video template, and the content of the video material is rendered according to the content of the video template to obtain a video file corresponding to the content of the video material.
In this embodiment, in order to increase the rendering speed, rendering is performed in a multi-thread parallel processing manner:
first, the video template content and/or the video material content is divided into a plurality of partial contents. For example, the text effect, the animation effect, the background effect, and the like in the content of the video template may be respectively used as one local content. As another example, the video material content may be divided into a plurality of partial contents by the number of materials or time points of the materials. In short, the video template content and/or the video material content can be split into a plurality of pieces by dividing the local content in advance, so that multithreading parallel processing is facilitated.
Then, starting a plurality of rendering threads which work in parallel, wherein each rendering thread corresponds to the local content in the video template content and/or the video material content respectively; each rendering thread respectively acquires local content in the video template content and/or the video material content, and performs rendering processing according to the acquired local content. Specifically, each rendering thread rapidly renders the corresponding local content in a parallel manner, so that the rendering operation of the whole material is completed together through the cooperation of multiple threads.
In addition, when the preset working area is set, each rendering thread acquires the video template content and/or the local content in the video material content from the preset working area respectively. The preset working area is specially used for storing the templates and the materials corresponding to the tasks being rendered, and the templates and the materials corresponding to the tasks which have completed the rendering operation are moved out of the working area, so that the rendering thread does not need to execute searching operation, the content can be directly acquired from the preset working area, the operation is convenient and fast, and errors are not easy to occur.
The rendering process mainly comprises the following operations: first, the corresponding template content is downloaded, namely: ae (after effects) project file. The template is then copied to a new workspace (in order to enable multitasking rendering), and the template material file under the AE project is replaced with the user's material. Next, aerender. exe rendering is invoked to render into video. Finally, the transcoded video is compressed using ffmpeg.
Therefore, when the video template is a project file in a video processing application, and the project file comprises a material subfile and a non-material subfile, in this step, the rendering processing is performed in the following manner: and determining a material subfile contained in the video template content, and replacing the material subfile with the video material content and then executing rendering processing.
Step S250: and pushing the video file to a corresponding client.
Specifically, the generated video files are stored in a preset video queue, and the mapping relation between each video file and the corresponding client is recorded in the video queue; and pushing each video file in the video queue to the corresponding client according to the mapping relation.
In one particular example, this step is performed by a rendering service that consumes a task queue to obtain tasks; and analyzing the information of the task to load the template and the material, rendering the template and the material into a video, and pushing a rendering result to a video queue. Correspondingly, the server consumes the video queue and pushes the generated video information to the client, wherein the generated video information comprises a timeout and retry mechanism, and the whole process is completed.
In conclusion, the mode can uniformly process the generation process of a plurality of video files, each video rendering task is managed through the task queue, a user only needs to upload the template and the material corresponding to each video rendering task, the user does not need to render each video one by one in real time, and the video rendering efficiency is improved. In addition, the multiplexing of the video editing processing mode can be realized through the video template information, so that the defect that the video editing mode is set for each material one by one is avoided, and the processing efficiency is greatly improved. In addition, the video generation mode provided by the invention can reduce manual intervention, and aims at automatic synthesis rendering of the video template and multitask automatic operation. The operation only needs to upload the video template without other operations, and the Windows cluster can realize automatic rendering and multitask processing and improve the rendering speed.
In addition, various modifications and changes may be made by those skilled in the art to the above-described embodiments. For example, in one variation, the front end implements special effects using CSS and JS. In another variant, a template is developed by using an open-source tool such as an MLT Multimedia Framework, and the rendering of a video by a server is realized. In a word, the Windows cluster in the scheme utilizes the video template and uses AE to conduct automatic video rendering.
Fig. 3 is a schematic structural diagram illustrating a video file generation apparatus according to still another embodiment of the present invention, and as shown in fig. 3, the apparatus includes:
an obtaining module 31, adapted to obtain video template information and video material information included in the video generation request;
the task storage module 32 is adapted to generate a video rendering task corresponding to the video generation request according to the video template information and the video material information, and store the generated video rendering task in a preset task queue;
the loading module 33 is adapted to determine a video rendering task to be rendered according to the task queue, and load video template content and video material content corresponding to the video rendering task to be rendered;
and the rendering module 34 is adapted to perform rendering processing on the video material content according to the video template content to generate a video file corresponding to the video generation request.
Optionally, the rendering module is specifically adapted to:
dividing the video template content and/or the video material content into a plurality of partial contents;
starting a plurality of rendering threads which work in parallel, wherein each rendering thread corresponds to the video template content and/or the local content in the video material content;
each rendering thread respectively acquires local content in the video template content and/or the video material content, and performs rendering processing according to the acquired local content.
Optionally, the loading module is specifically adapted to: copying the acquired video template content and the video material content to a preset working area;
and the rendering threads respectively acquire the video template content and/or the local content in the video material content from the preset working area.
Optionally, the loading module is specifically adapted to:
and acquiring a plurality of video rendering tasks to be rendered from the task queue, and respectively loading video template contents and video material contents corresponding to the video rendering tasks to be rendered through a plurality of parallel processing processes.
Optionally, the apparatus further comprises: the template configuration module is suitable for pre-configuring a plurality of video templates and storing the video templates into a preset video template library;
the video template information in the video generation request is the template identification of the video template stored in the video template library;
and the loading module is specifically adapted to: and loading the video template content and the video material content corresponding to the video rendering task to be rendered from the video template library.
Optionally, the video template is a project file in a video processing application, and the project file includes: a material subfile and a non-material subfile;
the rendering module is specifically adapted to:
and determining a material subfile contained in the video template content, and replacing the material subfile with the video material content to execute rendering processing.
Optionally, the video generation request is sent by a client, and the rendering module is further adapted to:
storing the video files into a preset video queue, and recording the mapping relation between each video file and a corresponding client in the video queue;
and pushing each video file in the video queue to a corresponding client according to the mapping relation.
The specific structure and the working principle of each module may refer to the description of the corresponding step in the method embodiment, and are not described herein again.
In addition, another embodiment of the present invention further provides a system for generating a video file, including: the video file generation device and the client are provided.
Embodiments of the present application provide a non-volatile computer storage medium, where at least one executable instruction is stored in the computer storage medium, and the computer executable instruction may execute the method in any of the above method embodiments.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
As shown in fig. 4, the electronic device may include: a processor (processor)402, a Communications Interface 404, a memory 406, and a Communications bus 408.
Wherein:
the processor 402, communication interface 404, and memory 406 communicate with each other via a communication bus 408.
A communication interface 404 for communicating with network elements of other devices, such as clients or other servers.
The processor 402 is configured to execute the program 410, and may specifically perform the relevant steps in the above method embodiments.
In particular, program 410 may include program code comprising computer operating instructions.
The processor 402 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention. The electronic device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 410 may be specifically configured to cause the processor 402 to perform the operations in the above-described method embodiments.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in an electronic device according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The invention also discloses A1. a method for generating the video file, which comprises the following steps:
acquiring video template information and video material information contained in a video generation request;
generating a video rendering task corresponding to the video generation request according to the video template information and the video material information, and storing the generated video rendering task into a preset task queue;
determining a video rendering task to be rendered according to the task queue, and loading video template content and video material content corresponding to the video rendering task to be rendered;
and rendering the video material content according to the video template content to generate a video file corresponding to the video generation request.
A2. The method of a1, wherein the rendering the video material content according to the video template content comprises:
dividing the video template content and/or the video material content into a plurality of partial contents;
starting a plurality of rendering threads which work in parallel, wherein each rendering thread corresponds to the video template content and/or the local content in the video material content;
each rendering thread respectively acquires local content in the video template content and/or the video material content, and performs rendering processing according to the acquired local content.
A3. The method according to a2, wherein the loading of the video template content and the video material content corresponding to the video rendering task to be rendered includes: copying the acquired video template content and the video material content to a preset working area;
the step of respectively acquiring the local content in the video template content and/or the video material content by each rendering thread includes: and each rendering thread acquires the video template content and/or the local content in the video material content from the preset working area respectively.
A4. The method according to any one of a1-3, wherein the determining a video rendering task to be rendered according to the task queue, and the loading video template content and video material content corresponding to the video rendering task to be rendered includes:
and acquiring a plurality of video rendering tasks to be rendered from the task queue, and respectively loading video template contents and video material contents corresponding to the video rendering tasks to be rendered through a plurality of parallel processing processes.
A5. The method according to any of a1-4, wherein before the method is performed, the method further comprises: the method comprises the steps of configuring a plurality of video templates in advance, and storing the video templates in a preset video template library;
the video template information in the video generation request is the template identification of the video template stored in the video template library;
and the loading the video template content and the video material content corresponding to the video rendering task to be rendered comprises: and loading the video template content and the video material content corresponding to the video rendering task to be rendered from the video template library.
A6. The method of a5, wherein the video template is a project file in a video processing application, the project file including: a material subfile and a non-material subfile;
then the rendering the video material content according to the video template content includes:
and determining a material subfile contained in the video template content, and replacing the material subfile with the video material content to execute rendering processing.
A7. The method according to any one of a1-6, wherein if the video generation request is sent by a client, after the generating the video file corresponding to the video generation request, the method further comprises:
storing the video files into a preset video queue, and recording the mapping relation between each video file and a corresponding client in the video queue;
and pushing each video file in the video queue to a corresponding client according to the mapping relation.
B8. An apparatus for generating a video file, comprising:
the acquisition module is suitable for acquiring video template information and video material information contained in the video generation request;
the task storage module is suitable for generating a video rendering task corresponding to the video generation request according to the video template information and the video material information and storing the generated video rendering task into a preset task queue;
the loading module is suitable for determining a video rendering task to be rendered according to the task queue and loading video template content and video material content corresponding to the video rendering task to be rendered;
and the rendering module is suitable for rendering the video material content according to the video template content so as to generate a video file corresponding to the video generation request.
B9. The apparatus of B8, wherein the rendering module is specifically adapted to:
dividing the video template content and/or the video material content into a plurality of partial contents;
starting a plurality of rendering threads which work in parallel, wherein each rendering thread corresponds to the video template content and/or the local content in the video material content;
each rendering thread respectively acquires local content in the video template content and/or the video material content, and performs rendering processing according to the acquired local content.
B10. The apparatus of B9, wherein the loading module is specifically adapted to: copying the acquired video template content and the video material content to a preset working area;
and the rendering threads respectively acquire the video template content and/or the local content in the video material content from the preset working area.
B11. The apparatus according to any of B8-10, wherein the loading module is specifically adapted to:
and acquiring a plurality of video rendering tasks to be rendered from the task queue, and respectively loading video template contents and video material contents corresponding to the video rendering tasks to be rendered through a plurality of parallel processing processes.
B12. The apparatus of any of B8-11, wherein the apparatus further comprises: the template configuration module is suitable for pre-configuring a plurality of video templates and storing the video templates into a preset video template library;
the video template information in the video generation request is the template identification of the video template stored in the video template library;
and the loading module is specifically adapted to: and loading the video template content and the video material content corresponding to the video rendering task to be rendered from the video template library.
B13. The apparatus of B12, wherein the video template is a project file in a video processing application, the project file comprising: a material subfile and a non-material subfile;
the rendering module is specifically adapted to:
and determining a material subfile contained in the video template content, and replacing the material subfile with the video material content to execute rendering processing.
B14. The apparatus of any of B8-13, wherein the video generation request is sent by a client, the rendering module is further adapted to:
storing the video files into a preset video queue, and recording the mapping relation between each video file and a corresponding client in the video queue;
and pushing each video file in the video queue to a corresponding client according to the mapping relation.
C15. A video file generation system, comprising: b8-14, and a client.
D16. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the video file generation method of any one of A1-7.
E17. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to execute the operation corresponding to the video file generation method as described in any one of a 1-7.

Claims (10)

1. A method for generating a video file comprises the following steps:
acquiring video template information and video material information contained in a video generation request;
generating a video rendering task corresponding to the video generation request according to the video template information and the video material information, and storing the generated video rendering task into a preset task queue;
determining a video rendering task to be rendered according to the task queue, and loading video template content and video material content corresponding to the video rendering task to be rendered;
and rendering the video material content according to the video template content to generate a video file corresponding to the video generation request.
2. The method of claim 1, wherein said rendering said video material content in accordance with said video template content comprises:
dividing the video template content and/or the video material content into a plurality of partial contents;
starting a plurality of rendering threads which work in parallel, wherein each rendering thread corresponds to the video template content and/or the local content in the video material content;
each rendering thread respectively acquires local content in the video template content and/or the video material content, and performs rendering processing according to the acquired local content.
3. The method of claim 2, wherein the loading of the video template content and the video material content corresponding to the video rendering task to be rendered comprises: copying the acquired video template content and the video material content to a preset working area;
the step of respectively acquiring the local content in the video template content and/or the video material content by each rendering thread includes: and each rendering thread acquires the video template content and/or the local content in the video material content from the preset working area respectively.
4. The method according to any one of claims 1 to 3, wherein the determining a video rendering task to be rendered according to the task queue, and the loading video template content and video material content corresponding to the video rendering task to be rendered comprises:
and acquiring a plurality of video rendering tasks to be rendered from the task queue, and respectively loading video template contents and video material contents corresponding to the video rendering tasks to be rendered through a plurality of parallel processing processes.
5. The method of any of claims 1-4, wherein prior to performing the method, further comprising: the method comprises the steps of configuring a plurality of video templates in advance, and storing the video templates in a preset video template library;
the video template information in the video generation request is the template identification of the video template stored in the video template library;
and the loading the video template content and the video material content corresponding to the video rendering task to be rendered comprises: and loading the video template content and the video material content corresponding to the video rendering task to be rendered from the video template library.
6. The method of claim 5, wherein the video template is a project file in a video processing application, the project file comprising: a material subfile and a non-material subfile;
then the rendering the video material content according to the video template content includes:
and determining a material subfile contained in the video template content, and replacing the material subfile with the video material content to execute rendering processing.
7. An apparatus for generating a video file, comprising:
the acquisition module is suitable for acquiring video template information and video material information contained in the video generation request;
the task storage module is suitable for generating a video rendering task corresponding to the video generation request according to the video template information and the video material information and storing the generated video rendering task into a preset task queue;
the loading module is suitable for determining a video rendering task to be rendered according to the task queue and loading video template content and video material content corresponding to the video rendering task to be rendered;
and the rendering module is suitable for rendering the video material content according to the video template content so as to generate a video file corresponding to the video generation request.
8. A video file generation system, comprising: a video file generation apparatus and a client according to claim 7.
9. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the video file generation method of any one of claims 1-6.
10. A computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to the video file generation method according to any one of claims 1 to 6.
CN202010177660.2A 2020-03-13 2020-03-13 Video file generation method, device and system Pending CN113395541A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010177660.2A CN113395541A (en) 2020-03-13 2020-03-13 Video file generation method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010177660.2A CN113395541A (en) 2020-03-13 2020-03-13 Video file generation method, device and system

Publications (1)

Publication Number Publication Date
CN113395541A true CN113395541A (en) 2021-09-14

Family

ID=77616241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010177660.2A Pending CN113395541A (en) 2020-03-13 2020-03-13 Video file generation method, device and system

Country Status (1)

Country Link
CN (1) CN113395541A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986087A (en) * 2021-12-27 2022-01-28 深圳市大头兄弟科技有限公司 Video rendering method based on subscription
CN114640806A (en) * 2022-03-14 2022-06-17 上海哔哩哔哩科技有限公司 Video file synthesis method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986087A (en) * 2021-12-27 2022-01-28 深圳市大头兄弟科技有限公司 Video rendering method based on subscription
CN114640806A (en) * 2022-03-14 2022-06-17 上海哔哩哔哩科技有限公司 Video file synthesis method and device

Similar Documents

Publication Publication Date Title
US11681564B2 (en) Heterogeneous computing-based task processing method and software and hardware framework system
US20090251475A1 (en) Framework to integrate and abstract processing of multiple hardware domains, data types and format
US11734054B2 (en) Techniques for interfacing between media processing workflows and serverless functions
CN113395541A (en) Video file generation method, device and system
CN115086752B (en) Recording method, system and storage medium for browser page content
US8738742B2 (en) Tiered XML services in a content management system
JP2006221630A (en) Log acquisition method and program, and storage medium
CN110580242A (en) picture storage and display method and system in network disk application
CN115309315B (en) Screenshot method, system and medium for X application in Wayland environment
JP4082051B2 (en) Image processing apparatus and image processing method
CN115686663A (en) Online file preview method and device and computer equipment
CN116414731A (en) Special effect editing method and device
US11340949B2 (en) Method and node for managing a request for hardware acceleration by means of an accelerator device
US6791556B1 (en) Multiframe rendering of video data on a general purpose computer
US20060114820A1 (en) System and method for caching and fetching data
CN118042243A (en) Multimedia resource processing method, device, equipment and medium
CN114691608A (en) Data storage method, device and equipment of three-dimensional model
CN115134658B (en) Video processing method, device, equipment and storage medium
CN111414162B (en) Data processing method, device and equipment thereof
CN111159137A (en) Method and device for processing file request
WO2024102208A1 (en) Interoperability between actor frameworks and asynchronous frameworks
CN114757813A (en) Rendering system and method and electronic equipment
CN115630033A (en) Log information processing method and device, electronic equipment and medium
CN116503535A (en) Image rendering method, device, electronic equipment and storage medium
US7886307B1 (en) Object-oriented data transfer system for data sharing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination