CN115564857A - Video production method and related equipment - Google Patents

Video production method and related equipment Download PDF

Info

Publication number
CN115564857A
CN115564857A CN202211268417.7A CN202211268417A CN115564857A CN 115564857 A CN115564857 A CN 115564857A CN 202211268417 A CN202211268417 A CN 202211268417A CN 115564857 A CN115564857 A CN 115564857A
Authority
CN
China
Prior art keywords
coordinate
sticker
preset
coordinates
canvas
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
CN202211268417.7A
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.)
Shenzhen Big Head Brothers Technology Co Ltd
Original Assignee
Shenzhen Big Head Brothers 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 Shenzhen Big Head Brothers Technology Co Ltd filed Critical Shenzhen Big Head Brothers Technology Co Ltd
Priority to CN202211268417.7A priority Critical patent/CN115564857A/en
Publication of CN115564857A publication Critical patent/CN115564857A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8549Creating video summaries, e.g. movie trailer

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a video making method and related equipment, wherein the method comprises the steps of obtaining a video making instruction; determining a template file corresponding to the video making instruction according to the video making instruction, wherein the template file comprises a canvas attribute value, a sticker material, a sticker coordinate and a transformation attribute value, the sticker material comprises a preset sticker and an updating sticker, and the sticker coordinate comprises a preset coordinate corresponding to the preset sticker; creating a blank canvas according to the canvas attribute value, and calculating a chartlet coordinate corresponding to the preset sticker according to the preset coordinate and the transformation attribute value; determining an updating coordinate corresponding to the updating paster according to the chartlet coordinate and the canvas attribute value; and inserting the sticker material into the blank canvas according to the preset coordinate and the updated coordinate to generate a target video. The invention can improve the efficiency of making the video containing the sticker material.

Description

Video production method and related equipment
Technical Field
The present invention relates to the field of video processing technologies, and in particular, to a video production method and related devices.
Background
With the development of internet technology, the threshold of video production and processing is lower and lower, and more users enter the field of video production. For users who need to process videos on a large scale, such as new media practitioners, processing of stickers for each video requires a great deal of time and effort. In order to improve convenience and efficiency of video production, some users may design template files in advance, where the template files include preset materials, rendering modes, and the like. The method is characterized in that widely used video software AE (Adobe Effects) is taken as an example, the AE is video processing software and can be used for editing, rendering and synthesizing a graphic video, a template export plug-in is installed on the AE software, and after a user finishes making a video sample by using the AE, the video sample is exported by the export plug-in a format file which meets the current product rendering requirement, namely a template file. The template file also marks the attribute characteristics and the variation attributes of the template file, such as the initial aspect ratio of 720 × 1280, the resolution and the frame rate information, the attributes of the initial position, the width and the height of the material in the video, the variation among image frames and the like, wherein the variation attributes comprise an anchor point, a target layer, a rotation attribute and a scaling sub-attribute, the target material determines the world coordinate position of the template where the center point of the current material is located, when the mapping is needed, the anchor point and the target layer fix the position of the mapping in the video, the rotation attribute, the scaling attribute and the like can complete the placement of the material, and finally the description of the whole template file is completed according to various marks.
For template files that are produced from the beginning, the user can arbitrarily select or arrange the position where the sticker is placed. However, if the original template file is updated, in order to avoid the overlapping of the stickers, one solution is manual adjustment by a user, which is very complicated for batch addition or modification, and the other solution is to preset a "vacancy", and when the sticker is added, the newly added sticker is automatically placed on the vacancy, but the vacancy needs to be preset when the template file is initially manufactured, and the "vacancy" is fixed and has a small number, which cannot meet the placement requirements of different stickers. Therefore, for mass production of video, the current video production method requiring stickers is still troublesome and inefficient.
Disclosure of Invention
The invention aims to solve the technical problem that the video production efficiency needing stickers is low, and provides a video production method and related equipment aiming at the defects of the prior art.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a method of producing a video, the method comprising:
acquiring a video production instruction;
determining a template file corresponding to the video making instruction according to the video making instruction, wherein the template file comprises a canvas attribute value, a sticker material, a sticker coordinate and a transformation attribute value, the sticker material comprises a preset sticker and an updating sticker, and the sticker coordinate comprises a preset coordinate corresponding to the preset sticker;
creating a blank canvas according to the canvas attribute value, and calculating a chartlet coordinate corresponding to the preset sticker according to the preset coordinate and the transformation attribute value;
determining an updating coordinate corresponding to the updating paster according to the chartlet coordinate and the canvas attribute value;
and inserting the sticker material into the blank canvas according to the preset coordinate and the updated coordinate to generate a target video.
The video production method comprises the steps that the updating paster comprises a user paster; the video production instructions comprise user materials; after the video production instruction is obtained, the method further comprises:
when the user material is detected, displaying a preset special effect selection box;
when a special effect instruction corresponding to the special effect selection frame is detected, carrying out special effect processing on the user material according to the special effect instruction to obtain a special effect paster and displaying the special effect paster;
and when a determination instruction corresponding to the special effect paster is detected, the special effect paster corresponding to the determination instruction is taken as a user paster corresponding to the template file to be stored.
The video production method comprises the steps that the updating paster comprises a point-burying paster; the method further comprises the following steps:
acquiring a buried point material based on a preset updating instruction;
and screening the point burying materials according to preset screening rules to obtain the point burying paster.
The video production method, wherein the calculating of the map coordinates corresponding to the preset sticker according to the preset coordinates and the transformation attribute values includes:
aiming at each preset paster, calculating an insertion coordinate corresponding to the preset paster according to the paster size corresponding to the preset paster and the transformation attribute value;
generating a minimum rectangular surrounding frame corresponding to the preset paster according to the inserting coordinates;
and generating a map coordinate according to the minimum rectangular surrounding frame.
The video production method comprises the following steps of generating mapping coordinates according to the minimum rectangular bounding box:
determining whether the minimum Bao Weikuang is crossed with the canvas coordinate according to the minimum Bao Weikuang and the canvas coordinate of the blank canvas;
if so, calculating the moving distance between the bounding box coordinate of the smallest bounding box and the canvas coordinate;
and generating the map coordinate according to the moving distance.
The video production method, wherein the determining the update coordinates corresponding to the update sticker according to the map coordinates and the canvas attribute value comprises:
determining an idle coordinate according to the chartlet coordinate and the canvas attribute value;
and determining the updating coordinate corresponding to each updating paster according to the idle coordinate.
The video production method, wherein the determining idle coordinates according to the map coordinates and the canvas attribute values comprises:
generating a coordinate set according to the canvas attribute value;
and screening the coordinate set based on the map coordinates to obtain idle coordinates.
The video production method, wherein the determining the update coordinates corresponding to each update sticker according to the idle coordinates comprises:
randomly traversing the updating paster, and for each updating paster, carrying out coordinate determination on the updating paster until the traversal is finished, wherein the coordinate determination comprises:
generating an initial coordinate according to a preset starting point coordinate and the size of the updated sticker;
matching the idle set according to the initial coordinates;
and if the matching is successful, taking the idle coordinate corresponding to the initial coordinate as the updating coordinate corresponding to the updating paster, and updating the idle set.
A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps in a method of making a video as described in any above.
A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the method of making a video as described in any of the above.
Has the advantages that: the invention provides a video production method and related equipment, wherein when a video production instruction is obtained, a blank canvas is newly built according to a canvas attribute value in a template file corresponding to the video production instruction. If the template file has the preset paster during creation, the paster coordinate corresponding to the preset paster is calculated according to the paster coordinate corresponding to the preset paster and the transformation attribute value. And for the newly added or obtained stickers from other channels, namely the updated stickers, automatically calculating the updated coordinates according to the sticker coordinates, and inserting the stickers in the template file into the blank canvas to obtain the target video based on the sticker coordinates and the updated coordinates. Through the mode of automatically calculating the sticker coordinate and updating the coordinate, the newly-added sticker can be automatically inserted into the canvas, user adjustment is not needed, the updating efficiency of the template file after the sticker is updated is improved, and the video production is more convenient and faster.
Drawings
Fig. 1 is a flowchart of a video production method according to the present invention.
Fig. 2 is a schematic interface diagram of a video production method provided by the present invention.
Fig. 3 is an overall flowchart of a video production method provided by the present invention.
Fig. 4 is a schematic pseudo code diagram for determining the insertion coordinates corresponding to each preset sticker in the video production method provided by the present invention.
Fig. 5 is a schematic pseudo code diagram for determining updated coordinates in the video production method provided by the present invention.
Fig. 6 is a schematic structural diagram of a terminal device provided in the present invention.
Detailed Description
The present invention provides a method for producing a video, and in order to make the objects, technical solutions, and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As shown in fig. 1, for convenience of description, the present embodiment provides a video production method, which is described by using a common server as an execution subject, where the server may be replaced by a tablet, a computer, or another device with a data processing function, and the video production method includes the following steps:
and S10, acquiring a video production instruction.
Specifically, the server obtains a video production instruction first, and the user can specify a plurality of video materials in the video production instruction. The video production instruction specifies template information for producing a video file, such as a template number and a template name.
And S20, determining a template file corresponding to the video making instruction according to the video making instruction.
Specifically, after the video production instruction is obtained, a template file corresponding to the video production instruction in the pre-stored template files is determined according to template information in the video production instruction.
The template file is a pre-prepared template file for making videos, canvas attribute values, sticker materials, sticker coordinates and transformation attribute values can be preset in the template file, and the sticker coordinates comprise preset coordinates corresponding to the preset stickers.
As shown in fig. 2, the canvas attribute value is an attribute value such as the size of the canvas used for generation, the background color, and the like, and the canvas size is, for example, 720 × 1280. The sticker material comprises a preset sticker and an update sticker, wherein the preset sticker refers to a sticker carried by the template file during creation, such as a sticker set by a designer of the template file, and the update sticker is a sticker subsequently updated by a user or the designer. Since the preset sticker is the sticker set when the template file is created, it has corresponding preset coordinates, i.e., the position coordinates of the preset sticker on the canvas. If the sticker material is directly pasted on the canvas, the pasting effect is relatively stiff, so that the general sticker material needs to be subjected to conversion processing such as rotation and scaling, the pasting effect is more flexible, and the conversion attribute value refers to the conversion mode and the conversion parameter adopted by the sticker material.
The update sticker includes stickers from different sources, for example where the update sticker includes a user sticker derived from sticker material uploaded by a user. The video production instruction can comprise user materials, the user uploads the user materials while sending the video production instruction, and the server takes the user materials as the updating sticker corresponding to the template information in the video production instruction and stores the updating sticker. Because the user's material that the user sent generally all is screenshot or simple drawing, and the highlight degree and the effect that directly regard as the sticker are relatively poor, consequently, for the highlight degree that improves the sticker material, when uploading user's material, can carry out special effect to the user's material, concrete mode is:
and A10, displaying a preset special effect selection box when the user material is detected.
Specifically, when it is detected that a video production instruction contains a user material, a preset special effect frame is displayed, and the special effect frame contains various different processing names and corresponding processing parameters, such as clipping, noise reduction, cutout and the like. For example, the special effect box includes general processing options and special processing options, the general processing options include general processing such as image denoising, high definition processing, cropping, and rotation, and the special effect processing options include special effect processing such as matting, image stylization, and face transition. The user material can be stored in the user material module and enter the server for Operation, and the server can adopt OSS (Operation Support Systems).
And A20, when a special effect instruction corresponding to the special effect selection frame is detected, carrying out special effect processing on the user material according to the special effect instruction to obtain a special effect paster and displaying the special effect paster.
Specifically, the user sends a special effect instruction according to the content selected by the special effect box. And when the special effect instruction is detected, carrying out special effect processing on the user material according to the special effect name and the processing parameter in the special effect selection frame aimed at by the special effect instruction. And displaying the special effect paster obtained by the special effect processing on a display screen so that a user can select the special effect paster which accords with the mind of the user.
For example, the uploaded user materials contain faces, the selected special effect processing is juvenile, face recognition is conducted on the user materials, face images in the user materials are extracted, and then the face images are juvenile based on a juvenile model trained in advance to obtain the special effect paster. For another example, the user materials include a plurality of user materials, the selected special effect is processed into an excessive video, the face images of the uploaded user materials are respectively extracted, then the appointed user materials are used as initial images, face replacement images of the initial images are made unexpectedly, and then the special effect paster is made according to the initial images and the face replacement images. For example, the uploaded user materials include user material a, user material B, and user material C, and the starting image is user material a. And replacing the face image in the user material B and the face image in the user material C with the face image in the user material A to respectively obtain a face replacement image B and a face replacement image C, and then making the initial image, the face replacement image B and the face replacement image C into a moving image to obtain the special effect sticker.
In addition, all special effect stickers may be clipped to a fixed size, e.g., 100 x 100, for size uniformity.
In addition, in order to increase the processing rate, the embodiment performs the special effect processing and the presentation in an asynchronous processing manner. Taking the user material A, B as an example, the user material a is displayed after being processed, and the user material B is processed while being displayed. The special effects processing may be performed by the material processing module.
And A30, when a determination instruction corresponding to the special effect paster is detected, saving the special effect paster corresponding to the determination instruction as the user paster corresponding to the template file.
Specifically, when the user determines the special effect sticker meeting the mind of the user, a determination instruction for the special effect sticker is sent, and the special effect sticker corresponding to the determination instruction is used as the user sticker corresponding to the template file and is stored. The special effect sticker may be stored in a user library module.
For the preset sticker in the template file selected by the user and the user sticker uploaded by the user, the preference of the user to the sticker and the positioning of the style of the template file are suggested, for example, the preset sticker and the user post are both in an lovely style, and the user has a preference to the sticker in the lovely style, so that for each template file, the user can be imaged according to the user sticker and the preset sticker corresponding to the template file to obtain a user label corresponding to the template file, and the user label can be calculated in a mode of data statistics, clustering, theme and the like.
As shown in fig. 3, the user can upload user material, view video production effect, and the like, and the user experience function entry module can be used to implement the method.
Besides manual uploading of the pasters by users, in order to improve the richness of the pasters, the pasters are buried in databases such as a material library in advance, and pasters are obtained from the material library regularly in a point burying mode. The method specifically comprises the following steps:
and B10, acquiring the buried point material based on a preset updating instruction.
Specifically, an update instruction is preset, the instruction is used for updating the sticker material, and the update instruction includes information such as an update cycle and an update number. The method can be used for embedding points in a database for storing materials in advance, when the situation that new materials for manufacturing stickers are updated is detected, new materials are obtained from the database based on an updating instruction and are stored into the database as embedded point materials, and the database can be named as an embedded point material management module.
And B20, screening the point burying materials according to preset screening rules to obtain the point burying paster.
Specifically, in order to avoid the excessive number of the embedded point stickers, a screening rule is preset in this embodiment, and is used for screening the embedded point materials to obtain the embedded point stickers. In one way of filtering the rules, the number of the embedded point stickers is set, for example 10, and only the top 10 acquired embedded point materials can be used as the embedded point stickers. In another screening rule, the embedded point materials are compared with the preset pasters, the embedded point materials which are very close to the preset pasters are removed from the embedded point pasters, the repeated appearance of the pasters with high similarity is avoided, and the richness of the pasters is increased inefficiently.
In order to cope with the preferences of different users, the third filtering method is also performed in combination with the previous user tags. Firstly, performing feature recognition on the buried point material to obtain buried point features, wherein the buried point features can be text descriptions, tags, feature vectors and the like of the buried point material. And calculating the similarity value between each buried point feature and the user tag, wherein the similarity can be calculated by adopting a cosine similarity algorithm. And finally, determining the embedded point paster in the embedded point material according to the similarity value. And presetting a similarity threshold, and taking the embedded point material with the similarity value exceeding the similarity threshold as the embedded point material close to the user label, namely the embedded point sticker. The third screening method can also be associated with a fixed number, for example, the number of the newly added stickers at one time is preset, that is, the threshold value of the newly added number is less than or equal to 10, and the top 10 of the embedded point materials are selected as the embedded point stickers from the embedded point materials exceeding the similarity threshold value. The added quantity threshold value can be determined according to the canvas attribute value, the number of the preset stickers and the user stickers in the template file. Taking the example that the preset sticker and the user sticker are both empty, the canvas attribute value 700 × 1280 can accommodate 700 × 1280/100 × 100=89 stickers for a sticker size of 100 × 100, and the newly added threshold value is a value smaller than 89, for example, 80. The screening aiming at the user preference can be realized by adopting a recommendation service module.
And S30, creating a blank canvas according to the canvas attribute value, and calculating a chartlet coordinate corresponding to the preset pasters according to the preset coordinate and the transformation attribute value.
Specifically, a blank canvas corresponding to the threshold is created according to the canvas attribute value, and in this embodiment, the size of the blank canvas is 720 × 1280.
Meanwhile, for the preset sticker, because the preset sticker is not directly pasted on a blank canvas, generally, the preset sticker is processed by rotating, amplifying, reducing and the like, the corresponding pasting coordinate is calculated according to the preset coordinate and the transformation attribute value set by the designer of the template file.
For example, a canvas coordinate system is constructed by presetting a vertex at the upper left corner of the canvas coordinate as an origin, a horizontal axis at the left side and a vertical axis at the upper side. The preset coordinates corresponding to the preset sticker are (0,0), (0, 100), (100,0) and (100 ), the anchor point is (50, 50), the anchor point refers to the center point coordinate of the rotation of the sticker material in the layer coordinate system, and the center point coordinate generally selects the midpoint of the sticker material. The transformation attribute values include image transformation parameters such as a rotation value, a scaling ratio, etc., wherein the rotation value is 30 ° counterclockwise and the scaling ratio is 0 in this example. The coordinates after rotation can be calculated according to the rotation formula and taken as mapping coordinates. For example, (0,0) corresponds to coordinates (-13, -32), (100 ) corresponds to coordinates (36, 136). The coordinate system of the canvas can be freely set, for example, in fig. 2, the upper left corner of the display interface is used as the origin, the horizontal left side is used as the horizontal axis, and the vertical downward side is used as the vertical axis.
If the transformed coordinates are directly used as the coordinates of the mapping, on one hand, the calculation in the mapping is complex, and on the other hand, the coordinates which are easy to be selected are overlapped with the preset paster when the coordinates are selected and updated subsequently, so that the calculation burden is increased. Therefore, in this embodiment, the mapping coordinates are calculated in the form of a bounding box, and first, for each of the preset pasters, the coordinates of the converted preset pasters are calculated according to the size of the pasters corresponding to the preset pasters and the transformed attribute values, and the coordinates are used as the insertion coordinates, for example, (36, 136) in the foregoing example, and the pseudo code used here can be referred to as shown in fig. 4. And then generating a minimum rectangular surrounding frame corresponding to the preset paster according to the inserting coordinates. The minimum rectangular bounding box refers to coordinates, a rectangle length and a width that surround the center of the set of specified contour points, as shown in fig. 2, the sides of the transformed preset sticker are not horizontal and vertical, and the minimum rectangular bounding box is a conventional rectangular box that can surround the transformed preset sticker. The algorithm of the minimum rectangular bounding box can adopt a rotating caliper algorithm, a traversal algorithm and the like. And finally, generating a map coordinate according to the minimum rectangular surrounding frame.
In the first way of generating the map coordinates, the coordinates inside the minimum rectangle bounding box can be directly taken as the map coordinates, which can be described by the four-corner coordinates and the anchor point. Since the template file is in different environments, the sticker material from different sources is prone to shift in coordinates to some extent, and the transformation will shift some of the sticker material away from the canvas, for example (-13, -32) as mentioned above, beyond the range displayed by the canvas. To avoid the effect of such an offset causing the final video to render only a portion of the sticker material, the present embodiment also corrects for the smallest rectangular bounding box. The method specifically comprises the following steps:
c31, determining whether the minimum Bao Weikuang is crossed with the canvas coordinate according to the minimum Bao Weikuang and the canvas coordinate of the blank canvas.
Specifically, the coordinates of the canvas, that is, the coordinates of the area displayed by the canvas on the canvas coordinate system, are compared with the coordinates of the canvas in the smallest bounding box to determine whether there is an intersection between the smallest Bao Weikuang and the canvas coordinates. Intersection herein should narrow the interpretation, referring only to the coordinates within the existing non-canvas coordinates in the smallest bounding box. The simple judgment method is to compare the vertex coordinates of the smallest enclosing frame with the vertex coordinates of the canvas coordinates.
And C32, if the minimum surrounding frame exists, calculating the moving distance between the surrounding frame coordinate of the minimum surrounding frame and the canvas coordinate.
Specifically, the bounding box coordinates of the smallest bounding box refer to the vertex coordinates of the smallest bounding box, the distance between each bounding box coordinate and the vertex in the canvas coordinate is calculated, the distance is used as a movement value, the positive direction of the canvas coordinate system is used as the movement direction, and the movement distance corresponding to each bounding box coordinate is calculated.
And C33, generating the map coordinate according to the moving distance.
Specifically, after the moving distance is obtained, all coordinates of the smallest enclosing frame are adjusted according to the moving distance to obtain the mapping coordinates.
And S40, determining an updating coordinate corresponding to the updating paster according to the mapping coordinate and the canvas attribute value.
In particular, the canvas attribute value determines the size of the canvas, and also determines the number of coordinates of the sticker on the canvas. All available coordinates on the canvas can be determined according to the canvas attribute values, all already occupied coordinates on the canvas can be determined according to the map coordinates, the rest coordinates are updated coordinates corresponding to the updated stickers, and the rest coordinates are called idle coordinates. And the free coordinates can be randomly distributed to the corresponding update coordinates of different update stickers.
The efficiency of adopting random allocation is too low, and overlapping easily occurs, so in this embodiment, a coordinate set may be generated according to the canvas attribute value first. In this example, the dimension is 720 x 1280, the outer-layer cyclic abscissa values are gradually increased by 1 from 0 and circulate to the maximum of 720, the inner-layer cyclic ordinate values are gradually increased by 1 from 0 and circulate to the maximum of 1280, and finally 720 x 1280 coordinate results are obtained, which are coordinate sets. If the coordinate set is represented by an array, it is [ (0,0), (0,1), (0,2),. - ]. And then screening the coordinate set based on the map coordinates to obtain idle coordinates. And then determining the updating coordinate corresponding to each updating paster according to the idle coordinate.
In order to avoid the situation of coordinate conflict when determining the update coordinates corresponding to the update sticker at the same time, the embodiment determines the update coordinates in a traversal manner. And traversing the updating stickers randomly, and determining the coordinates of each updating sticker until the traversal is finished. The coordinate determination is a process of determining the updated coordinate corresponding to the updated sticker. In one determination, random traversal is used, but space utilization is low. In another determination method, starting point coordinates are set in advance, for example, (0,0), and then initial coordinates are generated according to the starting point coordinates and the size of the updated seal paper, taking the coordinate system of the present embodiment as an example, the size of the seal paper is 100 × 100, and the initial coordinates are (0,0), (0, 100), (100,0), and (100 ). And then matching the idle coordinates according to the initial coordinates. And matching all coordinates in the range covered by the initial coordinates with the coordinate set, wherein if all the coordinates can be successfully matched with the idle coordinates in the idle set, the initial coordinate range does not contain the sticker material, so that the idle coordinates corresponding to the initial coordinates are used as the update coordinates corresponding to the update sticker, and the idle set is updated, for example, the idle coordinates corresponding to the update coordinates in the idle set are deleted.
As shown in FIG. 5, the set of canvas coordinates is named z, the free set is named z _ new, the set of map coordinates is named a2, the update sticker is represented by array a, i1 represents the coordinate in z, i2 represents the coordinate in a2, and i3 represents the coordinate in the array to which a2[ i2] points.
S50, inserting the sticker materials into the blank canvas according to the preset coordinates and the updated coordinates, and generating a target video.
Specifically, after the update coordinates are obtained, the preset sticker in the template file has the corresponding preset coordinates, and the update sticker has the corresponding update coordinates, so that the preset sticker can be inserted into the blank canvas according to the preset coordinates, and the update sticker can be inserted into the blank canvas according to the update coordinates, so that the target video is obtained. The user can upload a plurality of video materials at the moment, and the video materials are integrated and rendered based on the target video to obtain an edited video corresponding to each video material, so that the batch processing operation of the videos is completed. This operation may be implemented by the rendering service module.
Furthermore, after the sticker materials are inserted into the blank canvas, the user can adjust the coordinates corresponding to the sticker materials according to the preference of the user and change the shape, so that the effect of better meeting the mind of the user is achieved.
Based on the above video production method, the present invention further provides a terminal device, as shown in fig. 6, which includes at least one processor (processor) 20; a display screen 21; and a memory (memory) 22, and may further include a communication Interface (Communications Interface) 23 and a bus 24. The processor 20, the display 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may call logical commands in the memory 22 to perform the methods in the above embodiments.
In addition, the logic commands in the memory 22 can be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 22, which is a computer-readable storage medium, may be configured to store a software program, a computer-executable program, such as program commands or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by executing software programs, commands or modules stored in the memory 22, i.e. implements the method in the above-described embodiments.
The memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 22 may include a high speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, may also be used as the transient computer readable storage medium.
In addition, the specific processes loaded and executed by the computer readable storage medium and the plurality of command processors in the terminal device are described in detail in the method, and are not stated herein.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of producing a video, the method comprising:
acquiring a video production instruction;
determining a template file corresponding to the video making instruction according to the video making instruction, wherein the template file comprises a canvas attribute value, a sticker material, a sticker coordinate and a transformation attribute value, the sticker material comprises a preset sticker and an updating sticker, and the sticker coordinate comprises a preset coordinate corresponding to the preset sticker;
creating a blank canvas according to the canvas attribute value, and calculating a chartlet coordinate corresponding to the preset sticker according to the preset coordinate and the transformation attribute value;
determining an updating coordinate corresponding to the updating paster according to the chartlet coordinate and the canvas attribute value;
and inserting the sticker material into the blank canvas according to the preset coordinate and the updated coordinate to generate a target video.
2. A method of producing a video according to claim 1 wherein the updating sticker comprises a user sticker; the video production instruction comprises user materials; after the video production instruction is obtained, the method further comprises:
when the user material is detected, displaying a preset special effect selection box;
when a special effect instruction corresponding to the special effect selection frame is detected, carrying out special effect processing on the user material according to the special effect instruction to obtain a special effect paster and displaying the special effect paster;
and when a determination instruction corresponding to the special effect paster is detected, the special effect paster corresponding to the determination instruction is taken as a user paster corresponding to the template file to be stored.
3. A method of producing a video as claimed in claim 2 wherein the update sticker comprises a spot-on sticker; the method further comprises the following steps:
acquiring a buried point material based on a preset updating instruction;
and screening the point burying materials according to preset screening rules to obtain the point burying paster.
4. The method for producing a video according to claim 1, wherein the calculating the map coordinates corresponding to the predetermined sticker according to the predetermined coordinates and the transformation attribute value comprises:
aiming at each preset paster, calculating an insertion coordinate corresponding to the preset paster according to the paster size corresponding to the preset paster and the transformation attribute value;
generating a minimum rectangular enclosure frame corresponding to the preset sticker according to the insertion coordinates;
and generating a map coordinate according to the minimum rectangular surrounding frame.
5. The method for producing a video according to claim 4, wherein the generating of the map coordinates according to the minimum rectangle bounding box comprises:
determining whether the minimum Bao Weikuang is crossed with the canvas coordinate according to the minimum Bao Weikuang and the canvas coordinate of the blank canvas;
if so, calculating the moving distance between the bounding box coordinate of the smallest bounding box and the canvas coordinate;
and generating the map coordinate according to the moving distance.
6. The method for producing the video according to any one of claims 1 to 5, wherein the determining the update coordinates corresponding to the update sticker according to the map coordinates and the canvas attribute value comprises:
determining an idle coordinate according to the chartlet coordinate and the canvas attribute value;
and determining the updating coordinate corresponding to each updating paster according to the idle coordinate.
7. The method of claim 6, wherein determining the free coordinates based on the chartlet coordinates and the canvas attribute values comprises:
generating a coordinate set according to the canvas attribute value;
and screening the coordinate set based on the map coordinates to obtain idle coordinates.
8. The method for producing video according to claim 6, wherein the determining the update coordinates corresponding to each update sticker according to the free coordinates comprises:
randomly traversing the update stickers, and for each update sticker, performing coordinate determination on the update sticker until the traversal is finished, wherein the coordinate determination comprises:
generating an initial coordinate according to a preset starting point coordinate and the size of the updated sticker;
matching the idle set according to the initial coordinates;
and if the matching is successful, taking the idle coordinate corresponding to the initial coordinate as the updating coordinate corresponding to the updating paster, and updating the idle set.
9. A computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps in the method of making a video according to any one of claims 1 to 8.
10. A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the method of making a video according to any one of claims 1 to 8.
CN202211268417.7A 2022-10-17 2022-10-17 Video production method and related equipment Pending CN115564857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211268417.7A CN115564857A (en) 2022-10-17 2022-10-17 Video production method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211268417.7A CN115564857A (en) 2022-10-17 2022-10-17 Video production method and related equipment

Publications (1)

Publication Number Publication Date
CN115564857A true CN115564857A (en) 2023-01-03

Family

ID=84767546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211268417.7A Pending CN115564857A (en) 2022-10-17 2022-10-17 Video production method and related equipment

Country Status (1)

Country Link
CN (1) CN115564857A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116866498A (en) * 2023-06-15 2023-10-10 天翼爱音乐文化科技有限公司 Video template generation method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116866498A (en) * 2023-06-15 2023-10-10 天翼爱音乐文化科技有限公司 Video template generation method and device, electronic equipment and storage medium
CN116866498B (en) * 2023-06-15 2024-04-05 天翼爱音乐文化科技有限公司 Video template generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US20220080318A1 (en) Method and system of automatic animation generation
CN108959392B (en) Method, device and equipment for displaying rich text on 3D model
CN111752557A (en) Display method and device
CN103092612A (en) Method and electronic device for achieving three dimensional (3D) desktop mapping of Android operating system
WO2012155510A1 (en) Method and apparatus for processing character deformation special effect
CN115564857A (en) Video production method and related equipment
CN111210487A (en) Pattern generation method and system
CN105096364B (en) Animation data generation method and device and electronic equipment
CN109658485B (en) Webpage animation drawing method, device, computer equipment and storage medium
CN112685998A (en) Automatic labeling method, device, equipment and readable storage medium
AU2019200269B2 (en) An interactive user interface and its corresponding engine for improving image completion quality
CN115591239A (en) Game scene generation method and device, computer equipment and storage medium
CN110647377A (en) Picture processing system, device and medium for human-computer interaction interface
KR101984058B1 (en) Template application system and method using the file format svg
CN111460770B (en) Method, device, equipment and storage medium for synchronizing element attributes in document
CN114827722A (en) Video preview method, device, equipment and storage medium
CN114820988A (en) Three-dimensional modeling method, device, equipment and storage medium
US11276153B2 (en) Auto-complete image suggestions for image editing
CN113384892A (en) Method and device for acquiring and displaying material picture of scene model and storage medium
CN111596983A (en) Animation display method, device and medium based on animation component
JP2022028090A (en) Three-dimensional model editing device, three-dimensional model editing method, and program
JP4336813B2 (en) Image description system and method
CN113487725B (en) Model node modification method and device, terminal equipment and storage medium
CN117197300B (en) Rendering synthesis method of three-dimensional wire frame perspective view map based on transparent channel
CN117891448A (en) Visual component editing method, system, equipment and medium for constructing page

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 Building 1901, 1902, 1903, Qianhai Kexing Science Park, Labor Community, Xixiang Street, Bao'an District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Flash Scissor Intelligent Technology Co.,Ltd.

Address before: 518000 Unit 9ABCDE, Building 2, Haihong Industrial Plant Phase II, Haihong Industrial Plant, West Side of Xixiang Avenue, Labor Community, Xixiang Street, Bao'an District, Shenzhen, Guangdong

Applicant before: Shenzhen big brother Technology Co.,Ltd.