Method and device for processing multimedia file

文档序号:1628116 发布日期:2020-01-14 浏览:18次 中文

阅读说明:本技术 一种多媒体文件处理的方法及装置 (Method and device for processing multimedia file ) 是由 徐宗 于 2019-09-26 设计创作,主要内容包括:本发明公开了一种多媒体文件处理的方法及装置,其中方法包括:获取第一多媒体文件的第一文件信息;基于所述第一文件信息,匹配第二多媒体文件;根据所述第二多媒体文件的第二文件信息,确定所述第一多媒体文件和第二多媒体文件的输出方式。本发明实施例通过根据第一多媒体文件的第一文件信息来直接匹配相应的第二多媒体文件,最后再将第一多媒体文件和第二多媒体文件按照预定的方式输出,使得制作包含图片和音乐的多媒体文件的操作更加简单,并且能满足用户的个性化要求。(The invention discloses a method and a device for processing a multimedia file, wherein the method comprises the following steps: acquiring first file information of a first multimedia file; matching a second multimedia file based on the first file information; and determining the output modes of the first multimedia file and the second multimedia file according to the second file information of the second multimedia file. According to the embodiment of the invention, the corresponding second multimedia file is directly matched according to the first file information of the first multimedia file, and finally the first multimedia file and the second multimedia file are output according to the preset mode, so that the operation of manufacturing the multimedia file containing the picture and the music is simpler, and the personalized requirements of the user can be met.)

1. A method of multimedia file processing, comprising:

acquiring first file information of a first multimedia file;

matching a second multimedia file based on the first file information;

and determining the output modes of the first multimedia file and the second multimedia file according to the second file information of the second multimedia file.

2. The method of claim 1, wherein the first multimedia file comprises a set of target images, the set of target images including at least one target image;

the first file information of the first multimedia file comprises the category attribute of the target image group;

the second multimedia file comprises a music file;

the second file information includes rhythm point information of music.

3. The method of claim 2, wherein the obtaining the first file information of the first multimedia file specifically comprises:

identifying each target image in the target image group, and determining content information in each target image;

determining the attribute of each target image according to the content information in each target image;

and determining the category attribute of the target image group according to the attribute of each target image.

4. The method of claim 1, wherein the method further comprises:

defining a plurality of first file information of a first multimedia file;

acquiring a plurality of second multimedia files;

grouping the second multimedia files according to the third file information of the second multimedia files to obtain a plurality of second multimedia file groups;

and associating each second multimedia file group with each first file information of the first multimedia files respectively to construct a second multimedia file library.

5. The method of claim 4, wherein the third file information includes music attribute information.

6. The method of claim 5, wherein the matching a second multimedia file based on the first file information specifically comprises:

searching a second multimedia file group corresponding to the category attribute from the second multimedia file library according to the category attribute of the target image group;

and selecting a music file from the second multimedia file group as the target music for matching.

7. The method of claim 1, wherein the method further comprises:

defining a plurality of first file information of a first multimedia file;

obtaining a plurality of special effects;

grouping the special effects according to the attributes of the special effects to obtain a plurality of special effect groups;

and respectively associating each special effect group with each first file information to construct a special effect library.

8. The method of claim 7, wherein the method further comprises:

searching a special effect group corresponding to the first file information from the special effect library according to the first file information of the first multimedia file;

selecting a special effect from the group of special effects as the target special effect to match the first multimedia file with the target special effect.

9. The method of claim 2, wherein the determining the output mode of the first multimedia file and the second multimedia file according to the second file information of the second multimedia file specifically comprises:

acquiring rhythm point information of a music file;

according to the rhythm point information, corresponding each target image in the target image group and each rhythm point to synthesize a third multimedia file;

or comprises the following steps:

acquiring rhythm point information of a music file;

and associating each target image in the target image group with each rhythm point according to the rhythm point information so as to switch the current image into the target image associated with each rhythm point when the music file is played to each rhythm point.

10. An apparatus for multimedia file processing, comprising:

the acquisition module is used for acquiring first file information of a first multimedia file;

the matching module is used for matching a second multimedia file based on the first file information;

and the determining module is used for determining the output modes of the first multimedia file and the second multimedia file according to the second file information of the second multimedia file.

Technical Field

The present invention relates to the field of multimedia file processing technologies, and in particular, to a method and an apparatus for processing a multimedia file.

Background

Nowadays, with the popularization of intelligent equipment, people can take pictures and record videos at any time and any place to record life. And then music videos are made according to their own thinking.

However, in the existing music video production process, one method is as follows: the user needs to select favorite music according to the style of the photos or videos, and then switches the next photo or video at a proper time according to the rhythm of the music, so that the video which the user feels cool is generated finally. However, in this method, since the user selects music and switches the next photo or video at a proper time according to the rhythm of the music, the operation difficulty is high for the general user, and only people with certain experience in video editing can make a video with good effect. The other method is as follows: and (4) directly generating a stuck point video according to a template (comprising a switching special effect and music) in the system. Although the method is simple to operate, the music cannot be customized due to the small number of templates, so that the personalized requirements of users cannot be met.

Disclosure of Invention

The embodiment of the invention aims to provide a music video generation method and a music video generation device, which are used for solving the problems of high operation difficulty and insufficient individuation in the prior art for manufacturing a multimedia file containing pictures and music.

In order to solve the technical problem, the embodiment of the application adopts the following technical scheme: a multimedia file processing method, comprising:

acquiring first file information of a first multimedia file;

matching a second multimedia file based on the first file information;

and determining the output modes of the first multimedia file and the second multimedia file according to the second file information of the second multimedia file.

Optionally, the first multimedia file includes a target image group, and the target image group includes at least one target image;

the first file information of the first multimedia file comprises the category attribute of the target image group;

the second multimedia file comprises a music file;

the second file information includes rhythm point information of music.

Optionally, the obtaining of the first file information of the first multimedia file specifically includes:

identifying each target image in the target image group, and determining content information in each target image;

determining the attribute of each target image according to the content information in each target image;

and determining the category attribute of the target image group according to the attribute of each target image.

Optionally, the method further includes:

defining a plurality of first file information of a first multimedia file;

acquiring a plurality of second multimedia files;

grouping the second multimedia files according to the third file information of the second multimedia files to obtain a plurality of second multimedia file groups;

and associating each second multimedia file group with each first file information of the first multimedia files respectively to construct a second multimedia file library.

Optionally, the third file information includes music attribute information.

Optionally, the matching a second multimedia file based on the first file information specifically includes:

searching a second multimedia file group corresponding to the category attribute from the second multimedia file library according to the category attribute of the target image group;

and selecting a music file from the second multimedia file group as the target music for matching.

Optionally, the method further includes:

defining a plurality of first file information of a first multimedia file;

obtaining a plurality of special effects;

grouping the special effects according to the attributes of the special effects to obtain a plurality of special effect groups;

and respectively associating each special effect group with each first file information to construct a special effect library.

Optionally, the method further includes:

searching a special effect group corresponding to the first file information from the special effect library according to the first file information of the first multimedia file;

selecting a special effect from the group of special effects as the target special effect to match the first multimedia file with the target special effect.

Optionally, the determining, according to the second file information of the second multimedia file, an output mode of the first multimedia file and the second multimedia file specifically includes:

acquiring rhythm point information of a music file;

according to the rhythm point information, corresponding each target image in the target image group and each rhythm point to synthesize a third multimedia file;

or comprises the following steps:

acquiring rhythm point information of a music file;

and associating each target image in the target image group with each rhythm point according to the rhythm point information so as to switch the current image into the target image associated with each rhythm point when the music file is played to each rhythm point.

In order to solve the foregoing technical problem, an embodiment of the present invention provides an apparatus for processing a multimedia file, including:

the acquisition module is used for acquiring first file information of a first multimedia file;

the matching module is used for matching a second multimedia file based on the first file information;

and the determining module is used for determining the output modes of the first multimedia file and the second multimedia file according to the second file information of the second multimedia file.

The embodiment of the invention has the beneficial effects that: the corresponding second multimedia file is matched according to the first file information of the first multimedia file, and finally the first multimedia file and the second multimedia file are output according to a preset mode, so that the operation of manufacturing the multimedia file containing the picture and the music is simpler, and the personalized requirements of the user can be met.

Drawings

FIG. 1 is a flow chart of a method of multimedia file processing in an embodiment of the present invention;

FIG. 2 is a flow chart of a method of multimedia file processing in another embodiment of the present invention;

FIG. 3 is a flow chart of a method of multimedia file processing in yet another embodiment of the present invention;

fig. 4 is a block diagram of an apparatus for processing a multimedia file according to an embodiment of the present invention.

Detailed Description

Various aspects and features of the present application are described herein with reference to the drawings.

It will be understood that various modifications may be made to the embodiments of the present application. Accordingly, the foregoing description should not be construed as limiting, but merely as exemplifications of embodiments. Those skilled in the art will envision other modifications within the scope and spirit of the application.

The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and, together with a general description of the application given above and the detailed description of the embodiments given below, serve to explain the principles of the application.

These and other characteristics of the present application will become apparent from the following description of preferred forms of embodiment, given as non-limiting examples, with reference to the attached drawings.

It should also be understood that, although the present application has been described with reference to some specific examples, a person of skill in the art shall certainly be able to achieve many other equivalent forms of application, having the characteristics as set forth in the claims and hence all coming within the field of protection defined thereby.

The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the application, which can be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application of unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.

The specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the application.

The embodiment of the invention provides a method for processing a multimedia file, which comprises the following steps: acquiring first file information of a first multimedia file; matching a second multimedia file based on the first file information; and determining the output modes of the first multimedia file and the second multimedia file according to the second file information of the second multimedia file. According to the embodiment of the invention, the corresponding second multimedia file is directly matched according to the first file information of the first multimedia file, and finally the first multimedia file and the second multimedia file are output according to the preset mode, so that the operation of manufacturing the multimedia file containing the picture and the music is simpler, and the personalized requirements of the user can be met.

The embodiment of the invention provides a method for processing a multimedia file, which comprises the following steps as shown in figure 1:

step S101, acquiring first file information of a first multimedia file;

in this step, the first multimedia file comprises a target image group, and the target image group comprises at least one target image. The target image group may specifically be composed of one or more of a picture (photograph) and a video frame of a video. The first file information includes the category attribute of the target image group, and may of course include the attribute of the picture in the image group and the attribute of the video.

Step S102, matching a second multimedia file based on the first file information;

the second multimedia in this step refers to a multimedia file of a different type from the first multimedia file, and the second multimedia file may be a music file, which may include one piece of music or multiple pieces of music.

Step S103, determining the output mode of the first multimedia file and the second multimedia file according to the second file information of the second multimedia file.

In this step, the second file information includes rhythm point (drum point) information of music. In this step, after matching the corresponding second multimedia file for the first multimedia file, the first multimedia music and the second multimedia file can be synchronously broadcasted according to the music rhythm point information through two broadcasting channels respectively. The first multimedia file and the second multimedia file can be compressed into one file according to the music rhythm point to be played.

In the embodiment of the invention, the corresponding music is directly recommended for the image group according to the attribute of the image group, and then the image combined music is simultaneously output or the image combined music is compressed and synthesized into a file to be output, so that the music video is obtained, the operation is simple, the effect is various, and the personalized requirements of users can be met.

Another embodiment of the present invention provides a method for processing a multimedia file, as shown in fig. 2, including the following steps:

step S201, defining a plurality of first file information of a first multimedia file;

in this step, the first multimedia file includes an image group; the first file information includes all category attributes that the image group can have. The category attribute comprises one or more of the following: landscape (travel), people, pets, delicatessens, sports, parties.

Step S202, a plurality of second multimedia files are obtained;

in this step, the second multimedia file includes a music file.

Step S203, grouping each second multimedia file according to the third file information of each second multimedia file to obtain a plurality of second multimedia file groups;

in this step, the third file information includes music attribute information. That is, after acquiring a plurality of music files, the step is to group the music files according to the music attributes to obtain a plurality of music file groups. The music attribute information comprises one or more of the following: relaxing, calming, inspiring, enthusiasm, sadness, nostalgia, and pleasure (happy).

Step S204, associating each second multimedia file group with each first file information of the first multimedia files respectively to construct a second multimedia file library;

after obtaining a plurality of music file groups, this step is to associate each music group with each category attribute of the image group defined in step S201, so as to construct a music file library.

In particular, for example, the category attribute of the group of images for travel is associated with the music attribute of pleasure. For example, a category attribute of people may be associated with a musical attribute of nostalgic. Of course, one category attribute may be associated with a plurality of music attributes according to actual needs.

Step S205, acquiring a target image group, identifying each target image in the target image group, and determining content information in each target image;

wherein the content information is scenery, people, animals, etc. contained in the picture

Step S206, determining the attribute of each target image according to the content information in each target image;

in this step, the attributes of the target image include one or more of the following: landscape (travel), people, pets, delicatessens, sports, parties. When determining the attribute of the target image, for example, the content information in the target image is landscape and people, the attribute of the target image may be determined to be travel. If the content information includes a person and a food, the attribute of the target image may be determined to be a party. The setting can be specifically performed according to actual conditions.

Step S207, determining the category attribute of the target image group according to the attribute of each target image.

The category attribute of the target image group in this step includes one or more of the following: landscape, figure, pet, gourmet, sports, travel, party. In this step, when determining the category attribute of the target image group, the category attribute may be determined according to the proportion of the attributes of each target image, for example, 5 target images are provided, wherein the attributes of 3 target images are scenery, wherein the attribute of 1 target image is a person, and the attribute of another target image is gourmet, and then the category attribute of the target image group may be determined as scenery (travel).

Step S208, searching a second multimedia file group corresponding to the category attribute from the second multimedia file library according to the category attribute of the target image group;

for example, when it is determined that the category attribute of the target image group is landscape (travel), the step may determine the music file group associated with the category attribute of the target image group by searching the music file library (second multimedia file library), that is, find the music file group associated with landscape (travel).

Step S209 selects a music file from the second multimedia file group as the target music for matching.

In the step, one or more music files can be randomly selected from the determined music file group to serve as target music for matching, or one or more music files can be selected according to the sequence numbers of the music files in the music file group and the sequence numbers from small to large or from large to small, if a plurality of target music files exist, a user can screen according to actual needs and then determine the final target music file.

Step S210, determining an output mode of the first multimedia file and the second multimedia file according to the second file information of the second multimedia file.

In this step, the second file information includes rhythm point (drum point) information of the music file. The number of the rhythm points is not less than the number of the target images in the target image group.

Wherein, determining the output mode of the first multimedia file and the second multimedia file may be: according to the rhythm point (drum point) information, corresponding each target image and each rhythm point in the target image group to synthesize a third multimedia file; i.e., a multimedia file with music and images is synthesized and then outputted/played in the form of a third multimedia file. It can also be: and associating each target image in the target image group with each rhythm point according to the rhythm point information so as to switch the current image into the target image associated with each rhythm point when the music file is played to each rhythm point. Namely, the music file and the target image are respectively played through two playing channels, and the target image is switched at each rhythm point of the music file.

In the embodiment of the invention, the corresponding music is directly recommended for the target image group according to the category attribute of the target image group, and then the target image combination music file is output/played according to the rhythm point and the time point of the identified music so as to generate the short video, so that the personalized requirements of users can be met, and the operation is simple.

Another embodiment of the present invention provides a method for processing a multimedia file, as shown in fig. 3, including the following steps:

step S301, defining a plurality of first file information of a first multimedia file;

in this step, the first multimedia file includes an image group; the first file information includes all category attributes that the image group can have. The category attribute comprises one or more of the following: landscape (travel), people, pets, delicatessens, sports, parties.

Step S302, obtaining a plurality of special effects;

the special effect in this step is a form of playing the first multimedia file (each target image in the target image group). Such as switching the target image in a form of a rotation entry; switching the target image in a rotating exit form; or adding petals/raindrops/stars and the like to the target image.

Step S303, grouping the special effects according to the attributes of the special effects to obtain a plurality of special effect groups;

in this step, the attribute of the special effect includes one or more of the following: joy, sadness, belief, etc. For example, the attribute of a special effect of adding raindrops to a target image may be set to sadness, and the attribute of a special effect of adding petals to a target image may be set to cheerful.

Step S304, associating each special effect group with each first file information respectively to construct a special effect library.

After obtaining a plurality of special effect groups, in this step, each special effect group is associated with each category attribute of the image group defined in step S301, so as to construct a special effect library.

Specifically, for example, the category attribute of the image group of travel is associated with the attribute of the special effect of cheerfulness. For example, a person category attribute may be associated with a belief effect attribute. Of course, it is also possible to associate a category attribute with attributes of multiple special effects according to actual needs.

Step S305, acquiring first file information of a first multimedia file, and searching a special effect group corresponding to the first file information from the special effect library according to the first file information of the first multimedia file;

in this step, a special effect group corresponding to the category attribute is searched from the special effect library according to the category attribute of the target image group. For example, when the category attribute of the target image group is determined to be landscape (travel), the step may determine the special effect group associated with the category attribute of the target image group by searching the special effect library, that is, finding the special effect group associated with landscape (travel).

Step S306, selecting a special effect from the special effect group as the target special effect to match the first multimedia file with the target special effect.

In this step, when matching a target special effect for a first multimedia file (target image group), one or more special effects may be selected from the determined special effect groups randomly as a target special effect for matching, so as to match the target special effect for each picture/video frame in the target image group; of course, one or more target special effects may also be selected according to the sequence number of each special effect in the special effect group, and according to the sequence number from small to large or from large to small, so as to match the target special effects with each picture/video frame in the target image group.

Step S307, matching a second multimedia file based on the first file information;

step S308, determining the output mode of the first multimedia file and the second multimedia file according to the second file information of the second multimedia file.

According to the embodiment of the invention, the corresponding special effects are directly matched from the special effect library according to the category attribute of the target image group, and the corresponding music is matched according to the category attribute of the target image group, so that the music video is simple and convenient to manufacture, has more styles and can meet the personalized requirements of users.

An embodiment of the present invention provides a device for processing a multimedia file, as shown in fig. 4, including:

the system comprises an acquisition module 1, a processing module and a processing module, wherein the acquisition module is used for acquiring first file information of a first multimedia file;

the matching module 2 is used for matching a second multimedia file based on the first file information;

and the determining module 3 is configured to determine an output mode of the first multimedia file and the second multimedia file according to the second file information of the second multimedia file.

Specifically, in this embodiment, the first multimedia file includes a target image group, and the target image group includes at least one target image;

the first file information of the first multimedia file comprises the category attribute of the target image group; the category attribute comprises one or more of the following: scenery (travel), figures, pets, gourmet food, sports, party

The second multimedia file comprises a music file;

the second file information includes rhythm point information of music.

Specifically, the obtaining module is specifically configured to: identifying each target image in the target image group, and determining content information in each target image; determining the attribute of each target image according to the content information in each target image; and determining the category attribute of the target image group according to the attribute of each target image.

In a specific embodiment process of this embodiment, the multimedia file processing apparatus further includes a first construction module, where the first construction module is configured to:

defining a plurality of first file information of a first multimedia file; acquiring a plurality of second multimedia files; grouping the second multimedia files according to the third file information of the second multimedia files to obtain a plurality of second multimedia file groups; and associating each second multimedia file group with each first file information of the first multimedia files respectively to construct a second multimedia file library.

Wherein the third file information includes music attribute information. The music attribute information comprises one or more of the following: relaxing, calming, inspiring, enthusiasm, sadness, nostalgia, and pleasure (happy).

In this embodiment, the matching module is specifically configured to: searching a second multimedia file group corresponding to the category attribute from the second multimedia file library according to the category attribute of the target image group; and selecting a music file from the second multimedia file group as the target music for matching.

In this embodiment, the matching module may randomly select one or more music files from the determined music file group as the target music for matching, or may select one or more music files according to the sequence numbers of the music files in the music file group, in the order from small to large or from large to small, if there are a plurality of target music files, the user may select the one or more music files according to actual needs and then determine the final target music file.

Preferably, the multimedia file processing apparatus of the embodiment further includes a second construction module, and the second construction module is configured to: defining a plurality of first file information of a first multimedia file; obtaining a plurality of special effects; grouping the special effects according to the attributes of the special effects to obtain a plurality of special effect groups; and respectively associating each special effect group with each first file information to construct a special effect library.

The multimedia file processing apparatus in this embodiment further includes an effect matching module, and after the second building module builds the obtained effect library, the effect matching module is configured to: searching a special effect group corresponding to the first file information from the special effect library according to the first file information of the first multimedia file; selecting a special effect from the group of special effects as the target special effect to match the first multimedia file with the target special effect. In a specific implementation process, when a first multimedia file (a target image group) is matched with a target special effect, one or more special effects can be selected from the determined special effect groups randomly to serve as the target special effect for matching, so that each picture/video frame in the target image group is matched with the target special effect; of course, one or more target special effects may also be selected according to the sequence number of each special effect in the special effect group, and according to the sequence number from small to large or from large to small, so as to match the target special effects with each picture/video frame in the target image group.

In a specific implementation process, the determining module is specifically configured to: acquiring rhythm point information of a music file; according to the rhythm point information, corresponding each target image in the target image group and each rhythm point to synthesize a third multimedia file;

or the determining module is configured to: acquiring rhythm point information of a music file; and associating each target image in the target image group with each rhythm point according to the rhythm point information so as to switch the current image into the target image associated with each rhythm point when the music file is played to each rhythm point.

According to the embodiment of the invention, the corresponding special effects are directly matched from the special effect library according to the category attribute of the target image group, and the corresponding music is matched according to the category attribute of the target image group, so that the music video is simple and convenient to manufacture, has more styles and can meet the personalized requirements of users.

The above embodiments are only exemplary embodiments of the present invention, and are not intended to limit the present invention, and the scope of the present invention is defined by the claims. Various modifications and equivalents may be made by those skilled in the art within the spirit and scope of the present invention, and such modifications and equivalents should also be considered as falling within the scope of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:资源信息搜索方法、装置、终端设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!