Video transcoding method, device, equipment, medium and product

By performing fragmentation processing and transcoding and playing videos while transcoding, the problem of users waiting for the video to be fully transcoding before viewing is solved, and the video transcoding efficiency and user experience are improved.

CN119697407APending Publication Date: 2025-03-25CHINA MOBILE INTERNET CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411829647.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

When users watch videos transcoded by the server, they need to wait until the video is fully transcoded before viewing. Due to the long transcoding processing time, the user waits for a long time, which affects the user's experience.

Method used

By obtaining the metadata of the video to be transcoded, including playback time, frame rate, bit rate and bit rate compression ratio, the number of video shards is determined, and the video is sharded, and then each sharded video is transcoded to realize the transcoding and playback.

Benefits of technology

It improves the efficiency of video transcoding processing, reduces the time for users to wait for viewing, and improves the user's viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697407A_ABST
    Figure CN119697407A_ABST
Patent Text Reader

Abstract

The invention discloses a video transcoding method and device, equipment, a medium and a product, and belongs to the technical field of video data processing, and the method comprises the steps: obtaining metadata of a to-be-transcoded video, the metadata comprises the playing time length, the frame rate, the bit rate and the bit rate compression ratio of the video, the video is a video which does not conform to a preset coding format, and the video is a video which does not conform to the preset coding format; the bit rate compression ratio represents the change rate between different frames included in the video, and the playing duration is the total duration of playing the video; based on the playing time length, the frame rate, the bit rate and the bit rate compression ratio, determining the fragment number for performing fragment processing on the video, and performing fragment processing on the video based on the fragment number to obtain a plurality of fragment videos; and transcoding the plurality of fragment videos to obtain a transcoded video, and storing the transcoded video, so that the video transcoding efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of video data processing technology, and in particular, relates to a video transcoding method, device, equipment, medium and product. Background Art

[0002] Users can upload videos to the server through the user end, and the server transcodes the videos to obtain transcoded videos. Users can access the server through the user end to watch the transcoded videos online.

[0003] Currently, when users access a server to watch an online video from a user end, they need to wait for the video to be completely transcoded before watching. At the same time, since the server takes a long time to transcode the video and the transcoding efficiency is low, the user has to wait a long time to watch, which affects the user's viewing experience. Summary of the invention

[0004] The embodiments of the present application provide a video transcoding method, apparatus, device, medium and product, which can improve the video transcoding efficiency.

[0005] In a first aspect, an embodiment of the present application provides a video transcoding method, which is applied to a server, and the method includes:

[0006] Obtain metadata of the video to be transcoded, wherein the metadata includes the video's playback duration, frame rate, bit rate, and bit rate compression ratio, the video is a video that does not conform to a preset encoding format, the bit rate compression ratio represents a rate of change between different frames included in the video, and the playback duration is the total duration of the video being played;

[0007] Determine the number of segments for segmenting the video based on the playback duration, frame rate, bit rate, and bit rate compression ratio, and segment the video based on the number of segments to obtain multiple segmented videos;

[0008] Transcode multiple segmented videos to obtain transcoded videos and store the transcoded videos.

[0009] In a second aspect, an embodiment of the present application provides a video transcoding device, which is applied to a server, and the device includes:

[0010] An acquisition module, used to acquire metadata of the video to be transcoded, wherein the metadata includes the video's playback duration, frame rate, bit rate, and bit rate compression ratio, the video is a video that does not conform to a preset encoding format, the bit rate compression ratio represents a rate of change between different frames included in the video, and the playback duration is the total duration of the video playback;

[0011] A fragmentation module is used to determine the number of fragments for fragmenting the video based on the playback duration, frame rate, bit rate and bit rate compression ratio, and to fragment the video based on the number of fragments to obtain multiple fragmented videos;

[0012] The transcoding module is used to transcode multiple segmented videos to obtain transcoded videos and store the transcoded videos.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising:

[0014] a processor and a memory storing computer program instructions;

[0015] When the processor executes the computer program instructions, it is used to perform the video transcoding method of the first aspect mentioned above.

[0016] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the video transcoding method of the first aspect described above is implemented.

[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when processed by a processor, implements the video transcoding method of the first aspect above.

[0018] The video transcoding method, apparatus, device, medium and product provided in the embodiments of the present application obtain metadata of the video to be transcoded, and determine to perform segmentation processing on the video according to the playback duration, frame rate, bit rate and bit rate compression ratio included in the metadata to obtain multiple segmented videos. The multiple segmented videos are transcoded to obtain transcoded videos, which can improve the efficiency of video transcoding and save users' waiting time for watching. Furthermore, by transcoding the segmented videos, "transcoding while watching" can be achieved, thereby improving the user's viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0020] Figure 1 A schematic diagram of a video transcoding architecture provided for some embodiments of the present application.

[0021] Figure 2 A flowchart of a video transcoding method provided for some embodiments of the present application.

[0022] Figure 3 A flowchart of another video transcoding method provided for some embodiments of the present application.

[0023] Figure 4A flowchart of another video transcoding method provided for some embodiments of the present application.

[0024] Figure 5 A flowchart of another video transcoding method provided for some embodiments of the present application.

[0025] Figure 6 A flowchart of another video transcoding method provided for some embodiments of the present application.

[0026] Figure 7 A flowchart of another video transcoding method provided for some embodiments of the present application.

[0027] Figure 8 A schematic diagram of a video transcoding device provided in some embodiments of the present application.

[0028] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0030] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0031] Before describing the technical solutions provided by the embodiments of the present application, in order to facilitate the understanding of the embodiments of the present application, the present application first specifically describes the problems existing in the related art:

[0032] Nowadays, more and more users choose to store videos on servers such as cloud disks, and play videos online through the server to watch them online. However, the encoding format of the videos uploaded by users on the server may not conform to the preset format of the videos played online on the server, so the server needs to transcode the videos and then play them online after obtaining the transcoded videos.

[0033] Currently, when users access the server to watch transcoded videos online based on the user side, they need to wait until the video is completely transcoded before watching. At the same time, since the video playback time may be long, the server takes a long time to transcode the video, resulting in low transcoding efficiency. The user has to wait a long time to watch, which affects the user's viewing experience.

[0034] Based on this, the embodiments of the present application provide a video transcoding method, device, equipment, medium and product, which can solve the above problems. First, a server architecture for video transcoding provided by the embodiments of the present application is described in detail.

[0035] In some embodiments, Figure 1 As shown, the present application embodiment provides a schematic diagram of a server architecture, such as Figure 1 The server may include a receiving unit 101, a task scheduling unit 102, a transcoding service unit 103, a resource management unit 104, a playback unit 105, and a storage unit 106.

[0036] The receiving unit 101 is used to check whether the encoding format of the video to be transcoded meets the preset format when receiving the video to be transcoded sent by the user end, and obtain the inspection result. When the inspection result includes that the encoding format does not meet the preset format, a transcoding request is sent to the task scheduling unit.

[0037] The task scheduling unit 102 is used to parse the video and obtain metadata of the video when receiving the transcoding request, where the metadata includes the video playback time, frame rate, bit rate and bit rate compression ratio, slice the video based on the video playback time, frame rate, bit rate and bit rate compression ratio to obtain a plurality of sliced ​​videos, and generate a plurality of transcoding tasks based on the plurality of sliced ​​videos;

[0038] The transcoding service unit 103 is used to perform transcoding processing on the multiple segmented videos based on the multiple transcoding tasks to obtain transcoded videos, wherein one segmented video corresponds to one sub-transcoded video;

[0039] The resource management unit 104 is used to manage the transcoded video and determine the play order of multiple sub-transcoded videos;

[0040] The playing unit 105 is used to play the sub-transcoded video.

[0041] The storage unit 106 is used to store videos and transcode videos.

[0042] By setting up the above-mentioned server-side architecture, the embodiment of the present application can enable the server to transcode and play the video online when receiving the video sent by the user end, and can improve the transcoding efficiency by first segmenting the video to obtain segmented videos and then transcoding the segmented videos.

[0043] In some embodiments, Figure 2 As shown, the embodiment of the present application provides a video transcoding method, which is applied to a server. The method may include the following steps S210-S230:

[0044] S210: Obtain metadata of the video to be transcoded, wherein the metadata includes the video's playback duration, frame rate, bit rate, and bit rate compression ratio, the video is a video that does not conform to a preset encoding format, the bit rate compression ratio represents the rate of change between different frames included in the video, and the playback duration is the total duration of the video playback.

[0045] Here, the server can obtain the metadata of the video to be transcoded. The above video can be a video that the server detects does not conform to the preset encoding format, that is, the video in the above encoding format cannot be directly played online on the server. The above metadata can be obtained by parsing the video by the server. The metadata may include the video's playback duration, frame rate, bit rate, and bit rate compression ratio. The above playback duration is the total duration of the video playback. The bit rate refers to the number of bits transmitted per second. Generally, the higher the bit rate, the higher the video quality. The bit rate compression ratio can characterize the rate of change between different frames included in the video. The above bit rate compression ratio can be determined based on the playback duration and the grayscale values ​​in different frame images in the video.

[0046] In some examples, the frame rate may be the original frame rate of the video, the maximum frame rate supported by the user end for playing the video, or the minimum frame rate set by the server end.

[0047] S220: Determine the number of segments for segmenting the video based on the playback duration, frame rate, bit rate, and bit rate compression ratio, and segment the video based on the number of segments to obtain a plurality of segmented videos.

[0048] The number of segments for segmenting the video can be determined based on the playback time, frame rate, bit rate and bit rate compression ratio. For example, the start playback time and the end playback time of each segmented video can be determined based on the playback time, frame rate, bit rate and bit rate compression ratio. The number of segments is determined by the start playback time, the end playback time and the playback time, and the video is segmented based on the start playback time and the end playback time of each segmented video to obtain multiple segmented videos.

[0049] S230: Transcode the multiple segmented videos to obtain transcoded videos and store the transcoded videos.

[0050] The plurality of segmented videos may be transcoded to obtain transcoded videos. Here, the plurality of segmented videos may be transcoded based on the play order of the segmented videos to obtain transcoded videos. After obtaining the transcoded videos, the transcoded videos may be stored, and a corresponding relationship between the videos and the transcoded videos may be established, so that when a request to play the video is received from the user end later, the transcoded videos may be directly played.

[0051] In some examples, a segmented video can be transcoded into a sub-transcoded video. When a request to play a video is received from the user end, after completing the transcoding of a segmented video to obtain the corresponding sub-transcoded video, other segmented videos can be transcoded while playing the sub-transcoded video, thereby achieving transcoding and playback at the same time, further saving the user's waiting time for watching the video and improving the user's viewing experience.

[0052] The embodiment of the present application obtains metadata of a video to be transcoded, determines to perform segmentation on the video according to the playback duration, frame rate, bit rate, and bit rate compression ratio included in the metadata, and obtains a plurality of segmented videos. The plurality of segmented videos are transcoded to obtain transcoded videos, thereby improving the efficiency of video transcoding and saving the time users spend waiting to watch videos.

[0053] It can be imagined that before transcoding the video, the server needs to receive the video sent by the user.

[0054] In some embodiments, before step S210: obtaining metadata of the video to be transcoded, the method further includes:

[0055] Receive the video sent by the user end and store the video on the server end; parse the video to determine the video's playback duration, bit rate, bit rate compression ratio, frame rate, and clarity information set, where the clarity information set includes multiple clarity information options.

[0056] Before obtaining the metadata of the video to be transcoded, the server can receive the video sent by the user and store the video. The server can parse the video to determine the video's playback duration, bit rate, bit rate compression ratio, frame rate, and clarity information set.

[0057] In some examples, the video may be parsed to determine the resolution of the video, and then a first definition set including a plurality of first definition options may be determined based on the resolution, and then a definition information set including a plurality of definition information options of the transcoded video may be determined based on the first definition set. For example, the current resolution of the video is (w, h), where w is the number of pixels in the horizontal direction, and h is the number of pixels in the vertical direction. A first definition information set D may be determined based on the current resolution, and the first definition information set includes a set of all resolutions that are optional based on the current resolution. The definition information set D' of the transcoded video may be determined based on the first definition information set D, where

[0058] in

[0059] Here, the above d is the identifier of each clarity information.

[0060] In some examples, the bit rate compression ratio is determined based on the following steps:

[0061] A1: Based on the playback time T f , according to the following formula, obtain the sampling quantity S c ,

[0062]

[0063] in, Indicates obtaining 3 and The maximum value in .

[0064] A2: Based on the sampling quantity S c And the playback time determines multiple sampling time points. For example, when the playback time is determined to be 30, the playback time can be evenly divided into 30 parts to determine multiple sampling time points.

[0065] A3: For each sampling time point, select the first n frames of images and the last n frames of images at the sampling time point, and convert all the extracted images into grayscale images. Here, the value of n can be set manually. For example, if n=10, the first 10 frames of images and the last 10 frames of images at each sampling time point can be selected, and all the extracted images can be converted into grayscale images to obtain the sampling frame set S p ,

[0066]

[0067] Sampling frame set S p It includes multiple sub-sampling frames, each of which includes grayscale images of the first 10 frames of images and the last 10 frames of images at each time point.

[0068] A4: Determine the average frame-to-frame change rate index S based on the following formula:I :

[0069]

[0070] Here, based on each grayscale image, the pixel grayscale value matrix of each grayscale image can be determined. Based on each sub-sampling frame, the matrices corresponding to multiple images in each sub-sampling frame can be subtracted to obtain the sampling matrix corresponding to each sub-sampling frame. The grayscale values ​​in each sampling matrix that are greater than or equal to the preset threshold value P can be counted. s The number of

[0071] A5: The above average frame change rate index S I The larger value is compared with the preset ratio and used as the bit rate compression ratio.

[0072] For example, the bit rate compression ratio C is determined based on the following formula: r :

[0073] C r =max(S I ,50%) (3)

[0074] In the embodiment of the present application, when a server receives a video sent by a user, it stores and parses the video to obtain the above-mentioned video, and stores the above-mentioned video. The server can parse the above-mentioned video to determine the video's playback duration, bit rate, bit rate compression ratio, frame rate, and clarity information set, so as to facilitate subsequent segmentation of the video based on the above-mentioned parameters to obtain segmented videos.

[0075] It is conceivable that a user may select different definition information for playback when playing a video. Therefore, when transcoding the segmented video, a transcoded video of the target definition can be obtained based on any one of the above definition option information.

[0076] In some embodiments, the definition information of the transcoded video is target definition information, and the target definition information is any definition information option in the definition information set; Figure 3 As shown, after parsing the video and determining the video's playback duration, bit rate, bit rate compression ratio, frame rate, and definition information set, the method may further include the following steps S310-S330:

[0077] S310: Detect whether the server includes the transcoded video with target definition information, and obtain a detection result.

[0078] Here, when the server receives a video playback request sent by the user, it can detect whether the server includes a transcoded video with target clarity information based on the target clarity information carried in the request and obtain a detection result. Here, the above target clarity information can be information selected by the user.

[0079] Alternatively, the server may periodically traverse the stored videos and the transcoded videos corresponding to the videos, detect whether the server includes the transcoded videos with target clarity information, and obtain a detection result. Here, the target clarity information may be the clarity information of any item in the clarity information set.

[0080] Get the metadata of the video to be transcoded, including:

[0081] S320: When the detection result includes a transcoded video in the server that does not include target definition information, obtain metadata of the video.

[0082] When the server detects that the server does not include the transcoded video of the target definition, the metadata of the video can be obtained. Here, the server can obtain the metadata of the video based on the identifier of the video.

[0083] Transcode multiple segmented videos to obtain transcoded videos, including:

[0084] S330: Transcode the multiple segmented videos to obtain transcoded videos whose definition information is target definition information.

[0085] The server may perform transcoding processing on the multiple segmented videos to obtain a transcoded video whose definition information is the target definition information.

[0086] The embodiment of the present application detects whether the server includes transcoded video of the target clarity through the server, and obtains the detection result, which can adapt to different usage scenarios, such as the scenario of receiving the playback request sent by the user end or the scenario of periodic detection by the server, to realize transcoding processing of the video.

[0087] In some embodiments, before detecting whether the server includes a transcoded video with target definition information and obtaining the detection result, the method further includes:

[0088] Receive a playback request for playing a video sent by a user end, the playback request carrying target clarity information and a video identifier; detect whether the server end includes a transcoded video with the target clarity information, and obtain a detection result, including: based on the video identifier and the target clarity information, detect whether the server end includes a transcoded video with the target clarity information, and obtain a detection result.

[0089] The server can receive a playback request for playing a video sent by the user, and the playback request can carry target definition information and a video identifier. The target definition information is any definition information selected by the user based on the definition information set provided by the server. The server can traverse the transcoded videos corresponding to the video identifier based on the video identifier to see whether the transcoded video with the definition of the target definition information is included to obtain a detection result. Afterwards, if the server determines that the detection result includes a transcoded video that does not include the target definition information, the server can transcode the video corresponding to the video identifier to obtain a transcoded video with the definition of the target definition information.

[0090] In some examples, when the detection result includes a transcoded video including the target definition information in the server, the server can directly play the transcoded video including the target definition information, and the user can watch the video by accessing the server.

[0091] In the embodiment of the present application, when the server receives a playback request for playing a video sent by the user, the server detects whether the server includes a transcoded video with target clarity information based on the video identifier and the target clarity information, and obtains a detection result. It is thereby possible to determine whether the server includes the above-mentioned transcoded video, so as to facilitate timely playback of the above-mentioned transcoded video for the user.

[0092] In some embodiments, Figure 4 As shown, before the above step S220: determining the number of segments to be segmented for video based on the playback duration, frame rate, bit rate and bit rate compression ratio, the method may further include:

[0093] S410: Obtaining video playback data, where the playback data includes target definition information, network speed, playback time, and file reading rate of the server.

[0094] Here, the target definition information may be information carried in a playback request sent by a user end and received by the server end.

[0095] In some examples, before the user sends the video to the server, the user may pre-play the video based on the client, and the play request may also carry the network speed and the played time, where the played time is the time the user plays the video based on the user, and the file reading rate is the file reading rate of the central processing unit (CPU) of the server.

[0096] The number of segments to be segmented for video processing is determined based on the playback duration, frame rate, bit rate, and bit rate compression ratio, including:

[0097] S420: Determine the memory occupied by each segmented video based on the playback duration, frame rate, bit rate, bit rate compression ratio, network speed, and file reading rate.

[0098] Here, the preset occupied memory of each segmented video can be determined based on the playback duration, frame rate, bit rate, bit rate compression ratio, network speed, and file reading rate, and the preset occupied memory is compared with the memory threshold to determine the larger value as the occupied memory of each video. a , the following conditions are met:

[0099]

[0100] Among them, N us is the network speed, S d is the file reading rate, B s is the bit rate, P t is the frame rate, C r is the bit rate compression ratio.

[0101] S430: Determine the number of segments based on the playback duration, the elapsed playback duration, and the memory occupied.

[0102] Here, the number of segments c is determined based on the playback time, the elapsed playback time, and the memory occupied. f , the following conditions are met:

[0103]

[0104] Among them, T f is the playback time, T u is the playback time, G a To occupy memory.

[0105] The embodiment of the present application can improve the accuracy of determining the number of fragments by determining the number of fragments based on multiple parameters of the user end and the server end, and can give priority to playing the fragmented videos including the playback time by obtaining the playback time, thereby improving the user experience.

[0106] In some embodiments, the server may include a resource management unit and a transcoding service unit, such as Figure 5 As shown, determining the number of segments for segmenting a video based on the playback duration, frame rate, bit rate, and bit rate compression ratio, and segmenting the video based on the number of segments to obtain a plurality of segmented videos may include the following steps S510-S520:

[0107] S510: The resource management unit included in the server determines the number of segments for segmenting the video based on the playback duration, frame rate, bit rate and bit rate compression ratio, and segments the video based on the number of segments to obtain multiple segmented videos.

[0108] When the server obtains the metadata of the video, the resource management unit can determine the number of fragments for fragmenting the video based on the playback duration, frame rate, bit rate and bit rate compression ratio, and fragment the video based on the number of fragments to obtain multiple fragmented videos.

[0109] Transcode multiple segmented videos to obtain transcoded videos, including:

[0110] S520: Transcoding the plurality of segmented videos through a transcoding service unit included in the server to obtain transcoded videos.

[0111] When the resource management unit completes the video segmentation processing to obtain multiple segmented videos, the multiple transcoded videos can be sent to the transcoding service unit, and the transcoding service unit performs transcoding processing on the multiple segmented videos to obtain transcoded videos.

[0112] The embodiment of the present application segments the video into multiple segmented videos through the resource management unit, and transcodes the multiple segmented videos into transcoded videos through the transcoding service unit, which can improve the efficiency of transcoding the video and reduce the waiting time for users to watch videos.

[0113] In some embodiments, after determining the number of segments for segmenting the video based on the playback duration, frame rate, bit rate, and bit rate compression ratio by a resource management unit included in the server, and segmenting the video based on the number of segments to obtain multiple segmented videos, the method may further include:

[0114] The resource management unit is used to obtain the played time of the transcoded video, and the transcoding order of the multiple segmented videos is determined based on the played time. The transcoding service unit included in the server transcodes the multiple segmented videos to obtain the transcoded video, including: the transcoding service unit transcodes the multiple segmented videos based on the transcoding order to obtain the transcoded video.

[0115] Here, the resource management unit can be based on the number of shards c f , divide the video into c f+1 segmented video, and determine the start and end time of each segmented video based on the number of segments and the playback time. For example, if the total playback time is 100 minutes, determine the start and end time of one segmented video to be from the 20th minute to the 40th minute of the total time. Determine the start and end time of each segmented video based on the number of segments and the playback time si and end playback time T ei , the following conditions can be met:

[0116]

[0117] Afterwards, the resource management unit can determine the video playback order based on the start time, end time and the above-mentioned playback time of each segmented video, and further determine the transcoding order of multiple segmented videos based on the video playback order. The resource management unit can generate a video transcoding task data set based on the above-mentioned transcoding order, and the transcoding task data set includes multiple transcoding task data, wherein one transcoding task data corresponds to the transcoding task of one segmented video. The transcoding task data can be determined based on the following steps B1-B2:

[0118] B1: The resource management unit determines the playback order C″, where

[0119] C″={C' l ,C' l+1 ,…,C″ cf ,C″1,C″2,…,C″ l-1 ,C′ f}

[0120] The above transcoding order includes the corresponding playback order value of each segmented video.

[0121] B2: Generate a transcoding data set P based on the play order value, video identifier and definition information of each segmented video. The above transcoding task set includes multiple transcoding data. The transcoding data set P is:

[0122]

[0123] Among them, I i is the transcoding order value, R f is the identifier of the segmented video, (w,h) is the resolution, W I is the number of waiting task scheduling and its initial value can be 1, b is the bit rate, T={T1,T2,…T cf+1} is the identifier of the transcoding task, which is used to indicate that the task is a transcoding task.

[0124] The embodiment of the present application obtains the playback time of the transcoded video through the resource management unit, and determines the transcoding order of multiple segmented videos based on the playback time. The segmented videos are then transcoded based on the above transcoding order through the transcoding service unit. The segmented videos watched by the user can be transcoded first, and the special video corresponding to the segmented video can be played in time after the transcoding of the segmented video is completed, thereby improving the user's viewing experience.

[0125] In some embodiments, the transcoding service unit includes a plurality of transcoding service sub-units, the transcoded video includes a plurality of sub-transcoded videos, and one segmented video corresponds to one sub-transcoded video; the transcoding service unit transcodes the plurality of segmented videos based on the transcoding order to obtain the transcoded video, including:

[0126] A plurality of segmented videos are transcoded based on a transcoding order by a plurality of transcoding service sub-units to obtain transcoded videos.

[0127] The transcoding service unit may include multiple transcoding service sub-units, and multiple segmented videos may be transcoded based on the multiple transcoding service sub-units, thereby achieving transcoding of multiple segmented videos at the same time, further improving the efficiency of transcoding processing.

[0128] In some embodiments, Figure 6 As shown, before transcoding multiple segmented videos based on the transcoding order by multiple transcoding service subunits to obtain transcoded videos, the method may further include the following steps S610-S630:

[0129] S610: Determine the transcoding complexity of each segmented video based on the playback duration, frame rate, bit rate compression ratio of each segmented video and target definition information of the transcoded video through the transcoding task scheduling unit included in the server.

[0130] Here, the transcoding task scheduling unit determines the transcoding complexity of each segment video based on the playback duration, frame rate, bit rate compression ratio of each segment video and the target definition information of the transcoded video, which can meet the following conditions:

[0131] C T =(1-C r )t·w s ·h s ·P t (8)

[0132] Among them, C T is the transcoding complexity, C r is the bit rate compression ratio, P t is the frame rate, (w s ,h s ) is the target clarity information.

[0133] S620: Obtain the memory usage, CPU usage, and GPU usage of each transcoding service subunit through the transcoding task scheduling unit, and determine the load factor of each transcoding service subunit based on the memory usage, CPU usage, and GPU usage of each transcoding service subunit.

[0134] Here, the transcoding task scheduling unit may obtain the memory usage rate, the central processing unit usage rate and the graphics processing unit usage rate of each transcoding service sub-unit.

[0135] The task scheduling unit determines that the load factor of each transcoding service subunit can meet the following conditions based on the memory usage, CPU usage, and GPU usage of each transcoding service subunit:

[0136]

[0137] L s is the load factor, U m is the memory usage, U c is the CPU usage, O G is the image processor resource value, where, when an image processor exists in the transcoding service subunit, G It can be a first value such as 1, or 0 when there is no image processor. G It can be a second value such as 0, U GM Graphics processor usage.

[0138] S630: Determine, by the transcoding task scheduling unit, a transcoding service subunit for transcoding each segmented video based on the transcoding complexity of each segmented video and the load factor of each transcoding service subunit.

[0139] The transcoding service subunit for transcoding the sliced ​​video corresponding to each sliced ​​video can be determined based on the specific complexity of the sliced ​​video and the load factor of each transcoding service subunit through the transcoding task scheduling unit. Here, when allocating transcoding tasks to different transcoding service subunits, the transcoding service subunit with a load factor greater than or equal to a threshold can be excluded first, for example, the transcoding service subunit with a load factor greater than or equal to 90% can be excluded first, and the transcoding task can be allocated to the target transcoding service subunit with a load factor less than 90%. The load factors of the target transcoding service subunits can be arranged from small to large and the transcoding complexity of the sliced ​​videos can be arranged from large to small, and the transcoding task of the sliced ​​video with a high transcoding complexity can be allocated to the target transcoding service subunit with a low load factor.

[0140] In the embodiment of the present application, a transcoding task scheduling unit is used to determine the transcoding complexity of each segmented video based on the playback duration, frame rate, bit rate compression ratio and target clarity information of each segmented video, and then the load factor of each transcoding service subunit is determined based on the memory utilization rate, central processing unit utilization rate and graphics processing unit utilization rate of each transcoding service subunit, and based on the memory utilization rate, central processing unit utilization rate and graphics processing unit utilization rate of each transcoding service subunit. Transcoding tasks are allocated to the transcoding service subunits based on the transcoding complexity and the load factor, which can improve the efficiency of transcoded video processing.

[0141] In some embodiments, Figure 7 As shown, after the above step S630: determining the transcoding service subunit for transcoding the sliced ​​video corresponding to each sliced ​​video based on the transcoding complexity of each sliced ​​video and the load factor of each transcoding service subunit by the transcoding task scheduling unit, the method may further include the following steps S710-S720:

[0142] S710: When it is determined that any one transcoding service sub-unit has completed the transcoding processing of the segmented video and multiple first segmented videos among the multiple segmented videos have not completed the transcoding processing, the priority corresponding to each first segmented video is determined by the transcoding task scheduling unit based on the transcoding order of the first segmented videos, the transcoding complexity of the first segmented video, the transcoding processing time, the playback time and the playback time of the second segmented video, wherein the second segmented video is a video that has completed the transcoding processing among the multiple segmented videos.

[0143] In the case where it is determined that any one of the transcoding service subunits completes the transcoding processing of the segmented video and multiple first segmented videos in the multiple segmented videos have not completed the transcoding processing, that is, any one of the transcoding service subunits completes the transcoding processing of the segmented video and remains idle, and at the same time, there are multiple first segmented videos in the video that have not completed the transcoding processing, the priority corresponding to each first segmented video can be determined based on the transcoding order of the first segmented video, the transcoding complexity of the first segmented video, the transcoding processing time, the playback time, and the playback time of the second segmented video. Here, based on the transcoding order of the first segmented video, the transcoding complexity of the first segmented video, the transcoding processing time, the playback time, and the playback time of the second segmented video, the priority corresponding to each first segmented video is determined, and the following conditions are met:

[0144]

[0145] Among them, L p is the priority corresponding to each first video, W I is the number of waiting task scheduling, c f is the number of shards, I iis the transcoding order value, max(R) is the maximum transcoding processing time of the second segment video, and t c is the playback time, T f is the playback duration, C T The complexity of transcoding.

[0146] S720: Transcoding the plurality of first segmented videos based on priorities through the plurality of transcoding service sub-units to obtain sub-transcoded videos corresponding to each second segmented video.

[0147] Here, the task scheduling unit may reallocate transcoding tasks to the multiple transcoding service sub-units based on the priorities, and the first segmented video may be transcoded by the multiple transcoding service sub-units based on the priorities.

[0148] The embodiment of the present application can redetermine the priorities of multiple first fragmented videos when it is determined that any one transcoding service sub-unit has completed the transcoding process, and the multiple fragmented videos also include a first fragmented video that has not completed the transcoding process. By using multiple transcoding service sub-units to transcode the multiple first fragmented videos based on the priorities, a sub-transcoded video corresponding to each second fragmented video is obtained, which can further improve the efficiency of the transcoding process.

[0149] In some embodiments, after the transcoding process of all the segmented videos is completed, the sub-transcoded videos corresponding to each segmented video may be spliced ​​to obtain a transcoded video and store the transcoded video.

[0150] Based on the same inventive concept, an embodiment of the present application also provides a video transcoding device.

[0151] In some embodiments, Figure 8 As shown, a video transcoding device is applied to a server, and the device includes:

[0152] The acquisition module 801 is used to acquire metadata of the video to be transcoded, wherein the metadata includes the video playback duration, frame rate, bit rate, and bit rate compression ratio, the video is a video that does not conform to a preset encoding format, the bit rate compression ratio represents the rate of change between different frames included in the video, and the playback duration is the total duration of the video playback;

[0153] A fragmentation module 802 is used to determine the number of fragments for fragmenting the video based on the playback duration, frame rate, bit rate, and bit rate compression ratio, and to fragment the video based on the number of fragments to obtain multiple fragmented videos;

[0154] The transcoding module 803 is used to perform transcoding processing on multiple segmented videos to obtain transcoded videos and store the transcoded videos.

[0155] In some embodiments, the acquisition module is further configured to:

[0156] Receive the video sent by the user and store it on the server;

[0157] The video is parsed to determine the video's playback duration, bit rate, bit rate compression ratio, frame rate, and definition information set, where the definition information set includes multiple definition information options.

[0158] In some embodiments, the definition information of the transcoded video is target definition information, and the target definition information is any definition information option in the definition information set;

[0159] The sharding module is also used for:

[0160] Detect whether the server includes the transcoded video of the target definition information, and obtain the detection result;

[0161] In a case where the detection result includes a transcoded video in the server that does not include target definition information, obtaining metadata of the video;

[0162] Transcoding is performed on multiple segmented videos to obtain transcoded videos whose definition information is target definition information.

[0163] In some embodiments, the acquisition module is further configured to:

[0164] Receive a video playback request sent by a user terminal, where the video playback request carries target definition information and a video identifier;

[0165] Detect whether the server includes the transcoded video of the target definition information, and obtain the detection result, including:

[0166] Based on the video identifier and the target definition information, it is detected whether the server includes a transcoded video including the target definition information, and a detection result is obtained.

[0167] In some embodiments, the acquisition module is further configured to:

[0168] Get the video playback data, including target definition information, network speed, playback time, and file reading rate on the server.

[0169] The number of segments to be segmented for video processing is determined based on the playback duration, frame rate, bit rate, and bit rate compression ratio, including:

[0170] Determine the memory occupied by each segmented video based on playback duration, frame rate, bit rate, bit rate compression ratio, network speed, and file reading rate;

[0171] The number of shards is determined based on the playback duration, elapsed playback time, and memory usage.

[0172] In some embodiments, the sharding module is used to:

[0173] The resource management unit included in the server determines the number of segments for segmenting the video based on the playback duration, frame rate, bit rate and bit rate compression ratio, and segments the video based on the number of segments to obtain multiple segmented videos;

[0174] The transcoding service unit included in the server performs transcoding processing on the multiple segmented videos to obtain transcoded videos.

[0175] In some embodiments, the transcoding module is used to

[0176] Obtaining the elapsed playback time of the transcoded video through the resource management unit, and determining the transcoding order of the multiple segmented videos based on the elapsed playback time;

[0177] The transcoding service unit performs transcoding processing on the multiple segmented videos based on the transcoding order to obtain a transcoded video.

[0178] In some embodiments, the transcoding service unit includes a plurality of transcoding service sub-units, the transcoded video includes a plurality of sub-transcoded videos, and one segmented video corresponds to one sub-transcoded video; the transcoding module is used to:

[0179] A plurality of segmented videos are transcoded based on a transcoding order by a plurality of transcoding service sub-units to obtain transcoded videos.

[0180] In some embodiments, the sharding module is further configured to:

[0181] Determine the transcoding complexity of each segmented video based on the playback duration, frame rate, bit rate compression ratio and target definition information of the transcoded video by the transcoding task scheduling unit included in the server;

[0182] Obtaining the memory usage, the central processing unit usage, and the graphics processing unit usage of each transcoding service subunit through the transcoding task scheduling unit, and determining the load factor of each transcoding service subunit based on the memory usage, the central processing unit usage, and the graphics processing unit usage of each transcoding service subunit;

[0183] The transcoding task scheduling unit determines the transcoding service subunit for transcoding the sliced ​​video corresponding to each sliced ​​video based on the transcoding complexity of each sliced ​​video and the load factor of each transcoding service subunit.

[0184] In some embodiments, the transcoding module is further configured to:

[0185] When it is determined that any one of the transcoding service sub-units has completed the transcoding processing of the segmented video and multiple first segmented videos among the multiple segmented videos have not completed the transcoding processing, the priority corresponding to each first segmented video is determined by the transcoding task scheduling unit based on the transcoding order of the first segmented video, the transcoding complexity of the first segmented video, the transcoding processing time, the playback time and the playback time of the second segmented video, wherein the second segmented video is a video that has completed the transcoding processing among the multiple segmented videos;

[0186] The plurality of first segmented videos are transcoded based on priorities through the plurality of transcoding service sub-units to obtain sub-transcoded videos corresponding to each second segmented video.

[0187] The device of the above embodiment is used to implement the corresponding video transcoding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0188] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in an application embodiment.

[0189] The electronic device 900 may include a processor 901 and a memory 902 storing computer program instructions.

[0190] Specifically, the processor 901 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0191] The memory 902 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 902 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 902 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 902 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 902 is a non-volatile solid-state memory.

[0192] In certain embodiments, memory 902 includes a read-only memory (ROM). The ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of the above, where appropriate.

[0193] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of the present application.

[0194] The processor 901 implements any one of the video transcoding methods in the above embodiments by reading and executing computer program instructions stored in the memory 902 .

[0195] In one example, the electronic device may further include a communication interface 903 and a bus 904. Fig. 9 The processor 901, the memory 902, and the communication interface 903 are connected via a bus 904 and communicate with each other.

[0196] The communication interface 903 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0197] Bus 904 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 904 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0198] The electronic device of the above embodiment is used to implement the corresponding video transcoding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0199] In addition, in combination with the video transcoding method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the video transcoding methods in the above embodiment is implemented.

[0200] In addition, in combination with the video transcoding method in the above embodiment, the embodiment of the present application can provide a computer program product to implement. When the computer program product instructions are executed by a processor of an electronic device, any one of the video transcoding methods in the above embodiment is implemented.

[0201] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0202] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0203] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or devices based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0204] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (device) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.

[0205] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application.

Claims

1. A video transcoding method, characterized in that: Applied to the server, the method includes: Obtaining metadata of a video to be transcoded, wherein the metadata includes a playback duration, a frame rate, a bit rate, and a bit rate compression ratio of the video, the video is a video that does not conform to a preset encoding format, the bit rate compression ratio represents a rate of change between different frames included in the video, and the playback duration is a total duration of playing the video; Determine the number of slices for slice processing of the video based on the playback duration, the frame rate, the bit rate, and the bit rate compression ratio, and slice the video based on the number of slices to obtain a plurality of sliced ​​videos; The multiple segmented videos are transcoded to obtain transcoded videos and the transcoded videos are stored.

2. The video transcoding method according to claim 1, characterized in that: Before obtaining the metadata of the video to be transcoded, the method further includes: Receiving the video sent by the user end, and storing the video on the server end; The video is parsed to determine the playback duration, the bit rate, the bit rate compression ratio, the frame rate, and a definition information set of the video, wherein the definition information set includes a plurality of definition information options.

3. The video transcoding method according to claim 2, characterized in that: The definition information of the transcoded video is target definition information, and the target definition information is any definition information option in the definition information set; After parsing the video to determine the playback duration, the bit rate, the bit rate compression ratio, the frame rate, and the definition information set of the video, the method further includes: Detecting whether the server includes the transcoded video of the target definition information, and obtaining a detection result; The step of obtaining metadata of the video to be transcoded includes: In a case where the detection result includes the transcoded video in the server that does not include the target definition information, obtaining the metadata of the video; The step of transcoding the plurality of segmented videos to obtain transcoded videos includes: The multiple segmented videos are transcoded to obtain the transcoded video whose definition information is the target definition information.

4. The video transcoding method according to claim 3, characterized in that: Before obtaining the detection result of whether the transcoded video of the target definition information is included in the detection server, the method further includes: receiving a video playback request sent by a user terminal, wherein the video playback request carries the target definition information and a video identifier; The detecting server includes the transcoded video of the target definition information, and obtaining the detection result, including: The transcoded video including the target definition information is detected in the server based on the video identifier and the target definition information to obtain the detection result.

5. The video transcoding method according to claim 1, characterized in that: Before determining the number of segments to be segmented for the video based on the playback duration, the frame rate, the bit rate, and the bit rate compression ratio, the method further includes: Acquire playback data of the video, the playback data including target definition information, network speed, elapsed playback time, and file reading rate of the server; The determining the number of slices for slice processing of the video based on the playback duration, the frame rate, the bit rate, and the bit rate compression ratio includes: Determine the memory occupied by each segmented video based on the playback duration, the frame rate, the bit rate, the bit rate compression ratio, the network speed, and the file reading rate; The number of segments is determined based on the playback duration, the elapsed playback duration, and the occupied memory.

6. The video transcoding method according to claim 1, characterized in that: The determining the number of segments for segmenting the video based on the playback duration, the frame rate, the bit rate, and the bit rate compression ratio, and segmenting the video based on the number of segments to obtain a plurality of segmented videos includes: Determining, by a resource management unit included in the server, the number of fragments for fragmenting the video based on the playback duration, the frame rate, the bit rate, and the bit rate compression ratio, and fragmenting the video based on the number of fragments to obtain a plurality of fragmented videos; The step of transcoding the plurality of segmented videos to obtain transcoded videos includes: The transcoding service unit included in the server performs transcoding processing on the multiple segmented videos to obtain the transcoded video.

7. The video transcoding method according to claim 6, characterized in that: After determining the number of fragments for fragmenting the video based on the playback duration, the frame rate, the bit rate, and the bit rate compression ratio by the resource management unit included in the server, and fragmenting the video based on the number of fragments to obtain a plurality of fragmented videos, the method further includes: Acquire, by the resource management unit, the elapsed playing time of playing the transcoded video, and determine the transcoding order of the plurality of segmented videos based on the elapsed playing time; The transcoding service unit included in the server performs transcoding processing on the multiple segmented videos to obtain the transcoded video, including: The transcoding service unit performs transcoding processing on the multiple segmented videos based on the transcoding order to obtain the transcoded video.

8. The video transcoding method according to claim 7, characterized in that: The transcoding service unit includes a plurality of transcoding service sub-units, the transcoded video includes a plurality of sub-transcoded videos, and one of the sliced ​​videos corresponds to one of the sub-transcoded videos; The method of performing transcoding processing on the plurality of segmented videos based on the transcoding order by the transcoding service unit to obtain the transcoded video includes: The multiple transcoding service sub-units perform transcoding processing on the multiple segmented videos based on the transcoding order to obtain the transcoded videos.

9. The video transcoding method according to claim 8, characterized in that: Before the multiple transcoding service subunits perform transcoding processing on the multiple segmented videos based on the transcoding order to obtain the transcoded videos, the method further includes: Determining the transcoding complexity of each of the segmented videos by a transcoding task scheduling unit included in the server based on the playback duration of each of the segmented videos, the frame rate, the bit rate compression ratio, and the target definition information of the transcoded video; Acquire the memory usage rate, the central processing unit usage rate and the graphics processing unit usage rate of each of the transcoding service sub-units through the transcoding task scheduling unit, and determine the load factor of each of the transcoding service sub-units based on the memory usage rate, the central processing unit usage rate and the graphics processing unit usage rate of each of the transcoding service sub-units; The transcoding task scheduling unit determines the transcoding service subunit for transcoding the sliced ​​video corresponding to each sliced ​​video based on the transcoding complexity of each sliced ​​video and the load factor of each transcoding service subunit.

10. The video transcoding method according to claim 9, characterized in that: After determining, by the transcoding task scheduling unit based on the transcoding complexity of each of the segmented videos and the load factor of each of the transcoding service subunits, the transcoding service subunit corresponding to each of the segmented videos and performing transcoding processing on the segmented videos, the method further includes: In the case where it is determined that any one of the transcoding service subunits has completed the transcoding processing of the segmented video and multiple first segmented videos among the multiple segmented videos have not completed the transcoding processing, the transcoding task scheduling unit determines the priority corresponding to each of the first segmented videos based on the transcoding order of the first segmented videos, the transcoding complexity of the first segmented videos, the transcoding processing time of the second segmented videos, the playback time and the playback time, wherein the second segmented video is a video that has completed the transcoding processing among the multiple segmented videos; The plurality of first segmented videos are transcoded based on the priority by the plurality of transcoding service sub-units to obtain a sub-transcoded video corresponding to each of the second segmented videos.

11. A video transcoding device, characterized in that: Applied to the server, the device comprises: An acquisition module, used for acquiring metadata of a video to be transcoded, wherein the metadata includes a playback duration, a frame rate, a bit rate, and a bit rate compression ratio of the video, the video is a video that does not conform to a preset encoding format, the bit rate compression ratio represents a rate of change between different frames included in the video, wherein the playback duration is a total duration of playing the video; A fragmentation module, configured to determine the number of fragments for fragmenting the video based on the playback duration, the frame rate, the bit rate, and the bit rate compression ratio, and to fragment the video based on the number of fragments to obtain a plurality of fragmented videos; The transcoding module is used to perform transcoding processing on the multiple segmented videos to obtain transcoded videos and store the transcoded videos.

12. An electronic device, characterized in that: The device comprises: a processor, and a memory storing computer program instructions; The processor reads and executes the computer program instructions to implement the video transcoding method according to any one of claims 1 to 10.

13. A readable storage medium, characterized in that: The readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the video transcoding method according to any one of claims 1 to 10 is implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is processed by a processor, the video transcoding method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Live broadcasting method and server based on dynamic self-adaptive code rate transport protocol HLS streaming media

    CN104967872A

  • Video transcoding processing method and device, equipment and medium

    CN111757118A

  • Video transcoding method and related device thereof

    CN114630177A

  • Efficient Two-Pass Encoding Scheme for Adaptive Live Streaming

    US20240114183A1

  • Video Encoding Complexity Predictor

    US20240121400A1