CN113810783B - 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
CN113810783B
CN113810783B CN202010541538.9A CN202010541538A CN113810783B CN 113810783 B CN113810783 B CN 113810783B CN 202010541538 A CN202010541538 A CN 202010541538A CN 113810783 B CN113810783 B CN 113810783B
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.)
Active
Application number
CN202010541538.9A
Other languages
Chinese (zh)
Other versions
CN113810783A (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

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 a rich media file, and segmenting candidate file fragments to be subjected to special effect processing from the rich media file; responding to the special effect processing request, and carrying out special effect processing on the candidate file fragments to obtain target file fragments; responding to a file splicing request, splicing the target file segment into the rich media file, and generating a processed rich media file; and the splicing position of the target file fragment in the rich media file is the position of the candidate file fragment 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, a rich media file processing device, computer equipment and a storage medium.
Background
With the continuous development of video technology, the present technology can support recoding of video, such as adding special effects to video. In the process of recoding video, the whole video is often recoded, and because of more video frames needing recoding, a great deal of time is consumed in the recoding process, and the processing efficiency is lower.
Disclosure of Invention
The embodiment of the application 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.
In one aspect, a method for processing a rich media file is provided, including:
responding to a segmentation request of a rich media file, and segmenting candidate file fragments to be subjected to special effect processing from the rich media file;
responding to the special effect processing request, and carrying out special effect processing on the candidate file fragments to obtain target file fragments;
responding to a file splicing request, splicing the target file segment into the rich media file, and generating a processed rich media file; and the splicing position of the target file fragment in the rich media file is the position of the candidate file fragment in the rich media file.
In another aspect, there is provided a rich media file processing apparatus, including:
the segmentation module is used for responding to a segmentation request of the rich media file and segmenting candidate file fragments to be subjected to special effect processing from the rich media file;
the special effect processing module is used for responding to the special effect processing request, carrying out special effect processing on the candidate file fragments and obtaining target file fragments;
The splicing module is used for responding to a file splicing request, splicing the target file segment into the rich media file and generating a processed rich media file; and the splicing position of the target file fragment in the rich media file is the position of the candidate file fragment in the rich media file.
In a possible embodiment, the segmentation module is further configured to obtain, when a candidate file segment to be subjected to special effect processing is segmented from the rich media file, a segment identifier of the candidate file segment, and a segment identifier of a file segment not subjected to special effect processing; wherein the segment identification indicates an order of file segments in the rich media file;
and the splicing module is used for responding to a file splicing request, and sequentially splicing the target file fragment and the file fragment which is not subjected to special effect processing according to the fragment identification of the candidate file fragment and the fragment identification of the file fragment which is not subjected to special effect processing to obtain a rich media file spliced by the target file fragment and the file fragment 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 that, by executing the memory stored instructions, implement any of the rich media file processing methods as previously discussed.
In yet another aspect, a storage medium is provided having stored thereon 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 special effect processing process of the rich media file, the candidate file fragments needing special effect processing in the rich media file are segmented, special effect processing is carried out on the segmented candidate file fragments, and then the processed candidate file fragments and other unprocessed file fragments are spliced. And, because the part of file fragments in the rich media file are not processed, the quality of the part of rich media file is better. The user can also see the processing result faster, and the use experience of the user is improved. In addition, in the embodiment of the application, the rich media files except the GOP are processed, that is, the composition unit of the rich media files is smaller than the GOP, so that the file fragments needing to be processed in the rich media files can be more accurately positioned in the processing process of the rich media files, and the accuracy of processing the rich media files is improved.
Drawings
FIG. 1 is a diagram illustrating a time axis of a rich media file according to 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 an application scenario schematic diagram of a rich media file processing method according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for processing a rich media file according to an embodiment of the present application;
FIG. 5 is an exemplary diagram of a special effects mode display interface provided by an embodiment of the present application;
FIG. 6 is an exemplary diagram of a special effects pattern creation interface provided by an embodiment of the present application;
FIG. 7 is an exemplary diagram of a segmentation validation 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 time duration according to an embodiment of the present application;
FIG. 10 is an exemplary diagram of a segmented rich media file provided by an embodiment of the present application;
FIG. 11 is an exemplary diagram II of a segmented rich media file according to an embodiment of the present application;
FIG. 12 is an exemplary diagram of a special effects processing validation interface provided by an embodiment of the present 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 schematic process diagram of a method for processing a rich media file according to an embodiment of the present application;
FIG. 15 is an exemplary diagram of a process for processing a rich media file according to the method of FIG. 14;
FIG. 16 is a schematic 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 will be given with reference to the accompanying drawings and specific embodiments.
In order to better understand the technical solutions in the embodiments of the present application, the following describes the proper nouns 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 video, an audio, or a video. 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 formed by taking a group of pictures (Group Of Pictures, GOP) as a unit, for example, a video compressed by using an H265 compression method. The rich media file in the embodiments of the present application is, for example, a moving picture, audio, or a combination of moving pictures and audio.
(2) File fragment: the embodiment of the present application generally refers to a part of a rich media file obtained by dividing the rich media file, for example, the rich media file may be divided into a file segment 2, a file segment 3, etc. along a time axis of the rich media file 1.
(3) Drawing: broadly referring to a moving image composed of one frame image, a format of a moving image such as a graphic interchange format (Graphics Interchange Format, GIF) format, a bitmap animation format of PNG (Animated Portable Network Graphics, APNG) format, or a WEBP format.
(4) Audio frequency: generally, audio composed of a number of bits in sequence is referred to, 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, which may be device default, or user set. Segmentation parameters include, but are not limited to: a processing time period for dividing the rich media file, a dividing start position for dividing the rich media file, and a dividing end position for dividing the rich media file. The processing duration may be understood as the duration of the file segment to be subjected to the special effect processing. For example, referring to fig. 1, which shows a time axis of a moving picture, a user sets a multi-frame image between a point a and a point b of the time axis of the moving picture to perform special effect processing, where the point a is understood as a start position of division of a rich media file, and the point b is an end position of division of the rich media file.
(6) Special effect mode: generally refers to any special effect such as one or more of fading in, fading out, adding expressions, adding filters, etc.
(7) Target special effect mode: and means a special effect mode for processing the rich media file. The target special effects mode may be a device default special effects mode or one or more special effects modes selected by the user from a plurality of special effects modes. When there are multiple target special effects, each two target special effects can act on different file segments, or each two target special effects can act on one file segment.
(8) Candidate file segments: refers to a file segment in a rich media file that needs special effects processing, and a rich media file may include 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 user-entered segmentation parameters.
(9) Target file fragment: the method refers to file fragments obtained after special effect processing is carried out on candidate file fragments.
It should be noted that "at least one" in the embodiments of the present application means one or more, and "a plurality" means two or more.
The following describes embodiments of the present application in detail.
In the related art, when special effects are performed on a video, the video is recoded after the special effects are performed on the video, so as to obtain the video after the special effects are processed. The video is recoded indiscriminately, no matter what special effect processing is carried out on the video, the whole video is required to be recoded, so that the video processing capacity is large, the processing time is long, and the video processing efficiency is low.
To this end, an embodiment of the present application provides a rich media file processing method capable of processing a rich media file such as video, for example, a rich media file composed in units of group of pictures GOP, or a rich media file other than a rich media file composed in units of group of pictures GOP. The embodiment of the application is described by taking rich media files formed by taking group of pictures (GOP) as a unit as an example, and the technical idea of the method is as follows: and dividing the rich media file, dividing candidate file fragments to be subjected to special effect processing, processing the candidate file fragments when the special effect processing is performed, and splicing the file fragments subjected to the special effect processing and the file fragments which are not subjected to the special effect processing in the rich media file to obtain the processed rich media file.
Firstly, when special effect processing is carried out on the rich media file, candidate file fragments to be subjected to special effect processing are segmented, special effect processing is carried out on the candidate file fragments, and recoding is not needed on the whole rich media file.
Secondly, because the rich media file can be processed more quickly, the processing result required by the user can be generated more quickly naturally, namely, long-time waiting of the user is not needed, the processing time is saved, and the user experience is improved.
Further, the GOP has a certain duration, so when the rich media file with the GOP as a unit is processed, only the file segment with the duration being an integer multiple of the duration corresponding to the GOP can be processed, which results in that the rich media file cannot be processed accurately. The method of the embodiment of the application can process the rich media files except the rich media files formed by taking the GOP as the unit, namely process the rich media files with smaller forming units, so that the processing method of the embodiment of the application can more accurately position the file fragments needing to be processed in the rich media files and realize more accurate processing of the rich media files.
For example, the basic composition unit of the rich media file is GOP, the duration of one GOP is 5S, the user designates that special effect processing needs to be performed on the 3S content in the rich media file, and at least one GOP can be processed during processing, that is, the duration of the file segment actually processed is different from the duration designated by the user. In the embodiment of the application, the basic composition unit of the rich media file is a frame-by-frame image, the duration of each frame image is 0.03S for example, when the user designates 3S, 100 frames of images in the rich media file are determined to be processed, namely the actual processing duration is the same as the duration designated by the user, so that the rich media file is processed more accurately.
Further, considering that a user may want to add multiple special effects modes to a rich media file, when the user sets multiple target special effects modes and any two target special effects modes act on different file segments, the total duration of the multiple target special effects modes set by the user may exceed the total duration of the rich media file, so that the processing duration of each target special effects mode can be adjusted until the total duration of the multiple target special effects modes after adjustment is smaller than the total duration of the rich media file, and the segmentation parameters set by the user are automatically adjusted.
Further, considering how to splice in sequence in the subsequent process of splicing the file fragments, the embodiment of the application can obtain the fragment identification of each file fragment while segmenting the rich media file, and can rapidly splice the target file fragment after special effect processing and the file fragment without special effect processing by utilizing the fragment identification of each file fragment in the splicing process to obtain the processed video.
The application scenario of the rich media file processing method in the embodiment of the application is introduced as follows.
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 200 is shown, the rich media file processing device 200 comprising 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 etc. entered by external devices/users. After obtaining the rich media file, the input device 201 sends the rich media file to the processor 202, and the processor 202 segments the rich media file by using program instructions stored in the memory 203 to obtain candidate file segments, and performs special effects processing on the candidate file segments to obtain target file segments. And splicing the target file fragment and the file fragment 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.
Wherein the input device 201 may include, but is not limited to, one or more of a physical keyboard, function keys, a trackball, mouse, touch screen, joystick, etc. The processor 202 may be a central processing unit (central processing unit, CPU), or a digital processing unit, or the like. The memory 203 may be a volatile memory (RAM), such as a random-access memory (RAM); the memory 203 may also be a nonvolatile memory (non-volatile memory), such as a read-only memory, a flash memory (flash memory), a Hard Disk Drive (HDD) or a Solid State Drive (SSD), or 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, but is not limited thereto. The memory 203 may be a combination of the above. The output device 204 is for example a display, a speaker or a printer etc.
In one possible embodiment, the rich media file processing device 200 may 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 site, 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 System (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 game device, or any combination thereof, including the accessories of these devices, peripherals, or any combination thereof. It is also contemplated that the rich media file processing device 200 can support any type of interface device for a user (e.g., a wearable device, etc.). The server device may be a server, a large computing device, etc. for various service offerings. The server may be one or more servers. The server may be a physical server, a virtual server, or the like.
An example description of a specific implementation of the rich media file processing device 200, and a specific deployment of the device, is presented below.
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, an exemplary diagram of an application scenario is shown, and FIG. 3 may also be understood as a schematic diagram of one possible deployment of rich media file processing device 200. The application scenario includes a terminal device 310, a server 320, and a client 311 in the terminal device 310. The client 311 in the embodiment of the present application 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, obtains the processed rich media file, and displays the processed rich media file. The special effect processing procedure performed by the client 311 is described in detail below, and is not described here 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 a client 311, the client 311 generates a corresponding processing request according to the operation of the user and sends the processing request to a 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 following describes a rich media file processing method according to an embodiment of the present application based on a first possible application scenario among the application scenarios.
Referring to fig. 4, a process diagram of a method for executing a rich media file processing method for a terminal device 310 is shown, where the method includes:
s401, the terminal device 310 acquires the rich media file.
The special effects processing function of the terminal device 310 may be turned on when the user wants to process the rich media file. The user may obtain the rich media file to be processed from the network resource, upload the rich media file to the terminal device 310, or store a plurality of rich media files in the terminal device 310 in advance, where the user selects one or more rich media files as the rich media file 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 a 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 user selection operation for the special effect mode.
Specifically, after the terminal device 310 obtains the rich media file, the terminal device 310 may display a plurality of special effects modes, and the user may perform a selection operation of the plurality of special effects modes in the terminal device 310, where the selection operation is specifically, for example, clicking 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 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 effects patterns, the terminal device 310 obtains a plurality of target special effects patterns.
For example, referring to fig. 5, a special effect mode display interface displayed on 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 multiple special effects 501 in fig. 5 are, for example, fades in, fades out, filters, etc. in fig. 5.
As one embodiment, the terminal device 310 processes the rich media file in a default special effect mode. For example, the terminal device 310 processes the rich media file by default with a fade, where the fade and the fade are two target special effects obtained by the terminal device 310. In the embodiment of the present application, the terminal device 310 may process the rich media file based on the default special effect mode, without the need for the user to manually select the target special effect mode, so as to simplify the user operation.
In some cases, the user may not like various special effects modes 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 custom special effects mode.
Specifically, the terminal device 310 may obtain the customized target special effect mode according to the special effect mode setting information input by the user. The special effect mode setting information includes the name of the special effect mode, the processing object of the special effect mode and the processing rule of the special effect mode. The processing object refers to a file type of a corresponding processing of the special effect mode, such as processing video, processing audio, processing an image, or the like. Processing rules refer to how the rich media file is processed by the special effect mode, for example, the processing rules include processing which part of the file, for example, fade-in may process the beginning part of the rich media file, and processing rules include processing content of the rich media file, for example, adding some images in the rich media file, or modifying specific parameters of the rich media file, for example, transparency of images in the rich media file, etc.
When the user is supported to create the customized special effect mode, how the terminal device 310 generates the corresponding special effect mode according to the special effect mode setting information input by the user. The terminal device 310 may support special effect mode setting information in the form of an identification code, for example, when a user inputs special effect mode setting information, the terminal device 310 may obtain special effect mode according to the special effect mode setting information in the form of a code.
Alternatively, the terminal device 310 may store a correspondence, where the correspondence includes compiled codes associated with various keywords and keywords, and after the user inputs the special effect mode setting information in text form, the terminal device 310 extracts the target keyword in the special effect mode setting information, determines the compiled code corresponding to the target keyword based on the correspondence, and generates the special effect mode based on the compiled code of the target keyword. In the embodiment of the present application, the terminal device 310 may implement automatic compiling of the special effect mode setting information input by the user based on the stored correspondence.
For example, referring to fig. 5, the special effect display interface further includes a custom button 502, and the terminal device 310 displays a special effect mode creation interface as shown in fig. 6 in response to a clicking operation performed on the custom button 502 by a user, 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 a 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 so on. 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 the terminal device 310 obtains the setting information of the special effect mode, the user-defined special effect mode is generated.
S402, the terminal device 310 segments candidate file segments from the rich media file in response to the segmentation request of 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, which is equivalent to the user sending a splitting request, and the terminal device 310 splits the candidate file segments from the rich media file according to the splitting request. Among these, the terminal device 310 may split the rich media file to obtain candidate file segments in various ways, and specific examples are as follows:
first, the terminal device 310 may display the segmentation validation interface according to a default segmentation parameter, such as a combination of one or more of a segmentation start point, a segmentation end point, and a processing duration of the segmentation of the 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 corresponds to the terminal device 310 obtaining the division request, the terminal device 310 divides the candidate file segments from the rich media file according to the division request.
After the division confirmation interface is displayed, the user may perform a cancel operation of dividing the rich media file, and the terminal device 310 corresponds to obtaining a cancel division request and does not continue processing the rich media file in response to the cancel division request.
For example, referring to the division confirmation interface of fig. 7, the division confirmation interface includes a confirm division operation key 701 and a cancel division operation key 702, and the user clicks the confirm division operation key 701, and the terminal device 310 divides the rich media file according to the default division parameters according to the click operation. Or the terminal device 310 receives a click operation of the cancel division operation key 702, canceling division of the rich media file.
In addition, the segmentation validation interface in fig. 7 further includes a time axis 703 of the rich media file, and the user can learn that the duration of the rich media file is 10 seconds according to the time axis of the rich media file.
Secondly, the terminal equipment 310 responds to the segmentation request of the rich media file and displays 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 dividing the rich media file according to the dividing parameters to obtain candidate file fragments.
After the terminal device 310 obtains the rich media file, it may determine that the next step needs to perform segmentation on the rich media file, and receive a click operation on the displayed segmentation key, that is, obtain a segmentation request, 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 obtain the corresponding segmentation parameters according to the corresponding input operation performed by the user for the various segmentation parameters. Wherein the input operation may include one or a combination of several of the following:
A1: a duration input operation on the segmentation parameter input interface.
The terminal device 310 may obtain a processing duration for dividing the rich media file according to the duration input operation. The definition of the processing time period may refer to the content discussed above, and will not be repeated here.
A2: and inputting operation at a segmentation start position on the segmentation parameter input interface.
The terminal device 310 may obtain a division start position for dividing the rich media file according to the division start position input operation.
A3: and inputting an operation at a segmentation end position on the segmentation parameter input interface.
The terminal device 310 may obtain a division end position for dividing the rich media file according to the division end position input operation.
For example, referring to fig. 7, after the user clicks the confirm split operation key 701 in fig. 7, the terminal device 310 receives a click operation for the confirm split operation key 701, displays the split parameter input interface shown in fig. 8, and obtains the split parameters such as the input duration, the input split start position, and the input split end position according to the input operation for the duration input box 801 and the input operation for the split start position input box 802 and the input operation for the split end position input box 803.
As an embodiment, when there are multiple target special effects modes, after obtaining the processing duration corresponding to each target special effect mode, and any two target special effects modes act on different file segments, if it is determined that the sum of the processing durations of the multiple target special effects modes is greater than the total duration of the rich media file, the processing duration of each target special effect mode is adjusted, so as to obtain the adjusted processing duration of the target special effects mode, and the sum of the processing durations of the multiple target special effects modes is less than the total duration of the rich media file.
When the processing duration of each target special effect mode is adjusted, the processing duration of each target special effect mode can be reduced in an equal proportion according to the original processing duration of each target special effect mode, or the same duration can be reduced on the basis of the processing duration of each target special effect mode, or the processing duration of 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 the confirmation operation on the confirmation interface. Or, the terminal device 310 adjusts the processing duration of each target special effect mode again according to the modification operation performed on the adjusted processing duration of the target special effect mode.
For example, referring to fig. 9, an exemplary diagram of interface changes during adjustment of processing duration corresponding to each target special effect mode is shown. As shown in fig. 9 (1), the processing duration of the fade-in input by the user is 10S, the processing duration of the fade-out is 5S, the terminal device 310 determines that the sum of the processing durations of the two target special effect modes is greater than the total duration of the rich media file, the terminal device 310 may reduce the processing durations of the fade-in and fade-out in equal proportion, obtain the processing duration of the fade-in is 5S, and the processing duration of the fade-out special effect is 2.5S, the terminal device 310 displays a confirmation interface as shown in fig. 9 (2), and the terminal device 310 confirms the processing duration of each target special effect mode according to the click operation on the confirmation key 901 on the confirmation interface. Or the terminal device 310 adjusts the processing duration of each target special effect mode again according to the modification information of each processing duration by the user according to the clicking operation of the modification key 902 on the confirmation interface.
As an example, when the target special effects pattern comprises a plurality of target special effects patterns, and there are two target special effects patterns acting on different file segments. For any one of the two target special effects acting on different file segments, the terminal device 310 may perform the above process to obtain a candidate file segment corresponding to each target special effect. The different two file segments mean that the two file segments 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 a plurality of target special effect modes, the terminal device 310 correspondingly obtains a plurality of candidate file segments.
For example, referring to fig. 10, an interface diagram of a rich media file divided according to a division parameter is shown. Continuing with the example of fig. 9, the first 5S for processing the rich media file is faded in, the second 2.5S for processing the rich media file is faded out, and the terminal device 310 segments the rich media file with the segmentation parameters adjusted in fig. 9, to obtain three file segments as shown in fig. 10, specifically, the ab segment, the cd segment, and the ef segment in fig. 10. The ab fragments are candidate file fragments corresponding to fade-in, the cd fragments are file fragments which do not need to be processed, and the ef fragments are candidate file fragments corresponding to fade-out.
When the target special effect pattern comprises a plurality of target special effect patterns, there may be a case where two target special effect patterns act on two file segments having partially identical, that is, a file segment on which one target special effect pattern acts has a partial overlap with a file segment on which the other target special effect pattern acts on the time axis. In this case, the terminal device 310 may sort the target special effect modes according to the order of the processing duration corresponding to the target special effect modes from short to long, 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 pattern a acts on the 1 st to 5 th file segments a of the rich media file, the target special effect pattern B acts on the 2 nd to 5 th file segments B of the rich media file, and the two file segments on which the target special effect patterns a and B act are partially overlapped on the time axis of the rich media file. The terminal device 310 determines that the processing duration 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 1 st to 2 nd S, can be segmented according to the target special effect mode a.
Specifically, for example, referring to fig. 11, a schematic diagram of a rich media file divided according to a division parameter is shown. And the user selects two target special effect modes of fade-in and filter to process the rich media file, wherein the fade-in processing time is shorter than the filter processing time. The terminal device 310 determines that the two file fragments acted by the two target special effects have partially identical fragments, and the processing duration of the terminal device 310 determines fade-in is shorter, so that the candidate file fragments corresponding to the fade-in can be segmented out, and the candidate file fragments ab are obtained. The terminal device 310 segments a file segment to be subjected to filter processing from the file segments bc remaining in the rich media file according to the filter-associated segmentation parameters, to obtain another candidate file segment be, and a file segment ec not required to be subjected to special effect processing. In the subsequent processing, the terminal device 310 needs to perform fade-in processing and antique 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 effects pattern comprises a plurality of target special effects patterns, there may be cases where two target special effects patterns act on two file segments having partially identical, there may be cases where two target special effects patterns act on two different file segments, neither of these cases may occur during actual application, or one or both of them may occur. If so, processing in a corresponding manner as described above.
Further, when the target special effect mode includes a plurality of target special effect modes, the terminal device 310 may obtain special effect identifiers of each target special effect mode, for example, the terminal device 310 generates special effect identifiers for each target special effect mode, and associates the special effect identifiers of the target special effect mode with corresponding candidate file segments, 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 identifiers of the candidate file segment.
With continued reference to the example of fig. 11, the fade-in effect is identified as 10, the filter effect is identified as 11, the candidate file segment ab is identified as 10 and 11, and the candidate file segment be is identified as 11.
In addition to generating special effect identifiers for each file segment when segmenting the rich media file, in embodiments of the present application, the terminal device 310 may generate corresponding segment identifiers for each file segment, where the segment identifiers are used to indicate the order of the file segments in the rich media file.
Specifically, the sequence of the file segments in the rich media file refers to the sequence of the file segments in the file segments with the time axis of the rich media file as a reference, no matter which segmentation mode is adopted by the terminal device 310 to segment the rich media file, each obtained file segment has a corresponding sequence in the rich media file, and when the file segments are segmented, the terminal device 310 can generate the segment identifier of each file segment according to the sequence of each file segment with the time axis of the rich media file as a reference.
The process of the terminal device 310 dividing the rich media file to obtain candidate file segments will be described below by taking an example in which the rich media file includes one or both of a moving picture and audio.
B1, when the rich media file includes a moving picture, the terminal device 310 determines a multi-frame image in the rich media file, which needs to be subjected to special effect processing, according to the segmentation parameter, and segments the multi-frame image from the rich media file to obtain a candidate file segment.
Specifically, since the moving image is sequentially formed from one frame to one frame, the terminal device 310 may determine, according to the segmentation parameters, images in the rich media file that need special effect processing, segment the images from the rich media file, and obtain candidate file segments.
And B2, when the rich media file comprises audio, the terminal equipment 310 determines a plurality of bit numbers which need special effect processing in the rich media file according to the segmentation parameters, and segments the plurality of bit numbers from the rich media file to obtain candidate file fragments.
Specifically, since the audio is sequentially formed from one bit number to another, the terminal device 310 may determine, according to the splitting parameters, a plurality of bit numbers to be split in the rich media file, and obtain the candidate file segments.
And B3, when the rich media file comprises a moving picture and audio, determining multi-frame images and a plurality of bit numbers which need special effect processing in the rich media file, and obtaining candidate file fragments which need processing of the rich media file.
S403, the terminal device 310 responds to the special effect processing request to perform special effect processing on the candidate file segments, and obtain the target file segments.
After the terminal device 310 obtains the candidate file segment, a special effect processing confirmation interface may be displayed, where the terminal device 310 receives a special effect processing confirmation operation performed through confirmation of the special effect processing confirmation interface, which is equivalent to obtaining a special effect processing request, and the terminal device 310 responds to the special effect processing request to perform special effect processing on the candidate file segment, so as to obtain the target file segment.
Alternatively, the terminal device 310 receives the special effect processing cancellation operation confirmed through the special effect processing confirmation interface, which is equivalent to obtaining the cancellation special effect processing request, and the terminal device 310 cancels the special effect processing of the candidate file segment in response to the cancellation special effect processing 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.
Alternatively, the terminal device 310 may cancel the special effect processing for a part of the candidate file segments, and the terminal device 310 may cancel the special effect processing for the selected candidate file segments according to the special effect processing cancellation, and perform the special effect processing for other candidate file segments to obtain target file segments corresponding to other candidate file segments.
It should be noted that, when the candidate file segment is associated with multiple target special effects, when special effects are performed on the candidate file segment, the candidate file segment may be processed according to all the target special effects associated with the candidate file segment, for example, the terminal device 310 may determine, according to the special effects identifier associated with the candidate file segment, the target special effects that need to be processed on 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 the target special effect mode on the candidate file segment according to a cancel operation of the target special effect mode on the candidate file segment, and still perform other processing of the target special effect mode on the candidate file segment.
The specific special effect processing mode of 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 the special effect processing mode of the candidate file segment, specifically, adds the layer to each image in the candidate file segment.
Referring to fig. 12, an exemplary illustration of a special effect processing confirmation interface includes a confirmation key 1201 and a cancel key 1202, where 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 clicking operation for the cancel button, cancels the filter operation for the candidate file segment ab, but still fades in the candidate file segment ab to obtain the target file segment a1b1, and the terminal device 310 performs the filter operation for the candidate file segment be to obtain the target file segment b1e1.
S404, the terminal device 310 responds to the file splicing request and splices the target file segment into the rich media file to obtain the processed rich media file.
After obtaining the target file segments, the terminal device 310 may display a splice confirmation interface, where each file segment to be spliced is displayed on the splice confirmation interface, and the terminal device 310 splices all the file segments for a confirmation operation performed on the splice confirmation interface to splice all the file segments, so as to obtain the processed rich media file.
Or, the terminal device 310 performs a confirmation operation of selecting a spliced part of the file segments on the splicing confirmation interface, and 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 splice the file segments in sequence according to the segment identifiers of the file segments.
When the file segments are spliced, the position of the target file segment in the rich media file corresponds to the position of the candidate file segment corresponding to the target file segment in the rich media file. That is, when splicing, the target file segment is spliced to the position of the candidate file segment in the rich media file, so as to obtain the rich media file spliced by the target file segment and the file segment which is not subjected to special effect processing.
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 undergone special effects processing, to obtain the processed rich media file.
As an embodiment, S401 is an optional step, such as when the terminal device 310 itself stores the rich media file, then S401 need not be performed.
In the embodiment shown in fig. 4, the terminal device 310 executes the rich media processing file, which can relatively reduce the interaction between the server and the terminal device 310, and reduce the network transmission burden. Only the file segments to be subjected to special effect processing are recoded, the whole rich media file is not required 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 time length required for processing the rich media file according to the embodiment of the present application, and the time length required for processing the rich media file according to the related art:
for example, the length of the rich media file is D, the fade-in length D1, the fade-out length D2 seconds, the time taken to re-encode the rich media file for 1 second is T, 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+d2+t.
As can be seen from 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 the embodiment of the application. In addition, because the embodiment of the application does not recode part of the fragments in the rich media file, namely the fragments except fade-in and fade-out processes in the rich media file, the quality of the part of the fragments is the same as that of the original rich media file, and compared with the related technology, the quality of the rich media file processed in the embodiment of the application is better.
Based on the second possible application scenario among the application scenarios, the following describes a rich media file processing method according to an embodiment of the present application.
Referring to fig. 13, an interaction diagram between the client 311 and the server 320 is shown, and the interaction process specifically includes:
s1301, the client 311 acquires the rich media file.
The manner in which the rich media file is obtained may refer to the content discussed above, and will not be described here.
S1302, the client 311 sends the rich media file to the server 320.
S1303, the client 311 generates a division request in response to the division operation performed by the user.
The splitting operation, splitting request, etc. may refer to those previously discussed, and will not be described in detail herein.
S1304, the client 311 transmits the split request to the server 320.
In S1305, the server 320, in response to the request for splitting the rich media file, splits the candidate file segments that need to be subjected to special effects from the rich media file.
The content of segmenting the rich media file to obtain candidate file segments may be referred to in the foregoing discussion, and will not be described in detail 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 transmits the special effect processing request to the server 320.
S1308, the server 320 responds to the special effect processing request to perform special effect processing on the candidate file segments, and obtains the target file segments.
The content of obtaining the target file segment may refer to the content discussed above, and will not be described herein.
S1309, the client 311 generates a splice request in response to the splice operation performed by the user.
The splicing operation and the splicing request can refer to the content discussed above, and are not repeated here.
S1310, the client 311 sends the splice request to the server 320.
S1311, the server 320 splices the target file segment to the rich media file according to the splicing request, and obtains the processed rich media file.
The manner in which the servers 320 are spliced may be referred to in the foregoing discussion, and will not be described in detail herein.
In the embodiment shown in fig. 13, the execution of the rich media processing file by the server 320 relatively reduces the processing capacity 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 describe the technical solution in the embodiment of the present application, an example description is given below of a rich media file processing method according to the embodiment of the present application with reference to fig. 14. In fig. 14, a method of executing a rich media file by the terminal device 310 is taken as an example, and a target special effect mode is taken as an example for fade-in and fade-out.
S1401, the terminal device 310 acquires the rich media file.
S1402, the terminal device 310 determines that the target special effect mode is fade-in and fade-out according to the operation of selecting the special effect mode by the user.
S1403, the terminal device 310 acquires the processing duration of the fade-in, and the processing duration of the fade-out.
In S1404, the terminal device 310 determines whether the sum of the processing duration of the fade-in and the processing duration of the fade-out is greater than the total duration of the rich media file.
In S1405, if the terminal device 310 determines that the sum of the processing duration of the fade-in and the processing duration of the fade-out is greater than the total duration of the rich media file, the processing duration of the fade-in and the processing duration of the fade-out are adjusted.
Such as the length of fade-in processing, and the length of fade-out processing, etc., may be reduced in equal proportion.
It should be noted that S1405 is an optional step, for example, when the sum of the processing duration of the fade-in and the processing duration of the fade-out is smaller than the total duration of the rich media file, S1405 need not be executed.
S1406, the terminal device 310 obtains the segmentation parameters.
The segmentation parameters comprise the adjusted fade-in time length, fade-out time length and the like.
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 segments to obtain target file segments.
S1409, the terminal device 310 splices the target file segment and the file segment which is not subjected to special effect processing, and obtains the processed rich media file.
For example, referring to fig. 15, in order to illustrate a process of processing a rich media file, the terminal device 310 segments the rich media file S to obtain each file segment 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, 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 each segment after processing includes 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, and obtains the processed rich media file.
Based on the same inventive concept, an embodiment of the present application provides a rich media file processing device, please refer to fig. 16, the device 1600 includes:
a segmentation module 1601, configured to segment a candidate file segment to be subjected to special effect processing from a rich media file in response to a segmentation request of the rich media file;
the special effect processing module 1602 is configured to respond to the special effect processing request and perform special effect processing on the candidate file segments to obtain target file segments;
the splicing module 1603 is used for responding to the file splicing request and splicing the target file segment into the rich media file to generate the processed rich media file; 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 partition module 1601 is configured 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 dividing the rich media file according to the dividing parameters to obtain candidate file fragments.
In one possible embodiment, the partition module 1601 is configured to perform a combination of two or more of the following:
Responding to the time length input operation on the segmentation parameter input interface, and obtaining the processing time length for segmenting the rich media file; or alternatively, the first and second heat exchangers may be,
responding to the input operation of the segmentation starting position on the segmentation parameter input interface, and obtaining the segmentation starting position for segmenting the rich media file; or alternatively, the first and second heat exchangers may be,
and obtaining a segmentation end position for segmenting the rich media file in response to a segmentation end position input operation on the segmentation parameter input interface.
In one possible embodiment, the segmentation parameters include any two or more of a processing duration of special effects processing of the rich media file, a segmentation start position, and a segmentation end position, and,
the partition module 1601 is configured to perform a combination of one or more of:
when the rich media file comprises a moving picture, determining multi-frame images to be subjected to special effect processing in the rich media file according to the segmentation parameters, and segmenting the multi-frame images from the rich media file to obtain candidate file fragments; or alternatively, the first and second heat exchangers may be,
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 fragments.
In one possible embodiment, the candidate file segments comprise a plurality of candidate file segments; and, special effects processing module 1602 is 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 the target special effect mode associated with the candidate file segment, and obtaining a target file segment; or alternatively, the first and second heat exchangers may be,
obtaining a target special effect mode associated with each candidate file segment, and canceling special effect processing on the selected candidate file segment according to canceling special effect 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 segments according to the target special effect mode associated with the candidate file segments to obtain the target file segment.
In one possible embodiment, the partition module 1601 is further configured to:
before the media file is segmented into segmentation parameters, selecting a plurality of target special effect modes from a plurality of special effect modes; any two target special effect modes act on different two file fragments, and each target special effect mode has corresponding processing time length; the method comprises the steps of,
If the sum of the processing time lengths of the multiple target special effect modes is larger than the total time length of the rich media file, respectively adjusting the processing time length of each target special effect mode to obtain adjusted processing time length corresponding to each target special effect mode; the sum of the special effect time lengths after the adjustment of the plurality of target special effect modes is smaller than the total time length of the rich media file.
In a possible embodiment, the segmentation module 1601 is further configured to obtain, when the candidate file segment to be subjected to the special effect processing is segmented from the rich media file, a segment identifier of the candidate file segment and a segment identifier of the file segment not subjected to the special effect processing; wherein the segment identification indicates an order of the file segments in the rich media file;
and the splicing module 1603 is used for responding to the file splicing request, and sequentially splicing the target file fragment and the file fragment which is not subjected to special effect processing according to the fragment identification of the candidate file fragment and the fragment identification of the file fragment which is not subjected to special effect processing, so as to obtain the rich media file spliced by the target file fragment and the file fragment which is not subjected to special effect processing.
It should be noted that the rich media file processing device 1600 shown in fig. 16 may perform any of the rich media file processing methods discussed above, and will not be described herein.
Based on the same inventive concept, embodiments of the present application also provide a computer device, which is equivalent to the rich media file processing device 200 discussed above, specifically, for example, the terminal device 310 discussed above, or, for example, the server 320 discussed above.
Referring to fig. 17, the computer device 1700 includes a processor 1780 and a memory 1720.
The processor 1780 is configured to read a computer program and then execute a method defined by the computer program, for example, the processor 1780 reads a rich media file processing application program, thereby running an application on the computer device 1700 and displaying an interface of the application on the display unit 1740. The processor 1780 may include one or more general-purpose processors and may also include one or more digital signal processors (Digital Signal Processor, DSP) for performing the relevant operations to implement the techniques provided by embodiments of the application.
Memory 1720 typically includes memory and external memory, and memory may be Random Access Memory (RAM), read Only Memory (ROM), CACHE memory (CACHE), etc. The external memory can be a hard disk, an optical disk, a USB disk, a floppy disk, a tape drive, etc. Memory 1720 is used to store computer programs, including client-side corresponding applications, and the like, as well as other data, which may include operating system or data generated after an application is run, including system data (e.g., configuration parameters of the operating system) and user data. Program instructions in the embodiment of the present application are stored in the memory 1720, and the processor 1780 executes the program instructions in the memory 1720 to implement any one 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, previously described.
In addition, the computer device 1700 may further include a display unit 1740 for displaying information input by a user or provided to the user, various operation interfaces of the computer device 1700, etc., and in the embodiment of the present application, is mainly used to display interfaces, shortcut windows, etc. of clients installed in the computer device 1700. Alternatively, the display panel 1741 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD) or an Organic Light-Emitting Diode (OLED), or the like. The display panel 1741, e.g., a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the player on the display panel 1741 or on the display panel 1741 using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a predetermined program.
Alternatively, the display panel 1741 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth 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 detection device and converts it into touch point coordinates, which are then sent to the processor 1780, and can receive commands from the processor 1780 and execute them. In the embodiment of the present application, if the user performs the special effect processing operation, the touch detection device in the display panel 1741 detects the touch operation, and then the touch controller sends a signal corresponding to the detected touch operation, the touch controller converts the signal into the contact coordinates and sends the contact coordinates to the processor 1780, and the processor 1780 determines to perform special effect processing on the rich media file according to the received contact coordinates.
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, and the input unit 1730 may include, but is not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc. Input units 1730 are, for example, an image input device 1731 and other input devices 1732.
In addition to the above, the computer device 1700 may also include a power source 1790 for powering other modules, audio circuitry 1760, a near field communication module 1770, and RF circuitry 1710. The 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, a microphone 1762, and the like, and when the user does not use a touch screen, for example, the computer device 1700 may collect the sound of the user through the microphone 1762, analyze the sound of the user as a control instruction, and obtain an operation corresponding to the user. The user may play the rich media file through speaker 1761.
Based on the same inventive concept, an embodiment of the present application provides a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the rich media file processing method as previously discussed. The storage medium in the embodiments of the present application generally refers to a computer-readable storage medium.
It will be appreciated by those skilled in the art that 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 modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (11)

1. A method for processing a rich media file, comprising:
responding to a segmentation request of a rich media file, and segmenting candidate file fragments to be subjected to special effect processing from the rich media file to obtain fragment identifiers of the candidate file fragments and fragment identifiers of file fragments which are not subjected to special effect processing; the rich media file is formed by taking a first composition unit as a unit, and the duration corresponding to the first composition unit is smaller than the duration of one group of pictures GOP;
responding to the special effect processing request, and carrying out special effect processing on the candidate file fragments to obtain target file fragments;
responding to a file splicing request, splicing the target file segment into the rich media file, and generating a processed rich media file; 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;
the step of 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 generating the processed rich media file comprises the following steps: responding to the file splicing request, and sequentially splicing a target file fragment and the file fragment which is not subjected to special effect processing according to the fragment identification of the candidate file fragment and the fragment identification of the file fragment which is not subjected to special effect processing to obtain a rich media file spliced by the target file fragment and the file fragment which is not subjected to special effect processing;
The method for segmenting candidate file segments to be subjected to special effect processing from the rich media file in response to the segmentation request of the rich media file comprises the following steps: responding to a segmentation request of a rich media file, displaying a segmentation parameter input interface of the rich media file, responding to input operation on the segmentation parameter input interface, acquiring segmentation parameters for segmenting the rich media file, and segmenting the rich media file according to the segmentation parameters to obtain candidate file segments;
before the obtaining of the segmentation parameters for segmenting the rich media file in response to the input operation on the segmentation parameter input interface, the method further includes: selecting a plurality of target special effects modes from a plurality of special effects modes; any two target special effect modes act on different two file fragments, and each target special effect mode has corresponding processing time length;
wherein the responding to the input operation on the segmentation parameter input interface, obtaining the segmentation parameters for segmenting the rich media file comprises the following steps: if the sum of the processing time lengths of the multiple target special effect modes is larger than the total time length of the rich media file, respectively adjusting the processing time length of each target special effect mode to obtain an adjusted processing time length corresponding to each target special effect mode; and the sum of the special effect duration after the adjustment of the plurality of target special effect modes is smaller than the total duration of the rich media file.
2. The method of claim 1, wherein the obtaining the segmentation parameters for segmenting the rich media file in response to the input operation on the segmentation parameter input interface further comprises a combination of two or more of:
responding to the time length input operation on the segmentation parameter input interface, and obtaining the processing time length for segmenting the rich media file; or alternatively, the first and second heat exchangers may be,
responding to the segmentation starting position input operation on the segmentation parameter input interface, and obtaining a segmentation starting position for segmenting the rich media file; or alternatively, the first and second heat exchangers may be,
and responding to the segmentation ending position input operation on the segmentation parameter input interface, and obtaining the segmentation ending position for segmenting the rich media file.
3. The method of claim 2, wherein the segmentation parameters include any two or more of a processing duration, a segmentation start position, and a segmentation end position for performing special effects processing on the rich media file, and,
and dividing the rich media file according to the dividing parameters to obtain candidate file fragments, wherein the candidate file fragments comprise one or more of the following:
when the rich media file comprises a moving picture, determining multi-frame images to be subjected to special effect processing in the rich media file according to the segmentation parameters, and segmenting the multi-frame images from the rich media file to obtain candidate file fragments; or alternatively, the first and second heat exchangers may be,
And 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 fragments.
4. The method of claim 2, wherein the candidate file segments comprise a plurality of candidate file segments; the method comprises the steps of,
and responding to the special effect processing request, carrying out special effect processing on the candidate file fragments to obtain target file fragments, wherein the method comprises the following steps:
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 the target special effect mode associated with the candidate file segment, and obtaining a target file segment; or alternatively, the first and second heat exchangers may be,
obtaining a target special effect mode associated with each candidate file segment, and canceling special effect processing operation according to the candidate file segments selected from the plurality of candidate file segments so as to cancel special effect processing on the selected 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 segments according to the target special effect mode associated with the candidate file segment to obtain the target file segment.
5. The method of claim 1 or 2, wherein,
the segment identification is used to indicate the order of the file segments in the rich media file.
6. A rich media file processing apparatus, comprising:
the segmentation module is used for responding to a segmentation request of the rich media file, segmenting candidate file fragments to be subjected to special effect processing from the rich media file, and obtaining fragment identifiers of the candidate file fragments and fragment identifiers of file fragments which are not subjected to special effect processing; the rich media file is formed by taking a first composition unit as a unit, and the duration corresponding to the first composition unit is smaller than the duration of one group of pictures GOP;
the special effect processing module is used for responding to the special effect processing request, carrying out special effect processing on the candidate file fragments and obtaining target file fragments;
the splicing module is used for responding to a file splicing request, splicing the target file segment into the rich media file and generating a processed rich media file; 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;
the step of 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 generating the processed rich media file comprises the following steps: responding to the file splicing request, and sequentially splicing a target file fragment and the file fragment which is not subjected to special effect processing according to the fragment identification of the candidate file fragment and the fragment identification of the file fragment which is not subjected to special effect processing to obtain a rich media file spliced by the target file fragment and the file fragment which is not subjected to special effect processing;
The segmentation module is specifically configured to: responding to a segmentation request of a rich media file, displaying a segmentation parameter input interface of the rich media file, responding to input operation on the segmentation parameter input interface, acquiring segmentation parameters for segmenting the rich media file, and segmenting the rich media file according to the segmentation parameters to obtain candidate file segments; and, the segmentation module is further configured to:
selecting a plurality of target special effects modes from a plurality of special effects modes; wherein, any two target special effect modes act on different two file fragments, each target special effect mode has corresponding processing time length, and if the sum of the processing time lengths of the target special effect modes is larger than the total time length of the rich media file, the processing time lengths of the target special effect modes are respectively adjusted to obtain adjusted processing time lengths corresponding to each target special effect mode; and the sum of the special effect duration after the adjustment of the plurality of target special effect modes is smaller than the total duration of the rich media file.
7. The apparatus of claim 6, wherein the partitioning module is to perform a combination of two or more of:
Responding to the time length input operation on the segmentation parameter input interface, and obtaining the processing time length for segmenting the rich media file; or alternatively, the first and second heat exchangers may be,
responding to the segmentation starting position input operation on the segmentation parameter input interface, and obtaining a segmentation starting position for segmenting the rich media file; or alternatively, the first and second heat exchangers may be,
and responding to the segmentation ending position input operation on the segmentation parameter input interface, and obtaining the segmentation ending position for segmenting the rich media file.
8. The apparatus of claim 7, wherein the segmentation parameters include any two or more of a processing duration, a segmentation start position, and a segmentation end position for performing special effects processing on the rich media file, and,
the segmentation module is used for executing one or more of the following combinations:
when the rich media file comprises a moving picture, determining multi-frame images to be subjected to special effect processing in the rich media file according to the segmentation parameters, and segmenting the multi-frame images from the rich media file to obtain candidate file fragments; or alternatively, the first and second heat exchangers may be,
and 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 fragments.
9. The apparatus of claim 7, 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 the target special effect mode associated with the candidate file segment, and obtaining a target file segment; or alternatively, the first and second heat exchangers may be,
obtaining a target special effect mode associated with each candidate file segment, and canceling special effect processing on the selected candidate file segment in the plurality of candidate file segments according to canceling special effect processing operation 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 segments according to the target special effect mode associated with the candidate file segment to obtain the target file segment.
10. 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-5 by executing the instructions stored by the memory.
11. A storage medium storing computer instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 5.
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 CN113810783A (en) 2021-12-17
CN113810783B true 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)

Families Citing this family (1)

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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724423A (en) * 2011-09-30 2012-10-10 新奥特(北京)视频技术有限公司 Method and apparatus for material segmentation processing
CN105657538A (en) * 2015-12-31 2016-06-08 北京东方云图科技有限公司 Method and device for synthesizing video file by mobile terminal
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
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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9955107B2 (en) * 2009-04-23 2018-04-24 Arris Enterprises Llc Digital video recorder recording and rendering programs formed from spliced segments
US9301020B2 (en) * 2010-11-30 2016-03-29 Google Technology Holdings LLC Method of targeted ad insertion using HTTP live streaming protocol
CN102486794B (en) * 2010-12-06 2015-03-18 腾讯科技(深圳)有限公司 Method, device and system for acquiring rich-media file
US20160173960A1 (en) * 2014-01-31 2016-06-16 EyeGroove, Inc. Methods and systems for generating audiovisual media items
CN106385591B (en) * 2016-10-17 2020-05-15 腾讯科技(上海)有限公司 Video processing method and video processing device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102724423A (en) * 2011-09-30 2012-10-10 新奥特(北京)视频技术有限公司 Method and apparatus for material segmentation processing
CN105657538A (en) * 2015-12-31 2016-06-08 北京东方云图科技有限公司 Method and device for synthesizing video file by mobile terminal
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

Also Published As

Publication number Publication date
CN113810783A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
EP4119209A1 (en) Interaction scenario start up method, apparatus, storage medium, client end, and server
EP3979658A1 (en) Processing method, processing device, electronic device, and storage medium
US10108437B2 (en) Rendition of a content editor
CN112445395B (en) Music piece selection method, device, equipment and storage medium
CN112752121B (en) Video cover generation method and device
EP3467681B1 (en) Data migration method and device
US20230326110A1 (en) Method, apparatus, device and media for publishing video
JP2022521720A (en) Mini-program creation method, device, terminal and program
KR102353797B1 (en) Method and system for suppoting content editing based on real time generation of synthesized sound for video content
CN113810783B (en) Rich media file processing method and device, computer equipment and storage medium
US20100162234A1 (en) Method for installing application and computer system thereof
CN107025295A (en) A kind of photo film making method and mobile terminal
US8769169B2 (en) Assistive buffer usage techniques
CN108319444B (en) Music drumbeat-based control terminal vibration method, storage device and computer device
CN107016109B (en) A kind of photo film making method and mobile terminal
US10691336B2 (en) File-based custom configuration of dynamic keyboards
TW201325674A (en) Method of producing game event effects, tool using the same, and computer readable recording medium
WO2016200715A1 (en) Transitioning command user interface between toolbar user interface and full menu user interface based on use context
CN112036149A (en) File editing method and device, electronic equipment and storage medium
KR102488623B1 (en) Method and system for suppoting content editing based on real time generation of synthesized sound for video content
KR20150083475A (en) Media editing method and device using the touch input
JP7160885B2 (en) Methods, Systems, and Computer Programs for Deduplicating Content on Dual Screens
CN107038233A (en) A kind of photo film making method and mobile terminal
CN116627510A (en) Application program guiding method and device
CN116611402A (en) Method, device, equipment and storage medium for editing items

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