CN109769141A - A kind of video generation method, device, electronic equipment and storage medium - Google Patents

A kind of video generation method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109769141A
CN109769141A CN201910101242.2A CN201910101242A CN109769141A CN 109769141 A CN109769141 A CN 109769141A CN 201910101242 A CN201910101242 A CN 201910101242A CN 109769141 A CN109769141 A CN 109769141A
Authority
CN
China
Prior art keywords
video
resource
template file
replacement
target
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.)
Granted
Application number
CN201910101242.2A
Other languages
Chinese (zh)
Other versions
CN109769141B (en
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910101242.2A priority Critical patent/CN109769141B/en
Publication of CN109769141A publication Critical patent/CN109769141A/en
Application granted granted Critical
Publication of CN109769141B publication Critical patent/CN109769141B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present disclosure discloses a kind of video generation method, device, electronic equipment and storage mediums.Wherein, this method comprises: obtaining all videos template file corresponding with video generation request, and at least one target video template file is determined in all videos template file;In the whole resources for including in the target video template file, target replacement resource corresponding at least one source replacement resource is determined;Using the target replacement resource, corresponding source replacement resource in the target video template file is replaced, and Video Rendering is carried out to the target video template file that replacement is completed, generates target video.The embodiment of the present disclosure can be by replacing the resource in video template file automatically, the different video of Mass production, improves video formation efficiency, and video resource may be implemented and share, improve video resource utilization rate.

Description

A kind of video generation method, device, electronic equipment and storage medium
Technical field
The embodiment of the present disclosure be related to video processing technique more particularly to a kind of video generation method, device, electronic equipment and Storage medium.
Background technique
People usually can generate video using Video processing software according to business demand.For example, being handled using video soft Part Adobe After Effects (abbreviation AE).
In the prior art, user opens Video processing software, the video processing function provided using software, to picture and text The video resources such as word are operated, and a video file is generated.For example, user uses Video processing software Adobe After Effects operates the video resources such as picture and text, generates an AE video file.
Drawback of the prior art is that needing user that the videos such as Adobe After Effects is manually used to handle Software development video.If there is multitude of video generates demand, completely by manual operation, video formation efficiency is lower.And user The video file manually generated cannot achieve video resource and share for example, AE video file, can only be used by user, depending on Frequency resource utilization is low.
Summary of the invention
The disclosure provides a kind of video generation method, device, electronic equipment and storage medium, to realize to existing video Generation scheme optimizes, and realizes Mass production video, improves video formation efficiency.
In a first aspect, the embodiment of the present disclosure provides a kind of video generation method, comprising:
All videos template file corresponding with video generation request is obtained, and is determined extremely in all videos template file A few target video template file;
In the whole resources for including in target video template file, mesh corresponding at least one source replacement resource is determined Mark replacement resource;
Using target replacement resource, source replacement resource corresponding in target video template file is replaced, and to replacing The target video template file for changing completion carries out Video Rendering, generates target video.
In above scheme, optionally, at least one target video template file is determined in all videos template file, Include:
All videos template file is provided to generate with video and requests matched user;
Obtain at least one target video template file that user is fed back based on all videos template file.
In above scheme, optionally, in the whole resources for including in target video template file, determine and at least one The corresponding target replacement resource of item source replacement resource, comprising:
The resource information of whole source replacement resources in target video template file is provided to and generates request with video The user matched;
Obtain the target replacement resource corresponding at least one source replacement resource that user is fed back based on resource information.
In above scheme, optionally, the resource type of source replacement resource includes at least one of following:
Picture, text, video and audio.
In above scheme, optionally, before obtaining all videos template file corresponding with video generation request, also Include:
Whole original video files are obtained, and are parsed each original video files by DOM Document Object Model resolver For a corresponding DOM Document Object Model document;It wherein, include each in original video files in DOM Document Object Model document Item resource, and the interface of access resource;
According to DOM Document Object Model document and the replacement attribute of each single item resource, generate and each original video text The matched source replacement resource list of part;
Ergodic source replacement resource list obtains each single item source replacement resource;
Replacement resource corresponding file directory address in each single item source is replaced with into corresponding template directory address;
According to object numbered musical notation form, the resource name and resource format of each single item source replacement resource are saved, as The resource information of source corresponding with original video files replacement resource;
The original video files that processing is completed are determined as video template file.
In above scheme, optionally, original video files are the video file generated using Video processing software.
In above scheme, optionally, using target replacement resource, source corresponding in target video template file is replaced Resource is replaced, comprising:
Obtain resource name and the template directory address of source corresponding with target replacement resource replacement resource;
The resource name of target replacement resource is updated to the resource name of source replacement resource;
With updated target replacement resource, replacement is stored in the source replacement resource of template directory address.
Second aspect, the embodiment of the present disclosure additionally provide a kind of video-generating device, comprising:
Template file determining module, for obtaining all videos template file corresponding with video generation request, and complete At least one target video template file is determined in portion's video template file;
Replacement resource determining module, in whole resources for including in target video template file, determine at least The corresponding target replacement resource of one source replacement resource;
Video generation module is replaced source corresponding in target video template file and is provided for using target replacement resource Source is replaced, and carries out Video Rendering to the target video template file that replacement is completed, and generates target video.
In above scheme, optionally, template file determining module includes:
File provides unit, requests matched user for all videos template file to be provided to generate with video;
File obtaining unit, at least one the target video mould fed back for obtaining user based on all videos template file Plate file.
In above scheme, optionally, replacement resource determining module includes:
Information provider unit, for the resource information of whole source replacement resources in target video template file to be provided to It is generated with video and requests matched user;
Resource acquisition unit, for obtain user fed back based on resource information it is corresponding at least one source replacement resource Target replacement resource.
In above scheme, optionally, the resource type of source replacement resource includes at least one of following:
Picture, text, video and audio.
In above scheme, optionally, further includes:
Document analysis module, for obtaining whole original video files, and will be each by DOM Document Object Model resolver A original video files resolve to a corresponding DOM Document Object Model document;It wherein, include original in DOM Document Object Model document Each single item resource in beginning video file, and the interface of access resource;
List Generating Module, for according to the replacement attribute of DOM Document Object Model document and each single item resource, generate with The matched source replacement resource list of each original video files;
Source obtaining module is used for the list of ergodic source replacement resource, obtains each single item source replacement resource;
Address replacement module, for replacement resource corresponding file directory address in each single item source to be replaced with corresponding template Directory address;
Information preservation module is used for according to object numbered musical notation form, to the resource name and resource of each single item source replacement resource Format is saved, the resource information as source corresponding with original video files replacement resource;
File determining module, the original video files for completing processing are determined as video template file.
In above scheme, optionally, original video files are the video file generated using Video processing software.
In above scheme, optionally, video generation module includes:
Information acquisition unit, for obtaining the resource name of source corresponding with target replacement resource replacement resource, Yi Jimo Plate directory address;
Title updating unit, for the resource name of target replacement resource to be updated to the resource name of source replacement resource;
Resource replacement unit, for updated target replacement resource, the source that replacement is stored in template directory address to be replaced Change resource.
The third aspect, the embodiment of the present disclosure additionally provide a kind of electronic equipment, comprising:
One or more processors;
Storage device, for storing one or more programs;
When one or more programs are executed by one or more processors, so that one or more processors realize such as this public affairs Open video generation method described in embodiment.
Fourth aspect, the embodiment of the present disclosure additionally provide a kind of computer readable storage medium, are stored thereon with computer Program realizes the video generation method as described in the embodiment of the present disclosure when computer program is executed by processor.
The embodiment of the present disclosure, which passes through, obtains all videos template file corresponding with video generation request, and in all videos At least one target video template file, the whole resources for then including in target video template file are determined in template file In, target replacement resource corresponding at least one source replacement resource is determined, using target replacement resource, to target video template Corresponding source replacement resource is replaced in file, and carries out Video Rendering to the target video template file that replacement is completed, raw At target video, solves the prior art and need user that Video processing software is manually used to make video, video generates effect Rate is lower, cannot achieve video resource and shares, the low problem of video resource utilization rate can be by video template file Resource is replaced automatically, the different video of Mass production, improves video formation efficiency, and video resource may be implemented and share, mention High video resource utilization rate.
Detailed description of the invention
Fig. 1 is a kind of flow chart for video generation method that the embodiment of the present disclosure provides;
Fig. 2 is a kind of flow chart for video generation method that the embodiment of the present disclosure provides;
Fig. 3 is a kind of flow chart for video generation method that the embodiment of the present disclosure provides;
Fig. 4 is a kind of structural schematic diagram for video-generating device that the embodiment of the present disclosure provides;
Fig. 5 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present disclosure provides.
Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the disclosure, rather than the restriction to the disclosure.It also should be noted that in order to just Part relevant to the disclosure is illustrated only in description, attached drawing rather than entire infrastructure.
Fig. 1 is a kind of flow chart for video generation method that the embodiment of the present disclosure provides.The present embodiment is applicable to carry out The case where video generates, this method can be executed by video-generating device, which can use the side of software and/or hardware Formula realizes that the device can be configured at electronic equipment, for example, in terminal device or server.As shown in Figure 1, this method can be with Include the following steps:
Step 101 obtains all videos template file corresponding with video generation request, and in all videos template file At least one target video template file of middle determination.
Wherein, video, which refers to, is captured in a manner of electric signal by a series of static images, is noted down, being handled, being stored, being passed The various technologies sent and reappeared.Continuous image change it is per second more than more than 24 frame pictures when, according to persistence of vision principle, human eye It can not distinguish the tableaux of single width, it appears that be smooth continuous visual effect, picture continuous in this way is called video.
Video template file is the template file generated according to the original video files stored in database.Original video text Part can be the video file generated using Video processing software.For example, original video files be user handled using video it is soft The AE video file that part Adobe After Effects is generated.
Resource in original video files is divided into replaceable resource and can not replacement resource.Can not replacement resource be original view Changeless resource in frequency file.Source replacement resource is the replaceable resource in original video files.Source replacement resource can be with It is picture, text, the resource of video and audio including resource type.Whole original video files are obtained, each original is analyzed Source replacement resource in beginning video file, then according to the corresponding source replacement resource of each original video files to original video File is handled, and the resource information of source corresponding with each original video files replacement resource is generated, and processing is completed Original video files are determined as video template file.
The source replacement resource of video template file is interchangeable.Source replacement resource can be picture, text, video, or Person's audio.After the completion of replacement, video template file can render to obtain a video.In video template file it is changeless not Replaceable resource is the general frame of video, and internal source replacement resource can be to be replaced.On the basis of video template file On, according to business demand, the source replacement resource in video template file is replaced with new resource, that is, produce one with Based on original video files corresponding with video template file, picture, text, the sources such as video and audio replacement resource quilt The new video files of replacement.
User is without making video file using Video processing software manually as a result, according only to the view that demand selection is suitable Then frequency template file is replaced the source replacement resource in video template file with new resource, can be obtained and meet industry The new video file of business demand.Original video files are no longer disposable engineerings, but general in video generating process And the template that can be repeatedly multiplexed.It can be repeatedly multiplexed the same video template file, a large amount of video is generated, reach Mass production Purpose.
User generates request by sending video, requests according to video template file generated video.Video generation is obtained to ask It asks, request all videos template file is generated according to video, and determine at least one mesh in all videos template file Mark video template file.Target video template file is the video template file for generating new video.
In a specific example, obtains video and generate request, all videos template file is provided to and is generated with video Matched user is requested, at least one target video template text that user is fed back based on all videos template file is then obtained Part.User can select at least one target video template file in all videos template file.
In another specific example, it includes the video template file that user specifies that the video that user sends, which generates request, Relevant information.It is generated and is requested according to video, at least one target video template text can be determined in all videos template file Part.
In step 102, the whole resources for including in target video template file, determine and at least one source replacement resource Corresponding target replacement resource.
It wherein, include at least one source replacement resource in target video template file.Target replacement resource is for replacing The resource of a corresponding source replacement resource in target video template file.Determine target corresponding with each single item source replacement resource Replacement resource.
In a specific example, the resource information of whole source replacement resources in target video template file is provided to It is generated with video and requests matched user, acquisition user is fed back corresponding at least one source replacement resource based on resource information Target replacement resource.The resource information of source replacement resource includes the resource name and resource format of each single item source replacement resource.With Family can upload target replacement resource corresponding with each single item source replacement resource according to resource information.For example, target video template Whole source replacement resources in file include: picture, text, video and audio.User is according to the money of above-mentioned source replacement resource Source information, uploads corresponding replacement picture, and Alternate text replaces video, and replacement audio.
In another specific example, each single item source replacement resource in target video template file has corresponding one group to replace Change resource.Can be generated and be requested according to video, in the corresponding one group of replacement resource of each single item source replacement resource, it is determining with it is each The corresponding target replacement resource of item source replacement resource.For example, whole source replacement resources in target video template file include: figure Piece, text, video and audio.Picture is corresponding with one group and alternatively replaces picture.Text is corresponding with one group of alternative Alternate text. Video is corresponding with one group and alternatively replaces video.Audio is corresponding with one group and alternatively replaces audio.It is generated and is requested according to video, each In the corresponding one group of replacement resource of item source replacement resource, determine that corresponding replacement picture, Alternate text are replaced video, and replaced Change audio.
Step 103, using target replacement resource, source replacement resource corresponding in target video template file is replaced It changes, and Video Rendering is carried out to the target video template file that replacement is completed, generate target video.
Wherein it is determined that after target replacement resource corresponding with each single item source replacement resource, using target replacement resource, to mesh Corresponding source replacement resource is replaced in mark video template file.It is replaced specifically, obtaining source corresponding with target replacement resource Change resource name and the template directory address of resource.Template directory address is the storage address of source replacement resource.Target is replaced The resource name for changing resource is updated to the resource name of source replacement resource, then with updated target replacement resource, replacement guarantor There are the source replacement resources of template directory address.
After corresponding source replacement resource in target replacement resource replacement target video template file, to the mesh of replacement completion It marks video template file and carries out Video Rendering, that is, produce a new video, i.e. target video.Video Rendering is exactly according to setting The video parameter set, by all videos resources making at final finished product video.Video parameter may include resolution ratio, time model It encloses, frame rate etc..Optionally, pre-set video parameter is obtained, video renderer is called, for example, video renderer AE Render manager carries out Video Rendering.
The technical solution of the present embodiment, by acquisition all videos template file corresponding with video generation request, and At least one target video template file is determined in all videos template file, then includes in target video template file In whole resources, target replacement resource corresponding at least one source replacement resource is determined, using target replacement resource, to target Corresponding source replacement resource is replaced in video template file, and carries out video to the target video template file that replacement is completed Rendering generates target video, solves the prior art and needs user that Video processing software is manually used to make video, video Formation efficiency is lower, cannot achieve video resource and shares, the low problem of video resource utilization rate, can be by video template text Resource in part is replaced automatically, the different video of Mass production, improves video formation efficiency, and it is total that video resource may be implemented It enjoys, improves video resource utilization rate.
Fig. 2 is a kind of flow chart for video generation method that the embodiment of the present disclosure provides.The present embodiment can be with above-mentioned one Each optinal plan combines in a or multiple embodiments, in the present embodiment, corresponding with video generation request complete obtaining It, can be with before portion's video template file further include: obtain whole original video files, and will by DOM Document Object Model resolver Each original video files resolves to a corresponding DOM Document Object Model document;Wherein, it is wrapped in DOM Document Object Model document Include each single item resource in original video files, and the interface of access resource;According to DOM Document Object Model document and each The replacement attribute of item resource, generates and the matched source replacement resource list of each original video files;Ergodic source replacement resource List obtains each single item source replacement resource;Replacement resource corresponding file directory address in each single item source is replaced with into corresponding mould Plate directory address;According to object numbered musical notation form, the resource name and resource format of each single item source replacement resource are saved, made For the resource information of source corresponding with original video files replacement resource;The original video files that processing is completed are determined as video Template file.
And using target replacement resource, source replacement resource corresponding in target video template file is replaced, it can To include: resource name and the template directory address of acquisition source replacement resource corresponding with target replacement resource;Target is replaced The resource name for changing resource is updated to the resource name of source replacement resource;With updated target replacement resource, replacement is stored in The source replacement resource of template directory address.
As shown in Fig. 2, this method may include steps of:
Step 201 obtains whole original video files, and passes through DOM Document Object Model resolver for each original video Document analysis is a corresponding DOM Document Object Model document;It wherein, include original video files in DOM Document Object Model document In each single item resource, and access resource interface.
Wherein, original video files are that user is regarded using the AE that Video processing software Adobe After Effects is generated Frequency file.Original video files are protected based on extensible markup language (Extensible Markup Language, XML) format It deposits.
It will be stored using DOM Document Object Model resolver (Document Object Model parser, DOM parser) XML source code analysis in original video files is an object model document.The object of DOM Document Object Model document is by group It is woven in a tree structure.DOM Document Object Model document defines the object and attribute of all XML elements, and accesses them Method (interface).I.e. DOM Document Object Model document is the standard for obtaining, changing, adding or deleting XML element.In this public affairs It opens in embodiment, includes each single item resource in original video files in DOM Document Object Model document, and access connecing for resource Mouthful.
Step 202, according to the replacement attribute of DOM Document Object Model document and each single item resource, generate former with each The matched source replacement resource list of beginning video file.
Wherein, the replacement attribute of resource is replaceable and not replaceable.It, will be in original video files according to replacement attribute Resource is divided into replaceable resource and can not replacement resource.Can not replacement resource be changeless resource in original video files. Source replacement resource is the replaceable resource in original video files.According to the replacement attribute of each single item resource, each original is determined Whole source replacement resources of beginning video file generate and the matched source replacement resource list of each original video files.It replaces in source Change whole source replacement resources in the Resources list including original video files, and the interface of the corresponding source replacement resource of access.
Optionally, the resource type of source replacement resource includes at least one of following: picture, text, video and audio.
Step 203, ergodic source replacement resource list obtain each single item source replacement resource.
Wherein, ergodic source replacement resource list obtains each single item source replacement money according to the interface of corresponding source replacement resource Source.
Replacement resource corresponding file directory address in each single item source is replaced with corresponding template directory address by step 204.
Wherein, file directory address is the original storage address of source replacement resource.Template directory address is uniformly to be arranged, so The new storage address of each source replacement resource is distributed to afterwards.After obtaining each single item source replacement resource, obtains each single item source and replace The corresponding file directory address of resource is changed, and replacement resource corresponding file directory address in each single item source is replaced with into corresponding mould Plate directory address, convenient for being managed to each single item source replacement resource.
Step 205, according to object numbered musical notation form, the resource name and resource format of each single item source replacement resource are protected It deposits, the resource information as source corresponding with original video files replacement resource.
Wherein, each single item source replacement resource has corresponding resource name and resource format.Obtain each single item source replacement money The resource name and resource format in source, by the resource name of each single item source replacement resource and resource format according to object numbered musical notation (JavaScript Object Notation, JSON) form, is saved, and is replaced as source corresponding with original video files The resource information of resource.JSON is a kind of data interchange format of lightweight, is easy to people and reads and write, while being also easy to machine Parsing and generation.
The original video files that processing is completed are determined as video template file by step 206.
Wherein, the processing to whole original video files is completed, video corresponding with each original video files is obtained Template file.Video template file is stored.
Step 207 obtains all videos template file corresponding with video generation request, and in all videos template file At least one target video template file of middle determination.
In step 208, the whole resources for including in target video template file, determine and at least one source replacement resource Corresponding target replacement resource.
Step 209, the resource name for obtaining source corresponding with target replacement resource replacement resource and template directory Location.
Wherein, template directory address is the storage address of source replacement resource.It optionally, can be from the resource of source replacement resource In information, the resource name of source replacement resource is obtained.
Step 210, the resource name that the resource name of target replacement resource is updated to source replacement resource.
Wherein, the resource name of target replacement resource is revised as to the resource name of source replacement resource.
Step 211, with updated target replacement resource, replacement is stored in the source replacement resource of template directory address, and Video Rendering is carried out to the target video template file that replacement is completed, generates target video.
Wherein, with updated target replacement resource, the source replacement resource for being stored in template directory address is replaced.Target is replaced Changing resource becomes the source replacement resource stored at the template directory address.
The technical solution of the present embodiment, by the way that each original video files is resolved to a corresponding document object mould Type document generates and each original video files according to DOM Document Object Model document and the replacement attribute of each single item resource Matched source replacement resource list, then ergodic source replacement resource list obtain each single item source replacement resource, each single item source are replaced It changes the corresponding file directory address of resource and replaces with corresponding template directory address, and according to object numbered musical notation form, to each single item The resource name and resource format of source replacement resource are saved, the money as source corresponding with original video files replacement resource The original video files that processing is completed are determined as video template file by source information, can be raw for each original video files At corresponding video template file, video resource may be implemented and share, improve video resource utilization rate.
Fig. 3 is a kind of flow chart for video generation method that the embodiment of the present disclosure provides.The present embodiment can be with above-mentioned one Each optinal plan combines in a or multiple embodiments, in the present embodiment, determines at least in all videos template file One target video template file may include: to be provided to all videos template file to generate with video to request matched use Family;Obtain at least one target video template file that user is fed back based on all videos template file.
And in the whole resources in target video template file including, determine at least one of source replacement resource pair The target replacement resource answered may include: to provide the resource information of whole source replacement resources in target video template file Matched user is requested to generating with video;Acquisition user is fed back corresponding at least one source replacement resource based on resource information Target replacement resource.
As shown in figure 3, this method may include steps of:
Step 301, obtain with the corresponding all videos template file of video generation request, and by all videos template file It is provided to generate with video and requests matched user.
Wherein, user can select at least one video template file in all videos template file.
Step 302 obtains at least one target video template file that user is fed back based on all videos template file.
Wherein, the video template file that user selects in all videos template file is determined as target video template text Part.
The resource information of whole source replacement resources in target video template file is provided to and video life by step 303 At the matched user of request.
Wherein, the resource information of source replacement resource includes the resource name and resource format of each single item source replacement resource.With Family can upload target replacement resource corresponding with each single item source replacement resource according to resource information.For example, target video template Whole source replacement resources in file include: picture, text, video and audio.User is according to the money of above-mentioned source replacement resource Source information, uploads corresponding replacement picture, and Alternate text replaces video, and replacement audio.
Step 304 obtains target corresponding at least one the source replacement resource replacement that user is fed back based on resource information Resource.
Wherein, the target corresponding with each single item source replacement resource in target video template file that user uploads is obtained to replace Change resource.
Step 305, using target replacement resource, source replacement resource corresponding in target video template file is replaced It changes, and Video Rendering is carried out to the target video template file that replacement is completed, generate target video.
The technical solution of the present embodiment requests matched use by the way that all videos template file to be provided to generate with video Family, and at least one target video template file that user is fed back based on all videos template file is obtained, and, target is regarded The resource information of whole source replacement resources in frequency template file, which is provided to generate with video, requests matched user, and obtains use The target replacement resource corresponding at least one source replacement resource that family is fed back based on resource information, can be according to the need of user It asks, selects the video template file and replacement resource for generating video.
Fig. 4 is a kind of structural schematic diagram for video-generating device that the embodiment of the present disclosure provides.The present embodiment is applicable to The case where carrying out video generation.The device can realize that the device can be configured at electronics by the way of software and/or hardware Equipment.As shown in figure 4, the apparatus may include: template file determining module 401, replacement resource determining module 402 and video are raw At module 403.
Wherein, template file determining module 401, for obtaining all videos template text corresponding with video generation request Part, and at least one target video template file is determined in all videos template file;Replacement resource determining module 402 is used In the whole resources for including in target video template file, determine that target corresponding at least one source replacement resource is replaced Resource;Video generation module 403 is replaced source corresponding in target video template file and is provided for using target replacement resource Source is replaced, and carries out Video Rendering to the target video template file that replacement is completed, and generates target video.
The technical solution of the present embodiment, by acquisition all videos template file corresponding with video generation request, and At least one target video template file is determined in all videos template file, then includes in target video template file In whole resources, target replacement resource corresponding at least one source replacement resource is determined, using target replacement resource, to target Corresponding source replacement resource is replaced in video template file, and carries out video to the target video template file that replacement is completed Rendering generates target video, solves the prior art and needs user that Video processing software is manually used to make video, video Formation efficiency is lower, cannot achieve video resource and shares, the low problem of video resource utilization rate, can be by video template text Resource in part is replaced automatically, the different video of Mass production, improves video formation efficiency, and it is total that video resource may be implemented It enjoys, improves video resource utilization rate.
Optionally, based on the above technical solution, template file determining module 401 may include: that file provides list Member requests matched user for all videos template file to be provided to generate with video;File obtaining unit, for obtaining At least one target video template file that user is fed back based on all videos template file.
Optionally, based on the above technical solution, replacement resource determining module 402 may include: that information provides list Member requests to match for the resource information of whole source replacement resources in target video template file to be provided to generate with video User;Resource acquisition unit, for obtain user fed back based on resource information it is corresponding at least one source replacement resource Target replacement resource.
Optionally, based on the above technical solution, the resource type of source replacement resource may include following at least one : picture, text, video and audio.
It optionally, based on the above technical solution, can be with further include: document analysis module, for obtaining whole originals Beginning video file, and each original video files is resolved to by a corresponding document pair by DOM Document Object Model resolver As model document;Wherein, including each single item resource in original video files, and access resource in DOM Document Object Model document Interface;List Generating Module, for according to the replacement attribute of DOM Document Object Model document and each single item resource, generate with The matched source replacement resource list of each original video files;Source obtaining module is used for the list of ergodic source replacement resource, obtains Take each single item source replacement resource;Address replacement module, for replacing the corresponding file directory address of each single item source replacement resource For corresponding template directory address;Information preservation module is used for according to object numbered musical notation form, to the money of each single item source replacement resource Source name and resource format are saved, the resource information as source corresponding with original video files replacement resource;File is true Cover half block, the original video files for completing processing are determined as video template file.
Optionally, based on the above technical solution, original video files are the view generated using Video processing software Frequency file.
Optionally, based on the above technical solution, video generation module 403 may include: information acquisition unit, use In the resource name and template directory address that obtain source corresponding with target replacement resource replacement resource;Title updating unit, For the resource name of target replacement resource to be updated to the resource name of source replacement resource;Resource replacement unit, for more Target replacement resource after new, replacement are stored in the source replacement resource of template directory address.
Video generation side provided by the embodiment of the present disclosure can be performed in video-generating device provided by the embodiment of the present disclosure Method has the corresponding functional module of execution method and beneficial effect.
Below with reference to Fig. 5, it illustrates the electronic equipment for being suitable for being used to realize the embodiment of the present disclosure (such as terminal device or Server) 500 structural schematic diagram.Terminal device in the embodiment of the present disclosure can include but is not limited to such as mobile phone, Laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia broadcasting Put device), the mobile terminal of car-mounted terminal (such as vehicle mounted guidance terminal) etc. and such as number TV, desktop computer etc. Fixed terminal.Electronic equipment shown in Fig. 5 is only an example, should not function and use scope band to the embodiment of the present disclosure Carry out any restrictions.
As shown in figure 5, electronic equipment 500 may include processing unit (such as central processing unit, graphics processor etc.) 501, random access can be loaded into according to the program being stored in read-only memory (ROM) 502 or from storage device 508 Program in memory (RAM) 503 and execute various movements appropriate and processing.In RAM 503, it is also stored with electronic equipment Various programs and data needed for 500 operations.Processing unit 501, ROM 502 and RAM 503 pass through the phase each other of bus 504 Even.Input/output (I/O) interface 505 is also connected to bus 504.
In general, following device can connect to I/O interface 505: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 506 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 507 of dynamic device etc.;Storage device 508 including such as tape, hard disk etc.;And communication device 509.Communication device 509, which can permit electronic equipment 500, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 5 shows tool There is the electronic equipment 500 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communication device 509, or from storage device 508 It is mounted, or is mounted from ROM 502.When the computer program is executed by processing unit 501, the embodiment of the present disclosure is executed Method in the above-mentioned function that limits.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity When sub- equipment executes, so that the electronic equipment: obtaining all videos template file corresponding with video generation request, and in whole At least one target video template file is determined in video template file;The whole resources for including in target video template file In, determine target replacement resource corresponding at least one source replacement resource;Using target replacement resource, to target video template Corresponding source replacement resource is replaced in file, and carries out Video Rendering to the target video template file that replacement is completed, raw At target video.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+ +, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package, Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part. In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN) Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service Provider is connected by internet).
Flow chart and block diagram in attached drawing, illustrate the method and computer program product according to the various embodiments of the disclosure Architecture, function and operation in the cards.In this regard, each box in flowchart or block diagram can represent one A part of module, program segment or code, a part of the module, program segment or code include it is one or more for realizing The executable instruction of defined logic function.It should also be noted that in some implementations as replacements, function marked in the box It can also can occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated can actually base Originally it is performed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that It is the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, can uses and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Be described in the embodiment of the present disclosure involved module, unit can be realized by way of software, can also be with It is realized by way of hardware.Wherein, module, the title of unit are not constituted under certain conditions to the module or unit sheet The restriction of body, for example, template file determining module is also described as " obtaining all videos corresponding with video generation request Template file, and determine in all videos template file the module of at least one target video template file ", file provides single Member is also described as " be provided to all videos template file and generate the unit for requesting matched user with video ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (10)

1. a kind of video generation method characterized by comprising
All videos template file corresponding with video generation request is obtained, and is determined extremely in all videos template file A few target video template file;
In the whole resources for including in the target video template file, mesh corresponding at least one source replacement resource is determined Mark replacement resource;
Using the target replacement resource, corresponding source replacement resource in the target video template file is replaced, and Video Rendering is carried out to the target video template file that replacement is completed, generates target video.
2. the method according to claim 1, wherein determining at least one in all videos template file Target video template file, comprising:
The all videos template file is provided to generate with the video and requests matched user;
Obtain at least one target video template file that the user is fed back based on all videos template file.
3. the method according to claim 1, wherein the whole moneys for including in the target video template file In source, target replacement resource corresponding at least one source replacement resource is determined, comprising:
The resource information of whole source replacement resources in the target video template file is provided to and is asked with video generation Ask matched user;
Obtain the target replacement resource corresponding at least one source replacement resource that the user is fed back based on the resource information.
4. the method according to claim 1, wherein the resource type of the source replacement resource include it is following at least One:
Picture, text, video and audio.
5. the method according to claim 1, wherein obtaining all videos mould corresponding with video generation request Before plate file, further includes:
It obtains whole original video files, and is resolved to each original video files pair by DOM Document Object Model resolver The DOM Document Object Model document answered;It wherein, include each in original video files in the DOM Document Object Model document Item resource, and the interface of the access resource;
According to the DOM Document Object Model document and the replacement attribute of each single item resource, generate and each original video text The matched source replacement resource list of part;
The source replacement resource list is traversed, each single item source replacement resource is obtained;
Replacement resource corresponding file directory address in each single item source is replaced with into corresponding template directory address;
According to object numbered musical notation form, the resource name and resource format of each single item source replacement resource are saved, as The resource information of source corresponding with original video files replacement resource;
The original video files that processing is completed are determined as video template file.
6. according to the method described in claim 5, it is characterized in that, the original video files are raw using Video processing software At video file.
7. according to the method described in claim 5, it is characterized in that, using the target replacement resource, to the target video Corresponding source replacement resource is replaced in template file, comprising:
Obtain resource name and the template directory address of source replacement resource corresponding with the target replacement resource;
The resource name of the target replacement resource is updated to the resource name of the source replacement resource;
With updated target replacement resource, replacement is stored in the source replacement resource of the template directory address.
8. a kind of video-generating device characterized by comprising
Template file determining module, for obtaining all videos template file corresponding with video generation request, and described complete At least one target video template file is determined in portion's video template file;
Replacement resource determining module, in whole resources for including in the target video template file, determine at least The corresponding target replacement resource of one source replacement resource;
Video generation module replaces corresponding source in the target video template file for using the target replacement resource It changes resource to be replaced, and Video Rendering is carried out to the target video template file that replacement is completed, generate target video.
9. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now video generation method as described in any in claim 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt The video generation method as described in any in claim 1-7 is realized when processor executes.
CN201910101242.2A 2019-01-31 2019-01-31 Video generation method and device, electronic equipment and storage medium Active CN109769141B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910101242.2A CN109769141B (en) 2019-01-31 2019-01-31 Video generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910101242.2A CN109769141B (en) 2019-01-31 2019-01-31 Video generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109769141A true CN109769141A (en) 2019-05-17
CN109769141B CN109769141B (en) 2020-07-14

Family

ID=66454741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910101242.2A Active CN109769141B (en) 2019-01-31 2019-01-31 Video generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109769141B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110139159A (en) * 2019-06-21 2019-08-16 上海摩象网络科技有限公司 Processing method, device and the storage medium of video material
CN110418196A (en) * 2019-08-29 2019-11-05 金瓜子科技发展(北京)有限公司 Video generation method, device and server
CN110784739A (en) * 2019-10-25 2020-02-11 稿定(厦门)科技有限公司 Video synthesis method and device based on AE
CN112116690A (en) * 2019-06-19 2020-12-22 腾讯科技(深圳)有限公司 Video special effect generation method and device and terminal
CN112689189A (en) * 2020-12-21 2021-04-20 北京字节跳动网络技术有限公司 Video display and generation method and device
CN112738623A (en) * 2019-10-14 2021-04-30 北京字节跳动网络技术有限公司 Video file generation method, device, terminal and storage medium
CN112866798A (en) * 2020-12-31 2021-05-28 北京字跳网络技术有限公司 Video generation method, device, equipment and storage medium
WO2022063124A1 (en) * 2020-09-25 2022-03-31 连尚(北京)网络科技有限公司 Video fusion method and device
CN115209215A (en) * 2021-04-09 2022-10-18 北京字跳网络技术有限公司 Video processing method, device and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030206596A1 (en) * 2002-05-03 2003-11-06 David Carver Multimedia content assembly
WO2007082167A2 (en) * 2006-01-05 2007-07-19 Eyespot Corporation System and methods for storing, editing, and sharing digital video
CN101448089A (en) * 2007-11-26 2009-06-03 新奥特(北京)视频技术有限公司 Non-linear editing system
CN102789484A (en) * 2012-06-28 2012-11-21 奇智软件(北京)有限公司 Method and device for webpage information processing
CN105376502A (en) * 2015-11-23 2016-03-02 华中师范大学 All media on-line editing tool
CN109168028A (en) * 2018-11-06 2019-01-08 北京达佳互联信息技术有限公司 Video generation method, device, server and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030206596A1 (en) * 2002-05-03 2003-11-06 David Carver Multimedia content assembly
WO2007082167A2 (en) * 2006-01-05 2007-07-19 Eyespot Corporation System and methods for storing, editing, and sharing digital video
CN101448089A (en) * 2007-11-26 2009-06-03 新奥特(北京)视频技术有限公司 Non-linear editing system
CN102789484A (en) * 2012-06-28 2012-11-21 奇智软件(北京)有限公司 Method and device for webpage information processing
CN105376502A (en) * 2015-11-23 2016-03-02 华中师范大学 All media on-line editing tool
CN109168028A (en) * 2018-11-06 2019-01-08 北京达佳互联信息技术有限公司 Video generation method, device, server and storage medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116690A (en) * 2019-06-19 2020-12-22 腾讯科技(深圳)有限公司 Video special effect generation method and device and terminal
CN110139159A (en) * 2019-06-21 2019-08-16 上海摩象网络科技有限公司 Processing method, device and the storage medium of video material
CN110139159B (en) * 2019-06-21 2021-04-06 上海摩象网络科技有限公司 Video material processing method and device and storage medium
CN110418196A (en) * 2019-08-29 2019-11-05 金瓜子科技发展(北京)有限公司 Video generation method, device and server
CN110418196B (en) * 2019-08-29 2022-01-28 金瓜子科技发展(北京)有限公司 Video generation method and device and server
CN112738623A (en) * 2019-10-14 2021-04-30 北京字节跳动网络技术有限公司 Video file generation method, device, terminal and storage medium
US11621022B2 (en) 2019-10-14 2023-04-04 Beijing Bytedance Network Technology Co., Ltd. Video file generation method and device, terminal and storage medium
CN110784739A (en) * 2019-10-25 2020-02-11 稿定(厦门)科技有限公司 Video synthesis method and device based on AE
WO2022063124A1 (en) * 2020-09-25 2022-03-31 连尚(北京)网络科技有限公司 Video fusion method and device
CN112689189A (en) * 2020-12-21 2021-04-20 北京字节跳动网络技术有限公司 Video display and generation method and device
CN112866798A (en) * 2020-12-31 2021-05-28 北京字跳网络技术有限公司 Video generation method, device, equipment and storage medium
CN112866798B (en) * 2020-12-31 2023-05-05 北京字跳网络技术有限公司 Video generation method, device, equipment and storage medium
CN115209215A (en) * 2021-04-09 2022-10-18 北京字跳网络技术有限公司 Video processing method, device and equipment

Also Published As

Publication number Publication date
CN109769141B (en) 2020-07-14

Similar Documents

Publication Publication Date Title
CN109769141A (en) A kind of video generation method, device, electronic equipment and storage medium
CN109375918A (en) Interface rendering method, device, electronic equipment and the storage medium of small routine
CN110019350A (en) Data query method and apparatus based on configuration information
CN109871388A (en) Data cache method, device, whole electronic equipment and storage medium
CN110119294A (en) The generation method of menu page, apparatus and system
CN108804327A (en) A kind of method and apparatus of automatic Data Generation Test
CN109408189A (en) Dynamic adjusting method, device, equipment and the medium of client end interface layout
CN113094141A (en) Page display method and device, electronic equipment and storage medium
CN109815448B (en) Slide generation method and device
CN110516678A (en) Image processing method and device
CN110365973A (en) Detection method, device, electronic equipment and the computer readable storage medium of video
CN109410253A (en) Method and apparatus for generating information
CN109271557A (en) Method and apparatus for output information
CN112487331A (en) Page generation method and device, storage medium and electronic equipment
CN110139118A (en) Function operation method, device, electronic equipment and the storage medium of application program
CN109062560A (en) Method and apparatus for generating information
CN109710364A (en) Adjust method, apparatus, electronic equipment and the storage medium of layout type
CN109446199A (en) Cell data processing method and device
US20240061565A1 (en) Method and apparatus for generating image processing interface, device, and storage medium
CN111694629A (en) Information display method and device and electronic equipment
CN111680799A (en) Method and apparatus for processing model parameters
CN110134805A (en) Network storage method, device, electronic equipment and the medium of picture category comment data
CN109492039A (en) A kind of recording method of daily record data, device, electronic equipment and readable medium
CN105608128B (en) Streetscape video generation method and device based on path planning
CN109871465A (en) A kind of time shaft calculation method, device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant