Video processing method and apparatus, device, and storage medium
Patent Information
- Application Number
- PCT/CN2025/137040
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-03-25
- Filing Date
- 2025-11-24
- Publication Date
- 2026-10-01
Smart Images

Figure CN2025137040_01102026_PF_FP_ABST
Abstract
Description
Video processing methods, apparatus, equipment and storage media
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510363139.0, filed on March 25, 2025, the disclosure of which is incorporated herein by reference in its entirety. Technical Field
[0003] This disclosure relates to a video processing method, apparatus, device, and storage medium. Background Technology
[0004] Currently, in video processing technology, users can manually edit the subtitles in a video. For example, they can add different effects to the subtitles (such as font, font size, animation effects, stickers) based on the subtitle animation to complete the editing process.
[0005] However, manually applying special effects to video subtitles often takes a long time and is inefficient. Summary of the Invention
[0006] To address the aforementioned problems, this disclosure provides a video processing method, apparatus, device, and storage medium.
[0007] This disclosure provides a video processing method, the method comprising:
[0008] Determine the subtitle animation effect corresponding to the first video; wherein, the subtitle animation effect has a corresponding animation protocol file, the animation protocol file is used to characterize the animation feature information of the subtitle animation effect, and the first video includes audio segments and subtitle text segments with corresponding relationships;
[0009] Based on the animation protocol file corresponding to the subtitle animation and the subtitle text fragment, a subtitle material fragment is generated; wherein, the subtitle material fragment is used to present the subtitle text fragment with the subtitle animation;
[0010] A second video corresponding to the first video is generated based on the subtitle material fragments and the audio fragments.
[0011] In an optional implementation, after generating the second video corresponding to the first video based on the subtitle material fragment and the audio fragment, the method further includes:
[0012] The second video is displayed in the video preview window of the track editing interface; wherein the second video contains subtitle content with the aforementioned subtitle animation effect.
[0013] In one optional implementation, the method further includes:
[0014] The subtitle material fragment is displayed on the subtitle track in the track editing interface.
[0015] In one optional implementation, displaying the subtitle material fragment on the subtitle track of the track editing interface includes:
[0016] The subtitle material fragment is displayed on the subtitle track of the track editing interface based on the subtitle effect description fragment corresponding to the subtitle material fragment; wherein, the subtitle effect description fragment is generated based on the animation protocol file for the subtitle text fragment corresponding to the subtitle material fragment.
[0017] In one optional implementation, the animation protocol file defines the animation elements included in the subtitle animation and the display parameter information corresponding to the animation elements, and the subtitle effect description segment is generated as the corresponding subtitle text segment based on the animation elements defined in the animation protocol file and the display parameter information corresponding to the animation elements.
[0018] In one optional implementation, before displaying the subtitle material fragment on the subtitle track of the track editing interface, the method based on the subtitle effect description fragment corresponding to the subtitle material fragment further includes:
[0019] The description fragment generation model is invoked to process the subtitle content in the first video and the motion effect protocol file corresponding to the subtitle motion effect. The sentence processing sub-model in the description fragment generation model processes the subtitle content into sentences to obtain one or more subtitle text fragments. The description fragment generation sub-model in the description fragment generation model generates subtitle effect description fragments for the one or more subtitle text fragments based on the motion effect protocol file.
[0020] In one optional implementation, the method further includes:
[0021] In response to the subtitle animation switching operation for the first video, determine the corresponding subtitle animation after switching for the first video;
[0022] Based on the animation protocol file corresponding to the switched subtitle animation, a third video corresponding to the first video is generated; wherein, the third video includes the video content of the first video that presents the subtitle text with the switched subtitle animation.
[0023] In an optional implementation, after generating the second video corresponding to the first video based on the subtitle material fragment and the audio fragment, the method further includes:
[0024] In response to the export operation for the second video, determine whether the subtitle animation has a motion blur effect;
[0025] If the subtitle animation has the motion blur effect, then the second video is subjected to motion blur processing.
[0026] This disclosure also provides a video processing apparatus, the apparatus comprising:
[0027] The first determining module is used to determine the subtitle animation effect corresponding to the first video; wherein the subtitle animation effect has a corresponding animation protocol file, the animation protocol file is used to characterize the animation feature information of the subtitle animation effect, and the first video includes audio segments and subtitle text segments with corresponding relationships;
[0028] The first generation module is used to generate a subtitle material fragment based on the animation protocol file corresponding to the subtitle animation effect and the subtitle text fragment; wherein, the subtitle material fragment is used to present the subtitle text fragment with the subtitle animation effect;
[0029] The second generation module is used to generate a second video corresponding to the first video based on the subtitle material fragment and the audio fragment.
[0030] This disclosure also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the above-described method.
[0031] This disclosure also provides a video processing apparatus, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described above.
[0032] This disclosure also provides a computer program product comprising a computer program / instructions that, when executed by a processor, implement the method described above. Attached Figure Description
[0033] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0034] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0035] Figure 1 is a flowchart of a video processing method provided in an embodiment of this disclosure;
[0036] Figure 2 is a schematic diagram of a track editing interface provided in an embodiment of this disclosure;
[0037] Figure 3 is a schematic diagram of a video processing process provided in an embodiment of this disclosure;
[0038] Figure 4 is a schematic diagram of a video processing apparatus provided in an embodiment of this disclosure; and
[0039] Figure 5 is a schematic diagram of the structure of a video processing device provided in an embodiment of this disclosure. Detailed Implementation
[0040] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0041] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0042] Currently, in video processing technology, users can manually edit the subtitles in a video. For example, they can add different effects to the subtitles (such as font, font size, animation effects, stickers) based on the subtitle animation to complete the editing process.
[0043] However, manually applying special effects to video subtitles often takes a long time and is inefficient.
[0044] To this end, this disclosure provides a video processing method. Specifically, firstly, a subtitle animation effect corresponding to a first video is determined. The subtitle animation effect has a corresponding animation protocol file, which is used to characterize the animation feature information of the subtitle animation effect. The first video includes audio segments and subtitle text segments with corresponding relationships. Then, based on the animation protocol file corresponding to the subtitle animation effect and the subtitle text segments, a subtitle material segment for presenting the subtitle text segments with the subtitle animation effect is generated. Subsequently, a second video corresponding to the first video is generated based on the subtitle material segment and the audio segment.
[0045] In this embodiment, after determining the corresponding subtitle animation effect for the first video, a subtitle material segment for presenting the subtitle text segment with subtitle animation effect is generated based on the animation protocol file corresponding to the subtitle animation effect and the subtitle text segment, thereby generating the second video. It is evident that this embodiment can improve the generation efficiency of subtitle animation effects for subtitle content, thereby improving the overall editing efficiency of the video.
[0046] Specifically, this disclosure provides a video processing method. Referring to Figure 1, which is a flowchart of a video processing method provided in this disclosure, the method specifically includes:
[0047] S101: Determine the subtitle animation effect corresponding to the first video.
[0048] The subtitle animation has a corresponding animation protocol file, which is used to characterize the animation feature information of the subtitle animation. The first video includes audio segments and subtitle text segments with corresponding relationships.
[0049] The video processing method provided in this disclosure can be applied to a client, specifically, the client can be deployed on terminals such as smartphones, tablets, and desktop computers.
[0050] The first video in this embodiment can be the video currently requiring video processing. The first video includes multiple audio segments and subtitle text segments, with a corresponding relationship between them. The subtitle text segments are the objects of subtitle animation effects. These subtitle text segments can be multiple subtitle text segments extracted from the subtitle content of the first video. Specifically, a model can be used to split the subtitle content corresponding to the first video to obtain multiple subtitle text segments. The subtitle content corresponding to the first video can be obtained through speech recognition.
[0051] The subtitle animation effect for the first video can be selected by the user from multiple subtitle animation effects. These subtitle animation effects can be pre-configured with specific subtitle presentation styles, such as retro subtitle style or dark subtitle style. This subtitle animation effect can represent the overall style characteristics of the subtitle text segment.
[0052] In one optional implementation, the method for determining the subtitle animation effect corresponding to the first video may specifically include, after receiving the first video uploaded by the user, when a selection operation for one of a variety of subtitle animation effects is received, determining the selected subtitle animation effect as the subtitle animation effect corresponding to the first video.
[0053] In this embodiment, there is a correspondence between the subtitle animation effects and the animation protocol files. Each subtitle animation effect has a corresponding animation protocol file, which defines the rules related to the subtitle animation effects. Specifically, this animation protocol file can be a pre-configured protocol file. The animation protocol file is used to characterize the animation feature information of the subtitle animation effects. Specifically, the animation feature information describes various characteristics of the subtitle animation effects. Specifically, the animation feature information can describe the animation elements included in the subtitle animation effects and the display parameter information corresponding to each animation element.
[0054] The animated element is the basic unit that constitutes the subtitle effect. Specifically, animated elements can include animation, font, color, layout, global motion, and visual effects. Each of these animated elements has corresponding display parameters, which specify how the corresponding animated element is presented; that is, these display parameters characterize how each animated element is displayed. Specifically, the display parameters can include the size, color, proportion, display position, and timing of appearance and change of the animated element. For example, the font size of the subtitle content might be size 2 at one moment, and size 4 at the next moment.
[0055] In one optional implementation, the method for generating subtitle animation effects may specifically include: designers can select highly popular videos based on the popularity of existing videos, extract various animation elements contained in each subtitle animation effect from the video, and then use relevant tools to assemble and configure relevant parameter information for various animation elements to form various subtitle animation effects. At the same time, the animation protocol file corresponding to each subtitle animation effect is exported.
[0056] S102: Generate subtitle material fragments based on the animation protocol file corresponding to the subtitle animation effect and the subtitle text fragments.
[0057] The subtitle material fragment is used to present the subtitle text fragment with the subtitle animation effect. This subtitle material fragment is a subtitle text fragment carrying the subtitle animation effect.
[0058] In one optional implementation, generating a subtitle material fragment based on the motion effect protocol file corresponding to the subtitle animation and the subtitle text fragment may include: obtaining each subtitle text fragment and the motion effect protocol file corresponding to the subtitle animation included in the first video; then, generating a corresponding subtitle effect description fragment for each subtitle text fragment in the first video based on the motion effect protocol file; and then generating a subtitle material fragment corresponding to the subtitle text fragment based on the subtitle effect description fragment.
[0059] The subtitle text segment can be multiple time-series partial text segments obtained by segmenting the subtitle content corresponding to the first video into sentences. Specifically, the subtitle text segment can be a sentence, a phrase, a word, etc., from the subtitle content. For example, if the subtitle content is "It's sunny today," the subtitle text segment can be two text segments: "today" and "sunny."
[0060] Specifically, obtaining the animation protocol file corresponding to the subtitle animation effect may include, upon receiving a selection operation for any subtitle animation effect, identifying the selected subtitle animation effect as the subtitle animation effect corresponding to the first video, and retrieving the animation protocol file corresponding to that subtitle animation effect from the subtitle animation effect database. The subtitle animation effect database is used to store the animation protocol files corresponding to each subtitle animation effect.
[0061] There is a correspondence between subtitle text segments and subtitle effect description segments. The subtitle effect description segment describes the subtitle effect corresponding to the subtitle text segment. This subtitle effect description segment can be generated based on the motion effect elements defined in the motion effect protocol file and the display parameter information corresponding to the motion effect elements.
[0062] In one optional implementation, a description fragment generation model can be used to generate subtitle effect description fragments corresponding to subtitle text fragments based on subtitle content and animation protocol files. Specifically, the description fragment generation model is invoked, and the subtitle content of the first video and the animation protocol file of the subtitle animation are input into the description fragment generation model. The subtitle content is segmented into sentences based on the sentence processing submodel in the description fragment generation model to obtain multiple subtitle text fragments. Then, based on the animation protocol file, the description fragment generation submodel in the description fragment generation model generates corresponding subtitle effect description fragments for each of the multiple subtitle text fragments. The description fragment generation model includes a sentence processing submodel and a description fragment generation submodel.
[0063] In practical applications, the specific execution logic for generating the subtitle effect description fragment corresponding to the subtitle text fragment based on the animation protocol file and the subtitle text fragment can be implemented on the client or server side.
[0064] In one optional implementation, after generating multiple subtitle text segments corresponding to subtitle effect description segments, a subtitle effect description file corresponding to the first video can be constructed based on the multiple subtitle effect description segments and their respective corresponding subtitle text segments. The subtitle effect description file is a file used to indicate how the subtitle text segments present subtitle effects, and it includes corresponding subtitle text segments and subtitle effect description segments.
[0065] S103: Generate a second video corresponding to the first video based on the subtitle material fragment and the audio fragment.
[0066] The second video includes the video content of the first video containing subtitles with the aforementioned subtitle animation effects. The subtitles with animation effects included in the second video are subtitles processed with the animation effects; that is, the second video includes not only the video content of the first video but also the subtitles with animation effects.
[0067] In one optional implementation, after generating a second video based on the subtitle material fragment used to present the subtitle text fragment and the corresponding audio fragment, the second video can also be displayed in the video preview window of the track editing interface, so that users can see the display effect of the subtitle animation in the video and improve the user editing experience.
[0068] The track editing interface can be the user interface of video editing software, used to display video, audio, and subtitle tracks. The video preview window displayed on this interface is used to preview the video after editing.
[0069] Figure 2 shows a schematic diagram of a track editing interface provided in an embodiment of this disclosure. The video preview window 201 on the track editing interface displays a second video corresponding to a first video. The second video includes the video content of the first video with subtitles that have subtitle animation effects.
[0070] In practical applications, the specific implementation logic for generating a second video based on the subtitle material fragments used to present the subtitle text fragments and the corresponding audio fragments can be completed on the client or server side.
[0071] In one application scenario, a second video corresponding to a first video can be generated using a server. Specifically, a subtitle animation generation request is sent to the server. This request is used to generate a second video corresponding to the first video. Specifically, after determining the subtitle animation corresponding to the first video, the subtitle text fragment of the first video and the animation protocol file corresponding to the subtitle animation are obtained. Then, a subtitle animation generation request carrying the subtitle text fragment and the animation protocol file is sent to the server.
[0072] Then, upon receiving the subtitle animation generation request, the server obtains the subtitle text fragment and the animation protocol file. Based on the subtitle text fragment and the animation protocol file, it generates a subtitle effect description fragment corresponding to the subtitle text fragment, and then returns the subtitle effect description fragment to the client. Subsequently, upon receiving the subtitle effect description fragment returned by the server, the server generates a subtitle material fragment based on the subtitle effect description fragment, and then generates a second video based on the subtitle material fragment and the audio fragment, which is then displayed in the video preview window of the track editing interface.
[0073] In the video processing method provided in this embodiment, firstly, a subtitle animation effect corresponding to a first video is determined. The subtitle animation effect has a corresponding animation protocol file, which characterizes the animation feature information of the subtitle animation effect. The first video includes corresponding audio segments and subtitle text segments. Then, based on the animation protocol file corresponding to the subtitle animation effect and the subtitle text segments, a subtitle material segment is generated to present the subtitle text segments with the subtitle animation effect. Subsequently, a second video corresponding to the first video is generated based on the subtitle material segment and the audio segment.
[0074] In this embodiment, after determining the corresponding subtitle animation effect for the first video, a subtitle material segment for presenting the subtitle text segment with subtitle animation effect is generated based on the animation protocol file corresponding to the subtitle animation effect and the subtitle text segment, thereby generating the second video. It is evident that this embodiment can improve the generation efficiency of subtitle animation effects for subtitle content, thereby improving the overall editing efficiency of the video.
[0075] In one optional implementation, after displaying the second video corresponding to the first video in the video preview window on the track editing interface, one or more subtitle material fragments can also be displayed on the subtitle track on the track editing interface. That is, the subtitle text fragments after subtitle animation processing are displayed on the track editing interface to facilitate users to adjust the subtitle effects of the subtitle material fragments and improve editing efficiency.
[0076] In one optional implementation, one or more subtitle material segments are displayed on the subtitle track of the track editing interface. These subtitle material segments may carry a subtitle animation duration marker, which indicates the duration of the subtitle animation. Specifically, this duration marker can be indicated by an arrow. The longer the arrow, the longer the duration of the subtitle animation.
[0077] As shown in Figure 2 above, the track editing interface displays multiple subtitle tracks, and each subtitle track contains subtitle clips with corresponding subtitle animation timing indicators. For example, subtitle clip 202 contains subtitle animation timing indicators.
[0078] In another alternative implementation, one or more subtitle material fragments are displayed on the subtitle track in the track editing interface, and the subtitle material fragments may carry the identifiers of the animation elements contained in the subtitle animation.
[0079] In one optional implementation, since the second video includes subtitle content with animated subtitle effects, and displaying subtitle content with animated subtitle effects requires the support of corresponding resources, it is also necessary to obtain the corresponding dependent resources when generating the corresponding subtitle material segment based on the subtitle effect description segment. For example, if a unique font is set for the subtitle animation, the effect of the unique font cannot be displayed for the subtitle if the dependent resource corresponding to the unique font is not available.
[0080] Specifically, after generating the subtitle effect description segment, the subtitle effect description segment is parsed to determine the dependent resources of the subtitle effect description segment and obtain the dependent resources. After obtaining the dependent resources, subtitle material segments are generated based on the subtitle effect description segment and the dependent resources.
[0081] In practical applications, after determining the dependent resources of the subtitle effect description segment, we can first check if the dependent resource exists locally. If the dependent resource exists locally, there is no need to retrieve it; the subtitle material segment can be generated based on the subtitle effect description segment and the dependent resource. If the dependent resource does not exist locally, a request to retrieve the dependent resource can be sent to the server to obtain it.
[0082] In practical applications, subtitle animation effects may have a motion blur effect. Since applying a motion blur effect consumes a lot of performance, this embodiment of the disclosure can apply motion blur processing to the second video when triggering the export operation for the second video corresponding to the first video, thereby reducing performance consumption. This motion blur effect is used to simulate the blurring phenomenon produced when an object moves quickly. By applying this motion blur effect, the dynamic effect of the applied object can be made more realistic and natural.
[0083] Specifically, during the process of displaying the second video corresponding to the first video in the video preview window of the track editing interface, when an export operation for the second video is received, it is determined whether the subtitle animation effect has a motion blur effect. If the subtitle animation effect has a motion blur effect, the second video is motion blurred, and then exported and published based on the processed second video. The export operation for the second video may include triggering the export control on the track editing interface.
[0084] By applying motion blur to the second video, the subtitles in the video can be made more realistic and natural.
[0085] After displaying the second video corresponding to the first video in the video preview window of the above track editing interface, in order to facilitate users to adjust the subtitle animation effects, meet users' personalized needs, and further improve the user's editing experience, this embodiment of the disclosure can also support the subtitle animation effect switching operation for the first video.
[0086] Specifically, when a subtitle animation switching operation is received for the first video, the corresponding subtitle animation after switching for the first video is determined. The subtitle animation switching operation for the first video may include trigger operations such as clicking or long-pressing the animation switching control on the track editing interface.
[0087] In one optional implementation, after determining the animated subtitle effect corresponding to the first video, a animated subtitle material fragment can be generated based on the animation protocol file corresponding to the animated subtitle effect and the subtitle text fragment in the first video. Then, a third video corresponding to the first video can be generated based on the subtitle material fragment and the audio fragment in the first video. The third video includes the video content of the first video that presents the subtitle content with the animated subtitle effect. That is, the third video not only displays the video content of the first video, but also displays the subtitle content that presents the animated subtitle effect.
[0088] To facilitate understanding of the embodiments of this disclosure, a schematic diagram of a video processing process is also provided. Referring to FIG3, a schematic diagram of a video processing process provided in an embodiment of this disclosure is shown.
[0089] In one optional implementation, after receiving the first video, when a trigger operation for a certain subtitle animation effect is received, the subtitle animation effect is determined to be the subtitle animation effect corresponding to the first video. The subtitle animation effect has a corresponding animation protocol file, which is used to characterize the animation feature information of the subtitle animation effect. Specifically, the subtitle animation effect information defines the animation elements contained in the subtitle animation effect and the display parameter information corresponding to the animation elements.
[0090] After determining the subtitle animation effect corresponding to the first video, the subtitle content of the first video is obtained using a speech recognition tool, and the animation protocol file is obtained based on the subtitle animation effect. A subtitle animation effect generation request carrying the subtitle content and the animation protocol file is then sent to the server.
[0091] In one optional implementation, after receiving the subtitle animation generation request, the server invokes a description fragment generation model to generate subtitle effect description fragments corresponding to the subtitle text fragments included in the first video, based on the subtitle content and the animation protocol file. Specifically, the subtitle content and the animation protocol file are input into the description fragment generation model. The subtitle content is segmented into sentences based on the sentence processing model in the description fragment generation model to determine one or more subtitle text fragments. Then, based on the description fragment generation submodel in the description fragment generation model, corresponding subtitle effect description fragments are generated for each of the multiple subtitle text fragments according to the animation protocol file. Finally, a subtitle effect description file corresponding to the first video is constructed based on the multiple subtitle text fragments and the subtitle effect description fragments corresponding to the multiple subtitle text fragments. Finally, the subtitle effect description file is returned.
[0092] After obtaining the subtitle effect description file corresponding to the first video from the server, subtitle material fragments corresponding to each subtitle text fragment are generated based on the subtitle effect description file, and then the second video corresponding to the first video is generated based on the subtitle material fragments and the audio fragments corresponding to the subtitle text fragments.
[0093] Based on the above method embodiments, this disclosure also provides a video processing apparatus. Referring to FIG4, which is a schematic diagram of the structure of a video processing apparatus provided in an embodiment of this disclosure, the apparatus includes:
[0094] The first determining module 401 is used to determine the subtitle animation effect corresponding to the first video; wherein the subtitle animation effect has a corresponding animation protocol file, the animation protocol file is used to characterize the animation feature information of the subtitle animation effect, and the first video includes audio segments and subtitle text segments with corresponding relationships;
[0095] The first generation module 402 is used to generate a subtitle material fragment based on the animation protocol file corresponding to the subtitle animation effect and the subtitle text fragment; wherein, the subtitle material fragment is used to present the subtitle text fragment with the subtitle animation effect;
[0096] The second generation module 403 is used to generate a second video corresponding to the first video based on the subtitle material fragment and the audio fragment.
[0097] In one optional embodiment, the apparatus further includes:
[0098] The display module is used to display the second video in the video preview window of the track editing interface; wherein the second video presents subtitle content with the subtitle animation effect.
[0099] In one optional embodiment, the apparatus further includes:
[0100] The display module is used to display the subtitle material fragments on the subtitle track in the track editing interface.
[0101] In one optional implementation, the display module is specifically used for:
[0102] The subtitle material fragment is displayed on the subtitle track of the track editing interface based on the subtitle effect description fragment corresponding to the subtitle material fragment; wherein, the subtitle effect description fragment is generated based on the animation protocol file for the subtitle text fragment corresponding to the subtitle material fragment.
[0103] In one optional implementation, the animation protocol file defines the animation elements included in the subtitle animation and the display parameter information corresponding to the animation elements, and the subtitle effect description segment is generated as the corresponding subtitle text segment based on the animation elements defined in the animation protocol file and the display parameter information corresponding to the animation elements.
[0104] In one optional embodiment, the apparatus further includes:
[0105] The model processing module is used to call the description fragment generation model to process the subtitle content in the first video and the motion effect protocol file corresponding to the subtitle motion effect, so that the sentence processing sub-model in the description fragment generation model performs sentence processing on the subtitle content to obtain one or more subtitle text fragments, and the description fragment generation sub-model in the description fragment generation model generates subtitle effect description fragments for the one or more subtitle text fragments based on the motion effect protocol file.
[0106] In one optional embodiment, the apparatus further includes:
[0107] The second determining module is used to determine the subtitle animation effect corresponding to the first video after switching in response to the subtitle animation effect switching operation for the first video.
[0108] The third generation module is used to generate a third video corresponding to the first video based on the animation protocol file corresponding to the switched subtitle animation; wherein, the third video includes the video content of the first video that presents the subtitle text with the switched subtitle animation.
[0109] In one optional embodiment, the apparatus further includes:
[0110] The third determining module is used to determine whether the subtitle animation effect has a motion blur effect in response to the export operation for the second video;
[0111] The video processing module is used to perform motion blur processing on the second video when the subtitle animation has the motion blur effect.
[0112] In the video processing apparatus provided in this embodiment, firstly, a subtitle animation effect corresponding to a first video is determined. The subtitle animation effect has a corresponding animation protocol file, which characterizes the animation feature information of the subtitle animation effect. The first video includes corresponding audio segments and subtitle text segments. Then, based on the animation protocol file corresponding to the subtitle animation effect and the subtitle text segments, a subtitle material segment for presenting the subtitle text segments with the subtitle animation effect is generated. Subsequently, a second video corresponding to the first video is generated based on the subtitle material segment and the audio segment.
[0113] In this embodiment, after determining the corresponding subtitle animation effect for the first video, a subtitle material segment for presenting the subtitle text segment with subtitle animation effect is generated based on the animation protocol file corresponding to the subtitle animation effect and the subtitle text segment, thereby generating the second video. It is evident that this embodiment can improve the generation efficiency of subtitle animation effects for subtitle content, thereby improving the overall editing efficiency of the video.
[0114] In addition to the methods and apparatus described above, this disclosure also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to implement the video processing method described in this disclosure.
[0115] This disclosure also provides a computer program product, which includes a computer program / instructions that, when executed by a processor, implement the video processing method described in this disclosure.
[0116] In addition, this disclosure also provides a video processing device, as shown in FIG5, which may include: a processor 501, a memory 502, an input device 503, and an output device 504.
[0117] The video processing device may have one or more processors 501; Figure 5 shows an example of one processor. In some embodiments of this disclosure, the processor 501, memory 502, input device 503, and output device 504 may be connected via a bus or other means; Figure 5 shows an example of connection via a bus.
[0118] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing of the video processing device by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc. In addition, the memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The input device 503 can be used to receive input digital or character information, and to generate signal inputs related to user settings and function control of the video processing device.
[0119] Specifically in this embodiment, the processor 501 loads the executable files corresponding to the processes of one or more applications into the memory 502 according to the following instructions, and the processor 501 runs the applications stored in the memory 502, thereby realizing the various functions of the video processing device described above.
[0120] It should be noted that in this disclosure, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0121] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A video processing method, comprising: Determine the subtitle animation effect corresponding to the first video; wherein, the subtitle animation effect has a corresponding animation protocol file, the animation protocol file is used to characterize the animation feature information of the subtitle animation effect, and the first video includes audio segments and subtitle text segments with corresponding relationships; Based on the animation protocol file corresponding to the subtitle animation and the subtitle text fragment, a subtitle material fragment is generated; wherein, the subtitle material fragment is used to present the subtitle text fragment with the subtitle animation; and A second video corresponding to the first video is generated based on the subtitle material fragments and the audio fragments.
2. The method according to claim 1, wherein, After generating the second video corresponding to the first video based on the subtitle material fragment and the audio fragment, the method further includes: The second video is displayed in the video preview window of the track editing interface; wherein, the second video presents subtitle content with the aforementioned subtitle animation effect.
3. The method according to claim 1 or 2, further comprising: The subtitle clip is displayed on the subtitle track in the track editing interface.
4. The method according to claim 3, wherein, The display of the subtitle material fragment on the subtitle track of the track editing interface includes: The subtitle material fragment is displayed on the subtitle track of the track editing interface based on the subtitle effect description fragment corresponding to the subtitle material fragment; wherein, the subtitle effect description fragment is generated based on the animation protocol file for the subtitle text fragment corresponding to the subtitle material fragment.
5. The method according to claim 4, wherein, The motion effect protocol file defines the motion effect elements included in the subtitle motion effect and the display parameter information corresponding to the motion effect elements. The subtitle effect description segment is generated based on the motion effect elements defined in the motion effect protocol file and the display parameter information corresponding to the motion effect elements as the corresponding subtitle text segment.
6. The method according to claim 4 or 5, wherein, Before displaying the subtitle material segment on the subtitle track of the track editing interface based on the subtitle effect description segment corresponding to the subtitle material segment, the method further includes: The description fragment generation model is invoked to process the subtitle content in the first video and the motion effect protocol file corresponding to the subtitle motion effect. The sentence processing sub-model in the description fragment generation model processes the subtitle content into sentences to obtain one or more subtitle text fragments. The description fragment generation sub-model in the description fragment generation model generates subtitle effect description fragments for the one or more subtitle text fragments based on the motion effect protocol file.
7. The method according to any one of claims 1-6, further comprising: In response to the subtitle animation switching operation for the first video, determine the corresponding subtitle animation after switching for the first video; Based on the animation protocol file corresponding to the switched subtitle animation, a third video corresponding to the first video is generated; wherein, the third video includes the video content of the first video that presents the subtitle content with the switched subtitle animation.
8. The method according to any one of claims 1-7, wherein, After generating the second video corresponding to the first video based on the subtitle material fragment and the audio fragment, the method further includes: In response to the export operation for the second video, determine whether the subtitle animation has a motion blur effect; If the subtitle animation has the motion blur effect, then the second video is subjected to motion blur processing.
9. A video processing apparatus, comprising: The first determining module is configured to determine the subtitle animation effect corresponding to the first video; wherein the subtitle animation effect has a corresponding animation protocol file, the animation protocol file is used to characterize the animation feature information of the subtitle animation effect, and the first video includes audio segments and subtitle text segments with corresponding relationships; The first generation module is configured to generate a subtitle material fragment based on the animation protocol file corresponding to the subtitle animation and the subtitle text fragment; wherein, the subtitle material fragment is used to present the subtitle text fragment with the subtitle animation; The second generation module is configured to generate a second video corresponding to the first video based on the subtitle material fragments and the audio fragments.
10. A computer-readable storage medium storing instructions, wherein, When the instructions are executed on a terminal device, the terminal device causes the terminal device to perform the method as described in any one of claims 1-8.
11. A video processing apparatus, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the method as described in any one of claims 1-8.
12. A computer program product comprising a computer program / instructions, wherein, When the computer program / instructions are executed by the processor, they implement the method as described in any one of claims 1-8.