CN111726545B - Material file processing method and device, computer equipment and storage medium - Google Patents

Material file processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111726545B
CN111726545B CN202010576032.1A CN202010576032A CN111726545B CN 111726545 B CN111726545 B CN 111726545B CN 202010576032 A CN202010576032 A CN 202010576032A CN 111726545 B CN111726545 B CN 111726545B
Authority
CN
China
Prior art keywords
integrated
special effect
video
file
video frame
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.)
Active
Application number
CN202010576032.1A
Other languages
Chinese (zh)
Other versions
CN111726545A (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.)
Guangzhou Baiguoyuan Information Technology Co Ltd
Original Assignee
Guangzhou Baiguoyuan Information 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 Guangzhou Baiguoyuan Information Technology Co Ltd filed Critical Guangzhou Baiguoyuan Information Technology Co Ltd
Priority to CN202010576032.1A priority Critical patent/CN111726545B/en
Publication of CN111726545A publication Critical patent/CN111726545A/en
Application granted granted Critical
Publication of CN111726545B publication Critical patent/CN111726545B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects

Landscapes

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

Abstract

The embodiment of the invention discloses a material file processing method and device, computer equipment and a storage medium. The method comprises the steps of obtaining a material file forming a target special effect; generating an integrated material file corresponding to the target special effect according to the characteristics of each material file, wherein the integrated material file comprises a configuration document description and at least one integrated material video; and storing the formed integration material file and the target special effect in a correlation mode, so that a terminal with the target special effect requirement can acquire the integration material file. The method realizes the integration processing of the material files corresponding to the special effects, and the special effect processing of the user terminal side on the basis of the integrated material files effectively avoids the operation of synchronously decoding a plurality of required associated material files during special effect presentation, thereby reducing the requirement on the decoding performance of the user terminal during special effect presentation and improving the user experience of special effect presentation functions in application products.

Description

Material file processing method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of monitoring, in particular to a material file processing method and device, computer equipment and a storage medium.
Background
In some social application products, some special effects are usually provided on the corresponding user client to enhance the display effect of the user on the content to be displayed in use. Currently, part of special effect functions of a user client often needs a plurality of material files (such as a background file, a foreground file, an overlay file, and the like) to be embodied, and the material files are stored in a format of a single video file.
At present, when a user needs to perform special effect display, a user client generally needs to acquire material files required for supporting the special effect display, then decode each material file to acquire video frames included in each material file, sequentially select one video frame from each material file in sequence, and form a special effect video frame to be displayed by performing superposition processing on the selected multiple video frames.
In the implementation process, in order to ensure the overall continuity and fluency of the display among the special-effect video frames, it is required to ensure that the video frames that need to be subjected to the superposition processing in each material file are all decoded, which is equivalent to requiring that the user client can decode a plurality of material files simultaneously to obtain all the video frames that need to be subjected to the superposition processing currently. The method has higher requirement on synchronous decoding of a plurality of material files, and needs the user terminal to have stronger decoding capability, so that the performance requirement on the user terminal is higher.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for processing a material file, a computer device, and a storage medium, which reduce a terminal performance requirement when a user terminal performs special effect processing.
In a first aspect, an embodiment of the present invention provides a method for processing a material file, including:
acquiring a material file forming a target special effect;
generating an integrated material file corresponding to the target special effect according to the characteristics of each material file, wherein the integrated material file comprises a configuration document description and at least one integrated material video;
and storing the formed integration material file and the target special effect in a correlation mode, so that a terminal with the target special effect requirement can acquire the integration material file.
In a second aspect, an embodiment of the present invention provides a material file processing method, which is applied to a terminal, and includes:
receiving an integrated material file corresponding to a target special effect to be started, and acquiring a configuration document description and all integrated material videos included in the integrated material file, wherein the integrated material file is formed according to the method provided by the embodiment of the first aspect of the invention and is fed back through a server;
and dividing each integrated video frame in each integrated material video based on the description of the configuration document, and after each integrated video frame is divided, carrying out special effect processing on the target selected by the user based on each material video frame obtained by division in real time so as to display the special effect video frame formed after processing on a terminal interface in real time.
In a third aspect, an embodiment of the present invention provides a material file processing apparatus, including:
the file receiving module is used for acquiring a material file forming the target special effect;
the file integration module is used for generating an integrated material file corresponding to the target special effect according to the characteristics of each material file, and the integrated material file comprises a configuration document description and at least one integrated material video;
and the file storage module is used for storing the formed integrated material file and the target special effect in a correlation mode so that a terminal with the target special effect requirement can acquire the integrated material file.
In a fourth aspect, an embodiment of the present invention provides a material file processing apparatus, configured on a terminal, including:
the file acquisition module is used for receiving an integrated material file corresponding to a target special effect to be started and acquiring a configuration document description and all integrated material videos included in the integrated material file, wherein the integrated material file is formed according to the method provided by the embodiment of the third aspect of the invention and is fed back through a server;
and the file segmentation module is used for segmenting each integrated video frame in each integrated material video based on the configuration document description, and after each integrated video frame is segmented, carrying out special effect processing on a target selected by a user based on each segmented material video frame in real time so as to display the special effect video frame formed after the processing on a terminal interface in real time.
In a fifth aspect, an embodiment of the present invention provides a computer device, including:
one or more processors;
storage means for storing one or more programs;
the one or more programs are executed by the one or more processors, so that the one or more processors implement the material file processing method provided by the embodiment of the first aspect or the second aspect of the present invention.
In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the material file processing method provided in the first or second aspect of the present invention.
In the material file processing method, the device, the equipment and the storage medium provided by the embodiment of the invention, the material file forming the target special effect is firstly obtained by the material file processing method; generating an integrated material file corresponding to the target special effect according to the characteristics of each material file, wherein the integrated material file comprises a configuration document description and at least one integrated material video; and storing the formed integration material file and the target special effect in a correlation mode, so that a terminal with the target special effect requirement can acquire the integration material file. The material file processing method applied to the user terminal firstly receives an integrated material file corresponding to a target special effect to be started, and obtains a configuration document description and all integrated material videos included in the integrated material file; and then segmenting each integrated video frame in each integrated material video based on the description of the configuration document, and after segmenting each integrated video frame, carrying out special effect processing on the target selected by the user based on each segmented material video frame in real time so as to display the special effect video frame formed after processing on a terminal interface in real time. According to the technical scheme, the integration processing is firstly realized on one computer device for the material files with special effects, then the integrated material files generated by the computer device can be received when the special effects are required to be presented on the user terminal side, and the special effects are presented after the integrated material files are segmented.
Drawings
Fig. 1 is a schematic flow chart of a material file processing method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a material file processing method according to a second embodiment of the present invention;
fig. 3 is a flowchart illustrating an implementation of determining a video frame to be integrated in a material file processing method according to a second embodiment of the present invention;
FIG. 4 is a diagram illustrating the effect of forming integrated video frames according to an integrated arrangement in the second embodiment;
FIG. 5 is a diagram illustrating the effect of forming an integrated video frame according to another integrated arrangement in the second embodiment;
fig. 6 is a schematic flow chart of a material file processing method according to a third embodiment of the present invention;
fig. 7 is a schematic representation of an integrated video frame obtained by a material video processing method according to a third embodiment of the present invention;
fig. 8 is a display diagram of a special effect video frame formed after a video frame is segmented and integrated to perform special effect processing in a material video processing method according to a third embodiment of the present invention;
fig. 9 is a flowchart illustrating an implementation of integrating material video segmentation in the material video processing method according to the third embodiment of the present invention;
fig. 10 is a flowchart illustrating another implementation of the segmentation of the integrated material video in the material video processing method according to the third embodiment of the present invention;
fig. 11 is a block diagram showing a structure of a material file processing apparatus according to a fourth embodiment of the present invention;
fig. 12 is a block diagram showing a structure of a material file processing apparatus according to a fifth embodiment of the present invention;
fig. 13 is a schematic diagram of a hardware structure of a computer device according to a seventh embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. In addition, the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
Example one
Fig. 1 is a flowchart of a material file processing method according to an embodiment of the present invention, which is suitable for merging material files that provide support for special-effect display, and which can be executed by a material file processing apparatus, where the apparatus can be implemented by software and/or hardware, and can be generally integrated on a computer device.
It is understood that, in this embodiment, a computer device having a material file design function or a computer device capable of performing background service support for multimedia function type application software (including live application software, beauty effect type application software, and the like) that executes the provided method may be executed, and the collected material file supporting the target special effect may be subjected to video integration processing by the computer device.
As shown in fig. 1, a method for processing a material file according to an embodiment of the present invention specifically includes the following operations:
s101, obtaining a material file forming the target special effect.
In this embodiment, the computer device serving as the execution subject of this embodiment may directly obtain a material file from a preset material library, or may receive the material file from a material design platform of a third party, where the material design platform may be regarded as a platform for designing a material file required for special effect presentation, different special effect designs are composed of different material files, and the material file may be specifically a material video file, that is, one material file includes a certain number of material video frames.
Generally, material files required for special effect presentation can be divided into background material videos, foreground material videos and overlay material videos according to different material types, and in practical application, one special effect presentation can be formed by the material files of one or more material types.
And S102, generating an integrated material file corresponding to the target special effect according to the characteristics of each material file, wherein the integrated material file comprises a configuration document description and at least one integrated material video.
In the conventional special effect processing, after the material files forming the target special effect are obtained through the steps, the material files are not processed, but are directly associated and stored with the target special effect file, so that when the user side terminal is determined to have the use requirement of the target special effect, the material files associated with the target special effect are simultaneously fed back to the user side terminal, the user side terminal is enabled to simultaneously decode the material files, and the target special effect is presented. In the conventional special effect processing, because a plurality of files need to be decoded simultaneously and the plurality of files need to be completely synchronized, the requirement on the decoding performance of a user side terminal is high, and the applicability of a special effect presenting function on a user side is influenced.
In this embodiment, by executing the operation in this step, the material files associated with the target special effect are integrated, so as to form an integrated material file corresponding to the target special effect. The integrated material file may be understood as a file containing all material videos required for target effect presentation, and the integrated material file may include the integrated material video and the description of the configuration document. Specifically, the integrated material video may be an integrated video formed by integrating each material file, the configuration document description may be a document formed by recording and summarizing each integrated information generated in the material file integration, the configuration document description is equivalent to a document including the integrated information generated in the process of integrating the material file into the integrated material video,
it can be known that, when a user terminal needs to perform target special effect presentation, an integrated material video formed in this embodiment can be used as a material resource required by the target special effect presentation, but since the integrated material video is actually the integration of a plurality of material files, the user terminal needs to segment the integrated material video first when the user terminal wants to perform the target special effect presentation, the configuration document description in this embodiment can be used as a segmentation guidance description for the user terminal to segment the integrated material file, and the user terminal is made clear what operation should be performed through the integration information contained in the configuration document description to implement the segmentation of the integrated material video. Therefore, the profile description needs to be taken as an integration material file together with the integration material video, and acquired by the user terminal when the user terminal needs to perform presentation of the target special effect.
It should be noted that the integrated material file may include a configuration document description and one or more integrated material videos, and the actual number of the included integrated material videos may be specifically considered in combination with the number of the material files associated with the target special effect and the video width of the integrated material video to be formed. For example, assuming that the number of material files constituting the target special effect is small, each material file can be integrated into an integrated material video according to the characteristics of the material file, the width of each video frame in the integrated material video is still within the decoding capability range of the user-side terminal, and the performance of the user-side terminal does not affect the special effect presentation. Assuming that the number of material files constituting the target special effect is large, if the material files are still integrated into one integrated material video, the width of each video frame may exceed the decoding capability range of the user side terminal, and when the user side terminal decodes the integrated material video, the performance of the user side terminal still affects the special effect presentation.
Specifically, the process of integrating the material files to form the integrated material file can be described as follows: for each material file, a material video frame can be selected from each material file, and the selected material video frames are arranged according to a certain arrangement rule, wherein the arrangement rule can be determined according to the characteristics of the material file, and the characteristics of the material file can comprise the file size of the material file, the material type, the resolution of each contained material video frame and the like; for example, the present embodiment may take this characteristic of the resolution of the material file as a consideration, thereby setting a sorting rule that ensures that the frame width and the length of the video frames formed after the arrangement are substantially equal.
Then, the image frame containing the arranged material video frames can be used as one frame in the integrated material video, meanwhile, the display position and other integration information of the material video frames in the integrated image frame can be recorded, and then the operations of selecting the video frames, arranging the video frames and integrating the video frames are executed in a circulating mode until all the video frames in the material file are selected; and then, forming an integrated material video according to each image frame obtained by integration, forming a configuration document description according to each recorded integration information, and finally taking the integrated material video and the configuration document description as an integrated material file with a target special effect.
It can be understood that, in general, an integrated material video is formed by default, and when the number of material files is large, material file grouping is considered before the material files are integrated, and then the material files divided into the same group are integrated by adopting the above method, and the integration information during the integration of each group can be uniformly recorded in a configuration document description.
S103, storing the formed integration material file and the target special effect in a correlation mode, so that a terminal with the target special effect requirement can acquire the integration material file.
In the step, the formed integrated material file and the target special effect are stored in a correlation mode, so that the user side terminal can find the integrated material file corresponding to the target special effect in time when the user side terminal has special effect presentation requirements. It can be understood that, when the execution subject of the steps of the method of this embodiment is a computer device for implementing material design, the formed integrated material file and the target special effect are stored in association and then uploaded to a server (a computer device) for performing background service support on multimedia function application software, so that a user side terminal can download a required integrated material file from the server; or, the uploading operation is not carried out, and when the special effect presentation requirement exists at the user side terminal, the integrated material file required by the user side terminal is forwarded to the user side terminal through the server.
In addition, if the execution main body of the steps of the method of this embodiment is directly a server that supports background services for multimedia function application software, only the integrated material file and the target special effect are locally associated and stored, and the corresponding integrated material file can be sent to the user side terminal when the user side terminal has a special effect presentation requirement.
The material file processing method provided by the embodiment of the invention receives material files forming a target special effect, and each material file is sent by a material design platform; integrating the material files according to the resolution of the material files to form an integrated material file corresponding to the target special effect, wherein the integrated material file comprises a configuration document description and at least one integrated material video; and storing the formed integration material file and the target special effect in a correlation manner. The method realizes the integration processing of the material files corresponding to the special effects, and the special effect processing of the user terminal side on the basis of the integrated material files effectively avoids the operation of synchronously decoding a plurality of required associated material files during special effect presentation, thereby reducing the requirement on the decoding performance of the user terminal during special effect presentation and improving the user experience of the special effect presentation function in application products.
On the basis of the above embodiment, as an optional embodiment, the method further optimizes the formed integration material file and the associated storage of the target special effect as follows: storing the formed integrated material file and the target special effect in a local association manner; or uploading the formed integration material file and the target special effect to a server for associated storage.
It can be known that, the computer device for implementing the material file integration processing of the embodiment can perform local association storage on the integrated material file with the target special effect after the integrated material file with the target special effect is formed; alternatively, the data may be uploaded to a server where the storage is associated. For the association storage on the server, it is equivalent to that the execution subject is only used for generating the integration material file, and the generated integration material file is not needed to be concerned about how the integration material file is used by the user terminal, and the integration material file can be directly transmitted by the server and the user terminal through information interaction.
Correspondingly, on the basis of the optimization, the method further optimizes and comprises the following steps: if the associated storage is local associated storage, when the user terminal is determined to have the starting requirement of the target special effect, forwarding the target integration material file selected corresponding to the target special effect to the user terminal through the server; and if the association storage is uploaded to a server association storage, feeding back a target integration material file selected corresponding to the target special effect to the user terminal by the server when the user terminal is determined to have the starting requirement of the target special effect.
It can be understood that, the integrated material file formed by the method of this embodiment has a primary purpose that when the user-side terminal has a starting requirement for the target special effect, the user-side terminal can receive the integrated material file corresponding to the target special effect, so that the user-side terminal can realize presentation of the target special effect based on the received integrated material file.
In the embodiment, in order to transmit the integrated material file to the user side terminal when the user side terminal has the starting requirement of the target special effect, the transmission mode of the whole material file is further refined, and specifically, when the target special effect and the integrated material file are locally associated and stored, the target integrated material file corresponding to the target special effect can be selected locally and then forwarded to the user terminal through the server; alternatively, when the target special effect is locally associated with the integrated material file for storage, the server may select the target integrated material file corresponding to the target special effect and feed the selected target integrated material file back to the user terminal.
In addition, the step of selecting the target integration material file corresponding to the target special effect may specifically include: determining the file number of all integrated material files stored in association with the target special effect; if the number of the files is 1, directly determining a corresponding target integration material file from the integration material files which are stored in association with the target special effect; and if the number of the files is more than 1, selecting one integration material file matched with the performance of the user terminal from all the integration material files stored in a relevant mode as a corresponding target integration material file.
It should be noted that the computer device storing the information related to the target special effect and the integrated material file does not determine the performance level of the user side terminal, and some user side terminals have a large decodable video width range, so that even if an integrated material video with a large video width is formed, the integrated material video can be normally decoded; some user side terminals have a small decodable video width range, and if all the material files are processed to form an integrated material video, the user side terminals may still not decode normally. Therefore, the method can be repeatedly adopted as the target special effect to determine the integrated material file according to the actual application requirement, and one integrated material file is correspondingly obtained every time the material file processing method of the embodiment is executed, and the number of the integrated material videos included in the integrated material file obtained every time is different.
In the embodiment, it is assumed that the user terminal has different requirements, and the integration material file is determined twice by using the above method, and an integration material file associated with the target special effect can be obtained each time, where the integration material file corresponding to one time may include only one integration material video and one configuration document description, and the integration material file corresponding to another time may include multiple integration material videos and one configuration document description. Finally, the embodiment can find the target integration material file matching the performance of the user terminal from all the integration material files corresponding to the target special effect by judging the performance information of the user terminal.
In the optional embodiment of the present embodiment, an operation of feeding back the integrated material files with different storage modes to the user terminal is considered, and meanwhile, a problem of how to select and send the integrated material files to the user terminal when the computer device storing the integrated material files obtains a start request of the target special effect and the target special effect has different integrated material files is considered, and by feeding back more matched integrated material files to the user terminal, a risk that the user terminal cannot normally perform special effect presentation due to low terminal performance is reduced, and applicability of a special effect presentation function is improved.
Example two
Fig. 2 is a schematic flow chart of a material file processing method according to a second embodiment of the present invention, which is optimized based on the second embodiment, in this embodiment, the material files are further integrated according to the resolution of each material file to form an integrated material file corresponding to the target special effect, specifically: selecting a current video frame to be integrated from a corresponding material file according to the acquired special effect description information of the target special effect; determining an integration arrangement mode that the aspect ratio of the video with the set number meets the set conditions according to the resolution of the material file to which each current video frame to be integrated belongs; integrating each current video frame to be integrated based on each integration arrangement mode to obtain the set number of integrated video frames and corresponding integration information; and returning the determination operation of the current video frame to be integrated until all material video frames in each material file are selected, and forming an integrated material file based on all the obtained integrated video frames and corresponding integrated information.
As shown in fig. 2, a method for processing a material file according to a second embodiment of the present invention specifically includes the following operations:
s201, obtaining a material file forming the target special effect.
S202 to S206 of the present embodiment correspond to specific development of the material file integration processing.
S202, according to the obtained special effect description information of the target special effect, a current video frame to be integrated is selected from a corresponding material file.
In this embodiment, the integration operation on each material file is specifically decomposed into an operation of integrating material video frames in each material file to form an integrated video frame, and the key point of integrating each material video frame is to select a material video frame to be integrated from each material file. In the step, which material video frame should be selected from each material file is mostly the current video frame to be integrated can be determined through the special effect description information of the target special effect.
It should be noted that, the contents presented by different target special effects are not the same, the used material files are also different, and for one special effect, the associated material files do not all participate in the whole special effect presentation process, and some material files may be inserted at intervals or ended in advance in the presentation process, so that in this step, it may not be necessary to select a material video frame from all material files every time as a current video frame to be integrated, but it may be determined which material video frame should be selected from which material files as a current video to be integrated based on the special effect description information of the target special effect.
It can be known that, in a special effect design stage, in addition to the material files required for designing the special effect, there is a corresponding special effect description information, and the special effect description information may also be synchronously obtained when the execution subject obtains each material file, where the special effect description information may be specifically understood as information describing the presentation content of the designed special effect, and the description of the presentation content may preferably include: what material files are added to show what effects at what time and what material files are shown at what time in the whole special effect presentation, and so on.
Generally, the presentation of a special effect is equivalent to the playing of a special effect video, and the step can determine which material types each special effect video frame in the presented special effect video specifically consists of by analyzing the special effect description information, so that the material video frame forming the special effect video frame can be selected from the material files of the determined material types by combining the frame sequence number of the special effect video frame, and the selected material video frame is taken as the current video frame to be integrated.
Further, fig. 3 shows an implementation flowchart of determining a video frame to be integrated in the material file processing method according to the second embodiment of the present invention, and as shown in fig. 3, the embodiment specifically optimizes the video frame to be integrated currently selected from the corresponding material file according to the obtained special effect description information of the target special effect as follows:
s2021, analyzing the special effect description information, and determining material types included in each special effect video frame in the special effect video displayed when the target special effect is presented.
According to the above description of the special effect description information, it is equivalent to that each special effect video frame in the special effect video displayed in the special effect presentation can be restored through the whole special effect description information, and which material types specifically constitute in each special effect video frame can be obtained.
S2022, taking the special effect video frame corresponding to the determined current frame number as the current special effect video frame, where a first current frame number is a starting frame number of the special effect video displayed when the target special effect is presented.
It should be noted that, in the embodiment, the frame number of each special effect video frame may be set according to the time sequence for the special effect video displayed when the target special effect is presented, and the current video frame to be integrated may be determined according to the frame number of the special effect video displayed when the target special effect is presented. Specifically, in this embodiment, it may be determined that a special effect video frame with a current frame number is a current special effect video frame from a special effect video displayed when the target special effect is presented through this step, and the starting frame number in the displayed special effect video is used as a first current frame number in this embodiment.
S2023, determining target material files corresponding to the material types included in the current special-effect video frame, and selecting a material video frame which accords with the current frame sequence number from each target material file as a current video frame to be integrated.
In this embodiment, the present step may obtain material types included in the current special effect video frame, and may select, from the received material files, target material files that match the material types. Then, the process of selecting the current video frame to be integrated from the target material files can be described as follows: for each target material file, judging whether the target material file appears for the first time when the current frame is numbered, if so, directly selecting a first material video frame in the target material file as a current video frame to be integrated; and if not, taking the next adjacent material video frame which is the last adjacent material video frame in the target material video and is taken as the current video frame to be integrated as the new current video frame to be integrated.
S2024, determining the next frame number of the current frame number as the new current frame number.
In this step, after the selection of the current video frame to be integrated is completed, the next frame of the current frame number may be determined as the new current frame number, so that the iterative operation of the selection operation can be ensured when the subsequent selection of the current video frame to be integrated needs to be performed again.
And S203, determining an integration arrangement mode in which the aspect ratios of the set number of videos meet set conditions according to the resolution of the material file to which each current video frame to be integrated belongs.
The essence of this step is to determine an integration arrangement manner of the current video frames to be integrated, so as to ensure that the video aspect ratio of the integrated video frames formed after each current integrated video frame is arranged according to the integration arrangement manner meets a setting condition, wherein the setting condition met by the video aspect ratio may be that the ratio of the video aspect ratio is within a value range of 1 ± Δ t, and Δ t is a floating value set according to historical experience. In addition, in the present embodiment, it is necessary to determine the same integration arrangement manner as the number of integrated material videos to be formed, and the number of integrated material videos to be formed may be set by a relevant person before the material video processing is performed by using the method of the present embodiment, and the present embodiment records the set number as the set number.
Specifically, the integration arrangement mode in this step may be determined according to the resolution of the material file to which the current video frame to be integrated belongs, and it can be understood that the resolution of the material file is equivalent to the resolution of each current video frame to be integrated, and on the premise that the resolution of each current video frame to be integrated is known, the width and height values of each current video frame to be integrated can be known. In this step, various permutation and combination can be performed on each current video frame to be integrated with a known width and height value, so that an arrangement mode that the aspect ratio of the videos after permutation and combination approaches to 1 is selected as an integration arrangement mode. When the set number is multiple, the integration arrangement mode can be determined by adopting the mode for the current video frames to be integrated which are grouped according to the set number and are positioned in each group.
Preferably, in order to save the resource occupation calculated by the permutation and combination of the current video frames to be integrated, the embodiment first determines the aspect ratio of each current video frame to be integrated, and when the aspect ratio of each current video frame to be integrated is greater than 1, the current video frames to be integrated can be arranged in a top-down permutation mode; and when the aspect ratio of each current video frame to be integrated is less than 1, the current video frames to be integrated can be arranged in a left-to-right arrangement mode. The present embodiment is not limited to the above two arrangement manners, and still takes the arrangement target of ensuring that the aspect ratio of the integrated video satisfies the setting condition.
S204, integrating the current video frames to be integrated based on the integration arrangement modes to obtain the set number of integrated video frames and corresponding integration information.
The determined integration arrangement mode with the set number is used for respectively integrating the current video frames to be integrated, so that the integrated video frames with the set number can be obtained, and meanwhile, the integration information which records the position information of each current video frame to be integrated in the corresponding integrated video frame and the frame number corresponding to the integrated video frame and the current video frame to be integrated is also stored corresponding to each integrated video frame.
For example, fig. 4 shows an effect display diagram of an integrated video frame formed according to one integrated arrangement in the second embodiment, and fig. 5 shows an effect display diagram of an integrated video frame formed according to another integrated arrangement in the second embodiment, it can be seen that the current video frames to be integrated in the integrated video frame in fig. 4 are arranged according to an integrated arrangement from top to bottom; in fig. 5, the current video frames to be integrated in the integrated video frame are arranged in an integrated arrangement from left to right.
S205, whether all material video frames in each material file are selected or not is judged, and if yes, S206 is executed; if not, the process returns to S202.
After the current video frame to be integrated is determined from the material files by the above steps, the step may be executed to determine whether the material video frames in the material files are all selected as the current video frame to be integrated, if yes, the following operation of S206 may be executed, and if not, the operation needs to be returned to the above S202 to execute the operation of selecting the current video frame to be integrated again.
And S206, forming an integrated material file based on all the obtained integrated video frames and corresponding integrated information.
After the material video frames in the material files of the target special effect are all selected as the current video frames to be integrated for the integration processing of the video frames, the integrated material files related to the target special effect can be formed by the obtained integrated video frames and the corresponding integration information through the step.
When the set number is 1, 1 integrated material video is formed based on all integrated video frames, a configuration document description is formed based on all integrated information, and an integrated material file is formed based on the configuration document description and the configuration document description; or when the set number is greater than 1, determining the video frame division groups grouped in the same number as the set number, then forming an integrated material video according to each integrated video frame in the group, forming a configuration document description according to the integrated information of all the video frames, and finally forming an integrated material file based on the integrated material videos in the set number and the configuration document description, wherein in consideration of the limitation of the decoding capability of the user side terminal, the set number set in the embodiment is often not greater than 3, and the specific preferred value when the set number is greater than 1 may be 2, that is, the formed integrated material file may include 1 or 2 integrated material videos.
And S207, storing the formed integration material file and the target special effect in a correlation mode.
The method for processing the material file provided by the embodiment of the invention embodies the implementation process of integrating the material file. The integrated video frames are integrated according to the integration arrangement mode that the height ratio of the determined video frequency width meets the set conditions to form integrated video frames, the integrated material video is formed through the integrated video frames, and the integrated material file with the target special effect is formed through the integrated material video and the configuration document description. By utilizing the method, the integration processing of the material files corresponding to the special effects is realized, and the special effect processing of the user terminal side on the basis of the integrated material files effectively avoids the operation of synchronously decoding a plurality of required associated material files during special effect presentation, thereby reducing the requirement on the decoding performance of the user terminal during special effect presentation and improving the user experience of the special effect presentation function in the application product.
As an optional embodiment of the second embodiment, in the optional embodiment, the determining, according to the resolution of the material file to which each of the current video frames to be integrated belongs, an integration arrangement mode in which the set number of video aspect ratios meet the set condition is further embodied as: dividing each current video frame to be integrated according to a preset division rule to form the set number of packets to be integrated; and determining an integration arrangement mode that the aspect ratio of the videos with the set number meets the set conditions according to the video frame resolution of the current video frame to be integrated in the formed packet to be integrated.
In this optional embodiment, each obtained current video frame to be integrated is divided into groups to form a set number of packets to be integrated, where the set number may be 1 or greater than 1. Meanwhile, the preset division rule may be set by the correlation of the material forming the special effect video when the relevant person performs the special effect processing according to the material file, for example, in the presentation of the special effect video, the correlation degree between the background video and the foreground video is often high, so that the division of the material video frames of which the material types are the background video and the foreground video together may be considered, and the division of which the material types are the overlay video together is taken as the division rule, it can be understood that the preset division rule is more suitable for the case where the set number is greater than 1, and is equivalent to 1 to-be-integrated group when the set number is 1, and at this time, is equivalent to the case where all the current to-be-integrated video frames are classified into one to-be-integrated group, and the preset division rule is not considered too much.
It can also be known that, when the set number is 1, 1 integrated arrangement mode is formed; when the set number is larger than 1, a plurality of integration arrangement modes are formed corresponding to the groups to be integrated.
On the basis of this optional embodiment, further integrating each of the current video frames to be integrated based on each of the integration arrangement modes to obtain the set number of integrated video frames and corresponding integration information is specifically optimized as follows: integrating the current video frames to be integrated in the corresponding packets to be integrated according to the determined integration arrangement mode to form integrated video frames corresponding to the packets to be integrated; obtaining the position information and the material type of each current video frame to be integrated in the formed integrated video frame in the corresponding grouping to be integrated; and correspondingly forming integration information by combining the frame serial numbers of the corresponding integration video frames based on the position information and the material types of the current video frames to be integrated in the packets to be integrated.
In this embodiment, the integration arrangement manner is equivalent to defining an arrangement manner when the video frames to be integrated currently in the corresponding to-be-integrated group are combined to form an image frame, for example, for any to-be-integrated group, the video frames to be integrated currently in the corresponding to-be-integrated group are arranged from top to bottom, so as to form an integrated video frame corresponding to the to-be-integrated group, and the material type and the specific location in the integrated video frame of each current to-be-integrated video frame can be determined, for example, the vertex coordinates of four vertices of each current to-be-integrated video frame can be used as corresponding location information, and the corresponding frame number of the integrated video frame and the frame number of the integrated video frame to be integrated currently in the corresponding material file can also be obtained.
The position information, the material type and the frame number information can be regarded as integration information corresponding to the integrated video frame, and the integration information effectively declares relevant information of each material video frame integrated in the integrated video frame, so that the subsequent operation of the user side terminal on the division processing of the integrated material video is realized.
Meanwhile, on the basis of the optional embodiment, the forming of the integrated material file based on all the obtained integrated video frames and the corresponding integration information is further embodied as follows: forming a corresponding integrated material video based on each integrated video frame corresponding to the group to be integrated, and recording the integration information sequence corresponding to each integrated video frame in a preset configuration document description; and combining the formed integrated material video and the configuration document description to form an integrated material file with the target special effect.
In this embodiment, the integrated video frames formed corresponding to each to-be-integrated group may be combined into one integrated material video, and the integration information corresponding to each integrated video frame may also be sequentially recorded in the profile description, so that an integrated material file including a set number (1 or more) of integrated material videos and one profile description may be formed.
EXAMPLE III
Fig. 6 is a flowchart of a material file processing method according to a third embodiment of the present invention, where the method is suitable for performing segmentation processing on an obtained integrated material file associated with a target special effect and implementing presentation of the target special effect, and the method may be executed by a material file processing apparatus, where the apparatus may be implemented by software and/or hardware and is generally integrated on a terminal of a user.
It can be understood that, in this embodiment, a terminal executing the provided method can be regarded as a computer device installed with multimedia function application software (including live application software, beauty effect application software, and the like), and the division processing of the material file can be performed on the integrated material file associated with the target effect fed back by the computer device storing the integrated material file through the terminal.
As shown in fig. 6, a method for processing a material file according to a third embodiment of the present invention specifically includes the following operations:
s301, receiving an integrated material file corresponding to a target special effect to be started, and acquiring a configuration document description and all integrated material videos included in the integrated material file.
The execution main body of the embodiment is a terminal on the user side, and it can be understood that the terminal has already acquired the target special effect to be started selected by the user before executing the step, where the target special effect to be started can be understood as a target special effect that the user desires to present on the user terminal; then, the terminal may generate a corresponding start request for the target special effect to be started, and send the start request for the target special effect to the server establishing communication connection with the terminal. The step can optimize the received integrated material file to be fed back by the server.
Specifically, the server connected to the local terminal may determine and feed back the corresponding integrated material file to the local terminal based on the association table stored thereon and including the target special effect and the integrated material file, or may forward the integrated material file selected by the third-party device to the local terminal, where the association table including the target special effect and the information related to the integrated material file is stored on the third-party device.
In this step, the received integrated material file may be analyzed to obtain the configuration document description and all the integrated material videos included therein. It can be understood that the integrated material file in this embodiment may be specifically formed based on the material file processing method provided in the above-mentioned embodiment one or embodiment two, and the integrated material file may include only an integrated material file of a configuration document description and an integrated material video; an integrated material file may also include a profile description and a plurality of integrated material videos.
Meanwhile, as can be seen from the first embodiment, there may be two integrated material files stored in association with the target special effect, and after the computer device (which may be a server or a third-party device) storing the integrated material files obtains the starting requirement that the terminal has the starting target special effect, one integrated material file more matching the performance of the user-side terminal is selected, and then the server directly or indirectly feeds back the selected integrated material file to the terminal serving as the execution main body. Thus, the integrated material file received in this step may include one integrated material video or a plurality of integrated material videos.
S302, each integrated video frame in each integrated material video is divided based on the description of the configuration document, and after each integrated video frame is divided, special effect processing is carried out on a target selected by a user in real time based on each material video frame obtained through division, so that the special effect video frame formed after processing is presented on a terminal interface in real time.
In this embodiment, the step of dividing the integrated material video may be specifically regarded as a step of dividing each integrated video frame constituting the integrated material video, that is, the step of dividing each integrated video frame in each integrated material video obtained as described above by configuring the document description. The configuration document description includes integration information corresponding to each integrated video frame in all integrated material videos in the integrated material file, and for the integration information of one integrated video frame, the configuration document description specifically includes information such as position information, material types and corresponding frame numbers of the material video frames constituting the integrated video frame.
It should be noted that, the segmentation processing of each integrated video frame in the integrated material video in this step is sequentially executed according to the frame number of the integrated material video, and after each integrated video frame is segmented, each material video frame obtained by corresponding to the integrated video frame can be subjected to special effect processing together with a user-selected target selected on the terminal by the user, and the formed special effect video frame can be presented in real time. The target selected by the user may be a picture, a character, a video or the like to be subjected to special effect enhanced display.
In addition, when a plurality of integrated material videos are included in the integrated material file, material video frames required for special effect presentation may exist in different integrated material videos, and thus, division processing of the integrated video frames needs to be performed simultaneously for the plurality of integrated material videos.
For example, assuming that the material video frames of which the material types are respectively the background material, the foreground material, and the superimposed material are obtained correspondingly after the video frame is divided and integrated, and the target selected by the user is a picture, the material video frames of the 3 material types and the picture can be masked and mixed and superimposed to form a special-effect video frame which can be displayed on the terminal interface. Fig. 7 is a representation of an example of an integrated video frame obtained by a material video processing method according to a third embodiment of the present invention, and as shown in fig. 7, the integrated video frame 31 includes a background video frame, a foreground video frame, and an overlay video frame arranged from left to right. In addition, fig. 8 shows a display diagram of a special effect video frame formed after a video frame is divided and integrated to perform special effect processing in a material video processing method according to a third embodiment of the present invention.
The material file processing method provided by the third embodiment of the invention is specifically applied to a user side terminal, wherein the user side terminal firstly receives an integrated material file with a target special effect to be started, and acquires a configuration document description and all integrated material videos included in the integrated material file; and then segmenting each integrated video frame in each integrated material video based on the description of the configuration document, and after segmenting each integrated video frame, carrying out special effect processing on the target selected by the user based on each segmented material video frame in real time so as to display the special effect video frame formed after processing on a terminal interface in real time. By using the method, the material file suitable for the performance capability range of the terminal can be obtained when the terminal performs special effect presentation, so that the operation of synchronously decoding a plurality of required material files is effectively avoided when the material file performs special effect processing, and the application range of the special effect presentation function in practical application is better improved.
As an optional embodiment of the third embodiment, in the optional embodiment, when only one integrated material video is included in the integrated material file, the integrated material video is recorded as a first integrated material video, and the configuration document description is a first configuration document description; fig. 9 is a flowchart showing an implementation of dividing an integrated material video in a material video processing method according to a third embodiment of the present invention, and as shown in fig. 9, this implementation further embodies that each integrated video frame in each integrated material video is divided based on the description of the configuration document, and after each integrated video frame is divided, special effect processing is performed on a target selected by a user in real time based on each divided material video frame as follows:
the following steps in this alternative embodiment specifically provide a segmentation process when only one integrated material video is included in the integrated material file.
S3021, obtaining a first integrated video frame corresponding to the determined current frame number from the first integrated material video as a current video frame to be segmented, where the current frame number is a starting frame number of the first integrated material video.
For example, the current video frame to be segmented may be directly selected from the included first integrated material video, and it may be preferable to start from the start frame number of the first integrated material video as the first current frame number, and regard the integrated video frame with the current frame number as the current video frame to be segmented.
S3022, obtaining first integration information corresponding to the current frame sequence number from the first configuration document description.
It can be known that the first profile description includes first integration information respectively corresponding to each integrated video frame in the first integrated material video, so that after the current frame number is determined, the first integration information corresponding to the current frame number can be found from the first profile description.
And S3023, segmenting the first material video frames of the material types from the current video frame to be segmented based on the first integration information.
In this embodiment, the first integrated information includes position information of each material video frame integrated in the first integrated video frame and a material type to which the material video frame belongs. Further, the first integration information specifically includes information including position information of four vertices of each material video frame in the current video frame to be segmented, a material type to which each material video frame belongs, a frame number of the current video frame to be segmented, and a frame number corresponding to each material video frame in the original material file.
Through the information, each material video frame can be separated, the type and the frame sequence number information of each material video frame can be obtained, and the obtained information can be used for subsequent special effect processing.
And S3024, performing special effect processing on the target selected by the user according to each first material video frame.
Illustratively, each first material video frame obtained by segmentation is subjected to mixed superposition processing together with a target selected by a user to obtain a special effect video frame presented on a terminal interface.
S3025, judging whether all the first integrated video frames in the first integrated material video are selected, if so, executing S3027; if not, S3026 is performed.
This step corresponds to a loop determination step, and if the first integrated video frames are all selected as the video frames to be segmented at present, it is considered that the segmentation processing of the first integrated material video is completed, and the target special effect presentation realized based on the first integrated material video is completed, at which time the processing of the material file can be finished by executing S3027. In contrast, when there is also a first integrated video frame that is not selected, the operation of S3026 may be performed.
And S3026, determining the next frame sequence number of the current frame sequence number as a new current frame sequence number, and returning to execute S3021.
This step corresponds to a processing step of implementing a loop, and a new current frame number may be determined, and thus the process returns to S3021 to re-perform the determination operation of the current video frame to be segmented.
S3027, the material file processing is ended.
As another optional embodiment of the present invention, in this optional embodiment, when the integrated material file includes at least two integrated material videos, each integrated material video is recorded as a second integrated material video, and the configuration document description is a second configuration document description; fig. 10 is a flowchart showing another implementation of dividing the integrated material video in the material video processing method according to the third embodiment of the present invention, and as shown in fig. 10, this implementation further embodies that each integrated video frame in each integrated material video is divided based on the description of the configuration document, and after each integrated video frame is divided, special effect processing is performed on the target selected by the user in real time based on each divided material video frame as follows:
the following steps in this alternative embodiment specifically provide a segmentation process when the integrated material file includes multiple integrated material videos.
S3201, obtaining second integrated video frames corresponding to the determined current frame number from each second integrated material video, and taking each second integrated video frame as a current video frame to be segmented.
For example, in this step, it is required to respectively integrate the second integrated material videos included in the material file to obtain the current video frame to be segmented, and specifically, the integrated video frames corresponding to the current frame number in each second integrated material video may be mostly the current video frame to be segmented.
S3202, second integration information corresponding to each current video frame to be segmented under the current frame sequence number is obtained from the second configuration document description.
Based on the above steps, the current video frames to be segmented, which are the same as the second integrated material video in number, can be acquired, and the second configuration document description includes the second integrated information of all the integrated video frames in each second integrated material video, so that the step can determine the second integrated information corresponding to each current video frame to be segmented from the second configuration document description.
It is understood that the second profile description may summarize the second integrated information in units of the second integrated material video, and thus when the second integrated information is obtained, the corresponding second integrated information set may be first located from the second profile description according to the packet number of the second integrated material video, and then the second integrated information associated with the current frame number is obtained.
And S3203, respectively segmenting second material video frames of each material type from the corresponding current video frame to be segmented based on each second integration information.
The step is equivalent to the step of carrying out video frame segmentation processing on each current video frame to be segmented by combining with corresponding second integration information, and segmenting second material video frames of each material type from each current video frame to be segmented. The second integration information respectively comprises position information of material video frames integrated in the second integration video frames and material types of the material video frames, and the second integration information comprises contents which can simply and effectively realize the segmentation processing of the second integration video frames.
And S3204, carrying out special effect processing on the target selected by the user according to each second pixel video frame.
For the second integrated video frames with the same current frame number, all the second pixel video frames obtained after the division processing need to participate in the special effect processing, so that the special effect video frames with the current frame number and capable of being presented on the terminal interface are formed.
S3205, judging whether all second integrated video frames in each second integrated material video are selected, and if not, executing S3206; if yes, S3207 is performed.
This step also corresponds to a loop determination step, and if the second integrated video frames in all the second integrated material videos are selected as the video frames to be currently divided, it is considered that the division processing of the second integrated material video is completed, and the target special effect presentation based on the second integrated material video is realized, and at this time, execution of S3207 may be performed to end the processing of the material file. In contrast, when there is also a second integrated video frame that is not selected, the operation of S3206 may be performed.
S3206, determining the next frame number of the current frame number as the new current frame number, and returning to execute S3201.
S3207, the material file processing is ended.
The above-mentioned optional embodiments of this embodiment respectively provide specific operations for implementing the segmentation processing of the integrated material video to perform the target special effect presentation when the received integrated material file includes different numbers of integrated material videos, which is equivalent to providing different segmentation processing manners for the execution of the material file processing method in this embodiment.
Example four
Fig. 11 is a block diagram of a material file processing apparatus according to a fourth embodiment of the present invention, which is adapted to perform a merging process on material files for providing support for special effect display, where the apparatus can be implemented by software and/or hardware and can be generally integrated on a computer device. As shown in fig. 11, the apparatus includes: a file receiving module 41, a file integrating module 42 and a file storing module 43.
The file receiving module 41 may be configured to obtain a material file that constitutes a target special effect;
the file integration module 42 may be configured to generate an integrated material file corresponding to the target special effect according to the characteristics of each material file, where the integrated material file includes a configuration document description and at least one integrated material video;
the file storage module 43 may be configured to associate and store the formed integrated material file with the target special effect, so that a terminal having the target special effect requirement acquires the integrated material file.
The material file processing device provided by the fourth embodiment of the invention realizes the integration processing of the material files corresponding to the special effects, and the special effect processing of the user terminal side on the integrated material files effectively avoids the operation of synchronously decoding a plurality of required associated material files during special effect presentation, thereby reducing the requirement on the decoding performance of the user terminal during special effect presentation and improving the user experience of special effect presentation functions in application products.
EXAMPLE five
Fig. 12 is a block diagram of a material file processing apparatus according to a fifth embodiment of the present invention, which is adapted to perform a segmentation process on an obtained integrated material file associated with a target special effect and implement a target special effect presentation, where the apparatus may be implemented by software and/or hardware and is generally integrated on a terminal of a user. As shown in fig. 12, the apparatus includes: a file acquisition module 51 and a file splitting module 52.
The file acquisition module 51 is configured to receive an integrated material file corresponding to a target special effect to be started, and acquire a configuration document description and all integrated material videos included in the integrated material file, where the integrated material file is formed according to the fourth apparatus of the embodiment and is fed back by a server;
and the file segmentation module 52 is configured to segment each integrated video frame in each integrated material video based on the description of the configuration document, and perform special effect processing on the target selected by the user based on each material video frame obtained by the segmentation in real time after each integrated video frame is segmented, so as to present the special effect video frame formed after the processing on the terminal interface in real time.
The material file processing device provided by the fifth embodiment of the invention specifically uses the user side terminal as an execution main body, so that the material file suitable for the self performance capability range can be obtained when the terminal performs special effect presentation, thereby effectively avoiding the operation of synchronously decoding a plurality of required material files when the material file performs special effect processing, and better improving the application range of a special effect presentation function in practical application.
Example six
Fig. 13 is a schematic diagram of a hardware structure of a computer device according to a sixth embodiment of the present invention, specifically, the computer device includes: a processor and a storage device. At least one instruction is stored in the storage device, and the instruction is executed by the processor, so that the computer equipment executes the material file processing method according to the first embodiment or the second embodiment of the method.
Referring to fig. 13, the computer device may specifically include: a processor 60, a storage device 61, a display 62, an input device 63, an output device 64, and a communication device 65. The number of the processors 60 in the computer device may be one or more, and one processor 60 is taken as an example in fig. 13. The number of the storage devices 61 in the computer apparatus may be one or more, and one storage device 61 is taken as an example in fig. 13. The processor 60, the storage means 61, the display 62, the input means 63, the output means 64 and the communication means 65 of the computer apparatus may be connected by a bus or other means, as exemplified by the bus connection in fig. 13.
The storage device 61 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the embodiments of the present invention (for example, the file receiving module 41, the file integrating module 42, and the file storing module 43 in the material file processing device provided in the fourth embodiment or the file acquiring module 51 and the file dividing module 52 in the material file processing device provided in the fifth embodiment). The storage device 61 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating device, an application program required for at least one function; the storage data area may store data created according to use of the computer device, and the like. Further, the storage device 61 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 61 may further include memory located remotely from the processor 60, which may be connected to a computer device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
In general, the display screen 62 is used for displaying data according to instructions from the processor 60, and is also used for receiving touch operations applied to the display screen 62 and sending corresponding signals to the processor 60 or other devices. Optionally, when the display screen 62 is an infrared screen, the display screen further includes an infrared touch frame, and the infrared touch frame is disposed around the display screen 62, and may also be configured to receive an infrared signal and send the infrared signal to the processor 60 or other computer devices.
Communication means 65 for establishing a communication connection with other computer devices, which may be wired communication means and/or wireless communication means.
The input means 63 may be used for receiving input numeric or character information and generating key signal inputs related to user settings and function control of the computer device, and may be a camera for acquiring images and a sound pickup device for acquiring audio in video data. The output device 64 may include a video device such as a display screen and an audio device such as a speaker. It should be noted that the specific composition of the input device 63 and the output device 64 can be set according to actual conditions.
The processor 60 executes various functional applications of the computer device and data processing, i.e., implements the above-described material file processing method, by executing software programs, instructions, and modules stored in the storage device 61.
Specifically, in the embodiment, when the processor 60 executes one or more programs stored in the storage device 61, the following operations are specifically implemented: acquiring a material file forming a target special effect; generating an integrated material file corresponding to the target special effect according to the characteristics of each material file, wherein the integrated material file comprises a configuration document description and at least one integrated material video; storing the formed integration material file and the target special effect in a correlation mode, so that a terminal with the target special effect requirement can obtain the integration material file;
alternatively, the following operations may be implemented: receiving an integrated material file corresponding to a target special effect to be started, and acquiring a configuration document description and all integrated material videos included in the integrated material file, wherein the integrated material file is formed according to the method of the first embodiment or the second embodiment and is fed back through a server; and dividing each integrated video frame in each integrated material video based on the description of the configuration document, and after each integrated video frame is divided, carrying out special effect processing on the target selected by the user based on each material video frame obtained by division in real time so as to display the special effect video frame formed after processing on a terminal interface in real time.
EXAMPLE seven
An embodiment of the present invention further provides a computer-readable storage medium, where when a program in the storage medium is executed by a processor of a computer device, the computer device is enabled to execute the material file processing method according to the above embodiment. Illustratively, the material file processing method according to the above embodiment includes: acquiring a material file forming a target special effect; generating an integrated material file corresponding to the target special effect according to the characteristics of each material file, wherein the integrated material file comprises a configuration document description and at least one integrated material video; and storing the formed integration material file and the target special effect in a correlation mode, so that a terminal with the target special effect requirement can acquire the integration material file.
Or receiving an integrated material file corresponding to a target special effect to be started, and acquiring a configuration document description and all integrated material videos included in the integrated material file, wherein the integrated material file is formed according to the method of the first embodiment or the second embodiment and fed back through a server; and dividing each integrated video frame in each integrated material video based on the description of the configuration document, and after each integrated video frame is divided, carrying out special effect processing on the target selected by the user based on each material video frame obtained by division in real time so as to display the special effect video frame formed after processing on a terminal interface in real time.
It should be noted that, as for the embodiments of the apparatus, the computer device, and the storage medium, since they are basically similar to the embodiments of the method, the description is relatively simple, and in the relevant places, reference may be made to the partial description of the embodiments of the method.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, and the computer software product may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to enable a computer device (which may be a robot, a personal computer, a server, or a network device) to execute the material file processing method according to any embodiment of the present invention.
It should be noted that, in the above material file processing apparatus, each unit and each module included in the material file processing apparatus are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by suitable instruction execution devices. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It is to be noted that the foregoing description is only exemplary of the invention and that the principles of the technology may be employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (15)

1. A method for processing a material file, comprising:
acquiring a material file forming a target special effect;
generating an integrated material file corresponding to the target special effect according to the characteristics of each material file, wherein the integrated material file comprises a configuration document description and at least one integrated material video; wherein the configuration document description is used for guiding the division of the integrated material file;
storing the formed integration material file and the target special effect in a correlation mode, so that a terminal with the target special effect requirement can obtain the integration material file;
the method comprises the steps that a terminal receives an integrated material file corresponding to a target special effect to be started, and configuration document description and all integrated material videos included in the integrated material file are obtained;
and dividing each integrated video frame in each integrated material video based on the description of the configuration document, and after each integrated video frame is divided, carrying out special effect processing on the target selected by the user based on each material video frame obtained by division in real time so as to display the special effect video frame formed after processing on a terminal interface in real time.
2. The method of claim 1, wherein said integrating each of said material files according to their characteristics to form an integrated material file corresponding to said target effect comprises:
selecting a current video frame to be integrated from a corresponding material file according to the acquired special effect description information of the target special effect;
determining an integration arrangement mode that the aspect ratio of the video with the set number meets the set conditions according to the resolution of the material file to which each current video frame to be integrated belongs;
integrating each current video frame to be integrated based on each integration arrangement mode to obtain the set number of integrated video frames and corresponding integration information;
and returning the determination operation of the current video frame to be integrated until all material video frames in each material file are selected, and forming an integrated material file based on all the obtained integrated video frames and corresponding integrated information.
3. The method according to claim 2, wherein the selecting a current video frame to be integrated from a corresponding material file according to the obtained special effect description information of the target special effect comprises:
analyzing the special effect description information, and determining material types included in each special effect video frame in the special effect video displayed when the target special effect is presented;
taking the special effect video frame corresponding to the determined current frame serial number as a current special effect video frame, wherein the first current frame serial number is the initial frame serial number of the special effect video displayed when the target special effect is presented;
determining target material files corresponding to material types included in the current special-effect video frame, and selecting a material video frame which accords with a current frame serial number from each target material file as a current video frame to be integrated;
and determining the next frame sequence number of the current frame sequence number as a new current frame sequence number.
4. The method according to claim 2, wherein the determining, according to the resolution of the material file to which each of the current video frames to be integrated belongs, an integration arrangement mode in which a set number of video aspect ratios satisfy a set condition includes:
dividing each current video frame to be integrated according to a preset division rule to form the set number of packets to be integrated;
and determining an integration arrangement mode that the aspect ratio of the videos with the set number meets the set conditions according to the video frame resolution of the current video frame to be integrated in the formed packet to be integrated.
5. The method of claim 4, wherein the integrating the current video frames to be integrated based on the integration arrangement modes to obtain the set number of integrated video frames and corresponding integration information comprises:
integrating the current video frames to be integrated in the corresponding packets to be integrated according to the determined integration arrangement mode to form integrated video frames corresponding to the packets to be integrated;
obtaining the position information and the material type of each current video frame to be integrated in the formed integrated video frame in the corresponding grouping to be integrated;
and correspondingly forming integration information by combining the frame serial numbers of the corresponding integration video frames based on the position information and the material types of the current video frames to be integrated in the packets to be integrated.
6. The method of claim 5, wherein forming an integrated material file based on the obtained all integrated video frames and corresponding integration information comprises:
forming corresponding integrated material videos based on the integrated video frames corresponding to the to-be-integrated groups, and sequentially recording the integrated information corresponding to the integrated video frames in a preset configuration document description;
and combining the formed integrated material video and the configuration document description to form an integrated material file with the target special effect.
7. The method according to any one of claims 1 to 6, wherein storing the formed integrated material file in association with the target effect comprises:
storing the formed integrated material file and the target special effect in a local association manner; alternatively, the first and second electrodes may be,
and uploading the formed integrated material file and the target special effect to a server for associated storage.
8. The method of claim 7, further comprising:
if the associated storage is local associated storage, when the user terminal is determined to have the starting requirement of the target special effect, forwarding the target integration material file selected corresponding to the target special effect to the user terminal through the server;
and if the association storage is uploaded to a server association storage, feeding back a target integration material file selected corresponding to the target special effect to the user terminal by the server when the user terminal is determined to have the starting requirement of the target special effect.
9. The method of claim 8, wherein the step of selecting the target special effect corresponding target integration material file comprises:
determining the file number of all integrated material files stored in association with the target special effect;
if the number of the files is 1, directly determining a corresponding target integration material file from the integration material files which are stored in association with the target special effect;
and if the number of the files is more than 1, selecting one integration material file matched with the performance of the user terminal from all the integration material files stored in a relevant mode as a corresponding target integration material file.
10. The method according to claim 1, wherein when only one integrated material video is included in the integrated material file, the integrated material video is inscribed as a first integrated material video, and the profile description is a first profile description;
the method for segmenting each integrated video frame in each integrated material video based on the description of the configuration document and performing special effect processing on a target selected by a user based on each segmented material video frame in real time after segmenting each integrated video frame comprises the following steps:
acquiring a first integrated video frame corresponding to the determined current frame serial number from the first integrated material video as a current video frame to be segmented, wherein the current frame serial number is the initial frame serial number of the first integrated material video;
acquiring first integration information corresponding to the current frame sequence number from the first configuration document description;
dividing first material video frames of all material types from the current video frame to be divided based on the first integration information;
carrying out special effect processing on the target selected by the user according to each first material video frame;
and determining the next frame sequence number of the current frame sequence number as a new current frame sequence number, and returning to the determination operation of the current video frame to be segmented until all the first integrated video frames in the first integrated material video are selected.
11. The method according to claim 10, wherein when at least two integrated material videos are included in the integrated material file, each of the integrated material videos is registered as a second integrated material video, and the profile description is registered as a second profile description;
the method for segmenting each integrated video frame in each integrated material video based on the description of the configuration document and performing special effect processing on a target selected by a user based on each segmented material video frame in real time after segmenting each integrated video frame comprises the following steps:
acquiring second integrated video frames corresponding to the determined current frame serial numbers from the second integrated material videos, and taking the second integrated video frames as current video frames to be segmented;
acquiring second integration information corresponding to each current video frame to be segmented under the current frame sequence number from the second configuration document description;
respectively segmenting second material video frames of the material types from the corresponding current video frames to be segmented based on the second integration information;
carrying out special effect processing on the target selected by the user according to each second pixel video frame;
and determining the next frame sequence number of the current frame sequence number as a new current frame sequence number, and returning to the determination operation of the current video frame to be segmented until all the second integrated video frames in each second integrated material video are selected.
12. The method according to claim 11, wherein the first integrated information includes position information of each material video frame integrated in the first integrated video frame and the material type;
the second integration information respectively comprises position information of material video frames integrated in the second integration video frames and the types of the materials.
13. A material file processing apparatus characterized by comprising:
the file receiving module is used for acquiring a material file forming the target special effect;
the file integration module is used for generating an integrated material file corresponding to the target special effect according to the characteristics of each material file, and the integrated material file comprises a configuration document description and at least one integrated material video; wherein the configuration document description is used for guiding the division of the integrated material file;
the file storage module is used for storing the formed integrated material file and the target special effect in a correlation mode so that a terminal with the target special effect requirement can obtain the integrated material file;
the terminal comprises a file acquisition module, a display module and a display module, wherein the file acquisition module is used for receiving an integrated material file corresponding to a target special effect to be started and acquiring a configuration document description and all integrated material videos contained in the integrated material file;
the terminal comprises a file segmentation module used for segmenting each integrated video frame in each integrated material video based on the description of the configuration document, and after each integrated video frame is segmented, performing special effect processing on a target selected by a user based on each material video frame obtained by segmentation in real time so as to display the processed special effect video frame on a terminal interface in real time.
14. A computer device, comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs are executed by the one or more processors, so that the one or more processors implement the material file processing method according to any one of claims 1 to 12.
15. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the material file processing method according to any one of claims 1 to 12.
CN202010576032.1A 2020-06-22 2020-06-22 Material file processing method and device, computer equipment and storage medium Active CN111726545B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010576032.1A CN111726545B (en) 2020-06-22 2020-06-22 Material file processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010576032.1A CN111726545B (en) 2020-06-22 2020-06-22 Material file processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111726545A CN111726545A (en) 2020-09-29
CN111726545B true CN111726545B (en) 2022-08-16

Family

ID=72570002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010576032.1A Active CN111726545B (en) 2020-06-22 2020-06-22 Material file processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111726545B (en)

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2678280C (en) * 2008-09-09 2017-03-21 Best Film Service Inc. Special effects screen
JP5550446B2 (en) * 2010-05-20 2014-07-16 株式会社東芝 Electronic apparatus and moving image generation method
CN106294666A (en) * 2016-08-04 2017-01-04 上海汽笛生网络科技有限公司 A kind of method realizing text visualization Dynamic Display
CN107402985B (en) * 2017-07-14 2021-03-02 广州爱拍网络科技有限公司 Video special effect output control method and device and computer readable storage medium
CN108259781B (en) * 2017-12-27 2021-01-26 努比亚技术有限公司 Video synthesis method, terminal and computer-readable storage medium
CN110012352B (en) * 2019-04-17 2020-07-24 广州华多网络科技有限公司 Image special effect processing method and device and video live broadcast terminal
CN110445992A (en) * 2019-08-16 2019-11-12 深圳特蓝图科技有限公司 A kind of video clipping synthetic method based on XML
CN111193876B (en) * 2020-01-08 2021-09-07 腾讯科技(深圳)有限公司 Method and device for adding special effect in video
CN111290751B (en) * 2020-02-26 2023-05-23 广州市百果园信息技术有限公司 Special effect generation method, device, system, equipment and storage medium

Also Published As

Publication number Publication date
CN111726545A (en) 2020-09-29

Similar Documents

Publication Publication Date Title
EP3562163B1 (en) Audio-video synthesis method and system
CN106098056B (en) Voice news processing method, news server and system
CN104461474A (en) Mobile terminal and screen-shooting method and device therefor
JP7038226B2 (en) Video processing methods, devices, terminals and media
CN110674624B (en) Method and system for editing graphics context
CN106804003B (en) Video editing method and device based on ffmpeg
CN109683892B (en) Page display method and device, computer equipment and storage medium
CN112181353B (en) Audio playing method and device, electronic equipment and storage medium
US11863846B2 (en) Multimedia data publishing method and apparatus, and device and medium
CN113938699B (en) Method for quickly establishing live broadcast based on webpage
CN111367447A (en) Information display method and device, electronic equipment and computer readable storage medium
CN114816308B (en) Information partition display method and related equipment
CN113055709A (en) Video distribution method, device, equipment, storage medium and program product
JP7471510B2 (en) Method, device, equipment and storage medium for picture to video conversion - Patents.com
US20240119970A1 (en) Method and apparatus for multimedia resource clipping scenario, device and storage medium
CN111726545B (en) Material file processing method and device, computer equipment and storage medium
CN113282548A (en) File saving method and device, electronic equipment and storage medium
CN112201264A (en) Audio processing method and device, electronic equipment, server and storage medium
CN110446118B (en) Video resource preprocessing method and device and video resource downloading method and device
JP2005136566A (en) Apparatus and method for converting moving picture, moving picture distribution apparatus, mail repeating device and program
CN112016280B (en) File editing method and device and computer readable medium
CN110365962B (en) Color gamut conversion processing method and device and electronic equipment
CN117319736A (en) Video processing method, device, electronic equipment and storage medium
CN116847147A (en) Special effect video determining method and device, electronic equipment and storage medium
CN114428660A (en) Page processing method, device, 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