Video processing method and device, electronic equipment and storage medium

By determining the target media material group for parallel decoding at the jump time point in the video draft, the decoding process of multi-track video editing is optimized, solving the problems of stuttering and unsmooth preview, and achieving more efficient decoding and smoother playback.

CN119383288BActive Publication Date: 2025-11-07BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310922177.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2025-11-07
Estimated Expiration
2043-07-25

AI Technical Summary

Technical Problem

When jumping to a specified editing position in a video draft, existing technologies suffer from stuttering and unsmooth display of preview images, especially in multi-track video editing, where existing decoding methods are inefficient and unstable.

Method used

By determining the jump time point, the target media material group is obtained, and the media material is decoded in parallel according to the target number of parallel decoders, thus optimizing the decoding process to improve efficiency.

Benefits of technology

It reduces stuttering, improves the smoothness of preview image playback and decoding efficiency, and solves the stuttering problem when jumping between tracks in multi-track video editing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383288B_ABST
    Figure CN119383288B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a video processing method and device, electronic equipment and storage medium. The method comprises: determining a jump time point in response to a jump instruction for a video draft; wherein the video draft corresponds to at least two video editing tracks, and each video editing track comprises at least one media material; obtaining a target media material group according to a target time period in which the jump time point is located, the target media material group representing a logical set of media material segments of the media material on each video editing track within the target time period; determining a corresponding target parallel decoding number according to the target media material group, and performing parallel decoding on the media material corresponding to the jump time point based on the target parallel decoding number to obtain a decoded image. When the media material at the jump time point is decoded in parallel based on the target parallel decoding number, higher decoding efficiency can be achieved, the occurrence of freezing can be reduced, and the play fluency of the preview image generated after decoding can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the technical field of video processing, and particularly relate to a video processing method and device, an electronic device, and a storage medium. BACKGROUND

[0002] In a scenario of editing a video, a video draft to be edited is composed of multimedia materials located on multiple different tracks. In the process of editing the video draft, the specific content of the video draft is displayed in a video editor interface, so as to achieve the purpose of previewing the editing effect of the video draft.

[0003] In the prior art, when jumping to a specified editing position in a video draft, the terminal device triggers centralized decoding of the multimedia materials on the multiple tracks at the specified editing position, resulting in problems such as stuttering and unsmooth display of preview images. SUMMARY

[0004] Embodiments of the present disclosure provide a video processing method and device, an electronic device, and a storage medium to overcome problems such as stuttering and unsmooth display of preview images when jumping to a specified editing position in a video draft.

[0005] In a first aspect, embodiments of the present disclosure provide a video processing method, comprising:

[0006] In response to a jump instruction for a video draft, a jump time point is determined, wherein the video draft corresponds to at least two video editing tracks, and at least one piece of media material is included on the video editing tracks. According to a target time period in which the jump time point is located, a target media material group is obtained, which represents a logical set of media material segments of media materials on each video editing track within the target time period. According to the target media material group, a corresponding target parallel decoding number is determined, and based on the target parallel decoding number, parallel decoding is performed on media materials corresponding to the jump time point to obtain a decoded image.

[0007] In a second aspect, embodiments of the present disclosure provide a video processing device, comprising:

[0008] A receiving module is configured to determine a jump time point in response to a jump instruction for a video draft, wherein the video draft corresponds to at least two video editing tracks, and at least one piece of media material is included on the video editing tracks.

[0009] A processing module is configured to obtain a target media material group according to a target time period in which the jump time point is located, wherein the target media material group represents a logical set of media material segments of media materials on each video editing track within the target time period.

[0010] a decoding module configured to determine a target parallel decoding number according to the target media material group, and perform parallel decoding on the media material corresponding to the jump time point based on the target parallel decoding number to obtain a decoded image.

[0011] In a third aspect, an electronic device is provided, including a processor and a memory.

[0012] The memory stores computer-executable instructions.

[0013] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the video processing method as described in the first aspect and various possible designs of the first aspect.

[0014] In a fourth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the video processing method as described in the first aspect and various possible designs of the first aspect is implemented.

[0015] In a fifth aspect, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the video processing method as described in the first aspect and various possible designs of the first aspect is implemented.

[0016] The video processing method, device, electronic device, and storage medium provided in the embodiments respond to a jump instruction for a video draft to determine a jump time point. The video draft corresponds to at least two video editing tracks, and at least one piece of media material is included on the video editing track. According to a target time period in which the jump time point is located, a target media material group is obtained, which represents a logical set of media material segments of media materials on each video editing track in the target time period. According to the target media material group, a target parallel decoding number is determined, and media materials corresponding to the jump time point are decoded in parallel based on the target parallel decoding number to obtain a decoded image. By obtaining the target media material group corresponding to the jump time point and determining the target parallel decoding number matched therewith according to the target media material group, higher decoding efficiency can be achieved when the media materials at the jump time point are decoded in parallel based on the target parallel decoding number, and stuttering can be reduced, and the play fluency of the preview image generated after decoding is improved. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0018] Figure 1 An application scenario diagram of the video processing method provided by the embodiments of the present disclosure is shown in

[0019] Figure 2 A flowchart of the video processing method provided by the embodiments of the present disclosure is shown in Figure 1 ;

[0020] Figure 3 A schematic diagram of a target media material group provided by the embodiments of the present disclosure is shown in

[0021] Figure 4 A flowchart of the specific implementation of step S103 in the embodiment shown in Figure 2

[0022] A schematic diagram of a decoding mapping table provided by the embodiments of the present disclosure is shown in Figure 5

[0023] A flowchart of the video processing method provided by the embodiments of the present disclosure is shown in Figure 6 ; Figure 2

[0024] A schematic diagram of a time period sequence generation process provided by the embodiments of the present disclosure is shown in Figure 7

[0025] A flowchart of the specific implementation of step S206 in the embodiment shown in Figure 8 Figure 6 A schematic diagram of a process for calculating the decoding time consumption of a multi-track single frame provided by the embodiments of the present disclosure is shown in

[0026] Figure 9 A structural block diagram of the video processing device provided by the embodiments of the present disclosure is shown in

[0027] Figure 10 A structural diagram of an electronic device provided by the embodiments of the present disclosure is shown in

[0028] Figure 11 A hardware structural diagram of an electronic device provided by the embodiments of the present disclosure is shown in

[0029] Figure 12 Specific embodiments

[0030] ​​To make the purposes, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are some but not all of the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present disclosure.

[0031] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties, and the collection, use, and processing of related data need to comply with relevant laws, regulations, and standards of countries and regions, and provide corresponding operation portals for users to choose authorization or refusal.

[0032] The application scenarios of the embodiments of the present disclosure are explained as follows:

[0033] Figure 1 An application scenario diagram of the video processing method provided by the embodiments of the present disclosure is shown in the figure. The video processing method provided by the embodiments of the present disclosure can be applied to an application program with a video editing function, more specifically, can be applied to an application scenario for editing a multi-track video. The execution subject of the present embodiment can be a terminal device running the above-mentioned application program with a video editing function, can be a server of a server corresponding to the above-mentioned application program, or other electronic devices with similar functions. It is shown in Figure 1 For example, a terminal device is taken as an example, a video editing application for video editing is running in the terminal device. In the video editing application, a video draft is loaded by loading a project file or a draft file. Then, in a multi-track editor interface of the video editing application, a plurality of video editing tracks corresponding to the video draft are displayed. Each video editing track (for example, Track_1, Track_2, and Track_3 shown in the figure) contains one or more material segments (for example, segment c1, segment c2, segment c3, and segment c4 shown in the figure). The layer of the material segment on the video editing track is determined according to the serial number of the video editing track, so that each material segment is displayed in the finally generated preview video and output video in sequence based on the layer it is located in. Further, in the multi-track editor interface, the user can manually add, delete, or modify each material segment constituting the video draft on each video editing track as needed. Then, the terminal device synthesizes and encodes the material segments on the edited video editing tracks to obtain an output video meeting the user's demand.

[0034] Further, in the above video editing process, when the user jumps (seeks) the current editing position of the video draft to a specified editing position (e.g., T_1 position in the figure) by operating the multi-track editor interface, the terminal device will concentrate on decoding the material segments on all video editing tracks at the editing position. After all the material segments are decoded, the corresponding preview image is displayed in the preview window for the user to view the editing effect according to the decoded images of the material segments.

[0035] In the prior art, the above-mentioned concentrated decoding of media materials on multiple tracks is usually realized by serial decoding, for example, the segments c1, c3 and c4 are sequentially decoded in series to obtain the decoded image of the video draft at the editing position. However, the above-mentioned solution in the prior art has the problems of low execution efficiency and slow speed, which increases the time consumption of the decoding process. On the other hand, in other related technical solutions, the decoding of each material segment is performed in parallel, for example, the segments c1, c3 and c4 are decoded in parallel. When the amount of decoding data is small, the decoding speed can be faster than that of serial decoding. However, when the resource consumption of parallel decoding is large, for example, the number of threads for parallel decoding is too large or the amount of decoding data is too large, the decoding speed will decrease rapidly, which is lower than that of serial decoding, thereby causing instability of the decoding process. That is, when multiple video editing tracks are decoded in parallel, if the number of parallel decoding is not reasonable, the decoding efficiency will be low. Therefore, how to obtain a reasonable number of parallel decoding when jumping the video draft of multiple video editing tracks to improve the overall decoding efficiency is a problem to be solved. The present embodiment provides a wearing bias detection method to solve the above-mentioned problem.

[0036] Reference Figure 2 , Figure 2 The flowchart of the video processing method provided by the present embodiment Figure 1 The method of the present embodiment can be applied in a terminal device. The video processing method comprises the following steps:

[0037] Step S101: determining a jumping time point in response to a jumping instruction for a video draft; wherein the video draft corresponds to at least two video editing tracks, and at least one segment of media material is included on the video editing track.

[0038] For example, referring to the application scenario diagram shown in Figure 1 After loading the engineering file or draft file of the video draft, the terminal device displays multiple video editing tracks of the video draft in the multi-track editor interface. Each video editing track contains at least one segment of media material. For details, please refer to Figure 3As shown, then, the terminal device receives a user input jump instruction, and jumps the current editing time point (e.g., 0:00) of the video draft to the jump time point (e.g., 1:10) corresponding to the jump instruction. The jump time point is a playback timestamp corresponding to the output video generated based on the video draft. Each video editing track corresponds to the same playback timestamp coordinate. Therefore, according to the jump time point, the playback timestamp corresponding to the video draft is determined, and the playback timestamp of each video editing track is also determined. Further, at the jump time point, the terminal device loads and decodes the media materials on each video editing track at the jump time point, corresponding to at least two material segments, to generate corresponding decoded images, thereby realizing preview of the editing effect of the output video corresponding to the video draft based on the generated decoded images, so that the user can observe the effect of the superimposed display of the media materials on each video editing track in real time.

[0039] The specific implementation of loading the video draft through the engineering file or the draft file to set the media materials on the multiple video editing tracks, and the specific implementation of determining the corresponding jump time point based on the jump instruction are known to those skilled in the art, and will not be described here.

[0040] Step S102: According to the target time period in which the jump time point is located, a target media material group is obtained, which represents a logical set of media material segments of the media materials on the video editing tracks in the target time period.

[0041] For example, after the jump time point corresponding to the jump instruction is obtained, the target time period in which the jump time point is located is determined according to the jump time point. The time period is a pre-divided time interval, and the specific division rule will be described in subsequent steps. After the target time period is determined, the target media material group corresponding to the time period can be obtained according to the time period identifier corresponding to the target time period. The media material group is a logical set of media material segments, and the media material segment is a slice obtained by dividing the media material based on the time period. The target media material group represents a logical set of media material segments of the media materials on the video editing tracks in the target time period. Figure 3 A schematic diagram of a target media material group provided by an embodiment of the present disclosure is shown in FIG. 2. Figure 4As shown, in the multi-track editor interface for the video draft video_1, there are 3 video editing tracks, namely Track_1, Track_2 and Track_3. In the video editing track Track_1, there are media clips clip_1 and clip_2. In the video editing track Track_2, there are media clips clip_3 and clip_4. In the video editing track Track_3, there are media clips clip_5 and clip_6. The playback time of the media clips is based on the same playback time axis, and the relationship between the playback times of the media clips is shown in the figure. Based on the target time period [T1-T2], the video editing tracks are vertically segmented to obtain the media clip segment C1 corresponding to the video editing track Track_1, the media clip segment C2 corresponding to the video editing track Track_2, and the media clip segment C3 corresponding to the video editing track Track_3. The logical set of the media clip segment C1, the media clip segment C2 and the media clip segment C3 is the target media clip group.

[0042] Further, the target time period [T1-T2] determined by the jump time point may, in a possible implementation, be one of a plurality of time periods preset in the terminal device, for example, the time period [T2-T3] and the time period [T4-T5] in addition to the target time period [T1-T2].

[0043] Step S103: determining the target parallel decoding number corresponding to the target media clip group, and performing parallel decoding on the media clips corresponding to the jump time point based on the target parallel decoding number to obtain a decoded image.

[0044] For example, after obtaining the target media clip group, the target parallel decoding number matched with the target media clip group is determined. For example, the target parallel decoding number is the number of decoding threads used in parallel when decoding the media clips corresponding to the target media clip group. For example, the target parallel decoding number is 3, which means that the media clips on the video editing tracks corresponding to the target media clip group are decoded by 3 threads. For example, the target parallel decoding number is 6, which means that the media clips on the video editing tracks corresponding to the target media clip group are decoded by 6 threads. For example, the target parallel decoding number is not more than the number of media clips corresponding to the target media clip group.

[0045] In a possible implementation, the target parallel decoding number can be determined based on the decoding data amount corresponding to the target media material group. The more the number of media material segments corresponding to the target media material group, the larger the decoding data amount. Therefore, the target parallel decoding number matching the number of media materials corresponding to the target media material group can be obtained based on the preset mapping relationship. More specifically, for example, when the number of media material segments corresponding to the target media material group is 6, the target parallel decoding number is also determined to be 6, in the case of a request with a decoding data amount less than a threshold. Then, based on the target parallel decoding number, the corresponding decoding thread is invoked to decode the media material corresponding to the jump time point, so as to obtain the corresponding decoded image, thereby realizing the preview of the video editing effect. In this embodiment, by obtaining the target parallel decoding number and decoding the media material corresponding to the jump time point in parallel based on the target parallel decoding number, the decoding efficiency can be improved to a certain extent compared with the single-thread serial decoding scheme.

[0046] In another possible implementation, as shown in Figure 5 the specific implementation of determining the target parallel decoding number corresponding to the target media material group in step S103 includes:

[0047] Step S1031: obtaining a decoding mapping table corresponding to the target media material group according to the number of media material segments corresponding to the target media material group, the decoding mapping table containing at least one decoding time consumption record for representing the decoding duration corresponding to the parallel decoding number.

[0048] Step S1032: determining the parallel decoding number with the shortest decoding time consumption as the target parallel decoding number according to the decoding mapping table.

[0049] For example, after obtaining the target media material group and determining the number of media material segments corresponding to the target media material group, the corresponding decoding mapping table is obtained according to the number of media material segments, wherein the decoding mapping table contains at least one decoding time consumption record for representing the decoding duration corresponding to the parallel decoding number. The decoding time consumption record in the decoding mapping table is the record information generated when the video draft is decoded previously. Figure 5 A schematic diagram of a decoding mapping table provided in the embodiments of the present disclosure is shown in Figure 6As shown, the number of media material segments = M, and the corresponding decoding mapping table is determined to be decoding mapping table P1 (other decoding mapping tables include decoding mapping table P0, decoding mapping table P2, etc.), wherein the decoding mapping table P1 includes a plurality of decoding time consumption records, such as rec_1, rec_2, rec_3, etc. shown in the figure. Each decoding time consumption record corresponds to at least one parallel decoding number and a corresponding decoding time length. For example, rec_1 corresponds to two cases of parallel decoding numbers N = 1 and N = 2, i.e., two cases of parallel decoding number 1 and parallel decoding number 2, and correspondingly, when the parallel decoding number N = 1, the corresponding single-frame decoding time length T = 2 (a preset unit, such as 100 milliseconds, the same below); when the parallel decoding number N = 2, the corresponding single-frame decoding time length T = 1.2. For the decoding time consumption record rec_2, there are three cases of parallel decoding numbers N = 3, N = 4, and N = 5, and correspondingly, when the parallel decoding number N = 3, the corresponding single-frame decoding time length T = 0.8; when the parallel decoding number N = 4, the corresponding single-frame decoding time length T = 0.6; and when the parallel decoding number N = 5, the corresponding single-frame decoding time length T = 0.9. The specific implementation of the decoding time consumption record rec_3 is similar to that of the decoding time consumption records rec_1 and rec_2, and will not be described again. According to the decoding mapping table corresponding to the number of media material segments of the target media material group, the parallel decoding number with the shortest time consumption is selected, i.e., the parallel decoding number N = 4, which is determined as the target parallel decoding number.

[0050] In this embodiment, the jump time point is determined in response to a jump instruction for a video draft. The video draft corresponds to at least two video editing tracks, and at least one piece of media material is included on the video editing track. According to the target time period in which the jump time point is located, a target media material group is obtained, which represents a logical set of media material segments of the media material on each video editing track in the target time period. According to the target media material group, a target parallel decoding number is determined, and the media material corresponding to the jump time point is parallel decoded based on the target parallel decoding number to obtain a decoded image. By obtaining the target media material group corresponding to the jump time point and determining the target parallel decoding number matching the target media material group, higher decoding efficiency can be achieved when the media material at the jump time point is parallel decoded based on the target parallel decoding number, thereby reducing the occurrence of lag and improving the smoothness of the playback of the generated preview image after decoding.

[0051] Reference Figure 6 , Figure 2 Flowchart of a video processing method provided by the embodiments of the present disclosure Figure 2 The embodiments of the present disclosure are based on the embodiments shown in Figure 7 On the basis of the embodiments shown in the embodiments, step S103 is further refined, and the video processing method includes:

[0052] Step S201: determining a jump time point in response to a jump instruction for the video draft; wherein the video draft corresponds to at least two video edit tracks, and each video edit track comprises at least one media material.

[0053] Step S202: obtaining a pre-generated time period sequence, the time period sequence comprising at least two key time points, and each time period in the time period sequence corresponds to two adjacent key time points.

[0054] Step S203: obtaining a target time period in which the jump time point is located according to the position of the jump time point in the time period sequence.

[0055] Exemplarily, after receiving the jump instruction for the video draft and determining the jump time point, the target time period in which the jump time point is located needs to be determined according to the jump time point, and then the target media material group corresponding to the target time period is obtained. Specifically, first, a pre-generated time period sequence is obtained, the time period sequence comprising at least two key time points, and the key time points in the time period sequence are arranged in a monotonically changing order (for example, from small to large or from large to small). Each time period in the time period sequence corresponds to two adjacent key time points. Through the time period sequence, any two adjacent key time points can determine a time period and a media material group corresponding to the time period. The key time points in the time period sequence are determined by the start and end time points of the media materials on the video edit tracks. Therefore, exemplarily, before step S202, step S200A is further included.

[0056] Step S200A: obtaining the start and end time points of the media materials on each video edit track corresponding to the video draft.

[0057] Step S200B: mapping the start and end time points of the media materials on each video edit track to the same time axis, and obtaining the time period sequence by merging the overlapping start and end time points.

[0058] Exemplarily, Figure 7 A generation process diagram of the time period sequence provided by the embodiments of the present disclosure is as follows, Figure 7As shown, on the video editing tracks Track_1, Track_2, Track_3 corresponding to the video draft, there are corresponding media materials, such as the media materials clip_1 to clip_5 shown in the figure, the video editing tracks where each media material is located, and the playback time relationship between each media material. Referring to the figure, 10 start and end time points (including start time points and end time points) corresponding to the media materials clip_1 to clip_5 are obtained, which are P1 to P10 shown in the figure. Then, the start and end time points P1 to P10 are mapped to the unified time axis corresponding to each video editing track, i.e., the playback time axis of the video draft, and the overlapping start and end time points, i.e., P3 and P7, are merged, and P4 and P8 (P9) are merged. The time period sequence [P3, P1, P4, P5, P2, P10, P6] is obtained.

[0059] Further, the time point sequence corresponds to 6 media material groups, which are the media material group seg_1 (shown as seg_1 in the figure, the same below) corresponding to the time period [P3, P1], the media material group seg_2 corresponding to the time period [P1, P4], the media material group seg_3 corresponding to the time period [P4, P5], the media material group seg_4 corresponding to the time period [P5, P2], the media material group seg_5 corresponding to the time period [P2, P10], and the media material group seg_6 corresponding to the time period [P10, P6].

[0060] Step S204: According to the target time period where the jump time point is located, a target media material group is obtained, which represents the logical set of media material segments of the media materials on each video editing track in the target time period.

[0061] Reference Figure 8 As shown in the time period sequence, according to the position of the jump time point on the playback time axis, the target time period to which it belongs can be determined. Then, based on the mapping relationship between the above time period sequence and the media material group, the corresponding target media material group of the target time period can be obtained.

[0062] Step S205: Obtain the initial number of parallel decoding.

[0063] Exemplarily, after obtaining the target media material group corresponding to the jump time point, the media material segments (or media materials) on the multiple video edit tracks corresponding to the target media material group need to be decoded to realize the playing (previewing) of the video content at the jump time point after the jump operation. In order to improve the speed of centralized decoding of the media material segments on the multiple video edit tracks, and at the same time avoid the problem that unreasonable parameter setting of parallel decoding leads to a decrease in decoding speed, the embodiment adopts a dynamic parallel decoding manner, uses a dynamic number of decoding threads to perform parallel decoding on the media material segments corresponding to the target media material group. Specifically, an initial parallel decoding number is first obtained. In one possible implementation manner, the initial parallel decoding number is a preset value, for example, 1 (i.e., equivalent to single-thread serial decoding), that is, no matter how many media material segments are included in the target media material, the media materials of the target media material group are decoded by using one decoding thread. Then, through a subsequent iterative loop process, the parallel decoding number is gradually increased until the shortest time-consuming parallel decoding number, that is, the optimal parallel decoding number (target parallel decoding number), is detected, and decoding is performed based on the optimal parallel decoding number.

[0064] In another possible implementation manner, the initial parallel decoding number is dynamically determined based on the characteristics of the target media material group. Exemplarily, the specific implementation steps of step S205 include:

[0065] Step S2051: obtaining the cumulative number of media material segments in the target media material group;

[0066] Step S2052: determining the initial parallel decoding number according to the cumulative number and / or the resolution of each media material segment.

[0067] Exemplarily, the cumulative number of media material segments in the target media material group is obtained, and the more the cumulative number is, the more media material segments in the target media material group, that is, the more decoding data. In a possible implementation, the corresponding parallel decoding number is determined according to the cumulative number, for example, when the cumulative number is N, the corresponding initial parallel decoding number is f(N), and more specifically, for example, when the cumulative number is N, the corresponding initial parallel decoding number is 2 / N. In another possible implementation, the parallel decoding number is determined according to the cumulative number and the resolution of each media material segment. Specifically, for example, the media material segments in the target media material group include a media material segment cilp_1, a media material segment cilp_2 and a media material segment cilp_3. The media material segment cilp_1 and the media material segment cilp_2 are of 1080P resolution, and the media material segment cilp_3 is of 2K resolution. After equivalent conversion based on the resolution of each media material segment, the media material segment cilp_1 and the media material segment cilp_2 correspond to one preset unit of decoding data, the media material segment cilp_3 corresponds to two preset units of decoding data, and the media material segment cilp_1, the media material segment cilp_2 and the media material segment cilp_3 correspond to a total of four preset units of decoding data. Correspondingly, the corresponding parallel decoding number is determined according to the four preset units of decoding data, for example, 2. Compared with the scheme of determining the parallel decoding number only by the cumulative number, the resolution of each media material segment can better represent the specific decoding data required, and the initial parallel decoding number matched therewith is determined, so that the decoding efficiency can be further improved.

[0068] In the step of the embodiment, the initial parallel decoding number is determined based on the cumulative number of media material segments in the target media material group and / or the resolution of each media material segment, so that the initial parallel decoding number is closer to the optimal (shortest time-consuming) parallel decoding number obtained subsequently, thereby reducing the number and time length of parallel decoding number detection, and the optimal parallel decoding number (target parallel decoding number) is obtained more quickly, thereby improving the decoding speed.

[0069] In step S206, the target media material group is parallel decoded based on the parallel decoding number, and a multi-track single-frame decoding time-consuming is obtained.

[0070] Exemplarily, based on the parallel decoding number obtained in the previous step, the media material segments corresponding to the target media material group are decoded in parallel, and in the decoding process, the multi-track single-frame decoding time is counted, wherein the multi-track single-frame decoding time can be the total decoding time consumed after decoding one frame of all the media material segments corresponding to the target media material group, or can be the single-track average decoding time consumed after decoding one frame of all the media material segments corresponding to the target media material group.

[0071] Exemplarily, as shown in Figure 9 the specific implementation steps of step S206 include:

[0072] Step S2061: Obtain the video resolutions of the media material segments corresponding to the target media material group.

[0073] Step S2062: According to the video resolutions, sort the media material segments corresponding to the target media material in descending order to obtain a material segment sequence with a length of N, wherein N is the number of the media material segments corresponding to the target media material group.

[0074] Step S2063: Decode the first M media material segments in the material segment sequence in parallel, and decode the last N-M media material segments in series to obtain the multi-track single-frame decoding time, wherein M is the current parallel decoding number.

[0075] Exemplarily, in the process of decoding the media material segments corresponding to the target media material group, it is necessary to decode the media material segments based on the current parallel decoding number, and when the current parallel decoding number is less than the number of the media material segments, it is necessary to implement hybrid decoding of the media material segments corresponding to the target media material group in parallel first and then in series. For example, the first 5 of the 10 media material segments are divided into a first group and the last 5 are divided into a second group, the first group is decoded in parallel first, and then the second group is decoded in parallel after the first week of parallel decoding is completed. Finally, the multi-track single-frame decoding time is obtained according to the sum of the decoding times of the first group and the second group. In this embodiment step, according to the video resolutions of the media material segments, the media material segments corresponding to the target media material are sorted in descending order, and then based on the current parallel decoding number M (which is an integer greater than 0), the first M media material segments with smaller resolutions are decoded in parallel, and then the N-M (N is an integer greater than 1) media material segments are decoded in series to obtain the multi-track single-frame decoding time. The multi-track single-frame decoding time can reflect the decoding efficiency of the material segment sequence with a length of N based on the parallel decoding number M, the larger the multi-track single-frame decoding time, the lower the single-frame decoding efficiency, and vice versa, the smaller the multi-track single-frame decoding time, the higher the single-frame decoding efficiency.

[0076] Figure 9 This disclosure provides a schematic diagram of the process for calculating the decoding time of a multi-track single frame, which is illustrated below. Figure 9 The above process will be explained in detail as shown below. (Reference) Figure 2 As shown, the media clips corresponding to the target media clip group include media clip clip_1 (shown as clip_1 in the figure, the same below), media clip clip_2, media clip clip_3, and media clip clip_4. Among them, the resolution of media clip clip_1 is 540P, the resolution of media clip clip_2 is 1080P, the resolution of media clip clip_3 is 2K, and the resolution of media clip clip_4 is 720P. Based on the video resolution, the media clips corresponding to the target media material are sorted in ascending order to obtain a clip sequence cilp_list of length N=4. Then, based on the number of parallel decoders, when the number of parallel decoders M=2, the first two media clips clip_1 and clip_4 in the clip sequence cilp_list are decoded in parallel, while clip_2 and clip_3 are decoded serially. The corresponding time is then calculated to obtain the multi-track single-frame decoding time T1. When the number of parallel decoders M=3, the first three media clips clip_1, clip_4, and clip_2 in the clip sequence cilp_list are decoded in parallel, while clip_3 is decoded serially. The corresponding time is then calculated to obtain the multi-track single-frame decoding time T2. This process continues until the process of cyclically probing the number of target parallel decoders ends.

[0077] Optionally, after step S206, the method further includes:

[0078] Step S206A: Generate a decoding time record based on the multi-track single-frame decoding time and the corresponding number of parallel decodes, and add the decoding time record to the decoding mapping table.

[0079] For example, after decoding based on different numbers of parallel decoders each time and obtaining the corresponding multi-track single-frame decoding time, the number of parallel decoders and the corresponding multi-track single-frame decoding time are recorded as a set and stored in a decoding mapping table. This decoding mapping table is then saved synchronously with the video draft. When editing the video draft or jumping between video segments, the optimal number of parallel decoders (target number of parallel decoders) can be directly determined based on this decoding mapping table, and parallel decoding can be performed, thereby improving decoding efficiency. The implementation method of the decoding mapping table is discussed in... Figure 2 The embodiments shown have been described in detail and will not be repeated here.

[0080] Step S207: If the parallel decoding number or the multi-track single frame decoding time consumption meets the target condition, the target parallel decoding number is obtained based on the parallel decoding number, and step S209 is performed.

[0081] Step S208: If neither the parallel decoding number nor the multi-track single frame decoding time consumption meets the target condition, the target step is added to the parallel decoding number to update the parallel decoding number, and step S206 is returned.

[0082] For example, after each decoding based on the current parallel decoding number is completed, it is determined based on the obtained multi-track single frame decoding time consumption whether to end the detection of the target parallel decoding number. On the one hand, in a possible implementation manner, if the parallel decoding number reaches a preset number, the loop is stopped. According to the multi-track single frame decoding time consumption corresponding to different parallel decoding numbers recorded before, the parallel decoding number with the minimum multi-track single frame decoding time consumption is determined as the target parallel decoding number.

[0083] In another possible implementation manner, if the multi-track single frame decoding time consumption meets the target condition, for example, the multi-track single frame decoding time consumption is less than a preset value, the loop is stopped. The current parallel decoding number is determined as the target parallel decoding number. In the step of the embodiment, by judging the multi-track single frame decoding time consumption in real time, when the period meets the requirement, that is, less than the preset time consumption, the corresponding parallel decoding number can be used for subsequent parallel decoding, and the minimum multi-track single frame decoding time consumption is not pursued. Since the embodiment can effectively search the round of loop detection (parallel decoding number) compared with the scheme of pursuing the minimum multi-track single frame decoding time consumption, the overall time consumption is shorter, and the decoding speed can be further improved without the decoding mapping table.

[0084] On the other hand, for example, if neither the parallel decoding number nor the multi-track single frame decoding time consumption meets the target condition, the target step is added to the parallel decoding number, for example, the parallel decoding number is increased by 1, and step S206 is returned, the target media material group is continuously decoded in parallel to obtain an updated multi-track single frame decoding time consumption, and the above process is repeated until the loop is ended.

[0085] Optionally, after step S208, the method further includes:

[0086] Step S208A: The target step is updated according to the multi-track single frame decoding time consumption.

[0087] Exemplarily, in another possible implementation, the target step is a dynamic step, after step S208, the target step is updated according to the current multi-track single-frame decoding time consumption, specifically, when the multi-track single-frame decoding time consumption is larger, it indicates that the current parallel decoding number is farther away from the optimal parallel decoding number (target parallel decoding number), then the target step is increased, so as to reach the target parallel decoding number faster; and when the multi-track single-frame decoding time consumption is smaller, it indicates that the current parallel decoding number is closer to the optimal parallel decoding number (target parallel decoding number), then the target step is decreased, and the accuracy of the target parallel decoding number is improved.

[0088] Step S209: based on the target parallel decoding number, parallel decoding is performed on the media material corresponding to the jump time point, to obtain a decoded image.

[0089] In this embodiment, the implementation manners of step S201 and step S209 are the same as those of step S101 and step S103 in the embodiment of the disclosure Figure 10 The implementation manners of step S201 and step S209 in this embodiment are the same as those of step S101 and step S103 in the embodiment of the disclosure

[0090] The video processing method corresponding to the above embodiment, Figure 10 A structural block diagram of a video processing apparatus provided by an embodiment of the disclosure is shown. For ease of illustration, only parts related to the embodiment of the disclosure are shown.

[0091] With reference to Figure 11 , the video processing apparatus 3 comprises:

[0092] The receiving module 31 is configured to determine a jump time point in response to a jump instruction for a video draft; wherein the video draft corresponds to at least two video editing tracks, and the video editing track comprises at least one piece of media material;

[0093] The processing module 32 is configured to obtain a target media material group according to a target time period in which the jump time point is located, and the target media material group represents a logical set of media material segments of the media material on each video editing track within the target time period;

[0094] The decoding module 33 is configured to determine a corresponding target parallel decoding number according to the target media material group, and perform parallel decoding on the media material corresponding to the jump time point based on the target parallel decoding number, to obtain a decoded image.

[0095] In an embodiment of the present disclosure, the decoding module 33, when determining the target parallel decoding number according to the target media material group, is specifically configured to: obtain a parallel decoding number; perform parallel decoding on the target media material group based on the parallel decoding number to obtain a multi-track single-frame decoding time consumption; if the parallel decoding number or the multi-track single-frame decoding time consumption meets a target condition, obtain the target parallel decoding number based on the parallel decoding number; otherwise, increase the parallel decoding number by a target step, and return to perform the step of obtaining the parallel decoding number.

[0096] In an embodiment of the present disclosure, the decoding module 33, when performing parallel decoding on the target media material group based on the parallel decoding number to obtain a multi-track single-frame decoding time consumption, is specifically configured to: obtain video resolutions of each media material segment corresponding to the target media material group; sort each media material segment corresponding to the target media material in ascending order of the video resolutions to obtain a media material segment sequence with a length of N, where N is the number of media material segments corresponding to the target media material group; perform parallel decoding on the first M media material segments in the media material segment sequence, and perform serial decoding on the last N-M media material segments to obtain the multi-track single-frame decoding time consumption, where M is the current parallel decoding number.

[0097] In an embodiment of the present disclosure, before obtaining the initial parallel decoding number, the decoding module 33 is further configured to: obtain a cumulative number of media material segments in the target media material group; and determine the initial parallel decoding number according to the cumulative number and / or resolutions of each media material segment.

[0098] In an embodiment of the present disclosure, after performing parallel decoding on the target media material group based on the parallel decoding number to obtain a multi-track single-frame decoding time consumption, the decoding module 33 is further configured to: generate a decoding time consumption record according to the multi-track single-frame decoding time consumption and the corresponding parallel decoding number; and add the decoding time consumption record to a decoding mapping table.

[0099] In an embodiment of the present disclosure, after performing parallel decoding on the target media material group based on the parallel decoding number to obtain a multi-track single-frame decoding time consumption, the decoding module 33 is further configured to: update the target step according to the multi-track single-frame decoding time consumption.

[0100] In an embodiment of the present disclosure, the decoding module 33, when determining the target parallel decoding number according to the target media material group, is specifically configured to: obtain a decoding mapping table corresponding to the target media material group according to the number of media material segments corresponding to the target media material group, the decoding mapping table containing at least one decoding time consumption record, the decoding time consumption record being used to represent a decoding time length corresponding to the parallel decoding number; and determine the parallel decoding number with the shortest decoding time consumption as the target parallel decoding number according to the decoding mapping table.

[0101] In an embodiment of the present disclosure, before obtaining the target media material group according to the target time period in which the jump time point is located, the processing module 32 is further configured to: obtain a pre-generated time period sequence, the time period sequence comprising at least two key time points, and two adjacent key time points in the time period sequence corresponding to a time period; and obtain the target time period in which the jump time point is located according to the position of the jump time point in the time period sequence.

[0102] In an embodiment of the present disclosure, before obtaining the pre-generated time period sequence, the processing module 32 is further configured to: obtain the start and end time points of the media materials on each video editing track corresponding to the video draft; map the start and end time points of the media materials on each video editing track to the same time axis, and obtain the time period sequence by merging the overlapping start and end time points.

[0103] The receiving module 31, the processing module 32, and the decoding module 33 are connected in sequence. The video processing device 3 provided in this embodiment can execute the technical solutions of the method embodiments described above, and has similar implementation principles and technical effects. Therefore, no further description is given here.

[0104] Figure 11 A structural schematic diagram of an electronic device provided in an embodiment of the present disclosure is shown in FIG. 4. Figures 2-9 As shown in FIG. 4, the electronic device 4 comprises:

[0105] a processor 41, and a memory 42 connected to the processor 41 in communication;

[0106] The memory 42 stores computer execution instructions.

[0107] The processor 41 executes the computer execution instructions stored in the memory 42 to implement the video processing method in the embodiment shown in FIG. 4. Figures 2-9

[0108] Optionally, the processor 41 and the memory 42 are connected through a bus 43.

[0109] The related descriptions can be understood by referring to the related descriptions and effects of the steps in the corresponding embodiments, and therefore no further description is given here. Figures 2-9

[0110] An embodiment of the present disclosure provides a computer readable storage medium, the computer readable storage medium storing computer execution instructions, the computer execution instructions being executed by a processor to implement the video processing method provided in any of the embodiments of the present disclosure. Figure 12

[0111] In order to implement the above-mentioned embodiments, an electronic device is further provided in an embodiment of the present disclosure.

[0112] Reference​​​Figure 12 The diagram illustrates a structural schematic of an electronic device 900 suitable for implementing embodiments of the present disclosure. The electronic device 900 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 12 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0113] like Figure 12 As shown, the electronic device 900 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the electronic device 900. The processing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0114] Typically, the following devices can be connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 908 including, for example, magnetic tapes, hard disks, etc.; and communication devices 909. Communication device 909 allows electronic device 900 to communicate wirelessly or wiredly with other devices to exchange data. Although ​ An electronic device 900 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0115] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.

[0116] Note that the computer readable medium described above in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination thereof. The computer readable storage medium may, for example, be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device. In the present disclosure, the computer readable signal medium can include a data signal carried in a baseband or as part of a carrier wave, in which the computer readable program code is carried. Such a propagated data signal can take any of a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to wire, cable, RF (radio frequency), or any suitable combination of the above.

[0117] The computer readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device and not be assembled into the electronic device.

[0118] The computer readable medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the embodiments described above.

[0119] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0120] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may

[0121] The units described in the embodiments of the present disclosure can be implemented by software, or by hardware. In some cases, the name of the unit does not constitute a limitation on the unit itself. For example, the first obtaining unit can also be described as a unit for obtaining at least two Internet protocol addresses.

[0122] The functions described above in the specification of the present disclosure can be performed by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.

[0123] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more of: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0124] In a first aspect, according to one or more embodiments of the present disclosure, a video processing method is provided, comprising:

[0125] In response to a jump instruction for a video draft, a jump time point is determined, wherein the video draft corresponds to at least two video editing tracks, and at least one piece of media material is included on the video editing tracks; according to a target time period in which the jump time point is located, a target media material group is obtained, the target media material group representing a logical set of media material segments of media materials on each of the video editing tracks within the target time period; according to the target media material group, a target parallel decoding number is determined, and based on the target parallel decoding number, parallel decoding is performed on media materials corresponding to the jump time point to obtain a decoded image.

[0126] According to one or more embodiments of the present disclosure, the determining of the target parallel decoding number according to the target media material group comprises: obtaining a parallel decoding number; based on the parallel decoding number, parallel decoding is performed on the target media material group to obtain a multi-track single-frame decoding time consumption; if the parallel decoding number or the multi-track single-frame decoding time consumption meets a target condition, the target parallel decoding number is obtained based on the parallel decoding number; otherwise, a target step is added to the parallel decoding number, and the step of obtaining the parallel decoding number is returned to be executed.

[0127] According to one or more embodiments of the present disclosure, the parallel decoding number-based parallel decoding of the target media material group to obtain a multi-track single-frame decoding time consumption includes: obtaining video resolutions of each media material segment corresponding to the target media material group; sorting each media material segment corresponding to the target media material in ascending order of the video resolutions to obtain a media material segment sequence with a length of N, where the N is a number of media material segments corresponding to the target media material group; and performing parallel decoding on the first M media material segments in the media material segment sequence and performing serial decoding on the last N-M media material to obtain the multi-track single-frame decoding time consumption, where the M is the current parallel decoding number.

[0128] According to one or more embodiments of the present disclosure, before the initial parallel decoding number is obtained, the method further includes: obtaining a cumulative number of media material segments in the target media material group; and determining the initial parallel decoding number according to the cumulative number and / or resolutions of each media material segment.

[0129] According to one or more embodiments of the present disclosure, after the parallel decoding number-based parallel decoding of the target media material group to obtain a multi-track single-frame decoding time consumption, the method further includes: generating a decoding time consumption record according to the multi-track single-frame decoding time consumption and the corresponding parallel decoding number; and adding the decoding time consumption record to a decoding mapping table.

[0130] According to one or more embodiments of the present disclosure, after the parallel decoding number-based parallel decoding of the target media material group to obtain a multi-track single-frame decoding time consumption, the method further includes: updating the target step according to the multi-track single-frame decoding time consumption.

[0131] According to one or more embodiments of the present disclosure, the target parallel decoding number corresponding to the target media material group is determined according to the target media material group, including: obtaining a decoding mapping table according to a number of media material segments corresponding to the target media material group, the decoding mapping table including at least one decoding time consumption record, the decoding time consumption record being used to represent a decoding time length corresponding to a parallel decoding number; and determining the parallel decoding number with the shortest decoding time consumption as the target parallel decoding number according to the decoding mapping table.

[0132] According to one or more embodiments of the present disclosure, before the target media material group is obtained according to the target time period in which the jump time point is located, the method further includes: obtaining a pre-generated time period sequence, the time period sequence including at least two key time points, and each time period corresponding to two adjacent key time points in the time period sequence; and obtaining the target time period in which the jump time point is located according to a position of the jump time point in the time period sequence.

[0133] According to one or more embodiments of the present disclosure, before the obtaining of the pre-generated time period sequence, the method further includes: obtaining start and end time points of media materials on each video editing track corresponding to the video draft; and mapping the start and end time points of the media materials on each video editing track to the same time axis, and obtaining the time period sequence by merging the overlapping start and end time points.

[0134] In a second aspect, according to one or more embodiments of the present disclosure, a video processing apparatus is provided, including:

[0135] a receiving module configured to determine a jump time point in response to a jump instruction for a video draft, wherein the video draft corresponds to at least two video editing tracks, and each video editing track includes at least one piece of media material;

[0136] a processing module configured to obtain a target media material group according to a target time period in which the jump time point is located, the target media material group representing a logical set of media material segments of the media materials on each video editing track within the target time period;

[0137] a decoding module configured to determine a target parallel decoding number according to the target media material group, and perform parallel decoding on the media materials corresponding to the jump time point based on the target parallel decoding number, to obtain a decoded image.

[0138] According to one or more embodiments of the present disclosure, when determining the target parallel decoding number according to the target media material group, the decoding module is specifically configured to: obtain a parallel decoding number; perform parallel decoding on the target media material group based on the parallel decoding number, to obtain a multi-track single-frame decoding time consumption; if the parallel decoding number or the multi-track single-frame decoding time consumption meets a target condition, obtain the target parallel decoding number based on the parallel decoding number; otherwise, increase the parallel decoding number by a target step, and return to the step of obtaining the parallel decoding number.

[0139] According to one or more embodiments of the present disclosure, when performing parallel decoding on the target media material group based on the parallel decoding number, the decoding module is specifically configured to: obtain video resolutions of each media material segment corresponding to the target media material group; sort each media material segment corresponding to the target media material group in descending order of the video resolutions, to obtain a media material segment sequence with a length of N, wherein N is the number of media material segments corresponding to the target media material group; perform parallel decoding on the first M media material segments in the media material segment sequence, and perform serial decoding on the last N-M media material segments, to obtain the multi-track single-frame decoding time consumption, wherein M is the current parallel decoding number.

[0140] According to one or more embodiments of the present disclosure, before the initial number of parallel decodes is obtained, the decoding module is further configured to: obtain a cumulative number of media material segments in the target media material group; and determine the initial number of parallel decodes according to the cumulative number and / or resolutions of the media material segments.

[0141] According to one or more embodiments of the present disclosure, after the multi-track single-frame decoding time is obtained by decoding the target media material group in parallel according to the number of parallel decodes, the decoding module is further configured to: generate a decoding time record according to the multi-track single-frame decoding time and the corresponding number of parallel decodes; and add the decoding time record to a decoding mapping table.

[0142] According to one or more embodiments of the present disclosure, after the multi-track single-frame decoding time is obtained by decoding the target media material group in parallel according to the number of parallel decodes, the decoding module is further configured to: update the target step size according to the multi-track single-frame decoding time.

[0143] According to one or more embodiments of the present disclosure, when the target number of parallel decodes is determined according to the target media material group, the decoding module is specifically configured to: obtain a decoding mapping table according to a number of media material segments corresponding to the target media material group, the decoding mapping table including at least one decoding time record, the decoding time record being used to represent a decoding time length corresponding to a number of parallel decodes; and determine the target number of parallel decodes as the number of parallel decodes with the shortest decoding time according to the decoding mapping table.

[0144] According to one or more embodiments of the present disclosure, before the target media material group is obtained according to the target time period in which the jump time point is located, the processing module is further configured to: obtain a pre-generated time period sequence, the time period sequence including at least two key time points, and two adjacent key time points in the time period sequence corresponding to a time period; and obtain the target time period in which the jump time point is located according to a position of the jump time point in the time period sequence.

[0145] According to one or more embodiments of the present disclosure, before the pre-generated time period sequence is obtained, the processing module is further configured to: obtain start and end time points of media materials on each video editing track corresponding to a video draft; map the start and end time points of the media materials on each video editing track to a same time axis, and obtain the time period sequence by merging the overlapping start and end time points.

[0146] In a third aspect, according to one or more embodiments of the present disclosure, an electronic device is provided, including: at least one processor and a memory.

[0147] The memory stores computer-executable instructions;

[0148] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the video processing method according to the first aspect and various possible designs of the first aspect.

[0149] In a fourth aspect, a computer-readable storage medium is provided according to one or more embodiments of the present disclosure, and the computer-readable storage medium stores computer-executable instructions, when the processor executes the computer-executable instructions, the video processing method according to the first aspect and various possible designs of the first aspect is implemented.

[0150] In a fifth aspect, a computer program product is provided according to one or more embodiments of the present disclosure, and the computer program product includes a computer program, when the processor executes the computer program, the video processing method according to the first aspect and various possible designs of the first aspect is implemented.

[0151] The above description is merely exemplary of the disclosure and the application of the principles thereof and it is not intended to limit the scope of the disclosure to the specific forms set forth. The above description is merely exemplary of the disclosure and the application of the principles thereof and it is not intended to limit the scope of the disclosure to the specific forms set forth. The scope of the disclosure is not limited to the specific forms set forth above, and other technical solutions can be derived from the technical features disclosed above without departing from the disclosure. For example, technical solutions formed by replacing the above features with features disclosed in the disclosure (but not limited to) having similar functions form technical solutions.

[0152] In addition, although each operation is depicted in a particular order, this should not be understood as requiring the operations to be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing can be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the disclosure. Certain features described in the context of separate embodiments can also be combined in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented separately or in any suitable subcombination.

[0153] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims

1. A method of video processing, the method comprising: The method comprises: determining a jump time point in response to a jump instruction for a video draft; wherein the video draft corresponds to at least two video editing tracks, and at least one piece of media material is included on the video editing track; obtaining a target media material group according to a target time period in which the jump time point is located, the target media material group representing a logical set of media material segments of media materials on each of the video editing tracks within the target time period; determining a target parallel decoding number corresponding to the target media material group, and performing parallel decoding on media materials corresponding to the jump time point based on the target parallel decoding number to obtain a decoded image.

2. The method of claim 1, wherein, The step of determining the target parallel decoding number corresponding to the target media material group comprises: obtaining a parallel decoding number; performing parallel decoding on the target media material group based on the parallel decoding number to obtain a multi-track single-frame decoding time consumption; if the parallel decoding number or the multi-track single-frame decoding time consumption meets a target condition, obtaining the target parallel decoding number based on the parallel decoding number; otherwise, increasing the parallel decoding number by a target step, and returning to the step of obtaining the parallel decoding number.

3. The method of claim 2, wherein, The step of performing parallel decoding on the target media material group based on the parallel decoding number to obtain a multi-track single-frame decoding time consumption comprises: obtaining video resolutions of each media material segment corresponding to the target media material group; sorting each media material segment corresponding to the target media material group in ascending order of the video resolutions to obtain a media material segment sequence with a length of N, wherein the N is a number of media material segments corresponding to the target media material group; performing parallel decoding on the first M media material segments in the media material segment sequence, and performing serial decoding on the last N-M media material segments to obtain the multi-track single-frame decoding time consumption, wherein the M is a current parallel decoding number.

4. The method of claim 2, wherein, Before obtaining an initial parallel decoding number, the method further comprises: obtaining a cumulative number of media material segments in the target media material group; determining the initial parallel decoding number according to the cumulative number and / or resolutions of each media material segment.

5. The method of claim 2, wherein, After the step of performing parallel decoding on the target media material group based on the parallel decoding number to obtain a multi-track single-frame decoding time consumption, the method further comprises: generating a decoding time consumption record according to the multi-track single-frame decoding time consumption and the corresponding parallel decoding number; adding the decoding time consumption record to a decoding mapping table.

6. The method of claim 2, wherein, After the step of performing parallel decoding on the target media material group based on the parallel decoding number to obtain a multi-track single-frame decoding time consumption, the method further comprises: updating the target step according to the multi-track single-frame decoding time consumption.

7. The method of claim 1, wherein, The step of determining the target parallel decoding number corresponding to the target media material group comprises: obtaining a decoding mapping table corresponding to a number of media material segments of the target media material group, the decoding mapping table including at least one decoding time consumption record, the decoding time consumption record representing a decoding time length corresponding to a parallel decoding number; determining the parallel decoding number with the shortest decoding time consumption in the decoding mapping table as the target parallel decoding number.

8. The method of claim 1, wherein, Before obtaining the target media material group according to the target time period in which the jump time point is located, further comprising: obtaining a pre-generated time period sequence, the time period sequence comprising at least two key time points, and two adjacent key time points in the time period sequence corresponding to a time period; obtaining the target time period in which the jump time point is located according to the position of the jump time point in the time period sequence.

9. The method of claim 8, wherein, Before the obtaining of the pre-generated time period sequence, further comprising: obtaining the start and end time points of the media materials on each video editing track corresponding to the video draft; mapping the start and end time points of the media materials on each video editing track to the same time axis, and obtaining the time period sequence by merging the coincident start and end time points.

10. A video processing apparatus, comprising: comprising: a receiving module configured to determine a jump time point in response to a jump instruction for a video draft, wherein the video draft corresponds to at least two video editing tracks, and the video editing tracks comprise at least one segment of media material; a processing module configured to obtain a target media material group according to a target time period in which the jump time point is located, the target media material group representing a logical set of media material segments of the media materials on each video editing track within the target time period; a decoding module configured to determine a target parallel decoding number according to the target media material group, and perform parallel decoding on the media materials corresponding to the jump time point based on the target parallel decoding number to obtain a decoded image.

11. An electronic device, comprising: comprising: a processor and a memory; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, so that the processor executes the video processing method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and when the processor executes the computer execution instructions, the video processing method according to any one of claims 1 to 9 is realized.

13. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the video processing method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Video editing method, device and equipment and computer readable storage medium

    CN113015005A

  • A System and Methods Thereof for Auto-playing Video Content on Mobile Devices

    US20180324238A1