CN113810783A - Rich media file processing method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN113810783A
CN113810783A CN202010541538.9A CN202010541538A CN113810783A CN 113810783 A CN113810783 A CN 113810783A CN 202010541538 A CN202010541538 A CN 202010541538A CN 113810783 A CN113810783 A CN 113810783A
Authority
CN
China
Prior art keywords
file
rich media
special effect
media file
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010541538.9A
Other languages
Chinese (zh)
Other versions
CN113810783B (en
Inventor
钟雨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010541538.9A priority Critical patent/CN113810783B/en
Publication of CN113810783A publication Critical patent/CN113810783A/en
Application granted granted Critical
Publication of CN113810783B publication Critical patent/CN113810783B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/233Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/23424Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for inserting or substituting an advertisement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The application relates to the technical field of computers, and provides a rich media file processing method, a rich media file processing device, computer equipment and a storage medium, which are used for improving video coding efficiency. The method comprises the following steps: responding to a segmentation request of the rich media file, and segmenting candidate file segments to be subjected to special effect processing from the rich media file; responding to a special effect processing request, and carrying out special effect processing on the candidate file fragment to obtain a target file fragment; responding to a file splicing request, splicing the target file segments into the rich media file, and generating a processed rich media file; wherein the splicing position of the target file segment in the rich media file is the position of the candidate file segment in the rich media file.

Description

Rich media file processing method and device, computer equipment and storage medium
Technical Field
The application relates to the technical field of computers, in particular to the technical field of video processing, and provides a rich media file processing method and device, computer equipment and a storage medium.
Background
With the continuous development of video technology, the current technology can support the recoding of video, such as adding special effects in video. In the process of recoding a video, the whole video is often recoded, and because more video frames need to be recoded, a large amount of time is consumed in the recoding process, and the processing efficiency is low.
Disclosure of Invention
The embodiment of the application provides a rich media file processing method and device, computer equipment and a storage medium, which are used for improving video coding efficiency.
In one aspect, a rich media file processing method is provided, including:
responding to a segmentation request of the rich media file, and segmenting candidate file segments to be subjected to special effect processing from the rich media file;
responding to a special effect processing request, and carrying out special effect processing on the candidate file fragment to obtain a target file fragment;
responding to a file splicing request, splicing the target file segments into the rich media file, and generating a processed rich media file; wherein the splicing position of the target file segment in the rich media file is the position of the candidate file segment in the rich media file.
In another aspect, a rich media file processing apparatus is provided, including:
the device comprises a segmentation module, a search module and a search module, wherein the segmentation module is used for responding to a segmentation request of a rich media file and segmenting candidate file segments to be subjected to special effect processing from the rich media file;
the special effect processing module is used for responding to a special effect processing request and carrying out special effect processing on the candidate file fragment to obtain a target file fragment;
the splicing module is used for responding to a file splicing request, splicing the target file segments into the rich media file and generating a processed rich media file; wherein the splicing position of the target file segment in the rich media file is the position of the candidate file segment in the rich media file.
In a possible embodiment, the segmenting module is further configured to, when segmenting a candidate file segment to be subjected to special effect processing from the rich media file, obtain a segment identifier of the candidate file segment and a segment identifier of a file segment that is not subjected to special effect processing; wherein the segment identifier is used for indicating the sequence of the file segments in the rich media file;
and the splicing module is used for responding to a file splicing request, sequentially splicing the target file segment and the file segment which is not subjected to special effect processing according to the segment identification of the candidate file segment and the segment identification of the file segment which is not subjected to special effect processing, and obtaining the rich media file spliced by the target file segment and the file segment which is not subjected to special effect processing.
In yet another aspect, a computer device is provided, comprising:
at least one processor, and
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the at least one processor implementing any rich media file processing method as previously discussed by executing the instructions stored by the memory.
In yet another aspect, a storage medium is provided that stores computer instructions that, when executed on a computer, cause the computer to perform any of the rich media file processing methods as previously discussed.
Due to the adoption of the technical scheme, the embodiment of the application has at least the following technical effects:
in the embodiment of the application, in the process of carrying out special effect processing on the rich media file, candidate file segments needing special effect processing in the rich media file are segmented, the segmented candidate file segments are subjected to special effect processing, and then the processed candidate file segments and other unprocessed file segments are spliced. And, because partial file segments in the rich media file are not processed, the quality of the rich media file is better. The user can also see the processing result more quickly, and the use experience of the user is improved. In addition, in the embodiment of the application, the rich media file except for the GOP is processed, that is, the composition unit of the rich media file is a smaller composition unit than the GOP, so that in the process of processing the rich media file, the file segment needing to be processed in the rich media file can be more accurately located, and the accuracy of processing the rich media file is improved.
Drawings
FIG. 1 is an exemplary diagram of a timeline of a rich media file provided by an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a rich media file processing device according to an embodiment of the present application;
fig. 3 is a schematic view of an application scenario of a rich media file processing method according to an embodiment of the present application;
FIG. 4 is a flowchart of a rich media file processing method according to an embodiment of the present application;
FIG. 5 is an exemplary diagram of a special effects mode presentation interface provided by an embodiment of the present application;
FIG. 6 is an exemplary diagram of a special effects mode creation interface provided by an embodiment of the present application;
FIG. 7 is an exemplary diagram of a segmentation confirmation interface provided by an embodiment of the present application;
FIG. 8 is an exemplary diagram of a segmentation parameter input interface provided by an embodiment of the present application;
FIG. 9 is an exemplary diagram of an interface for adjusting a processing duration according to an embodiment of the present disclosure;
FIG. 10 is a diagram of an example of a partitioned rich media file provided by an embodiment of the present application;
FIG. 11 is a diagram of an example of a partitioned rich media file provided by an embodiment of the present application;
FIG. 12 is an exemplary diagram of an effect processing validation interface provided by an embodiment of the application;
fig. 13 is a diagram illustrating an interaction process between a client and a server according to an embodiment of the present application;
FIG. 14 is a process diagram of a rich media file processing method according to an embodiment of the present application;
FIG. 15 is a diagram illustrating an example of processing a rich media file according to the method of FIG. 14;
FIG. 16 is a schematic structural diagram of a rich media file processing device according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the drawings and specific embodiments.
In order to better understand the technical solutions in the embodiments of the present application, the following description refers to specific terms related to the embodiments of the present application.
(1) Rich Media (Rich Media) file: broadly refers to various types of media files, such as one or a combination of several of a motion picture, video, or audio. The rich media file related to the technical solution in the embodiment Of the present application may be any rich media file, or may be a rich media file configured by taking a Group Of Pictures (GOP) as a unit, and the rich media file configured by taking the GOP as a unit, for example, a video compressed by an H265 compression method. The rich media file in the embodiment of the present application is, for example, a motion picture, audio, or a combination of a motion picture and audio.
(2) File fragment: in the embodiment of the present application, a part of a rich media file obtained by dividing a rich media file is generally referred to, for example, the rich media file may be divided into a file segment 2 and a file segment 3 along a time axis of a rich media file 1.
(3) In the graph: generally, a moving picture is composed of one frame and one frame, and the Format of the moving picture is, for example, Graphics Interchange Format (GIF) Format, bitmap animation Format (APNG) Format of PNG, or WEBP Format.
(4) Audio: generally, audio is composed of bits in sequence, and the format of the audio may be, for example, AAC format or MP3 format.
(5) Segmentation parameters: refers to parameters involved in the rich media file splitting process, and the splitting parameters may be device default or user set. Segmentation parameters include, but are not limited to: a combination of two or more of a processing time period for dividing the rich media file, a division start position for dividing the rich media file, and a division end position for dividing the rich media file. The processing time duration can be understood as the time duration of the file segment to be subjected to special effect processing. For example, referring to fig. 1, a time axis of a motion picture is shown, and a user sets a multi-frame image between a point a and a point b of the time axis of the motion picture to perform special effect processing, where the point a is understood as a division start position of a rich media file and the point b is an division end position of the rich media file.
(6) Special effect mode: broadly refers to any special effect, such as one or more of fading in, fading out, adding an expression, adding a filter, etc.
(7) Target special effect mode: refers to a special effect mode for processing the rich media file. The target special effect mode may be a device default special effect mode or one or more special effect modes selected by a user from a plurality of special effect modes. When there are a plurality of target special effect modes, every two target special effect modes may act on different document fragments, or every two target special effect modes may act on one document fragment.
(8) Candidate file segments: the file segments of the rich media file which need special effect processing are referred, and one rich media file may comprise one or more candidate file segments. The candidate file segments may be determined by the device based on default segmentation parameters or may be determined based on segmentation parameters entered by the user.
(9) Target file fragment: the method is a file fragment obtained by carrying out special effect processing on the candidate file fragment.
It should be noted that "at least one" in the embodiments of the present application means one or more, "a plurality" means two or more.
The following provides a detailed description of examples of the present application.
In the related art, when performing special effect processing on a video, the video is usually re-encoded after the special effect processing of the video, so as to obtain the video after the special effect processing. The video is subjected to undifferentiated recoding, and no matter which special effect processing is carried out on the video, the whole video needs to be subjected to recoding completely, so that the video processing amount is large, the processing time is long, and the video processing efficiency is low.
To this end, the present embodiment provides a rich media file processing method capable of processing a rich media file such as a video, for example, a rich media file configured in units of GOP of a group of pictures, or a rich media file other than a rich media file configured in units of GOP of a group of pictures. The embodiment of the present application is described by taking, as an example, a rich media file constituted by taking a group of pictures GOP as a unit, and the technical idea of the method is as follows: the rich media file is divided, candidate file segments to be subjected to special effect processing are divided, when the special effect processing is carried out, the candidate file segments are processed, the file segments subjected to the special effect processing and the file segments which are not subjected to the special effect processing in the rich media file are spliced, and the processed rich media file is obtained.
Firstly, when the method carries out special effect processing on the rich media file, the candidate file segments to be subjected to special effect processing are segmented, the special effect processing is carried out on the candidate file segments, the whole rich media file does not need to be recoded, and compared with the related technology, under the condition that the special effect processing can be carried out on the rich media file, the processing amount can be reduced, and the processing efficiency of the rich media file is improved.
And secondly, because the rich media file can be processed more quickly, the processing result required by the user can be generated more quickly, namely, the user does not need to wait for a long time, the processing time is saved, and the user experience is improved.
Further, the GOP has a certain time length, so that when a rich media file with GOP as a unit is processed, only file segments with the time length being an integral multiple of the time length corresponding to the GOP can be processed, and the rich media file cannot be accurately processed. The method of the embodiment of the application can process the rich media files except the rich media file which is formed by taking GOP as a unit, namely, the rich media file with a smaller forming unit is processed, so that the processing method of the embodiment of the application can more accurately locate the file segments which need to be processed in the rich media file, and the rich media file can be more accurately processed.
For example, the basic composition unit of the rich media file is GOP, the duration of one GOP is 5S, the user specifies that special effect processing needs to be performed on the 3S content in the rich media file, at least one GOP can be processed during processing, that is, the duration of the file segment actually processed is different from the duration specified by the user. In the embodiment of the application, the basic composition unit of the rich media file is one frame and one frame of image, the time length of each frame of image is 0.03S, for example, when a user specifies 3S, 100 frames of images in the rich media file are determined to be processed, that is, the actual processing time length is the same as the time length specified by the user, so that the rich media file is processed more accurately.
Further, considering that sometimes a user may want to add multiple special effect modes to a rich media file, when the user sets multiple target special effect modes and any two target special effect modes act on different file segments, the total duration of the multiple target special effect modes set by the user may exceed the total duration of the rich media file, so that the processing duration of each target special effect mode can be adjusted until the total duration of the adjusted multiple target special effect modes is less than the total duration of the rich media file, and the automatic adjustment of the segmentation parameters set by the user is realized.
Further, considering how to specifically splice the file segments in sequence in the subsequent process of splicing the file segments, in the embodiment of the present application, segment identifiers of the file segments are obtained while the rich media file is segmented, and the segment identifiers of the file segments can be utilized in the splicing process to rapidly splice the target file segment after the special effect processing and the file segments without the special effect processing, so as to obtain the processed video.
An application scenario of the rich media file processing method in the embodiment of the present application is described below.
The rich media file processing method in the embodiment of the application can be executed by rich media file processing equipment. Referring to fig. 2, a schematic diagram of a rich media file processing device is shown, the rich media file processing device 200 includes at least one input device 201, at least one processor 202, at least one memory 203, and at least one output device 204.
The input device 201 is used to provide an input interface to obtain rich media files and the like input by an external device/user. After obtaining the rich media file, the input device 201 sends the rich media file to the processor 202, and the processor 202 uses the program instructions stored in the memory 203 to segment the rich media file to obtain candidate file segments, and performs special effect processing on the candidate file segments to obtain target file segments. And splicing the target file segment and the file segment which is not subjected to special effect processing to obtain the processed rich media file. The output device 204 outputs the processed rich media file.
Input device 201 may include, but is not limited to, one or more of a physical keyboard, function keys, a trackball, a mouse, a touch screen, a joystick, and the like, among others. The processor 202 may be a Central Processing Unit (CPU), a digital processing unit, or the like. The memory 203 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 203 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a hard disk (HDD) or a solid-state drive (SSD), or the memory 203 may be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 203 may be a combination of the above memories. Output device(s) 204 such as a display, speakers, or printer, etc.
In one possible embodiment, the rich media file processing device 200 can be a client device or a server device. The user end device may be a mobile terminal, a fixed terminal, or a portable terminal, such as a mobile handset, a station, a unit, a device, a multimedia computer, a multimedia tablet, an internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a Personal Communication Systems (PCS) device, a personal navigation device, a Personal Digital Assistant (PDA), an audio/video player, a digital camera/camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a gaming device, or any combination thereof, including accessories, peripherals, or any combination thereof, of these devices. It is also contemplated that the rich media file processing device 200 can support any type of interface device for the user (e.g., wearable device, etc.). The server-side device may be a server, a mainframe computing device, etc. for various service offerings. The server may be one or more servers. The server may also be a physical server or a virtual server, etc.
The following exemplifies specific implementations of the rich media file processing device 200, and specific deployments of the device.
A first possible application scenario:
the rich media file processing device 200 is implemented by a terminal device, and may specifically be implemented by a client in the terminal device.
Referring to fig. 3, which shows an exemplary application scenario, fig. 3 can also be understood as a schematic diagram of a possible deployment of the rich media file processing apparatus 200. The application scenario includes a terminal device 310, a server 320, and a client 311 in the terminal device 310. In the embodiment of the present application, the client 311 generally refers to a client with a video processing function, and specifically may be a client pre-installed in the terminal device 310, or a client of a web page version, or a client embedded in a third-party application. The user selects or inputs the rich media file through the client 311, and the client 311 performs special effect processing on the rich media file according to the operation of the user to obtain the processed rich media file and display the processed rich media file. The special effect processing procedure performed by the client 311 is specifically described below, and is not described herein again.
After obtaining the processed rich media file, the client 311 may share the processed rich media file to other clients through the server 320 according to the sharing operation of the user.
A second possible application scenario:
the rich media file processing device 200 is implemented by a server.
Referring to fig. 3, in the application scenario, a user inputs or selects a rich media file through the client 311, the client 311 generates a corresponding processing request according to an operation of the user and sends the processing request to the server 320, the server 320 performs special effect processing on the rich media file to obtain a processed rich media file, and sends the processed rich media file to the client 311, and the client 311 displays the processed rich media file.
The client 311 may share the processed rich media file to other clients through the server 320 according to the sharing operation of the user.
The rich media file processing method according to the embodiment of the present application is described below based on a first possible application scenario among the above application scenarios.
Referring to fig. 4, a process diagram of the terminal device 310 executing the rich media file processing method is shown, where the method includes:
s401, the terminal device 310 acquires the rich media file.
When the user wants to process the rich media file, the special effect processing function of the terminal device 310 may be turned on. The user may obtain the rich media files to be processed from the network resource and upload the rich media files to the terminal device 310, or the terminal device 310 may have a plurality of rich media files pre-stored therein, and the user selects one or more rich media files as the rich media files to be processed. The rich media file may be any rich media file, or the rich media file may be a rich media file other than the GOP unit rich media file.
As an embodiment, after acquiring the rich media file, the terminal device 310 obtains the target special effect mode according to a selection operation of the user for the special effect mode.
Specifically, after the terminal device 310 acquires the rich media file, the terminal device 310 may display a plurality of special effect modes, a user may perform a selection operation of the plurality of special effect modes in the terminal device 310, specifically, click a required special effect mode, and the terminal device 310 obtains a target special effect mode according to the selection operation of the user. If the selection operation corresponds to a special effect mode, the terminal device 310 obtains a target special effect mode. If the selection operation corresponds to a plurality of special effect modes, the terminal device 310 obtains a plurality of target special effect modes.
For example, referring to fig. 5, a special effect mode display interface displayed by the terminal device 310 is shown, a plurality of special effect modes 501 are displayed on the terminal device 310, a user performs a selection operation in the special effect mode display interface, and the terminal device 310 obtains a target special effect mode in response to the selection operation. The plurality of special effects modes 501 in fig. 5 are, for example, fade-in, fade-out, filter, etc. in fig. 5.
As an embodiment, the terminal device 310 processes the rich media file in a default trick mode. For example, the terminal device 310 processes the rich media file by default using fade-in and fade-out, which are two target special effect modes obtained by the terminal device 310. In this embodiment of the present application, the terminal device 310 may process the rich media file based on the default special effect mode, and does not need the user to manually select the target special effect mode, thereby simplifying the user operation.
In some cases, the user may not like the various trick modes already existing in the terminal device 310, and in the embodiment of the present application, the terminal device 310 may support the user to create a customized trick mode.
Specifically, the terminal device 310 may obtain a customized target special effect mode according to special effect mode setting information input by the user. The special effect mode setting information is such as a name of the special effect mode, a processing object of the special effect mode, and a processing rule of the special effect mode. The processing object refers to a file type of a special effect mode corresponding to processing, such as processing video, processing audio, or processing a motion picture. The processing rule refers to a processing mode of the rich media file by the special effect mode, the processing rule includes, for example, which part of the file is processed, for example, fade-in can process the beginning part of the rich media file, the processing rule refers to, for example, the content of processing the rich media file, for example, adding some images in the rich media file, or modifying a specific parameter of the rich media file, for example, transparency of the images in the rich media file.
When a user is supported to create a customized special effect mode, how the terminal device 310 converts and generates a corresponding special effect mode according to special effect mode setting information input by the user is involved. The terminal device 310 may support recognizing special effect mode setting information in a code form, for example, when a user inputs the special effect mode setting information, the terminal device 310 may input the special effect mode setting information in the code form, and obtain the special effect mode according to the special effect mode setting information in the code form.
Alternatively, the terminal device 310 may store a correspondence relationship including compiled codes of various keywords and keywords, and after the user inputs the special effect mode setting information in a text form, the terminal device 310 extracts a target keyword in the special effect mode setting information, determines a compiled code corresponding to the target keyword based on the correspondence relationship, and generates the special effect mode based on the compiled code of the target keyword. In this embodiment, the terminal device 310 may automatically compile the special effect mode setting information input by the user based on the stored correspondence.
For example, referring to fig. 5 again, the special effect display interface further includes a custom key 502, and the terminal device 310 displays a special effect mode creation interface as shown in fig. 6 in response to a click operation performed by a user on the custom key 502, where the special effect mode creation interface includes a special effect mode information definition box 600, and the special effect mode information definition box 600 specifically includes a name input box 601 of the special effect mode, a processing object input box 602 of the special effect mode, a processing rule input box 603 of the special effect mode, and the like. The terminal device 310 obtains the name, the processing object, and the processing rule of the special effect mode according to the input operation performed by the user in the name input box 601, the input operation performed by the user in the processing object input box 602, and the input operation performed by the user in the processing rule input box 603, and after obtaining the special effect mode setting information, the terminal device 310 generates the user-defined special effect mode.
S402, the terminal device 310 responds to the rich media file segmentation request, and segments the candidate file segment from the rich media file.
After the terminal device 310 obtains the rich media file, the user may perform a splitting operation on the terminal device 310, that is, the terminal device 310 may split the candidate file segments from the rich media file according to the splitting request, which is equivalent to the user issuing the splitting request. There are various ways for the terminal device 310 to segment the rich media file to obtain the candidate file segments, and specific examples are as follows:
in one embodiment, the terminal device 310 may display the splitting confirmation interface according to default splitting parameters, such as one or more of a splitting start point, a splitting end point and a processing time length of the split rich media file. The segmentation confirmation interface is used for prompting a user whether to segment the file segment corresponding to the rich media file. When the user performs a confirmation operation of dividing the rich media file in the division confirmation interface, which is equivalent to that the terminal device 310 obtains a division request, the terminal device 310 divides the candidate file segment from the rich media file according to the division request.
After displaying the splitting confirmation interface, the user may perform a cancellation operation of splitting the rich media file, and the terminal device 310 may obtain a cancellation splitting request and may not continue processing the rich media file in response to the cancellation splitting request.
For example, referring to the division confirmation interface of fig. 7, the division confirmation interface includes a confirmation division operation key 701 and a cancellation division operation key 702, the user clicks the confirmation division operation key 701, and the terminal device 310 divides the rich media file according to the default division parameter based on the clicking operation. Or the terminal device 310 receives the click operation of the cancel division operation key 702 to cancel the division of the rich media file.
In addition, the segmentation confirmation interface in fig. 7 further includes a time axis 703 of the rich media file, and the user can know that the duration of the rich media file is 10 seconds according to the time axis of the rich media file.
Secondly, the terminal device 310 responds to the rich media file segmentation request and displays a rich media file segmentation parameter input interface; responding to input operation on a segmentation parameter input interface, and acquiring segmentation parameters for segmenting the rich media file; and according to the segmentation parameters, segmenting the rich media file to obtain candidate file segments.
After the terminal device 310 acquires the rich media file, it may be determined that the rich media file needs to be segmented next time, and a click operation on the displayed segmentation key is received, that is, a segmentation request is obtained, and the terminal device 310 displays a segmentation parameter input interface of the rich media file according to the segmentation request. The terminal device 310 may receive the inputted segmentation parameters through the segmentation parameter input interface. The terminal device 310 may perform corresponding input operations for various segmentation parameters according to a user, and obtain corresponding segmentation parameters. The input operation may include one or a combination of the following:
a1: and inputting a duration on the segmentation parameter input interface.
The terminal device 310 may obtain the processing time length for segmenting the rich media file according to the time length input operation. The definition of the processing duration can refer to the content discussed above, and is not described herein again.
A2: and inputting operation at the segmentation starting position on the segmentation parameter input interface.
The terminal device 310 may obtain a division start position at which the rich media file is divided, according to the division start position input operation.
A3: and inputting operation at a segmentation ending position on the segmentation parameter input interface.
The terminal device 310 may obtain a division end position where the rich media file is divided, according to the division end position input operation.
For example, referring to fig. 7 again, after the user clicks the confirmation division operation key 701 in fig. 7, the terminal device 310 receives a click operation for the confirmation division operation key 701, and displays the division parameter input interface shown in fig. 8, and the terminal device 310 obtains the division parameters such as the input duration, the input division start position, and the input division end position, according to the input operation for the duration input box 801 and the input operation for the division start position input box 802 and the input operation for the division end position input box 803.
As an embodiment, when there are multiple target special effect modes, after obtaining the processing time length corresponding to each target special effect mode, and any two target special effect modes act on different file segments, if it is determined that the sum of the processing time lengths of the multiple target special effect modes is greater than the total time length of the rich media file, the processing time length of each target special effect mode is adjusted, and the adjusted processing time length of the target special effect mode is obtained, and the sum of the adjusted processing time lengths of the multiple target special effect modes is less than the total time length of the rich media file.
When the processing time duration of each target special effect mode is adjusted, the processing time duration of each target special effect mode can be reduced in an equal proportion according to the original processing time duration of each target special effect mode, or the same time duration can be reduced on the basis of the processing time duration of each target special effect mode, or the processing time duration of a part of target special effect modes in a plurality of target special effect modes can be reduced, and the like.
Further, after the terminal device 310 obtains the adjusted processing duration of the target special effect mode, a confirmation interface may be displayed, and the terminal device 310 may determine the adjusted processing duration of the special effect mode in response to a confirmation operation on the confirmation interface. Alternatively, the terminal device 310 adjusts the processing time length of each target special effect mode again according to the modification operation performed for the adjusted processing time length of the target special effect mode.
For example, please refer to fig. 9, which shows an example of interface change in the process of adjusting the processing duration corresponding to each target special effect mode. As shown in (1) in fig. 9, the processing time duration of fade-in input by the user is 10S, the processing time duration of fade-out is 5S, the terminal device 310 determines that the sum of the processing time durations of the two target special effect modes is greater than the total time duration of the rich media file, the terminal device 310 may reduce the processing time durations of fade-in and fade-out in an equal proportion to obtain the processing time duration of fade-in as 5S and the special effect processing time duration of fade-out as 2.5S, the terminal device 310 displays a confirmation interface as shown in (2) in fig. 9, and the terminal device 310 confirms the processing time duration of each target special effect mode according to a click operation on a confirmation key 901 on the confirmation interface. Or the terminal device 310 adjusts the processing time length of each target special effect mode again according to the click operation of the modification key 902 on the confirmation interface and the modification information of the user for each processing time length.
As an embodiment, when the target special effect mode includes a plurality of target special effect modes, there are two target special effect modes that act on different file segments. For any one of the two target special effect modes acting on different file segments, the terminal device 310 may execute the above process to obtain a candidate file segment corresponding to each target special effect mode. The two different file clips mean that the two file clips do not overlap on the time axis of the rich media file. In this case, for each target special effect mode, one candidate file segment is segmented, and if there are multiple target special effect modes, the terminal device 310 correspondingly obtains multiple candidate file segments.
For example, referring to fig. 10, a schematic interface diagram of a rich media file divided according to a division parameter is shown. Continuing with the example of fig. 9, fade in the first 5S for processing the rich media file, fade out the last 2.5S for processing the rich media file, and the terminal device 310 segments the rich media file according to the adjusted segmentation parameters in fig. 9, to obtain three file segments shown in fig. 10, specifically, an ab segment, a cd segment, and an ef segment in fig. 10. The ab segment is a candidate file segment corresponding to fade-in, the cd segment is a file segment which does not need processing, and the ef segment is a candidate file segment corresponding to fade-out.
When the target special effect modes include a plurality of target special effect modes, there may be a case where two target special effect modes act on two file clips having a part of the same, that is, a file clip on which one target special effect mode acts has a partial overlap with a file clip on which another target special effect mode acts on a time axis. In this case, the terminal device 310 may sort the target special effect mode pairs in the order from short to long processing time lengths corresponding to the target special effect modes, and segment the candidate file segments corresponding to the target special effect modes according to the sorted target special effect modes.
For example, the target special effect mode a is applied to the file segments a from 1S to 5S of the rich media file, the target special effect mode B is applied to the file segments B from 2S to 5S of the rich media file, and the two file segments applied by the target special effect modes a and B are partially overlapped on the time axis of the rich media file. The terminal device 310 determines that the processing time of the target special effect mode a is longer than that of the target special effect mode B, so that the candidate file segment B corresponding to the target special effect mode B can be segmented first, and then the candidate file segment c in the rich media file, specifically the file segments from 1S to 2S, can be segmented according to the target special effect mode a.
For example, referring to fig. 11, a schematic diagram of a rich media file divided according to a division parameter is shown. The user selects two target special effect modes of fade-in and filter to process the rich media file, and the processing time length of fade-in is shorter than that of the filter. The terminal device 310 determines that two file segments acted by the two target special effect modes have partially same segments, and the processing time for determining fade-in is shorter by the terminal device 310, so that a candidate file segment corresponding to fade-in can be segmented, and a candidate file segment ab is obtained. The terminal device 310 segments a file segment that needs to be subjected to filter processing from the remaining file segment bc in the rich media file according to the segmentation parameters associated with the filter, and obtains another candidate file segment be and a file segment ec that does not need special effect processing. When performing subsequent processing, the terminal device 310 needs to perform fade-in processing and retro filter processing on the candidate file segment ab, and needs to perform filter processing on the candidate file segment be.
It should be noted that when the target special effect mode includes a plurality of target special effect modes, there may be a case where two target special effect modes act on two file segments having a part of the same, there may be a case where two target special effect modes act on two different file segments, and both of the cases may not occur or one or both of them may occur in an actual application process. If the data is present, the processing is carried out according to the corresponding mode.
Further, when the target special effect mode includes a plurality of target special effect modes, the terminal device 310 may obtain a special effect identifier of each target special effect mode, for example, the terminal device 310 generates a special effect identifier for each target special effect mode, and associates the special effect identifier of the target special effect mode with a corresponding candidate file segment, so that each candidate file segment is associated with a corresponding special effect identifier, and the terminal device 310 may determine which target special effect mode is used to process the candidate file segment according to the special effect identifier of the candidate file segment.
With reference to the example of fig. 11, the fade-in special effect flag is 10, the filter special effect flag is 11, the candidate file fragment ab is associated with the special effect flags 10 and 11, and the candidate file fragment be is associated with the special effect flag 11.
In addition to generating special effect identifiers for each file segment when the rich media file is divided, in this embodiment of the present application, the terminal device 310 may generate a corresponding segment identifier for each file segment, where the segment identifier is used to indicate an order of the file segment in the rich media file.
Specifically, the sequence of the file segments in the rich media file refers to a sequence of the file segments in the multiple file segments with reference to a time axis of the rich media file, and the terminal device 310 divides the rich media file in any division manner, so that each obtained file segment has a corresponding sequence in the rich media file, and while dividing, the terminal device 310 may generate a segment identifier of each file segment according to the sequence of each file segment with reference to the time axis of the rich media file.
The following describes a process of the terminal device 310 dividing the rich media file to obtain candidate file segments, by taking the rich media file including one or both of a motion picture and audio as an example.
B1, when the rich media file includes a motion picture, the terminal device 310 determines the multi-frame image in the rich media file that needs special effect processing according to the dividing parameter, and divides the multi-frame image from the rich media file to obtain candidate file segments.
Specifically, since the motion picture is sequentially composed of frames and images, the terminal device 310 may determine the images that need special effect processing in the rich media file according to the segmentation parameters, and segment the images from the rich media file to obtain candidate file segments.
B2, when the rich media file includes audio, the terminal device 310 determines a plurality of bit numbers that need special effect processing in the rich media file according to the dividing parameter, and divides the plurality of bit numbers from the rich media file to obtain candidate file segments.
Specifically, since the audio is sequentially composed of one bit number and one bit number, the terminal device 310 may determine a plurality of bit numbers to be divided in the rich media file according to the dividing parameters, so as to obtain the candidate file segments.
And B3, when the rich media file comprises a motion picture and audio, determining a plurality of frame images which need special effect processing in the rich media file and a plurality of bit numbers, and obtaining candidate file segments which need processing of the rich media file.
S403, the terminal device 310 responds to the special effect processing request, and performs special effect processing on the candidate file segment to obtain the target file segment.
After the terminal device 310 obtains the candidate file segment, a special effect processing confirmation interface may be displayed, the terminal device 310 receives a special effect processing confirmation operation confirmed through the special effect processing confirmation interface, which is equivalent to obtaining a special effect processing request, and the terminal device 310 performs special effect processing on the candidate file segment in response to the special effect processing request to obtain the target file segment.
Alternatively, the terminal device 310 receives a special effect processing cancellation operation confirmed through the special effect processing confirmation interface, which is equivalent to obtaining a special effect processing cancellation request, and the terminal device 310 cancels the special effect processing of the candidate file segment in response to the special effect processing cancellation request.
When the number of the candidate file segments is more than one, the terminal device 310 responds to the special effect processing confirmation operation performed on all the candidate file segments, and the terminal device 310 performs special effect processing on the candidate file segments according to the special effect processing confirmation operation and the target special effect mode associated with the candidate file segments to obtain the target file segments.
Or, the terminal device 310 may cancel the special effect processing cancellation operation performed on part of the candidate file segments, and the terminal device 310 may cancel the special effect processing performed on the selected candidate file segment according to the special effect processing cancellation operation, perform the special effect processing on other candidate file segments, and obtain the target file segments corresponding to the other candidate file segments.
It should be noted that, when a candidate file segment is associated with multiple target special effect modes, when a candidate file segment is subjected to special effect processing, the candidate file segment may be processed according to all target special effect modes associated with the candidate file segment, for example, the terminal device 310 may determine a target special effect mode that needs to be processed for the candidate file segment according to a special effect identifier associated with the candidate file segment.
Alternatively, when canceling the special effect processing on the candidate file segment, the terminal device 310 may cancel the processing of one target special effect mode on the candidate file segment according to a cancellation operation of the target special effect mode for the candidate file segment, and still perform the processing of another target special effect mode on the candidate file segment.
The specific manner of performing special effect processing on the candidate file segment is related to the processing rule of the target special effect mode, for example, when the processing rule of the target special effect mode is to add a layer, the terminal device 310 performs special effect processing on the candidate file segment, specifically, the layer is added to each image in the candidate file segment.
Referring to fig. 12, an exemplary view of a special effect processing confirmation interface is shown, where the special effect processing confirmation interface includes a confirmation key 1201 and a cancel key 1202, the terminal device 310 receives a click operation performed on the confirmation key 1201, and the terminal device 310 performs special effect processing on each candidate file fragment ab and candidate file fragment be.
Or, the terminal device 310 receives the click operation performed on the cancel key, cancels the filter operation on the candidate file segment ab, performs the fade-in operation on the candidate file segment ab to obtain the target file segment a1b1, and performs the filter operation on the candidate file segment be by the terminal device 310 to obtain the target file segment b1e 1.
S404, the terminal device 310 responds to the file splicing request, splices the target file segments into the rich media file, and obtains the processed rich media file.
After the target file segment is obtained, the terminal device 310 may display a splicing confirmation interface, where the splicing confirmation interface displays each file segment to be spliced, and the terminal device 310 splices all file segments to obtain the processed rich media file according to a confirmation operation of splicing all file segments performed on the splicing confirmation interface.
Or, for the confirmation operation of selecting the splicing part of the file segments performed on the splicing confirmation interface by the terminal device 310, the terminal device 310 splices the selected part of the file frequency bands to obtain the processed rich media file.
When the file segments are spliced, the terminal device 310 may sequentially splice the file segments according to the segment identifiers of the file segments.
When the file segments are spliced, the positions of the target file segments in the rich media file correspond to the positions of the candidate file segments corresponding to the target file segments in the rich media file. That is to say, during the splicing, the target file segment is spliced to the position of the candidate file segment in the rich media file, and the rich media file formed by splicing the target file segment and the file segment which is not subjected to the special effect processing is obtained.
For example, with continued reference to the example of fig. 12, the terminal device 310 sequentially splices the target file segment a1b1, the target segment b1e1, and the file segment ec that has not been subjected to special effect processing, to obtain a processed rich media file.
As an embodiment, S401 is an optional step, for example, when the terminal device 310 itself stores the rich media file, S401 does not need to be executed.
In the embodiment shown in fig. 4, the rich media processing file executed by the terminal device 310 can relatively reduce the interaction between the server and the terminal device 310, and reduce the network transmission load. Only the file segment to be specially processed needs to be recoded, the whole rich media file does not need to be processed, the time for processing the rich media file is saved, and the processing efficiency of the rich media file is improved. The following compares the required duration for processing the rich media file according to the embodiment of the present application with the required duration for processing the rich media file in the related art:
for example, the time duration of a rich media file is D, the fade-in time duration D1, the fade-out time duration D2 seconds, the time taken to re-encode the rich media file for 1 second is T, and the time taken to split and splice is T, where (D1+ D2) < D. The time consumption of the related technical scheme is D × t, and the time consumption of the embodiment of the application is as follows: d1 × T + D2 × T + T.
According to the formula, the longer the length of the rich media file is, the more time for processing the rich media file can be saved. In addition, because partial segments in the rich media file, namely segments of the rich media file except for fade-in and fade-out processing, are not re-encoded in the embodiment of the present application, the quality of the partial segments is the same as that of the original rich media file, and therefore, compared with the related art, the quality of the rich media file processed in the embodiment of the present application is better.
Based on the second possible application scenario in the application scenarios, the rich media file processing method according to the embodiment of the present application is described below.
Referring to fig. 13, a schematic diagram of interaction between the client 311 and the server 320 is shown, where the interaction process specifically includes:
s1301, the client 311 obtains the rich media file.
The meaning of the rich media file can refer to the content discussed above, and is not described herein again.
S1302, the client 311 sends the rich media file to the server 320.
S1303, the client 311 generates a segmentation request in response to a segmentation operation performed by the user.
The splitting operation, the splitting request, and the like can refer to the foregoing discussion, and are not described in detail herein.
S1304, the client 311 transmits the split request to the server 320.
S1305, the server 320, in response to the request for splitting the rich media file, splits the candidate file segments that need special effect processing from the rich media file.
The content of the rich media file to obtain the candidate file segments can refer to the content discussed above, and will not be described herein.
S1306, the client 311 generates a special effect processing request in response to the special effect processing operation performed by the user.
S1307, the client 311 sends the special effect processing request to the server 320.
S1308, the server 320 responds to the special effect processing request, and performs special effect processing on the candidate file segment to obtain a target file segment.
The content of obtaining the target file segment may refer to the content discussed above, and is not described herein again.
S1309, the client 311 responds to the splicing operation performed by the user to generate a splicing request.
The splicing operation and the splicing request may refer to the contents discussed above, and are not described herein again.
S1310, the client 311 sends the splicing request to the server 320.
S1311, the server 320 splices the target file segments to the rich media file according to the splicing request, and obtains the processed rich media file.
The manner of splicing the servers 320 can refer to the content discussed above, and is not described here.
In the embodiment shown in fig. 13, the rich media processing file is executed by the server 320, which can relatively reduce the processing amount of the terminal device. Because the whole rich media file does not need to be recoded, the processing amount of the rich media file can be reduced, and the time for processing the rich media file is saved.
In order to more clearly illustrate the technical solution in the embodiment of the present application, an example of the rich media file processing method related to the embodiment of the present application is described below with reference to fig. 14. Fig. 14 illustrates an example of a method in which the terminal device 310 executes a rich media file, and examples of the target special effect mode include fade-in and fade-out.
S1401, the terminal device 310 acquires the rich media file.
S1402, the terminal device 310 determines the target special effect mode to fade in and fade out according to the operation of the user selecting the special effect mode.
S1403, the terminal device 310 acquires the processing time length of fade-in, and the processing time length of fade-out.
S1404, the terminal apparatus 310 determines whether the sum of the fade-in processing duration and the fade-out processing duration is greater than the total duration of the rich media file.
S1405, the terminal device 310 adjusts the fade-in processing duration and the fade-out processing duration if it is determined that the sum of the fade-in processing duration and the fade-out processing duration is greater than the total duration of the rich media file.
For example, the processing time for fade-in and fade-out can be reduced proportionally.
It should be noted that S1405 is an optional step, for example, when the sum of the fade-in processing time length and the fade-out processing time length is less than the total time length of the rich media file, S1405 does not need to be executed.
S1406, the terminal device 310 obtains the segmentation parameters.
The segmentation parameters include the adjusted fade-in duration and fade-out duration, etc.
S1407, the terminal device 310 obtains candidate file segments in the rich media file according to the segmentation parameters.
S1408, the terminal device 310 performs special effect processing on the candidate file segment to obtain a target file segment.
S1409, the terminal device 310 splices the target file segment and the file segment that has not undergone special effect processing, to obtain a processed rich media file.
For example, referring to fig. 15, as a schematic process diagram of processing a rich media file, the terminal device 310 segments the rich media file S to obtain file segments 1502 in fig. 15, where the obtained file segments include a candidate file segment S1 to be subjected to fade-in processing, a candidate file segment S2 to be subjected to fade-out processing, and a file segment S3 not to be subjected to special effect processing, and the terminal device 310 may perform special effect processing on the candidate file segment S1 and perform special effect processing on the candidate file segment shown in S2, where the processed file segments include a target file segment S4 and a target file segment S5. The terminal device 310 splices the target file segment S4, the file segment S3 without special effect processing, and the target file segment S5 to obtain a processed rich media file.
Based on the same inventive concept, an embodiment of the present application provides a rich media file processing apparatus, please refer to fig. 16, the apparatus 1600 includes:
the segmenting module 1601 is configured to respond to a segmenting request of the rich media file, and segment a candidate file segment to be subjected to special effect processing from the rich media file;
a special effect processing module 1602, configured to respond to the special effect processing request, perform special effect processing on the candidate file segment to obtain a target file segment;
a splicing module 1603, configured to respond to the file splicing request, splice the target file segments into the rich media file, and generate a processed rich media file; and the splicing position of the target file segment in the rich media file is the position of the candidate file segment in the rich media file.
In one possible embodiment, the segmentation module 1601 is configured to:
responding to the dividing request of the rich media file, and displaying a dividing parameter input interface of the rich media file;
responding to input operation on a segmentation parameter input interface, and acquiring segmentation parameters for segmenting the rich media file;
and according to the segmentation parameters, segmenting the rich media file to obtain candidate file segments.
In one possible embodiment, the segmentation module 1601 is configured to perform a combination of two or more of the following:
responding to a duration input operation on a segmentation parameter input interface, and acquiring the processing duration for segmenting the rich media file; or the like, or, alternatively,
responding to a segmentation starting position input operation on a segmentation parameter input interface, and obtaining a segmentation starting position for segmenting the rich media file; or the like, or, alternatively,
in response to a division end position input operation on the division parameter input interface, a division end position at which the rich media file is divided is obtained.
In one possible embodiment, the division parameter includes any two or more of a processing time length for performing the special effect processing on the rich media file, a division start position, and a division end position, and,
the segmentation module 1601 is configured to perform one or more of the following:
when the rich media file comprises a dynamic image, determining a multi-frame image to be subjected to special effect processing in the rich media file according to the segmentation parameters, and segmenting the multi-frame image from the rich media file to obtain a candidate file segment; or the like, or, alternatively,
when the rich media file comprises audio, determining a plurality of bit numbers to be subjected to special effect processing in the rich media file according to the segmentation parameters, and segmenting the plurality of bit numbers from the rich media file to obtain candidate file segments.
In one possible embodiment, the candidate file segments include a plurality of candidate file segments; and, the special effects processing module 1602 is configured to:
responding to the special effect processing request, aiming at each candidate file segment, carrying out special effect processing on the candidate file segment according to a target special effect mode associated with the candidate file segment, and obtaining a target file segment; or the like, or, alternatively,
obtaining a target special effect mode associated with each candidate file segment, and cancelling special effect processing on the selected candidate file segment according to special effect cancelling processing operation on the selected candidate file segment in the plurality of candidate file segments;
and aiming at each candidate file segment except the selected candidate file segment in the plurality of candidate file segments, carrying out special effect processing on the candidate file segment according to a target special effect mode associated with the candidate file segment to obtain a target file segment.
In a possible embodiment, the segmentation module 1601 is further configured to:
before the media file is subjected to the segmentation parameters of the segmentation, a plurality of target special effect modes are selected from the plurality of special effect modes; any two target special effect modes act on two different file fragments, and each target special effect mode has corresponding processing duration; and the number of the first and second groups,
if the sum of the processing durations of the target special effect modes is larger than the total duration of the rich media file, respectively adjusting the processing duration of each target special effect mode to obtain the adjusted processing duration corresponding to each target special effect mode; and the sum of the special effect time lengths after the adjustment of the plurality of target special effect modes is less than the total time length of the rich media file.
In a possible embodiment, the segmenting module 1601 is further configured to, when segmenting a candidate file segment to be subjected to special effect processing from the rich media file, obtain a segment identifier of the candidate file segment and a segment identifier of a file segment that is not subjected to special effect processing; wherein the segment identifier is used for indicating the sequence of the file segments in the rich media file;
the splicing module 1603 is configured to respond to the file splicing request, sequentially splice the target file segment and the file segment that is not subjected to the special effect processing according to the segment identifiers of the candidate file segments and the segment identifiers of the file segments that are not subjected to the special effect processing, and obtain the rich media file spliced by the target file segment and the file segments that are not subjected to the special effect processing.
It should be noted that the rich media file processing device 1600 shown in fig. 16 can perform any rich media file processing method discussed above, and the details are not repeated here.
Based on the same inventive concept, the present application also provides a computer device, which is equivalent to the rich media file processing device 200 discussed in the foregoing, such as the terminal device 310 discussed in the foregoing, or the server 320 discussed in the foregoing.
Referring to fig. 17, the computer apparatus 1700 includes a processor 1780 and a memory 1720.
The processor 1780 is used to read the computer program and then execute the method defined by the computer program, for example, the processor 1780 reads the rich media file processing application program, thereby running the application on the computer device 1700 and displaying the interface of the application on the display unit 1740. The Processor 1780 may include one or more general purpose processors, and may further include one or more Digital Signal Processors (DSPs) for performing relevant operations to implement the solutions provided by the embodiments of the present application.
Memory 1720 typically includes both internal and external memory, which may be Random Access Memory (RAM), Read Only Memory (ROM), and CACHE memory (CACHE). The external memory can be a hard disk, an optical disk, a USB disk, a floppy disk or a tape drive. The memory 1720 is used for storing computer programs including client-side corresponding application programs and the like, and other data, which may include data generated by an operating system or an application program after being executed, including system data (e.g., configuration parameters of the operating system) and user data. Program instructions stored in the memory 1720 of the embodiments of the present application are executed by the processor 1780 to implement any of the rich media file processing methods discussed above. The processor 1780 may also implement the functionality of the rich media file processing apparatus of FIG. 16, supra.
In addition, the computer device 1700 may further include a display unit 1740 configured to display information input by a user or information provided to the user, various operation interfaces of the computer device 1700, and the like, and in this embodiment, the display unit is mainly configured to display an interface of a client installed in the computer device 1700, a shortcut window, and the like. Alternatively, the Display panel 1741 may be configured in the form of a Liquid Crystal Display (LCD) or an Organic Light-Emitting Diode (OLED). The display panel 1741, such as a touch screen, may collect touch operations of a user (e.g., operations of a player on the display panel 1741 or on the display panel 1741 using any suitable object or accessory such as a finger, a stylus, etc.) on or near the display panel 1741, and drive the corresponding connection device according to a preset program.
Alternatively, the display panel 1741 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch direction of a player, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 1780, and can receive and execute commands sent from the processor 1780. In the embodiment of the present invention, when the user performs the operation of the special effect processing, if the touch detection device in the display panel 1741 detects the touch operation, the touch controller transmits a signal corresponding to the detected touch operation, converts the signal into the touch point coordinate, and transmits the touch point coordinate to the processor 1780, and the processor 1780 determines to perform the special effect processing on the rich media file according to the received touch point coordinate.
The display panel 1741 may be implemented by various types, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 1740, the computer device 1700 may also include an input unit 1730, which may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like. An input unit 1730 such as an image input device 1731 and other input devices 1732.
In addition to the above, the computer device 1700 may also include a power supply 1790 for powering the other modules, audio circuitry 1760, a near field communication module 1770, and RF circuitry 1710. Computer device 1700 may also include one or more sensors 1750, such as acceleration sensors, light sensors, pressure sensors, and the like. The audio circuit 1760 specifically includes a speaker 1761 and a microphone 1762, for example, when the user does not use a touch screen, the computer device 1700 may collect the voice of the user through the microphone 1762, and use the voice of the user as a control instruction, analyze the voice, and obtain an operation corresponding to the user. The user may play the rich media file through the speaker 1761.
Based on the same inventive concept, embodiments of the present application provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the rich media file processing method discussed above. The storage medium in the embodiments of the present application broadly refers to a computer-readable storage medium.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (15)

1. A rich media file processing method, comprising:
responding to a segmentation request of the rich media file, and segmenting candidate file segments to be subjected to special effect processing from the rich media file;
responding to a special effect processing request, and carrying out special effect processing on the candidate file fragment to obtain a target file fragment;
responding to a file splicing request, splicing the target file segments into the rich media file, and generating a processed rich media file; wherein the splicing position of the target file segment in the rich media file is the position of the candidate file segment in the rich media file.
2. The method of claim 1, wherein the segmenting candidate file segments to be subjected to special effects processing from the rich media file in response to a rich media file segmentation request comprises:
responding to a segmentation request of the rich media file, and displaying a segmentation parameter input interface of the rich media file;
responding to the input operation on the segmentation parameter input interface, and acquiring segmentation parameters for segmenting the rich media file;
and according to the segmentation parameters, segmenting the rich media file to obtain candidate file segments.
3. The method of claim 2, wherein the obtaining of the splitting parameter for splitting the rich media file in response to the input operation on the splitting parameter input interface comprises a combination of two or more of:
responding to a duration input operation on the segmentation parameter input interface, and obtaining the processing duration for segmenting the rich media file; or the like, or, alternatively,
responding to a segmentation starting position input operation on the segmentation parameter input interface, and obtaining a segmentation starting position for segmenting the rich media file; or the like, or, alternatively,
and responding to a segmentation end position input operation on the segmentation parameter input interface to obtain a segmentation end position for segmenting the rich media file.
4. The method according to claim 2 or 3, wherein the division parameter includes any two or more of a processing time length for special effects processing of the rich media file, a division start position, and a division end position, and,
the rich media file is segmented according to the segmentation parameters to obtain candidate file segments, wherein the candidate file segments comprise one or more of the following:
when the rich media file comprises a dynamic image, determining a plurality of frames of images to be subjected to special effect processing in the rich media file according to the segmentation parameters, and segmenting the plurality of frames of images from the rich media file to obtain candidate file segments; or the like, or, alternatively,
when the rich media file comprises audio, determining a plurality of bit numbers to be subjected to special effect processing in the rich media file according to the segmentation parameters, and segmenting the plurality of bit numbers from the rich media file to obtain candidate file segments.
5. The method of claim 2 or 3, wherein the candidate document snippets include a plurality of candidate document snippets; and the number of the first and second groups,
the responding to the special effect processing request, performing special effect processing on the candidate file segment to obtain a target file segment, including:
responding to the special effect processing request, aiming at each candidate file segment, carrying out special effect processing on the candidate file segment according to a target special effect mode associated with the candidate file segment, and obtaining a target file segment; or the like, or, alternatively,
obtaining a target special effect mode associated with each candidate file segment, and carrying out special effect cancellation operation on the selected candidate file segment in the plurality of candidate file segments to cancel the special effect processing on the selected candidate file segment;
and aiming at each candidate file segment except the selected candidate file segment in the plurality of candidate file segments, carrying out special effect processing on the candidate file segment according to a target special effect mode associated with the candidate file segment to obtain a target file segment.
6. The method of claim 5,
before the step of acquiring the splitting parameter for splitting the rich media file in response to the input operation on the splitting parameter input interface, the method comprises the following steps: selecting a plurality of target special effect modes from the plurality of special effect modes; any two target special effect modes act on two different file fragments, and each target special effect mode has corresponding processing duration;
the obtaining of the segmentation parameters for segmenting the rich media file in response to the input operation on the segmentation parameter input interface further comprises:
if the sum of the processing durations of the plurality of target special effect modes is larger than the total duration of the rich media file, respectively adjusting the processing duration of each target special effect mode to obtain the adjusted processing duration corresponding to each target special effect mode; wherein a sum of the adjusted special effect durations of the plurality of target special effect modes is smaller than a total duration of the rich media file.
7. The method according to any one of claims 1 to 3,
when candidate file segments to be subjected to special effect processing are segmented from the rich media file, segment identifications of the candidate file segments and segment identifications of file segments which are not subjected to special effect processing are obtained; wherein the segment identifier is used for indicating the sequence of the file segments in the rich media file; and
the responding to the file splicing request, splicing the target file segment to the position of the candidate file segment in the rich media file, and obtaining the rich media file spliced by the target file segment and the file segment which is not subjected to special effect processing, including:
responding to a file splicing request, sequentially splicing the target file segment and the file segment which is not subjected to special effect processing according to the segment identification of the candidate file segment and the segment identification of the file segment which is not subjected to special effect processing, and obtaining the rich media file spliced by the target file segment and the file segment which is not subjected to special effect processing.
8. A rich media file processing apparatus, comprising:
the device comprises a segmentation module, a search module and a search module, wherein the segmentation module is used for responding to a segmentation request of a rich media file and segmenting candidate file segments to be subjected to special effect processing from the rich media file;
the special effect processing module is used for responding to a special effect processing request and carrying out special effect processing on the candidate file fragment to obtain a target file fragment;
the splicing module is used for responding to a file splicing request, splicing the target file segments into the rich media file and generating a processed rich media file; wherein the splicing position of the target file segment in the rich media file is the position of the candidate file segment in the rich media file.
9. The apparatus of claim 8, wherein the partitioning module is to:
responding to a segmentation request of the rich media file, and displaying a segmentation parameter input interface of the rich media file;
responding to the input operation on the segmentation parameter input interface, and acquiring segmentation parameters for segmenting the rich media file;
and according to the segmentation parameters, segmenting the rich media file to obtain candidate file segments.
10. The apparatus of claim 9, wherein the partitioning module is configured to perform a combination of two or more of:
responding to a duration input operation on the segmentation parameter input interface, and obtaining the processing duration for segmenting the rich media file; or the like, or, alternatively,
responding to a segmentation starting position input operation on the segmentation parameter input interface, and obtaining a segmentation starting position for segmenting the rich media file; or the like, or, alternatively,
and responding to a segmentation end position input operation on the segmentation parameter input interface to obtain a segmentation end position for segmenting the rich media file.
11. The apparatus according to claim 9 or 10, wherein the division parameter includes any two or more of a processing time length for performing a special effect process on the rich media file, a division start position, and a division end position, and,
the segmentation module is configured to perform a combination of one or more of:
when the rich media file comprises a dynamic image, determining a plurality of frames of images to be subjected to special effect processing in the rich media file according to the segmentation parameters, and segmenting the plurality of frames of images from the rich media file to obtain candidate file segments; or the like, or, alternatively,
when the rich media file comprises audio, determining a plurality of bit numbers to be subjected to special effect processing in the rich media file according to the segmentation parameters, and segmenting the plurality of bit numbers from the rich media file to obtain candidate file segments.
12. The apparatus of claim 9 or 10, wherein the candidate file segments comprise a plurality of candidate file segments; and the special effect processing module is used for:
responding to the special effect processing request, aiming at each candidate file segment, carrying out special effect processing on the candidate file segment according to a target special effect mode associated with the candidate file segment, and obtaining a target file segment; or the like, or, alternatively,
obtaining a target special effect mode associated with each candidate file segment, and cancelling special effect processing on the selected candidate file segment according to special effect cancelling processing operation on the selected candidate file segment in the plurality of candidate file segments;
and aiming at each candidate file segment except the selected candidate file segment in the plurality of candidate file segments, carrying out special effect processing on the candidate file segment according to a target special effect mode associated with the candidate file segment to obtain a target file segment.
13. The apparatus of claim 12, wherein the partitioning module is further to:
selecting a plurality of target special effect modes from the plurality of special effect modes; any two target special effect modes act on two different file fragments, and each target special effect mode has corresponding processing duration; and the number of the first and second groups,
if the sum of the processing durations of the plurality of target special effect modes is larger than the total duration of the rich media file, respectively adjusting the processing duration of each target special effect mode to obtain the adjusted processing duration corresponding to each target special effect mode; wherein a sum of the adjusted special effect durations of the plurality of target special effect modes is smaller than a total duration of the rich media file.
14. A computer device, comprising:
at least one processor, and
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the at least one processor implementing the method of any one of claims 1-7 by executing the instructions stored by the memory.
15. A storage medium storing computer instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 7.
CN202010541538.9A 2020-06-15 2020-06-15 Rich media file processing method and device, computer equipment and storage medium Active CN113810783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010541538.9A CN113810783B (en) 2020-06-15 2020-06-15 Rich media file processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010541538.9A CN113810783B (en) 2020-06-15 2020-06-15 Rich media file processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113810783A true CN113810783A (en) 2021-12-17
CN113810783B CN113810783B (en) 2023-08-25

Family

ID=78892429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010541538.9A Active CN113810783B (en) 2020-06-15 2020-06-15 Rich media file processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113810783B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339446A (en) * 2021-12-28 2022-04-12 北京百度网讯科技有限公司 Audio and video editing method, device, equipment, storage medium and program product

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100272419A1 (en) * 2009-04-23 2010-10-28 General Instrument Corporation Digital video recorder recording and rendering programs formed from spliced segments
US20120137015A1 (en) * 2010-11-30 2012-05-31 General Instrument Corporation Method of targeted ad insertion using http live streaming protocol
CN102724423A (en) * 2011-09-30 2012-10-10 新奥特(北京)视频技术有限公司 Method and apparatus for material segmentation processing
US20130232195A1 (en) * 2010-12-06 2013-09-05 Tencent Technology (Shenzhen) Company Limited Method, device and system for obtaining rich media files
CN105657538A (en) * 2015-12-31 2016-06-08 北京东方云图科技有限公司 Method and device for synthesizing video file by mobile terminal
US20160173960A1 (en) * 2014-01-31 2016-06-16 EyeGroove, Inc. Methods and systems for generating audiovisual media items
CN107948729A (en) * 2017-12-13 2018-04-20 广东欧珀移动通信有限公司 Rich Media's processing method, device, storage medium and electronic equipment
CN108012090A (en) * 2017-10-25 2018-05-08 北京川上科技有限公司 A kind of method for processing video frequency, device, mobile terminal and storage medium
US20190132642A1 (en) * 2016-10-17 2019-05-02 Tencent Technology (Shenzhen) Company Limited Video processing method, video processing device, and storage medium
CN110121104A (en) * 2018-02-06 2019-08-13 上海全土豆文化传播有限公司 Video clipping method and device
CN110213672A (en) * 2019-07-04 2019-09-06 腾讯科技(深圳)有限公司 Video generation, playback method, system, device, storage medium and equipment
CN110674341A (en) * 2019-09-11 2020-01-10 广州华多网络科技有限公司 Special effect processing method and device, electronic equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100272419A1 (en) * 2009-04-23 2010-10-28 General Instrument Corporation Digital video recorder recording and rendering programs formed from spliced segments
US20120137015A1 (en) * 2010-11-30 2012-05-31 General Instrument Corporation Method of targeted ad insertion using http live streaming protocol
US20130232195A1 (en) * 2010-12-06 2013-09-05 Tencent Technology (Shenzhen) Company Limited Method, device and system for obtaining rich media files
CN102724423A (en) * 2011-09-30 2012-10-10 新奥特(北京)视频技术有限公司 Method and apparatus for material segmentation processing
US20160173960A1 (en) * 2014-01-31 2016-06-16 EyeGroove, Inc. Methods and systems for generating audiovisual media items
CN105657538A (en) * 2015-12-31 2016-06-08 北京东方云图科技有限公司 Method and device for synthesizing video file by mobile terminal
US20190132642A1 (en) * 2016-10-17 2019-05-02 Tencent Technology (Shenzhen) Company Limited Video processing method, video processing device, and storage medium
CN108012090A (en) * 2017-10-25 2018-05-08 北京川上科技有限公司 A kind of method for processing video frequency, device, mobile terminal and storage medium
CN107948729A (en) * 2017-12-13 2018-04-20 广东欧珀移动通信有限公司 Rich Media's processing method, device, storage medium and electronic equipment
CN110121104A (en) * 2018-02-06 2019-08-13 上海全土豆文化传播有限公司 Video clipping method and device
CN110213672A (en) * 2019-07-04 2019-09-06 腾讯科技(深圳)有限公司 Video generation, playback method, system, device, storage medium and equipment
CN110674341A (en) * 2019-09-11 2020-01-10 广州华多网络科技有限公司 Special effect processing method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339446A (en) * 2021-12-28 2022-04-12 北京百度网讯科技有限公司 Audio and video editing method, device, equipment, storage medium and program product
CN114339446B (en) * 2021-12-28 2024-04-05 北京百度网讯科技有限公司 Audio/video editing method, device, equipment, storage medium and program product

Also Published As

Publication number Publication date
CN113810783B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
US11206448B2 (en) Method and apparatus for selecting background music for video shooting, terminal device and medium
EP3979658A1 (en) Processing method, processing device, electronic device, and storage medium
JP5883932B2 (en) Local and remote media item management
US20150177903A1 (en) Method and apparatus for controlling scale resolution in electronic device
EP2527999A1 (en) Method and apparatus for splitting media files
US11705120B2 (en) Electronic device for providing graphic data based on voice and operating method thereof
EP3971707A1 (en) Screen sharing processing method, apparatus and device, and storage medium
JP6665200B2 (en) Multimedia information processing method, apparatus and system, and computer storage medium
CN112445395B (en) Music piece selection method, device, equipment and storage medium
US20130036196A1 (en) Method and system for publishing template-based content
EP3382707A1 (en) Audio file re-recording method, device and storage medium
US20110196520A1 (en) Systems and methods for application sound management
EP3467681B1 (en) Data migration method and device
KR20170057334A (en) Actionable item switcher view
CN113810783B (en) Rich media file processing method and device, computer equipment and storage medium
US20100162234A1 (en) Method for installing application and computer system thereof
US10133408B2 (en) Method, system and computer program product
CN103631872A (en) Method for playing multimedia files and electronic terminal
US9087057B2 (en) Content processing apparatus, method, and system
US10691336B2 (en) File-based custom configuration of dynamic keyboards
KR102353797B1 (en) Method and system for suppoting content editing based on real time generation of synthesized sound for video content
CN112036149A (en) File editing method and device, electronic equipment and storage medium
JP5479198B2 (en) Electronic device and image processing program
US10027750B1 (en) Utilizing network identifiers that are based on media items
KR20190101601A (en) Method for displaying chart and apparatus using the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant