Multimedia file processing method and device
By dividing the multimedia file into fragments and selectively determining the fragments to generate target files, the problem of quality degradation during compression is solved, and the effect of saving storage space without reducing quality is achieved.
Patent Information
- Application Number
- CN202411212686.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-24
AI Technical Summary
When compressing multimedia files, the prior art usually leads to a decline in file quality, affecting the user experience, and it is difficult to save storage space without sacrificing quality.
The target multimedia file is generated by dividing the to-processed multimedia file into multiple segments and determining the segment that meets the target conditions based on the evaluation score or user configuration information, thereby reducing the file size without decreasing the file quality.
It realizes effective storage space saving without sacrificing the quality of multimedia files, simplifies the processing process, and provides personalized services to users.
Smart Images

Figure CN119182976A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of file processing, and specifically relates to a multimedia file processing method and device. Background Art
[0002] Currently, it is increasingly common for users to capture multimedia files such as audio and video through electronic devices such as mobile phones, and the captured multimedia files usually require a large amount of storage space on the electronic device. It is generally necessary to save storage space on the electronic device by reducing the size of the multimedia files.
[0003] In the related art, when multimedia files are compressed, the quality of the multimedia files may be poor. Taking video files as an example, the size of the video files can generally be reduced by transcoding and compressing the video files, thereby saving storage space. However, the resolution of the compressed video is poor, which affects the user's experience of watching the video. Summary of the invention
[0004] The embodiments of the present application provide a multimedia file processing method and device, which can solve the problem of poor quality of multimedia files caused by compressing multimedia files in the related art.
[0005] In a first aspect, an embodiment of the present application provides a method for processing multimedia files, the method comprising:
[0006] Get the multimedia files to be processed;
[0007] Dividing the to-be-processed multimedia file into N multimedia file segments, where N is an integer greater than 1;
[0008] Determining M multimedia file segments that meet a target condition from the N multimedia file segments, where M is an integer less than N;
[0009] Based on the M multimedia file segments, generating a target multimedia file;
[0010] The storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
[0011] In a second aspect, an embodiment of the present application provides a multimedia file processing device, the device comprising: an acquisition module, a segmentation module, a determination module and a generation module;
[0012] The acquisition module is used to acquire the multimedia file to be processed;
[0013] The segmentation module is used to segment the to-be-processed multimedia file into N multimedia file segments, where N is an integer greater than 1;
[0014] The determining module is used to determine M multimedia file segments that meet the target condition from the N multimedia file segments, where M is an integer less than N;
[0015] The generating module is used to generate a target multimedia file based on the M multimedia file segments;
[0016] The storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
[0017] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0018] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0019] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0020] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0021] In the embodiment of the present application, a multimedia file to be processed is obtained; the multimedia file to be processed is divided into N multimedia file segments, where N is an integer greater than 1; M multimedia file segments that meet the target condition are determined from the N multimedia file segments, where M is an integer less than N; a target multimedia file is generated based on the M multimedia file segments; wherein the storage space occupied by the target multimedia file is less than the storage space occupied by the multimedia file to be processed. In this way, the embodiment of the present application obtains multiple multimedia file segments by dividing the multimedia file to be processed, and a part of the multimedia file segments that meet the target condition are determined from the multiple multimedia file segments in a targeted manner to generate the target multimedia file, thereby saving storage space without sacrificing the quality of the part of the multimedia file segments that meet the target condition. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a schematic flow chart of a multimedia file processing method provided in an embodiment of the present application;
[0023] Figure 2 is a schematic flow chart of another multimedia file processing method provided in an embodiment of the present application;
[0024] Figure 3 is a schematic flow chart of another multimedia file processing method provided in an embodiment of the present application;
[0025] Figure 4 is a schematic flow chart of another multimedia file processing method provided in an embodiment of the present application;
[0026] Figure 5 is a schematic flow chart of another multimedia file processing method provided in an embodiment of the present application;
[0027] Figure 6 is a schematic flow chart of another multimedia file processing method provided in an embodiment of the present application;
[0028] Figure 7 is a schematic flow chart of another multimedia file processing method provided in an embodiment of the present application;
[0029] Figure 8-1 is a schematic flow chart of video processing in practical applications provided by an embodiment of the present application;
[0030] Figure 8-2 is a schematic diagram of an interface for displaying a video playback page provided in an embodiment of the present application;
[0031] Figure 8-3 is a schematic diagram of an interface for processing a video provided in an embodiment of the present application;
[0032] Fig. 9 is a schematic structural diagram of a multimedia file processing device provided in an embodiment of the present application;
[0033] Fig.10 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0034] Fig.11 It is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0035] Description of reference numerals:
[0036] 801 - thumbnail of the video clip; 802 - first mark; 803 - second mark. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0038] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0039] The multimedia file processing method provided by the embodiment of the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0040] Figure 1 It is a schematic flow chart of a multimedia file processing method provided in an embodiment of the present application.
[0041] like Figure 1 As shown, the multimedia file processing method provided in the embodiment of the present application may include:
[0042] Step 110: Obtain the multimedia file to be processed;
[0043] Step 120: dividing the multimedia file to be processed into N multimedia file segments, where N is an integer greater than 1;
[0044] Step 130: determining M multimedia file segments that meet a target condition from the N multimedia file segments, where M is an integer less than N;
[0045] Step 140: Generate a target multimedia file based on the M multimedia file segments;
[0046] The storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
[0047] In step 110, the multimedia files to be processed may be multimedia files shot, transmitted or stored by mobile terminals such as mobile phones and tablets. The multimedia files may include video files, audio files, etc. The embodiment of the present application does not impose specific restrictions on the source and type of the multimedia files to be processed.
[0048] In step 120, the multimedia file to be processed is divided into a plurality of multimedia file segments, wherein the duration of any two multimedia file segments may be the same or different, the scene types of any two multimedia file segments may be the same or different, and the subject behavior types in any two multimedia file segments may be the same or different.
[0049] For example, an embodiment of the present application can use a multimedia file fragment recognition algorithm to automatically analyze and identify evaluation index information of each multimedia file fragment among multiple multimedia file fragments, and use multiple evaluation index information to score each multimedia file fragment to obtain an evaluation score for each multimedia file fragment.
[0050] The evaluation score is proportional to the importance. The higher the evaluation score of the multimedia file segment is, the higher the importance of the multimedia file segment is.
[0051] In step 130, the M multimedia file segments that meet the target condition may be M multimedia file segments having evaluation scores greater than a preset threshold, or may be M multimedia file segments selected by a user, or may be M multimedia file segments belonging to the same scene type, or may be M multimedia file segments belonging to the same character subject, or may be M multimedia file segments with the same behavior type of different character subjects, and so on. The embodiment of the present application does not impose any specific limitation on the target condition.
[0052] Taking determining M multimedia file segments whose evaluation scores are greater than a preset threshold as an example, an embodiment of the present application can select a portion of multimedia file segments with higher evaluation scores from multiple multimedia file segments, for example, select M multimedia file segments whose evaluation scores are greater than a preset threshold from N multimedia file segments, where M is an integer less than N.
[0053] In step 140, a target multimedia file is generated based on the above-mentioned M multimedia file segments. Among the N multimedia file segments, in addition to selectively retaining M multimedia file segments, the remaining NM multimedia file segments may be compressed or discarded to reduce the size of the multimedia file, so that the storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
[0054] In which, taking the multimedia file as a video file as an example, the resolution of the M multimedia file segments in the target multimedia file is the same as the resolution of the M multimedia file segments in the multimedia file to be processed. In other words, during the multimedia file processing, the resolution of the M multimedia file segments in the target multimedia file is guaranteed to remain unchanged and be the same as the resolution of the original M multimedia file segments in the multimedia file to be processed.
[0055] For example, in actual applications, when the target multimedia file includes M multimedia file segments that meet the target condition, the resolution of the target multimedia file is the same as the resolution of the multimedia file to be processed. In other words, during the multimedia file processing, it is ensured that the resolution of the target multimedia file obtained after processing remains unchanged and is the same as the resolution of the original multimedia file to be processed.
[0056] It can be understood that the embodiment of the present application can construct a shorter but complete multimedia file story line based on the determined M multimedia file fragments, avoiding the loss of content details of all multimedia file fragments due to the overall reduction of resolution in the related art, and can effectively reduce the size of the multimedia file without sacrificing the clarity of the above-mentioned M multimedia file fragments, saving storage space for the multimedia file.
[0057] According to the multimedia file processing method provided by the embodiment of the present application, the multimedia file to be processed is obtained; the multimedia file to be processed is divided into N multimedia file segments, N is an integer greater than 1; M multimedia file segments that meet the target condition are determined from the N multimedia file segments, M is an integer less than N; based on the M multimedia file segments, a target multimedia file is generated; wherein the storage space occupied by the target multimedia file is less than the storage space occupied by the multimedia file to be processed. In this way, the embodiment of the present application obtains multiple multimedia file segments by dividing the multimedia file to be processed, and a part of the multimedia file segments that meet the target condition are determined from the multiple multimedia file segments in a targeted manner to generate the target multimedia file, thereby saving storage space without sacrificing the multimedia file quality of the part of the multimedia file segments that meet the target condition.
[0058] In practical applications, this application can adopt user interaction design, so that users can customize the processing of multimedia files according to their own needs without the need for professional editing software or technology, which not only simplifies the multimedia file processing process, but also provides users with highly personalized services.
[0059] For example, in order to provide personalized services for multimedia file processing, in a specific embodiment, in the above step 130, determining M multimedia file segments that meet the target conditions from N multimedia file segments may include: determining M multimedia file segments whose evaluation scores are greater than a preset threshold from the N multimedia file segments, wherein the preset threshold may be obtained based on configuration information input by the user.
[0060] Among them, the preset threshold can be determined by the user. For example, the preset threshold is obtained based on the configuration information input by the user. The larger the preset threshold obtained based on the configuration information input by the user, the higher the content importance of the M multimedia file fragments determined, and the smaller the number of the M multimedia file fragments; the smaller the preset threshold obtained based on the configuration information input by the user, the more content of the M multimedia file fragments determined, that is, the larger the number of the M multimedia file fragments.
[0061] In this way, the present application can adopt a user interaction design, and obtain a preset threshold based on the configuration information input by the user, so that the user can customize the processing of the multimedia files to be processed according to their own needs, and obtain M multimedia file fragments with evaluation scores greater than the preset threshold. There is no need to transcode and compress the entire multimedia file to be processed, nor is there a need to use professional editing software or technology. This not only simplifies the multimedia file processing process, but also provides users with highly personalized services.
[0062] In a specific embodiment, the configuration information input by the user may include mode selection information, which can be used to determine a target processing mode from a plurality of preset processing modes, wherein different preset processing modes correspond to different thresholds, and the number of determined multimedia file fragments (i.e., M) is also different, so that the user can comprehensively consider the two factors of storage space and the importance of multimedia file content, and selectively process the multimedia files to be processed, rather than having only one fixed processing mode.
[0063] For example, Figure 2 As shown, the multimedia file processing method provided in the embodiment of the present application may include:
[0064] Step 210: Obtain the multimedia file to be processed;
[0065] Step 220: dividing the multimedia file to be processed into N multimedia file segments, where N is an integer greater than 1;
[0066] Step 230: Obtaining mode selection information input by the user;
[0067] Step 240: determining a target processing mode from a plurality of preset processing modes based on the mode selection information; wherein different preset processing modes correspond to different thresholds, and the target processing mode corresponds to the preset threshold;
[0068] Step 250: Based on a preset threshold corresponding to the target processing mode, determine M multimedia file segments having evaluation scores greater than the preset threshold among the N multimedia file segments, where M is an integer less than N;
[0069] Step 260: Generate a target multimedia file based on the M multimedia file segments;
[0070] The storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
[0071] Among them, step 210 can refer to the specific content of step 110, step 220 can refer to the specific content of step 120, steps 230 to 250 can be sub-steps of step 130, and step 260 can refer to the specific content of step 140.
[0072] In step 230, the embodiment of the present application can pre-set multiple preset processing modes, one preset processing mode corresponds to a threshold of the evaluation score, and different preset processing modes correspond to different thresholds. The mode selection information input by the user can be used to determine a target processing mode from the multiple preset processing modes, and the target processing mode corresponds to the preset threshold.
[0073] In step 240, the target processing mode can be selected by the user from a plurality of preset processing modes after comprehensively considering two factors, storage space and importance of multimedia file content.
[0074] In step 250, based on the preset threshold corresponding to the target processing mode, M multimedia file segments with evaluation scores greater than the preset threshold are determined among the N multimedia file segments, so that the M multimedia file segments with evaluation scores greater than the preset threshold can save storage space and basically retain the multimedia file segments whose content is considered important by the customer.
[0075] In this way, since multiple preset processing modes are pre-set, the target processing mode can be directly selected from the multiple preset processing modes through the mode selection information input by the user, which makes it convenient for the user to selectively process the multimedia files to be processed after comprehensively considering the two factors of storage space and the importance of multimedia file content, thereby improving the flexibility of the multimedia file processing process.
[0076] For example, there are a first preset processing mode and a second preset processing mode among the plurality of preset processing modes, and a first preset threshold corresponding to the first preset processing mode is different from a second preset threshold corresponding to the second preset processing mode;
[0077] The number of multimedia file segments having evaluation scores greater than a first preset threshold is different from the number of multimedia file segments having evaluation scores greater than a second preset threshold.
[0078] Among them, when the first preset threshold is greater than the second preset threshold, the number of multimedia file fragments whose evaluation scores are greater than the first preset threshold determined by the first preset processing mode is less than the number of multimedia file fragments whose evaluation scores are greater than the second preset threshold determined by the second preset processing mode.
[0079] Conversely, when the first preset threshold is less than the second preset threshold, the number of multimedia file fragments whose evaluation scores are greater than the first preset threshold determined by the first preset processing mode is greater than the number of multimedia file fragments whose evaluation scores are greater than the second preset threshold determined by the second preset processing mode.
[0080] For example, the first preset threshold is 80 points, the second preset threshold is 60 points, the first preset threshold is greater than the second preset threshold, the first preset processing mode is used to determine multimedia file segments with evaluation scores greater than 80 points from N multimedia file segments, and the second preset processing mode is used to determine multimedia file segments with evaluation scores greater than 60 points from N multimedia file segments. In other words, the second preset processing mode is used to determine multimedia file segments with evaluation scores greater than 60 points and less than 80 points and multimedia file segments with evaluation scores greater than 80 points from N multimedia file segments. Obviously, in the case that there are multimedia file segments with evaluation scores greater than 60 points and less than 80 points among the N multimedia file segments, the number of multimedia file segments determined by the first preset processing mode is less than the number of multimedia file segments determined by the second preset processing mode.
[0081] In this way, since there are a first preset processing mode and a second preset processing mode among the multiple preset processing modes, the first preset threshold corresponding to the first preset processing mode is different from the second preset threshold corresponding to the second preset processing mode, and the number of multimedia file fragments determined by the first preset processing mode is also different from the number of multimedia file fragments determined by the second preset processing mode. The target processing mode can be directly selected from the first preset processing mode and the second preset processing mode through the mode selection information input by the user, which is convenient for the user to selectively process the multimedia files to be processed after comprehensively considering the two factors of storage space and the importance of multimedia file content, thereby improving the flexibility of the multimedia file processing process.
[0082] In another specific embodiment, if multiple preset processing modes are unable to meet the user's needs for saving storage space and retaining important content of multimedia files, in order to provide personalized services for multimedia file processing, the embodiment of the present application can also allow the user to customize the preset threshold. That is, the configuration information input by the user can include the preset threshold.
[0083] For example, Figure 3 As shown, the multimedia file processing method provided in the embodiment of the present application may include:
[0084] Step 310: Obtain the multimedia file to be processed;
[0085] Step 320: Segment the multimedia file to be processed into N multimedia file segments, where N is an integer greater than 1;
[0086] Step 330: Obtaining a preset threshold value input by the user;
[0087] Step 340: Based on the preset threshold input by the user, determine M multimedia file segments having evaluation scores greater than the preset threshold among the N multimedia file segments, where M is an integer less than N;
[0088] Step 350: Generate a target multimedia file based on the M multimedia file segments;
[0089] The storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
[0090] Among them, step 310 can refer to the specific content of step 110, step 320 can refer to the specific content of step 120, steps 330 to 340 can be sub-steps of step 130, and step 350 can refer to the specific content of step 140.
[0091] In step 330, the configuration information input by the user may include a preset threshold. For example, there are a first preset processing mode and a second preset processing mode in multiple preset processing modes, the first preset threshold corresponding to the first preset processing mode is 80 points, and the second preset threshold corresponding to the second preset processing mode is 60 points. If the user believes that both the first preset processing mode and the second preset processing mode are difficult to meet the needs, for example, the multimedia file segments with an evaluation score of more than 80 points determined by the first preset processing mode may omit some important content, and the multimedia file segments with an evaluation score of more than 60 points determined by the second preset processing mode may occupy too much storage space. In this case, the embodiment of the present application can obtain the preset threshold input by the user, for example, the preset threshold can be 70 points. The size of the preset threshold can be manually set by the user.
[0092] In step 340, based on a preset threshold value input by the user, such as 70 points, multimedia file segments with an evaluation score of 70 points or above are determined, which can not only retain multimedia file segments with important content, but also save storage space, thereby satisfying the user's demand for saving storage space and retaining important content of multimedia files.
[0093] In this way, in an application scenario where multiple preset processing modes are unable to meet the user's needs for saving storage space and retaining important content of multimedia files, the embodiment of the present application can determine multimedia file segments with evaluation scores greater than the preset threshold based on the preset threshold input by the user, thereby retaining multimedia file segments with important content and saving storage space, thereby meeting the user's needs for saving storage space and retaining important content of multimedia files, and providing users with highly personalized services during the multimedia file processing process.
[0094] In another specific embodiment, in order to improve the efficiency of multimedia file processing, the embodiment of the present application can automatically analyze and identify evaluation index information of each multimedia file fragment in multiple multimedia file fragments from the multimedia file to be processed, and use the evaluation index information to score each multimedia file fragment to obtain an evaluation score for each multimedia file fragment.
[0095] For example, Figure 4 As shown, the multimedia file processing method provided in the embodiment of the present application may include:
[0096] Step 410: Obtain the multimedia file to be processed;
[0097] Step 420: Segment the multimedia file to be processed into N multimedia file segments, where N is an integer greater than 1;
[0098] Step 430: obtaining evaluation index information of N multimedia file segments; wherein the evaluation index information is used to reflect the importance of the multimedia file segments;
[0099] Step 440: determining an evaluation score of each of the N multimedia file segments based on the evaluation index information of the N multimedia file segments;
[0100] Step 450: determining M multimedia file segments among the N multimedia file segments whose evaluation scores are greater than a preset threshold, where M is an integer less than N;
[0101] Step 460: Generate a target multimedia file based on the M multimedia file segments;
[0102] The storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
[0103] Among them, step 410 can refer to the specific content of step 110, step 420 can refer to the specific content of step 120, step 430 and step 440 can be executed before step 450, step 450 can refer to the specific content of step 130, and step 460 can refer to the specific content of step 140.
[0104] Among them, in step 420, the embodiment of the present application can use a preset duration (for example, 2 seconds) as a unit period to divide the multimedia file to be processed into N multimedia file segments, so that the duration of each multimedia file segment is the preset duration.
[0105] In step 430 and step 440, the embodiment of the present application can score each of the N multimedia file segments through a multimedia file segment identification algorithm to obtain an evaluation score for each multimedia file segment.
[0106] In step 430, based on the evaluation index information of each multimedia file segment, an evaluation score of each multimedia file segment is determined.
[0107] The evaluation index information is used to reflect the importance of the multimedia file segment.
[0108] In different scenarios, the evaluation index information (evaluation dimension) may be different. For example, the scenario type may include but is not limited to at least one of the following: daily life, food, anniversary, travel, sports, pets, night scene, etc., and this application does not make specific restrictions on this.
[0109] In different scene types of multimedia file segments, different evaluation index information may be used to reflect the importance of the multimedia file segments, wherein different evaluation index information corresponds to different importance levels.
[0110] For example, the first type of scene may be a scene that focuses on the moving subjects in the multimedia file image, such as anniversaries, outings, sports, pets, etc. In the first type of scene, the evaluation index information may include but is not limited to at least one of the following: changes in subject movements, changes in subject speed, subject expressions, subject content expressions, number of subjects, etc. This application does not limit the specific types of evaluation index information.
[0111] The subject refers to a dynamic person such as a human figure or an animal, and the subject content expression can be understood as the audio content expressed by the subject in the image.
[0112] For another example, the second type of scene may be a scene that focuses on the photography skills of the photographer of the multimedia file to be processed, such as daily life, food, night scene, etc. In the second type of scene, the evaluation index information may include but is not limited to at least one of the following: camera movement performance, special moments, photography technology effects (such as color richness), subject following, etc. This application does not limit the specific type of evaluation index information.
[0113] In step 440, an evaluation score of each multimedia file segment is determined based on the evaluation index information of each multimedia file segment. Different evaluation index information reflects different importance levels, and the evaluation score is proportional to the importance level. The higher the importance level of the multimedia file segment, the higher the evaluation score of the multimedia file segment.
[0114] In this way, the embodiment of the present application can automatically analyze and identify the evaluation index information of each multimedia file fragment in multiple multimedia file fragments from the multimedia file to be processed, and use the evaluation index information to score each multimedia file fragment to obtain an evaluation score for each multimedia file fragment, so as to facilitate subsequent processing of the multimedia file fragment according to the evaluation score of each multimedia file fragment, without the need for users to manually score each multimedia file fragment, thereby improving the efficiency of multimedia file processing.
[0115] In another specific embodiment, in order to provide personalized services for multimedia file processing, if the user is not satisfied with the evaluation score of the multimedia file segment obtained by automatic analysis, the embodiment of the present application can provide the user with a function of manually adjusting the evaluation score of the multimedia file segment.
[0116] For example, after determining the evaluation score of each of the N multimedia file segments in step 440, the multimedia file processing method provided in the embodiment of the present application may further include:
[0117] Acquire first adjustment information for a specified multimedia file segment, where the first adjustment information is used to adjust an evaluation score of the specified multimedia file segment; the specified multimedia file segment is a multimedia file segment among the N multimedia file segments;
[0118] Based on the first adjustment information, the evaluation score of the specified multimedia file segment is adjusted from the original first evaluation score to the second evaluation score.
[0119] It is understandable that after the user manually adjusts the evaluation score of the specified multimedia file segment, the number of multimedia file segments determined to be greater than the preset threshold may change.
[0120] For example, the first evaluation score may be less than a preset threshold, and the second evaluation score may be greater than the preset threshold. That is, the first evaluation score before the user's manual adjustment may be less than the preset threshold, and the second evaluation score after the user's manual adjustment may be greater than the preset threshold. At this time, the adjustment operation may be equivalent to adding the specified multimedia file segment to the above-mentioned M multimedia file segments.
[0121] For another example, the first evaluation score may be greater than a preset threshold, and the second evaluation score may be less than the preset threshold. That is, the first evaluation score before the user manually adjusts the score may be greater than the preset threshold, and the second evaluation score after the user manually adjusts the score may be less than the preset threshold. In this case, the adjustment operation may be equivalent to deleting the specified multimedia file segment from the above-mentioned M multimedia file segments.
[0122] For example, if the evaluation score of the fifth multimedia file segment automatically analyzed by the multimedia file segment recognition algorithm is 70 points, and the user is not satisfied with the evaluation score of the fifth multimedia file segment automatically analyzed, the embodiment of the present application can adjust the evaluation score of the designated fifth multimedia file segment from the original 70 points to 90 points based on the first adjustment information (e.g., 90 points) input by the user. If the first preset threshold corresponding to the first preset processing mode is 80 points, the number of multimedia file segments with evaluation scores above 80 points determined by the first preset processing mode is one more than the original number after the user manually adjusts the evaluation score of the designated fifth multimedia file segment from the original 70 points to 90 points.
[0123] For example, if the evaluation score of the seventh multimedia file segment automatically analyzed by the multimedia file segment recognition algorithm is 70 points, and the user is not satisfied with the evaluation score of the seventh multimedia file segment automatically analyzed, the embodiment of the present application can adjust the evaluation score of the designated seventh multimedia file segment from the original 70 points to 40 points based on the first adjustment information (e.g., 40 points) input by the user. If the second preset threshold corresponding to the second preset processing mode is 60 points, the number of multimedia file segments with evaluation scores of more than 60 points determined by the second preset processing mode is one less than the original number after the user manually adjusts the evaluation score of the designated seventh multimedia file segment from the original 70 points to 40 points.
[0124] Therefore, it can be seen that after the user manually adjusts the evaluation score of the specified multimedia file fragment, the specified multimedia file fragment is added to the M multimedia file fragments whose evaluation scores are greater than the preset threshold according to the user's customized needs, or the specified multimedia file fragment is deleted from the M multimedia file fragments whose evaluation scores are greater than the preset threshold according to the user's customized needs.
[0125] In this way, when the user is dissatisfied with the evaluation score of the multimedia file fragment obtained by automatic analysis, the embodiment of the present application can provide the user with the function of manually adjusting the evaluation score of the specified multimedia file fragment, provide personalized services for multimedia file processing, and realize adding the specified multimedia file fragment to the M multimedia file fragments whose evaluation scores are greater than the preset threshold determined above, or deleting the specified multimedia file fragment from the M multimedia file fragments whose evaluation scores are greater than the preset threshold determined above, according to the user's customized needs.
[0126] In another specific embodiment, in order to provide personalized services for multimedia file processing, if the user is not satisfied with the area of the target multimedia file segment obtained by automatic segmentation, the embodiment of the present application can provide the user with a function of manually adjusting the area of the target multimedia file segment.
[0127] For example, Figure 5 As shown, the multimedia file processing method provided in the embodiment of the present application may include:
[0128] Step 510: Obtain the multimedia file to be processed;
[0129] Step 520: dividing the multimedia file to be processed into N multimedia file segments, where N is an integer greater than 1;
[0130] Step 530: Acquire second adjustment information for the target multimedia file segment, where the second adjustment information is used to adjust the target time point of the target multimedia file segment;
[0131] The target multimedia file segment is a multimedia file segment among the N multimedia file segments, and the target time point includes at least one of a start time point and an end time point of the target multimedia file segment;
[0132] Step 540: adjusting the target time point of the target multimedia file segment based on the second adjustment information;
[0133] Step 550: Determine M multimedia file segments that meet the target condition from the N multimedia file segments, where M is an integer less than N;
[0134] Step 560: Generate a target multimedia file based on the M multimedia file segments;
[0135] The storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
[0136] Among them, step 510 can refer to the specific content of step 110, step 520 can refer to the specific content of step 120, steps 530 to 540 can be executed after step 520, step 550 can refer to the specific content of step 130, and step 560 can refer to the specific content of step 140.
[0137] In step 530, the second adjustment information may be adjustment information input by a user, and the second adjustment information may be used to adjust the area of the target multimedia file segment, for example, by adjusting the target time point of the target multimedia file segment (at least one of the start time point and the end time point of the target multimedia file segment) to enlarge or reduce the area of the target multimedia file segment.
[0138] In step 540, based on the second adjustment information, the target time point of the target multimedia file segment is adjusted, and the area of the target multimedia file segment may be enlarged or reduced.
[0139] The target multimedia file segment may be the multimedia file segment whose evaluation score is greater than a preset threshold value determined above.
[0140] It can be understood that the embodiments of the present application can independently adjust the starting time point of the target multimedia file segment, move the starting time point of the target multimedia file segment forward or backward, thereby adjusting the area size of the target multimedia file segment, and also affecting the area of the previous multimedia file segment of the target multimedia file segment.
[0141] Alternatively, the embodiment of the present application can independently adjust the end time point of the target multimedia file segment, move the end time point of the target multimedia file segment forward or backward, thereby adjusting the area size of the target multimedia file segment, and also affecting the area of the next multimedia file segment after the target multimedia file segment.
[0142] Alternatively, the embodiment of the present application can simultaneously adjust the starting time point and the ending time point of the target multimedia file segment, and move the starting time point / ending time point of the target multimedia file segment forward / backward, thereby adjusting the area size / area position of the target multimedia file segment, and also affecting the areas of two multimedia file segments adjacent to the target multimedia file segment.
[0143] For example, the multimedia file to be processed is divided into 10 multimedia file segments, each of which has a duration of 5 seconds, and the target multimedia file segment may be the second multimedia file segment among the 10 multimedia file segments.
[0144] For example, an embodiment of the present application can move the starting time point of the target multimedia file segment forward by 1 second based on the adjustment information input by the user. In this way, the duration of the target multimedia file segment changes from 5 seconds to 6 seconds, and the duration of the first multimedia file segment changes from 5 seconds to 4 seconds.
[0145] For example, the embodiment of the present application can also move the end time point of the target multimedia file segment forward by 1 second based on the adjustment information input by the user. In this way, the duration of the target multimedia file segment changes from 5 seconds to 4 seconds, and the duration of the third multimedia file segment changes from 5 seconds to 6 seconds.
[0146] For example, based on the adjustment information input by the user, the embodiment of the present application can move the starting time point of the target multimedia file segment forward by 1 second and the ending time point of the target multimedia file segment backward by 1 second. In this way, the duration of the target multimedia file segment changes from 5 seconds to 7 seconds, while the duration of the first multimedia file segment changes from 5 seconds to 4 seconds, and the duration of the third multimedia file segment changes from 5 seconds to 4 seconds.
[0147] For example, an embodiment of the present application can move the start time point of the target multimedia file segment forward by 1 second and the end time point of the target multimedia file segment forward by 1 second based on the adjustment information input by the user. In this way, the duration of the target multimedia file segment does not change, but the regional position of the target multimedia file segment moves forward by one second as a whole, and the duration of the first multimedia file segment changes from 5 seconds to 4 seconds, and the duration of the third multimedia file segment changes from 5 seconds to 6 seconds.
[0148] In this way, when the user is not satisfied with the area of the target multimedia file fragment obtained by automatic analysis, the embodiment of the present application can provide the user with the function of manually adjusting the area of the target multimedia file fragment, provide personalized services for multimedia file processing, and realize the adjustment of the area size or area position of the target multimedia file fragment according to the user's customized needs.
[0149] In another specific embodiment, in order to save storage space as much as possible, the embodiment of the present application can also delete the remaining NM multimedia file segments while retaining the M multimedia file segments whose evaluation scores are greater than a preset threshold. Figure 6 As shown, the multimedia file processing method provided in the embodiment of the present application may include:
[0150] Step 610: Obtain the multimedia file to be processed;
[0151] Step 620: Segment the multimedia file to be processed into N multimedia file segments, where N is an integer greater than 1;
[0152] Step 630: Determine M multimedia file segments that meet the target condition from the N multimedia file segments, where M is an integer less than N;
[0153] Step 640: when M is equal to 1, M multimedia file segments with evaluation scores greater than a preset threshold are used as target multimedia files;
[0154] Step 650: when M is greater than 1, merge the M multimedia file segments to generate a target multimedia file;
[0155] The storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
[0156] Among them, steps 610 to 630 may refer to the specific contents of steps 110 to 130 , and steps 640 and 650 may be sub-steps of step 140 .
[0157] In step 640 , if there is only one multimedia file segment with an evaluation score greater than a preset threshold, this multimedia file segment may be directly used as the target multimedia file.
[0158] In step 650, if there are multiple multimedia file segments with evaluation scores greater than a preset threshold, the multiple multimedia file segments may be directly merged to generate a target multimedia file.
[0159] In step 640 and step 650, in the process of processing the multimedia file segments, it is actually implicit that the remaining NM multimedia file segments are deleted, and only the M multimedia file segments with evaluation scores greater than a preset threshold are retained.
[0160] In this way, in the process of processing multimedia file segments, M multimedia file segments with evaluation scores greater than a preset threshold are used as target multimedia files, and the remaining NM multimedia file segments are discarded, which can save storage space to the greatest extent.
[0161] In another specific embodiment, in order to ensure the integrity of the multimedia file to be processed, the embodiment of the present application may retain the remaining NM multimedia file segments after compression, provided that the M multimedia file segments with evaluation scores greater than a preset threshold are retained. Figure 7 As shown, the multimedia file processing method provided in the embodiment of the present application may include:
[0162] Step 710: Obtain the multimedia file to be processed;
[0163] Step 720: dividing the multimedia file to be processed into N multimedia file segments, where N is an integer greater than 1;
[0164] Step 730: Determine M multimedia file segments that meet the target condition from the N multimedia file segments, where M is an integer less than N;
[0165] Step 740: compressing NM multimedia file segments whose evaluation scores are less than or equal to a preset threshold among the N multimedia file segments to obtain NM compressed segments;
[0166] Step 750: Merge the M multimedia file segments whose evaluation scores are greater than a preset threshold and the NM compressed segments to generate a target multimedia file.
[0167] Among them, steps 710 to 730 may refer to the specific contents of steps 110 to 130 , and steps 740 and 750 may be sub-steps of step 140 .
[0168] In step 740 and step 750, the M multimedia file segments that meet the target condition may be the M multimedia file segments whose evaluation scores are greater than a preset threshold, and the remaining NM multimedia file segments whose evaluation scores are less than or equal to the preset threshold may be the multimedia file segments that do not meet the target condition. The NM multimedia file segments whose evaluation scores are less than or equal to the preset threshold among the N multimedia file segments are compressed to obtain NM compressed segments. Then, the M multimedia file segments whose evaluation scores are greater than the preset threshold and the NM compressed segments are merged to generate the target multimedia file. Furthermore, the remaining NM multimedia file segments can be compressed and retained under the premise of ensuring that the resolution of the M multimedia file segments whose evaluation scores are greater than the preset threshold remains unchanged, so that storage space can be saved without sacrificing the multimedia file quality of some multimedia file segments with higher evaluation scores, and the integrity of the processed target multimedia file can be guaranteed as much as possible.
[0169] Among them, after transcoding and compressing the NM multimedia file fragments whose evaluation scores are less than or equal to a preset threshold, the storage space occupied by the compressed NM fragments is smaller than the storage space occupied by the original NM multimedia file fragments, and accordingly, the resolution of the NM compressed fragments is smaller than the resolution of the original NM multimedia file fragments.
[0170] The embodiment of the present application obtains a plurality of multimedia file fragments by dividing the multimedia file to be processed, and selectively compresses NM multimedia file fragments that do not meet the target conditions from the plurality of multimedia file fragments to generate a target multimedia file. Since there is no need to uniformly transcode and compress the entire multimedia file to be processed, the resolution of some multimedia file fragments with higher evaluation scores is specifically ensured to remain unchanged, thereby avoiding the loss of content details of some multimedia file fragments with higher evaluation scores caused by the overall transcoding compression to reduce the resolution in the related art. Furthermore, storage space can be saved without sacrificing the multimedia file quality of some multimedia file fragments with higher evaluation scores.
[0171] In this way, the embodiment of the present application can compress and retain NM multimedia file segments whose evaluation scores are less than or equal to the preset threshold, so as to ensure the integrity of the processed target multimedia file as much as possible.
[0172] In practical applications, taking a mobile terminal such as a mobile phone, a tablet, etc. executing a video processing method on a video file to be processed as an example, the embodiment of the present application can use a mobile phone to perform video processing.
[0173] Figure 8-1 It is a schematic flowchart of using a mobile phone to process video in actual application provided by an embodiment of the present application.
[0174] like Figure 8-1 As shown, the video processing method provided in the embodiment of the present application includes the following steps:
[0175] Step 810: Select video and highlight compression options;
[0176] In step 810, the user opens the photo album application on the mobile device and browses the video list. The user finds the video that he wants to compress from the video list and clicks to select it. Then the display screen of the mobile device displays the video playback page. Figure 8-2 As shown, the user clicks the "More" button in the lower right corner of the screen to open the menu, and the user finds and selects the "Highlight Compression" option in the pop-up menu to enter the compression function.
[0177] Step 820: Automatically segment the video segments and identify highlight segments;
[0178] In step 820, the album application can automatically divide the selected video into multiple video clips and display a thumbnail 801 of each video clip on the user interface. The duration of each video clip can be a preset fixed value (e.g., 5 seconds). The system automatically analyzes the visual and audio content of each video clip, and accurately marks the highlight clips using a highlight clip recognition algorithm, and sets an evaluation score (e.g., 0-100 points) for each video clip based on the evaluation data of the highlight clips.
[0179] Among them, the thumbnail of the highlight clip can be displayed as a mark in the user interface to distinguish it from the ordinary clip.
[0180] For example, Figure 8-3 As shown, thumbnails of video clips with an evaluation score of 80 points or more (called premium highlight clips) can be marked and displayed with a first mark 802 in the user interface, and thumbnails of video clips with an evaluation score of 60 points or more (called ordinary highlight clips) can be marked and displayed with a second mark 803 in the user interface.
[0181] The first mark 802 and the second mark 803 are displayed in different ways (display color, display pattern or display shape, etc.). For example, in actual applications, the first mark 802 can be displayed in red, and the second mark 803 can be displayed in orange.
[0182] Users can view all marked ordinary highlight clips, premium highlight clips and ordinary clips by sliding the screen.
[0183] In step 820, the embodiment of the present application can automatically analyze and identify the highlight segments in the video segment, rather than just uniformly compressing the entire video.
[0184] Step 830: Select compression mode;
[0185] In step 830, if Figure 8-3 As shown, three buttons can be displayed on the user interface: "Simple Highlight Compression", "Deep Highlight Compression" and "Manually Adjust Highlights". There is a question mark button on the right. Click the question mark button and a pop-up box will display the compression characteristics and effects of each compression mode.
[0186] Among them, when the user clicks the "Simple Highlight Compression" button, the simple highlight compression mode will be executed, which can retain the high-quality highlight clips and ordinary highlight clips in the video content and delete the ordinary clips.
[0187] Among them, when the user clicks the "Deep Highlight Compression" button, the deep highlight compression mode will be executed, which can retain the high-quality highlight clips of the video content and delete the ordinary highlight clips and ordinary clips.
[0188] The user clicks the “manually adjust highlights” button to manually adjust the evaluation score and area of the highlight segment in step 840 .
[0189] Among them, users can click to select their preferred compression mode ("Simple Highlight Compression" button or "Deep Highlight Compression" button) to make decisions based on the requirements of compression quality and video length.
[0190] In step 830, the embodiment of the present application avoids the loss of all content details due to overall reduction in resolution in traditional methods by selectively retaining highlight clips of highlight moments and constructing a shorter but complete video storyline based on them.
[0191] Furthermore, the embodiment of the present application introduces two preset processing modes, namely “simple highlight compression” and “deep highlight compression”, allowing users to selectively compress based on storage space and content importance, rather than having only one fixed compression ratio option.
[0192] Among them, the compression ratio refers to the ratio of the final target video length to the original video length. The duration of the video clip retained by "Simple Highlight Compression" is longer, and the compression ratio of the "Simple Highlight Compression" mode is larger than that of the "Deep Highlight Compression" mode.
[0193] Step 840: Manually select or adjust highlight segments;
[0194] In step 840, if Figure 8-3 As shown, after the user clicks the "Manually adjust highlights" button, the user can manually select or adjust the highlight segment.
[0195] For example, the user clicks on the visual mark of each highlight segment (such as the first mark 802 or the second mark 803) to add or cancel the highlight state. By clicking on the visual mark, the evaluation score of the highlight segment can be manually set (to prevent the system from identifying the highlight segment incorrectly and support user manual conditions). After the setting is completed, the visual mark automatically switches to red or orange according to the evaluation score set by the user.
[0196] Afterwards, users can use the interactive preview function to view the adjusted highlight clips and compression effects in real time.
[0197] In step 840, the embodiment of the present application may provide a user interaction interface to allow the user to manually adjust the highlight segment, thereby increasing the flexibility and personalization of the video processing process.
[0198] Step 850: Confirm compression settings and preview;
[0199] In step 850, if Figure 8-3 As shown, after the user completes the selection or adjustment of the highlight clip, he clicks the central play button. The application displays a compressed video preview according to the user's settings. The user can evaluate the compression quality and the final content in the preview, and return to the previous step 840 if necessary.
[0200] Step 860: perform compression;
[0201] In step 860, if the user is satisfied with the compression preview result, click the "Compress" button to start the compression process.
[0202] The application displays the compression progress and notifies the user when compression is complete.
[0203] Step 870: Save and manage the target video;
[0204] After the compression is completed, the user chooses to save the target video in the mobile phone album or other storage location.
[0205] Users can also choose to share the target video on social media or send it to friends or family through other channels.
[0206] The video processing method provided by the embodiment of the present application can significantly save storage space while maintaining the key visual content of high-definition video. Through content intelligent recognition technology, it can automatically detect and extract highlight clips in the video, give priority to saving these highlight clips, and reduce or compress other less important content (ordinary clips). This video processing method reduces the size of video files and optimizes storage and transmission efficiency without sacrificing the core viewing value of the video.
[0207] In addition, the embodiment of the present application adopts a user interaction design, allowing users to customize compression according to their own needs without the need for professional editing software or technology, which not only simplifies the video compression process but also provides users with highly personalized services.
[0208] In general, the video processing solution provided in the embodiments of the present application is a high-definition video highlight selection and compression solution based on content intelligent recognition, which can cope with the storage pressure caused by large high-resolution video files, while maintaining the viewing quality of the video and the integrity of important content. This has significant practical value and good user experience for both video content producers and ordinary users.
[0209] The multimedia file processing method provided in the embodiment of the present application can be executed by a multimedia file processing device. In the embodiment of the present application, the multimedia file processing device provided in the embodiment of the present application is described by taking the multimedia file processing method executed by the multimedia file processing device as an example.
[0210] Fig. 9 It is a schematic structural diagram of a multimedia file processing device provided in an embodiment of the present application.
[0211] like Fig. 9 As shown, the multimedia file processing device provided in the embodiment of the present application may include: an acquisition module 901, a segmentation module 902, a determination module 903 and a generation module 904;
[0212] An acquisition module 901 is used to acquire a multimedia file to be processed;
[0213] A segmentation module 902, configured to segment the multimedia file to be processed into N multimedia file segments, where N is an integer greater than 1;
[0214] A determination module 903 is used to determine M multimedia file segments that meet a target condition from the N multimedia file segments, where M is an integer less than N;
[0215] A generating module 904, configured to generate a target multimedia file based on the M multimedia file segments;
[0216] The storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
[0217] According to the multimedia file processing device provided by the embodiment of the present application, it includes an acquisition module, a segmentation module, a determination module and a generation module; the acquisition module is used to acquire the multimedia file to be processed; the segmentation module is used to segment the multimedia file to be processed into N multimedia file segments, N is an integer greater than 1; the determination module is used to determine M multimedia file segments that meet the target condition from the N multimedia file segments, M is an integer less than N; the generation module is used to generate the target multimedia file based on the M multimedia file segments; wherein the storage space occupied by the target multimedia file is less than the storage space occupied by the multimedia file to be processed. In this way, the embodiment of the present application obtains multiple multimedia file segments by segmenting the multimedia file to be processed, and specifically determines a part of the multimedia file segments that meet the target condition from the multiple multimedia file segments, and generates the target multimedia file, thereby saving storage space without sacrificing the multimedia file quality of the part of the multimedia file segments that meet the target condition.
[0218] Optionally, in the multimedia file processing device provided in an embodiment of the present application, the determination module can be used to: determine M multimedia file fragments whose evaluation scores are greater than a preset threshold from N multimedia file fragments, where the preset threshold is obtained based on configuration information input by the user.
[0219] In this way, the present application can adopt a user interaction design, and obtain a preset threshold based on the configuration information input by the user, so that the user can customize the processing of the multimedia files to be processed according to their own needs, and obtain M multimedia file fragments with evaluation scores greater than the preset threshold. There is no need to transcode and compress the entire multimedia file to be processed, nor is there a need to use professional editing software or technology. This not only simplifies the multimedia file processing process, but also provides users with highly personalized services.
[0220] Optionally, in the multimedia file processing device provided in the embodiment of the present application, the configuration information includes mode selection information; and the determination module includes:
[0221] A first acquisition module, used to acquire mode selection information input by a user;
[0222] A first determination module is used to determine a target processing mode from a plurality of preset processing modes based on the mode selection information; wherein different preset processing modes correspond to different thresholds, and the target processing mode corresponds to the preset threshold;
[0223] The second determination module is used to determine, based on a preset threshold corresponding to the target processing mode, M multimedia file segments having evaluation scores greater than the preset threshold among the N multimedia file segments.
[0224] In this way, since multiple preset processing modes are pre-set, the target processing mode can be directly selected from the multiple preset processing modes through the mode selection information input by the user, which makes it convenient for the user to selectively process the multimedia files to be processed after comprehensively considering the two factors of storage space and the importance of multimedia file content, thereby improving the flexibility of the multimedia file processing process.
[0225] Optionally, in the multimedia file processing device provided in the embodiment of the present application, the configuration information includes a preset threshold; and the determination module includes:
[0226] A second acquisition module is used to acquire a preset threshold value input by a user;
[0227] The third determination module is used to determine, based on a preset threshold input by a user, M multimedia file segments having evaluation scores greater than the preset threshold among the N multimedia file segments.
[0228] In this way, in an application scenario where multiple preset processing modes are unable to meet the user's needs for saving storage space and retaining important content of multimedia files, the embodiment of the present application can determine multimedia file segments with evaluation scores greater than the preset threshold based on the preset threshold input by the user, thereby retaining multimedia file segments with important content and saving storage space, thereby meeting the user's needs for saving storage space and retaining important content of multimedia files, and providing users with highly personalized services during the multimedia file processing process.
[0229] Optionally, the multimedia file processing device provided in the embodiment of the present application further includes a third acquisition module and a fourth determination module;
[0230] a third acquisition module, configured to acquire evaluation index information of the N multimedia file segments before determining the M multimedia file segments that meet the target condition from the N multimedia file segments; wherein the evaluation index information is used to reflect the importance of the multimedia file segments;
[0231] The fourth determination module is used to determine the evaluation score of each of the N multimedia file segments based on the evaluation index information of the N multimedia file segments.
[0232] In this way, the embodiment of the present application can automatically analyze and identify the evaluation index information of each multimedia file fragment in multiple multimedia file fragments from the multimedia file to be processed, and use the evaluation index information to score each multimedia file fragment to obtain an evaluation score for each multimedia file fragment, so as to facilitate subsequent processing of the multimedia file fragment according to the evaluation score of each multimedia file fragment, without the need for users to manually score each multimedia file fragment, thereby improving the efficiency of multimedia file processing.
[0233] Optionally, the multimedia file processing device provided in the embodiment of the present application further includes a fifth acquisition module and an adjustment module;
[0234] a fourth acquisition module, configured to acquire second adjustment information for a target multimedia file segment after dividing the multimedia file to be processed into N multimedia file segments, wherein the second adjustment information is used to adjust a target time point of the target multimedia file segment; the target multimedia file segment is a multimedia file segment among the N multimedia file segments, and the target time point includes at least one of a start time point and an end time point of the target multimedia file segment;
[0235] The adjustment module is used to adjust the target time point of the target multimedia file segment based on the second adjustment information.
[0236] In this way, when the user is not satisfied with the area of the target multimedia file fragment obtained by automatic analysis, the embodiment of the present application can provide the user with the function of manually adjusting the area of the target multimedia file fragment, provide personalized services for multimedia file processing, and realize the adjustment of the area size or area position of the target multimedia file fragment according to the user's customized needs.
[0237] Optionally, the multimedia file processing device provided in the embodiment of the present application further includes a fourth acquisition module and a fifth determination module;
[0238] a fifth acquisition module, configured to acquire first adjustment information for a designated multimedia file segment after determining the evaluation score of each of the N multimedia file segments, the first adjustment information being used to adjust the evaluation score of the designated multimedia file segment; the designated multimedia file segment being a multimedia file segment among the N multimedia file segments;
[0239] The fifth determining module is configured to adjust the evaluation score of the specified multimedia file segment from the original first evaluation score to the second evaluation score based on the first adjustment information.
[0240] In this way, when the user is dissatisfied with the evaluation score of the multimedia file fragment obtained by automatic analysis, the embodiment of the present application can provide the user with the function of manually adjusting the evaluation score of the specified multimedia file fragment, provide personalized services for multimedia file processing, and realize adding the specified multimedia file fragment to the M multimedia file fragments whose evaluation scores are greater than the preset threshold determined above, or deleting the specified multimedia file fragment from the M multimedia file fragments whose evaluation scores are greater than the preset threshold determined above, according to the user's customized needs.
[0241] Optionally, in the multimedia file processing device provided in the embodiment of the present application, the generating module includes:
[0242] A generating submodule, for, when M is equal to 1, taking M multimedia file segments whose evaluation scores are greater than a preset threshold as target multimedia files;
[0243] The first merging module is used to merge the M multimedia file segments to generate a target multimedia file when M is greater than 1.
[0244] In this way, in the process of processing multimedia file segments, M multimedia file segments with evaluation scores greater than a preset threshold are used as target multimedia files, and the remaining NM multimedia file segments are discarded, which can save storage space to the greatest extent.
[0245] Optionally, in the multimedia file processing device provided in the embodiment of the present application, the generating module includes:
[0246] A compression submodule, used for compressing NM multimedia file segments whose evaluation scores are less than or equal to a preset threshold among the N multimedia file segments, to obtain NM compressed segments;
[0247] The second merging module is used to merge the M multimedia file segments and the NM compressed segments to generate a target multimedia file.
[0248] In this way, the embodiment of the present application can compress and retain NM multimedia file segments whose evaluation scores are less than or equal to the preset threshold, so as to ensure the integrity of the processed target multimedia file as much as possible.
[0249] The multimedia file processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0250] The multimedia file processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0251] The multimedia file processing device provided in the embodiment of the present application can achieve Figures 1 to 7 , Figure 8-1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0252] Fig.10 It is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
[0253] Alternatively, if Fig.10 As shown, an embodiment of the present application further provides an electronic device 1000, including a processor 1001 and a memory 1002, wherein the memory 1002 stores a program or instruction running on the processor 1001, and when the program or instruction is executed by the processor 1001, each step of the above-mentioned multimedia file processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0254] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0255] Fig.11It is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0256] The electronic device 1100 includes but is not limited to: a radio frequency unit 1101, a network module 1102, an audio output unit 1103, an input unit 1104, a sensor 1105, a display unit 1106, a user input unit 1107, an interface unit 1108, a memory 1109, and a processor 1110 and other components.
[0257] Those skilled in the art will appreciate that the electronic device 1100 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.11 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0258] Among them, the processor 1110 is used to obtain a multimedia file to be processed; divide the multimedia file to be processed into N multimedia file segments, N is an integer greater than 1; determine M multimedia file segments that meet the target condition from the N multimedia file segments, M is an integer less than N; generate a target multimedia file based on the M multimedia file segments; wherein the storage space occupied by the target multimedia file is less than the storage space occupied by the multimedia file to be processed.
[0259] In this way, the embodiment of the present application obtains multiple multimedia file fragments by dividing the multimedia file to be processed, and specifically determines a part of the multimedia file fragments that meet the target conditions from the multiple multimedia file fragments to generate the target multimedia file, thereby saving storage space without sacrificing the multimedia file quality of the part of the multimedia file fragments that meet the target conditions.
[0260] Optionally, the processor 1110 may be configured to: determine, from the N multimedia file segments, M multimedia file segments having evaluation scores greater than a preset threshold, where the preset threshold is obtained based on configuration information input by a user.
[0261] In this way, the present application can adopt a user interaction design, and obtain a preset threshold based on the configuration information input by the user, so that the user can customize the processing of the multimedia files to be processed according to their own needs, and obtain M multimedia file fragments with evaluation scores greater than the preset threshold. There is no need to transcode and compress the entire multimedia file to be processed, nor is there a need to use professional editing software or technology. This not only simplifies the multimedia file processing process, but also provides users with highly personalized services.
[0262] Optionally, the configuration information includes mode selection information; the processor 1110 is used to obtain the mode selection information input by the user; based on the mode selection information, determine the target processing mode from multiple preset processing modes; wherein different preset processing modes correspond to different thresholds, and the target processing mode corresponds to the preset threshold; based on the preset threshold corresponding to the target processing mode, determine M multimedia file fragments among the N multimedia file fragments whose evaluation scores are greater than the preset threshold.
[0263] In this way, since multiple preset processing modes are pre-set, the target processing mode can be directly selected from the multiple preset processing modes through the mode selection information input by the user, which makes it convenient for the user to selectively process the multimedia files to be processed after comprehensively considering the two factors of storage space and the importance of multimedia file content, thereby improving the flexibility of the multimedia file processing process.
[0264] Optionally, the configuration information includes the preset threshold;
[0265] The processor 1110 is configured to obtain the preset threshold value input by the user; and determine, based on the preset threshold value input by the user, M multimedia file segments among the N multimedia file segments whose evaluation scores are greater than the preset threshold value.
[0266] In this way, in an application scenario where multiple preset processing modes are unable to meet the user's needs for saving storage space and retaining important content of multimedia files, the embodiment of the present application can determine multimedia file segments with evaluation scores greater than the preset threshold based on the preset threshold input by the user, thereby retaining multimedia file segments with important content and saving storage space, thereby meeting the user's needs for saving storage space and retaining important content of multimedia files, and providing users with highly personalized services during the multimedia file processing process.
[0267] Optionally, the processor 1110 is further used to obtain evaluation index information of the N multimedia file fragments before determining M multimedia file fragments among the N multimedia file fragments whose evaluation scores are greater than a preset threshold; wherein the evaluation index information is used to reflect the importance of the multimedia file fragments; and determine the evaluation score of each of the N multimedia file fragments based on the evaluation index information of the N multimedia file fragments.
[0268] In this way, the embodiment of the present application can automatically analyze and identify the evaluation index information of each multimedia file fragment in multiple multimedia file fragments from the multimedia file to be processed, and use the evaluation index information to score each multimedia file fragment to obtain an evaluation score for each multimedia file fragment, so as to facilitate subsequent processing of the multimedia file fragment according to the evaluation score of each multimedia file fragment, without the need for users to manually score each multimedia file fragment, thereby improving the efficiency of multimedia file processing.
[0269] Optionally, the processor 1110 is further used to obtain first adjustment information for a specified multimedia file fragment after determining the evaluation score of each of the N multimedia file fragments, wherein the first adjustment information is used to adjust the evaluation score of the specified multimedia file fragment; the specified multimedia file fragment is a multimedia file fragment among the N multimedia file fragments; based on the first adjustment information, the evaluation score of the specified multimedia file fragment is adjusted from the original first evaluation score to the second evaluation score.
[0270] In this way, when the user is dissatisfied with the evaluation score of the multimedia file fragment obtained by automatic analysis, the embodiment of the present application can provide the user with the function of manually adjusting the evaluation score of the specified multimedia file fragment, provide personalized services for multimedia file processing, and realize adding the specified multimedia file fragment to the M multimedia file fragments whose evaluation scores are greater than the preset threshold determined above, or deleting the specified multimedia file fragment from the M multimedia file fragments whose evaluation scores are greater than the preset threshold determined above, according to the user's customized needs.
[0271] Optionally, the processor 1110 is further configured to, after dividing the to-be-processed multimedia file into N multimedia file segments, obtain second adjustment information for a target multimedia file segment, where the second adjustment information is used to adjust a target time point of the target multimedia file segment; the target multimedia file segment is a multimedia file segment among the N multimedia file segments, and the target time point includes at least one of a start time point and an end time point of the target multimedia file segment;
[0272] An adjustment module is used to adjust the target time point of the target multimedia file segment based on the second adjustment information.
[0273] In this way, when the user is not satisfied with the area of the target multimedia file fragment obtained by automatic analysis, the embodiment of the present application can provide the user with the function of manually adjusting the area of the target multimedia file fragment, provide personalized services for multimedia file processing, and realize the adjustment of the area size or area position of the target multimedia file fragment according to the user's customized needs.
[0274] Optionally, the processor 1110 is configured to, when M is equal to 1, use M multimedia file segments with evaluation scores greater than a preset threshold as the target multimedia files; and when M is greater than 1, merge the M multimedia file segments to generate the target multimedia file.
[0275] In this way, in the process of processing multimedia file segments, M multimedia file segments with evaluation scores greater than a preset threshold are used as target multimedia files, and the remaining NM multimedia file segments are discarded, which can save storage space to the greatest extent.
[0276] Optionally, the processor 1110 is used to compress NM multimedia file fragments among the N multimedia file fragments whose evaluation scores are less than or equal to the preset threshold to obtain NM compressed fragments; and merge the M multimedia file fragments and the NM compressed fragments to generate a target multimedia file.
[0277] In this way, the embodiment of the present application can compress and retain NM multimedia file segments whose evaluation scores are less than or equal to the preset threshold, so as to ensure the integrity of the processed target multimedia file as much as possible.
[0278] It should be understood that in the embodiment of the present application, the input unit 1104 may include a graphics processor (Graphics Processing Unit, GPU) 11041 and a microphone 11042, and the graphics processor 11041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1106 may include a display panel 11061, and the display panel 11061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1107 includes a touch panel 11071 and at least one of other input devices 11072. The touch panel 11071 is also called a touch screen. The touch panel 11071 may include two parts: a touch detection device and a touch controller. Other input devices 11072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0279] The memory 1109 can be used to store software programs and various data. The memory 1109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1109 may include a volatile memory or a non-volatile memory, or the memory 1109 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0280] The processor 1110 may include one or more processing units; optionally, the processor 1110 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1110.
[0281] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned multimedia file processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0282] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0283] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned multimedia file processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0284] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0285] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned multimedia file processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0286] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0287] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0288] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A multimedia file processing method, characterized in that: include: Get the multimedia files to be processed; Dividing the to-be-processed multimedia file into N multimedia file segments, where N is an integer greater than 1; Determining M multimedia file segments that meet a target condition from the N multimedia file segments, where M is an integer less than N; Based on the M multimedia file segments, generating a target multimedia file; The storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
2. The method according to claim 1, characterized in that The determining of M multimedia file segments satisfying a target condition from the N multimedia file segments comprises: Determine, from the N multimedia file segments, M multimedia file segments having evaluation scores greater than a preset threshold; The preset threshold is obtained based on configuration information input by the user.
3. The method according to claim 2, characterized in that The configuration information includes mode selection information; and the step of determining, from the N multimedia file segments, M multimedia file segments having evaluation scores greater than a preset threshold value, includes: Get the mode selection information entered by the user; Based on the mode selection information, determining a target processing mode from a plurality of preset processing modes; wherein different preset processing modes correspond to different thresholds, and the target processing mode corresponds to the preset threshold; Based on the preset threshold corresponding to the target processing mode, M multimedia file segments having evaluation scores greater than the preset threshold are determined among the N multimedia file segments.
4. The method according to claim 2, characterized in that: The configuration information includes the preset threshold; and the determining of M multimedia file segments having evaluation scores greater than the preset threshold among the N multimedia file segments includes: Obtaining the preset threshold value input by the user; Based on the preset threshold input by the user, M multimedia file segments having evaluation scores greater than the preset threshold are determined among the N multimedia file segments.
5. The method according to any one of claims 1 to 4, characterized in that: Before determining M multimedia file segments satisfying a target condition from the N multimedia file segments, the method includes: Acquire evaluation index information of the N multimedia file segments; wherein the evaluation index information is used to reflect the importance of the multimedia file segments; Based on the evaluation index information of the N multimedia file segments, an evaluation score of each of the N multimedia file segments is determined.
6. The method according to claim 1, characterized in that After dividing the to-be-processed multimedia file into N multimedia file segments, the method further includes: Acquire second adjustment information for a target multimedia file segment, where the second adjustment information is used to adjust a target time point of the target multimedia file segment; the target multimedia file segment is a multimedia file segment among the N multimedia file segments, and the target time point includes at least one of a start time point and an end time point of the target multimedia file segment; Based on the second adjustment information, the target time point of the target multimedia file segment is adjusted.
7. A multimedia file processing device, characterized in that: include: Acquisition module, segmentation module, determination module and generation module; The acquisition module is used to acquire the multimedia file to be processed; The segmentation module is used to segment the to-be-processed multimedia file into N multimedia file segments, where N is an integer greater than 1; The determining module is used to determine M multimedia file segments that meet the target condition from the N multimedia file segments, where M is an integer less than N; The generating module is used to generate a target multimedia file based on the M multimedia file segments; The storage space occupied by the target multimedia file is smaller than the storage space occupied by the multimedia file to be processed.
8. The device according to claim 7, characterized in that The determination module is used to determine, from the N multimedia file segments, M multimedia file segments whose evaluation scores are greater than a preset threshold; the preset threshold is obtained based on configuration information input by a user.
9. The device according to claim 8, characterized in that The determining module comprises: A first acquisition module, used to acquire mode selection information input by a user; A first determination module, configured to determine a target processing mode from a plurality of preset processing modes based on the mode selection information; wherein different preset processing modes correspond to different thresholds, and the target processing mode corresponds to the preset threshold; The second determination module is configured to determine, based on the preset threshold corresponding to the target processing mode, M multimedia file segments having evaluation scores greater than the preset threshold among the N multimedia file segments.
10. The device according to claim 8, characterized in that The determining module comprises: A second acquisition module, used to acquire the preset threshold value input by the user; The third determination module is used to determine, based on the preset threshold input by the user, M multimedia file segments among the N multimedia file segments whose evaluation scores are greater than the preset threshold.
11. The device according to any one of claims 7 to 10, characterized in that: Also includes: a third acquisition module, configured to acquire evaluation index information of the N multimedia file segments before determining the M multimedia file segments that meet the target condition from the N multimedia file segments; wherein the evaluation index information is used to reflect the importance of the multimedia file segments; The fourth determination module is used to determine the evaluation score of each of the N multimedia file segments based on the evaluation index information of the N multimedia file segments.
12. The device according to claim 7, characterized in that Also includes: a fourth acquisition module, configured to acquire second adjustment information for a target multimedia file segment after dividing the to-be-processed multimedia file into N multimedia file segments, wherein the second adjustment information is used to adjust a target time point of the target multimedia file segment; the target multimedia file segment is a multimedia file segment among the N multimedia file segments, and the target time point includes at least one of a start time point and an end time point of the target multimedia file segment; An adjustment module is used to adjust the target time point of the target multimedia file segment based on the second adjustment information.
Citation Information
Patent Citations
Video editing method, device and equipment and computer readable storage medium
CN112532897A
Data processing method and device and video cover generation method and device
CN113132753A
Multimedia data coding method and device
CN113573065A
Video editing method, device and equipment and storage medium
CN113709561A
Video editing method and device, computing equipment and storage medium
CN114143575A
