CN110505523B - Video transcoding priority order control method and processing terminal - Google Patents

Video transcoding priority order control method and processing terminal Download PDF

Info

Publication number
CN110505523B
CN110505523B CN201910909457.7A CN201910909457A CN110505523B CN 110505523 B CN110505523 B CN 110505523B CN 201910909457 A CN201910909457 A CN 201910909457A CN 110505523 B CN110505523 B CN 110505523B
Authority
CN
China
Prior art keywords
video
transcoding
priority
task
transcoded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910909457.7A
Other languages
Chinese (zh)
Other versions
CN110505523A (en
Inventor
朱骢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Tvcbook Technology Co ltd
Original Assignee
Guangzhou Tvcbook Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Tvcbook Technology Co ltd filed Critical Guangzhou Tvcbook Technology Co ltd
Priority to CN201910909457.7A priority Critical patent/CN110505523B/en
Publication of CN110505523A publication Critical patent/CN110505523A/en
Application granted granted Critical
Publication of CN110505523B publication Critical patent/CN110505523B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • H04N21/440272Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA for performing aspect ratio conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention relates to a video transcoding priority order control method and a processing terminal, wherein the method comprises the following steps: step S1: acquiring a transcoding task instruction and generating a corresponding random number; step S2: acquiring a transcoding task ID of a corresponding priority according to the generated random number; step S3: and obtaining a corresponding video file of the video to be transcoded according to the obtained transcoding task ID, and transcoding the video file to obtain the transcoded video. The invention can effectively distribute the transcoding tasks with corresponding priorities according to the priority order, and can avoid the resource waste of the transcoding nodes while ensuring that the transcoding tasks with the prior priority order are processed preferentially.

Description

Video transcoding priority order control method and processing terminal
Technical Field
The invention relates to the technical field of video transcoding, in particular to a video transcoding priority order control method and a processing terminal.
Background
At present, video applications are very extensive, and due to the fact that mobile devices have different requirements for playing video formats, most of video platforms convert videos into video formats suitable for being played by mobile terminals through servers. For example, mobile terminals such as mobile phones and tablet computers may not support video formats such as rmvb and avi, and at this time, a user is required to upload a movie to a server, and the server transcodes the video formats, and then transcodes the video formats and sends the transcoded video formats to the user, so that the video formats can be played at the mobile terminal.
In the existing transcoding system cluster, each transcoding node directly transcodes the video to be transcoded according to the distributed video to be transcoded, different transcoding nodes are easily caused to repeatedly transcode the same video to be transcoded, the video with the highest priority cannot be transcoded at first, all the videos to be transcoded are all viewed as the same entity, the video needing to be transcoded preferentially can be transcoded finally, some transcoding nodes are easily caused to carry out video transcoding, and some transcoding nodes are not subjected to video transcoding, so that transcoding node resources are wasted.
Disclosure of Invention
In view of the deficiencies of the prior art, it is an object of the present invention to provide a method for controlling video transcoding priority order, which can solve the problem of video transcoding priority control;
the second purpose of the invention is to provide a processing terminal which can control the video transcoding priority;
the technical scheme for realizing one purpose of the invention is as follows: a video transcoding priority order control method comprises the following steps:
step S1: acquiring a transcoding task instruction and generating a corresponding random number;
step S2: inquiring the transcoding task ID of the priority corresponding to the random number according to the generated random number, if the transcoding task ID of the corresponding priority is not picked up, acquiring the transcoding task ID of the corresponding priority, if the transcoding task ID of the corresponding priority is picked up completely, inquiring the transcoding task ID of the next sequential priority,
if the transcoding task ID of the corresponding priority is not received in the transcoding task ID of the next sequence of priorities, the transcoding task ID of the corresponding priority is obtained, otherwise, the transcoding task ID of the next sequence of priorities is continuously inquired, the steps are sequentially carried out until the transcoding task ID of the corresponding priority is received or until the transcoding task ID of the last sequence of priorities is received, a plurality of time is waited, a random number is regenerated, and the step is executed again;
step S3: and according to the obtained transcoding task ID, obtaining a corresponding video file of the video to be transcoded, transcoding the video file to obtain a transcoded video, and finishing transcoding.
Further, according to the transcoding priority order, the probability of generating random numbers of corresponding priorities is set from high to low.
Further, the priority comprises the highest priority, the high priority and the common priority in sequence from high to low according to the transcoding priority, the numerical range of the random number corresponding to the priority is an integer from 0 to 9, the number of the random number corresponding to the highest priority is an integer from 0 to 6, the number of the random number corresponding to the high priority is 7 or 8, and the number of the random number corresponding to the common priority is 9.
Further, in step S2 or step S3, the obtained transcoding task ID is marked, and the marked transcoding task ID indicates that the transcoding task ID is picked up.
Further, the transcoding the video file to obtain the transcoded video specifically includes steps S4-S6:
step S4: acquiring video width and height information of the video file, wherein the video width and height information refers to video broadside and high-side parameter information;
step S5: judging a type group suitable for transcoding of the video file according to the video bandwidth height information, wherein the type group represents video parameter information of the video file after transcoding, and the video parameter information at least comprises maximum resolution;
step S6: transcoding videos of the type groups in a circulating and sequential mode, if transcoding is carried out to be horizontal screen videos, when the video width height ratio is larger than or equal to 16:9, using a horizontal edge as a reference edge, when the video width height ratio is smaller than 16:9, using a vertical edge as a reference edge,
if transcoding into a vertical screen video, when the video width height ratio is greater than or equal to 9:16, using the horizontal edge as a reference edge, when the video width height ratio is less than 9:16, using the vertical edge as a reference edge,
and calculating the size of the transcoded video adaptive to the maximum resolution according to the reference edge and the maximum resolution, and transcoding by using the size of the transcoded video as a video transcoding parameter to obtain a transcoded video and finish video transcoding.
Further, the specific implementation process for judging the type group suitable for transcoding of the video file according to the video bandwidth height information comprises the following steps:
the method comprises the steps of calculating the number of pixels of a video and the aspect ratio of the video according to obtained video width height information, determining the definition level capable of providing a transcoded video according to the number of pixels of the video and the aspect ratio of the video, inquiring a database according to the definition level, obtaining the maximum resolution parameter of a transcoding target video, and accordingly determining the type group of a video file suitable for transcoding according to the maximum resolution parameter.
Further, after the step S4 and before the step S5, the method further includes a step S4-5: determining whether the video file is suitable for transcoding, if not, marking the video file, and not transcoding the marked video file; otherwise, step S5 is executed.
Further, if the width and/or the height of the transcoded video size adapted at the maximum resolution are calculated to be odd according to the reference edge and the maximum resolution, the odd width and/or height are replaced by the nearest even number larger than the odd number, and the width and the height which are both even numbers are obtained.
Further, after the step S6 is executed, the method further includes writing the transcoded video file information into a transcoded video data table, where the transcoded video data table stores MD5, video resolution, code rate, transcoding standard used, whether the transcoding process is superimposed with a watermark, video duration, time consumed for transcoding, and file size information of the video file information.
The second technical scheme for realizing the aim of the invention is as follows: a processing terminal, comprising,
a memory for storing program instructions;
a processor for executing the program instructions to perform the steps of the video transcoding priority order control method.
The invention has the beneficial effects that: the invention can effectively distribute the transcoding tasks with corresponding priorities according to the priority order, and can avoid the resource waste of the transcoding nodes while ensuring that the transcoding tasks with the prior priority order are processed preferentially; meanwhile, compared with the existing transcoding video, the transcoded video has the highest pixel utilization rate and the clearest picture under the same size, can adapt to a playing terminal, and does not generate the situation of black edges.
Drawings
FIG. 1 is a schematic flow chart of a first embodiment;
fig. 2-7 are schematic diagrams illustrating comparison of transcoding effects of a plurality of different transcoding methods and conventional transcoding methods according to the embodiment;
fig. 8 is a schematic structural diagram of a processing terminal according to a second embodiment.
Detailed description of the preferred embodiments
The invention will be further described with reference to the accompanying drawings and specific embodiments:
example one
As shown in fig. 1 to 2, a method for controlling video transcoding priority order includes the following steps:
step S1: and acquiring a transcoding task instruction, wherein the transcoding task instruction refers to the fact that transcoding of the video needs to be executed, and a corresponding random number is generated every time a transcoding task instruction is acquired.
Preferably, the random number has a value in the range of 0 to 9 integers, for a total of ten.
Step S2: inquiring the transcoding task ID of the priority corresponding to the random number according to the generated random number, if the transcoding task ID of the corresponding priority is not picked up, acquiring the transcoding task ID of the corresponding priority, if the transcoding task ID of the corresponding priority is picked up completely, inquiring the transcoding task ID of the next sequential priority,
if the transcoding task ID of the corresponding priority is not received in the transcoding task ID of the next sequence of priorities, the transcoding task ID of the corresponding priority is obtained, otherwise, the transcoding task ID of the next sequence of priorities is continuously inquired, the process is sequentially carried out until the transcoding task ID of the corresponding priority is received or until the transcoding task ID of the last sequence of priorities is received, a plurality of times (for example, one minute) are waited, the random number is regenerated, and the step is executed again.
And obtaining the transcoding task ID of the corresponding priority, wherein the priority comprises a plurality of priority sequences. In this embodiment, the priorities include the highest priority, the high priority, and the normal priority in order from high to low according to the transcoding priority. Wherein, the random numbers 0-6 indicate that the corresponding priority is the highest priority, the random numbers 7-8 indicate that the corresponding priority is the high priority, and the random number 9 indicates that the corresponding priority is the common priority.
In practical applications, there may be more than one transcoding task ID corresponding to each priority, but a plurality of transcoding task IDs are included.
For example, after receiving the transcoding task command, a certain transcoding node a generates a corresponding random number, and if the generated random number is 5, the priority corresponding to the random number 5 is the highest priority. Inquiring the transcoding task ID corresponding to the highest priority, if the transcoding task ID corresponding to the highest priority has the transcoding task ID which is not picked up, obtaining the transcoding task ID corresponding to the highest priority, otherwise, inquiring the transcoding task ID corresponding to the high priority (the priority of the next sequence), if the transcoding task ID corresponding to the high priority has the transcoding task ID which is not picked up, acquiring the transcoding task ID corresponding to the high priority, otherwise, inquiring the transcoding task ID corresponding to the common priority, if the transcoding task ID corresponding to the common priority has the transcoding task ID which is not picked up, then the transcoding task ID corresponding to the common priority is obtained, otherwise, after waiting for one minute (of course, the specific waiting time can be set manually), a new random number is regenerated, and re-executing the steps according to the new random number to finally obtain the transcoding task ID corresponding to the priority.
Step S3: and according to the obtained transcoding task ID, obtaining a corresponding video file of the video to be transcoded, transcoding the video file to obtain a transcoded video, and finishing transcoding.
Preferably, in step S2 or step S3, the obtained transcoding task ID is marked, and the marked transcoding task ID indicates that the transcoding task ID is picked up, so as to prevent other transcoding nodes from picking up the transcoding task ID, which results in repeatedly transcoding the video corresponding to the same transcoding task ID, where picking up refers to that the transcoding task ID is received by the transcoding node and determines a video transcoding instruction for executing the transcoding task ID, and indicates a state of whether the transcoding task ID is received by the transcoding node and executes the transcoding task.
After each transcoding node receives the transcoding task, a corresponding random number is generated, and each random number corresponds to a priority of a transcoding priority order, so that the transcoding task with the highest priority can be processed preferentially, video transcoding of some transcoding nodes can be effectively prevented, and resources are wasted due to the fact that some transcoding nodes are vacant.
Meanwhile, according to the transcoding priority sequence, the probability of generating random numbers with corresponding priorities is set from high to low in sequence. For example, the probability of generating the random number corresponding to the highest priority is 70%, the probability of generating the random number corresponding to the high priority is 20%, and the probability of generating the random number corresponding to the normal priority is 10%. Correspondingly, under the condition that the random number is ten integers from 0 to 9, the numerical range of the random number corresponding to the highest priority is from 0 to 6, the numerical range of the random number corresponding to the high priority is from 7 to 8, and the numerical range of the random number corresponding to the common priority is 9.
When the number of transcoding nodes of the transcoding cluster is more, the probability of transcoding the video corresponding to the highest priority is closer to 70%, the probability of transcoding the video corresponding to the high priority in the second sequence is closer to 20%, and the probability of transcoding the video corresponding to the common priority in the last sequence is closer to 10%. Theoretically, when the number of the transcoding nodes of the transcoding cluster is 3, the probability that all the transcoding nodes do not receive the highest priority is (30%)32.7%, that is to say, the probability that all transcoding nodes do not transcode the video corresponding to the highest priority first is 2.7%, and this probability is very low, and as the number of transcoding nodes increases, the probability that all transcoding nodes transcode the video corresponding to the highest priority first falls off linearly, and its probability is very low.
Through the random number, priority sequence control can be carried out on video transcoding, the video transcoding task with the highest priority is processed in the first sequence with the large probability, meanwhile, each transcoding node resource can be fully utilized, and the waste of the transcoding node resources is avoided. Compared with the conventional video transcoding without priority sequence control, the method generally sets the transcoding nodes of the first group to perform the video transcoding with the highest priority, sets the transcoding nodes of the second group to perform the video transcoding with the next priority, and so on, wherein the video transcoding of each priority is set with one or one group of corresponding transcoding nodes, and when a certain transcoding node/group of transcoding nodes does not have a video transcoding task with the corresponding priority, the transcoding node/group is controlled to waste resources of the transcoding nodes.
Preferably, the transcoding the video file to obtain the transcoded video includes steps S4-S6:
step S4: and acquiring video width and height information of the video file, wherein the video width and height information refers to video broadside and high-side parameter information. The width and height refer to the width and height of the video size, respectively, for example, the size of the source video in fig. 2(a) is 1080X1920, the width is 1080 and the height is 1920.
Preferably, after the source video file is obtained, determining whether the source video file is suitable for transcoding, so as to continue to execute the subsequent steps, wherein the specific process includes: determining whether the source video file is suitable for transcoding, if not, marking the source video file and not transcoding, and extracting the marked source video file again in the follow-up process and not transcoding; and if the source video file is suitable for transcoding, executing step S5.
Step S5: and judging a type group suitable for transcoding the video file according to the video width height information, wherein the type group represents video parameter information of the transcoded video file, and the video parameter information comprises video pixel number, video width-height ratio, video definition level and the like.
For example, the width and height information of a certain video m is 1080X1920, the number of video pixels is 200 ten thousand pixels, the video definition level is n, the width and height information of another video w is 1080X1920, the number of video pixels is 200 ten thousand pixels, the video definition level is n, that is, the width and height information of the video m is the same as that of the video w, and the number of video pixels, the video width and height ratio and the video definition level are also the same, so that the video m and the video n are in the same type group.
Preferably, in this step, the specific implementation process of determining the type group suitable for transcoding of the video file according to the video width ratio information includes the following steps:
the method comprises the steps of calculating the number of pixels of a video and the aspect ratio of the video according to obtained video width height information, determining the definition level capable of providing a transcoded video according to the number of pixels of the video and the aspect ratio of the video, inquiring a database according to the definition level, obtaining the maximum resolution parameter of a transcoding target video, and determining a type group of a video file suitable for transcoding according to the maximum resolution parameter.
For example, for a certain video a uploaded by a user, according to the number of video pixels of the video a and the video aspect ratio, the maximum resolution of the video a is fullhd, and then the video a can be transcoded to obtain transcoded videos with different sizes, such as fullhd, HD, C1, 240 and the like; if the maximum resolution of the video a is HD, the video a can be transcoded to obtain transcoded videos with resolutions of different sizes, such as HD, C1, 240 and the like. Therefore, a user can select a transcoded video with a corresponding size which meets the requirement of the user to play from different sizes of transcoded videos such as Ful lHD, HD, C1 and 240 according to the requirement of the user on the playing terminal.
Step S6: and transcoding the videos of the type groups circularly and sequentially so that the transcoded videos can be suitable for decoding of a playing terminal, particularly for hard decoding. The specific implementation process comprises the following steps:
if transcoding is a horizontal screen video, when the video width height ratio is greater than or equal to 16:9, using a horizontal edge as a reference edge, and when the video width height ratio is less than 16:9, using a vertical edge as a reference edge; if transcoding into a vertical screen video, when the video width height ratio is greater than or equal to 9:16, using the horizontal edge as a reference edge, when the video width height ratio is less than 9:16, using the vertical edge as a reference edge,
and calculating the size of the transcoded video adaptive to the maximum resolution according to the reference edge and the maximum resolution, and transcoding by using the size of the transcoded video, a preset video mode and a preset sound mode as video transcoding parameters to obtain a transcoded video and finish video transcoding. The video mode represents information such as the coding format and the coding rate of the video, and the audio mode represents information such as the coding format and the coding rate of the audio.
Preferably, if the width and/or height of the transcoded video size adapted at the maximum resolution is calculated to be odd according to the reference edge and the maximum resolution, the odd width and/or height is replaced by the nearest even number larger than the odd number, that is, an even number difference compensation process is performed to obtain the widths and heights that are all even numbers. For example, the size of the transcoded video adapted at the maximum resolution is calculated to be 853x480 according to the reference edge and the maximum resolution, and since the broadside 853 is odd, even compensation is performed to obtain the broadside 854, the size of the final transcoded video is 854x 480.
Preferably, after the step S6 is executed, the transcoded video file information is written into a transcoded video data table, where the transcoded video data table stores information of the MD5, the video resolution, the code rate, the used transcoding standard, whether a watermark is superimposed in the transcoding process, the video duration, the transcoding time consumption, the file size, and the like of the video file information, so as to facilitate subsequent reading of the transcoded video.
As shown in fig. 2, fig. 2(b) is one of the results of conventional transcoding, the obtained video has a black edge (the black area in the figure is the black edge) when being played, while fig. 2(c) is processed by interpolation pixel, which not only wastes storage capacity due to image blurring, but also may not be correctly decoded at the terminal because of the video size exceeding 1920X 1080. Compared with conventional transcoding, the method and the device do not generate black edges, the transcoded video does not exceed the size of the standard video, the transcoded video can be decoded by the terminal, screen resources are not wasted, and the transcoded video can be played after being hard decoded by the terminal.
Similarly, fig. 3-7 also show that fig. 3(b), fig. 4(b), fig. 5(b), fig. 6(b), and fig. 7(b) are one of the results of using conventional transcoding, the obtained video has black edges during playing, and fig. 4(c) and fig. 7(c) are processed by interpolation pixels, which not only wastes storage capacity due to image blurring, but also may not be decoded correctly at the terminal because of the video size exceeding 1920X 1080.
For a video website, videos uploaded by a user may have different video sizes (i.e., different aspect ratios), but after being processed by the method and the device, the videos are transcoded into different video sizes and resolutions suitable for various terminals, so that the user terminal can adaptively select videos of the corresponding video sizes.
Example two
As shown in fig. 8, the invention also relates to a processing terminal 100 implementing the method steps of embodiment one, comprising,
a memory 101 for storing program instructions;
a processor 102, configured to execute the program instructions to execute the steps in the video transcoding priority order control method according to the first embodiment.
The embodiments disclosed in this description are only an exemplification of the single-sided characteristics of the invention, and the scope of protection of the invention is not limited to these embodiments, and any other functionally equivalent embodiments fall within the scope of protection of the invention. Various other changes and modifications to the above-described embodiments and concepts will become apparent to those skilled in the art from the above description, and all such changes and modifications are intended to be included within the scope of the present invention as defined in the appended claims.

Claims (10)

1. A video transcoding priority order control method is characterized by comprising the following steps:
step S1: acquiring a transcoding task instruction and generating a corresponding random number;
step S2: inquiring the transcoding task ID of the priority corresponding to the random number according to the generated random number, if the transcoding task ID of the corresponding priority is not picked up, acquiring the transcoding task ID of the corresponding priority, if the transcoding task ID of the corresponding priority is picked up completely, inquiring the transcoding task ID of the next sequential priority,
if the transcoding task ID of the corresponding priority is not received in the transcoding task ID of the next sequence of priorities, the transcoding task ID of the corresponding priority is obtained, otherwise, the transcoding task ID of the next sequence of priorities is continuously inquired, the steps are sequentially carried out until the transcoding task ID of the corresponding priority is received or until the transcoding task ID of the last sequence of priorities is received, a plurality of time is waited, a random number is regenerated, and the step is executed again;
step S3: and according to the obtained transcoding task ID, obtaining a corresponding video file of the video to be transcoded, transcoding the video file to obtain a transcoded video, and finishing transcoding.
2. The video transcoding priority order control method of claim 1, wherein the probability of generating the random number of the corresponding priority is set from top to bottom according to the transcoding priority order.
3. The method as claimed in claim 1, wherein the priority comprises a highest priority, a high priority and a normal priority in order from high to low according to the transcoding priority, and the random numbers corresponding to the priorities have a value range of 0 to 9, wherein the numbers of the random numbers corresponding to the highest priority are integers from 0 to 6, the numbers of the random numbers corresponding to the high priority are 7 or 8, and the numbers of the random numbers corresponding to the normal priority are 9.
4. The method of claim 1, wherein in step S2 or step S3, the obtained transcoding task ID is marked, and the marked transcoding task ID indicates that the transcoding task ID is retrieved.
5. The method for controlling video transcoding priority order according to claim 1, wherein the transcoding of the video file to obtain the transcoded video is performed in a process from step S4 to step S6:
step S4: acquiring video width and height information of the video file, wherein the video width and height information refers to video broadside and high-side parameter information;
step S5: judging a type group suitable for transcoding of the video file according to the video bandwidth height information, wherein the type group represents video parameter information of the video file after transcoding, and the video parameter information at least comprises maximum resolution;
step S6: transcoding videos of the type groups in a circulating and sequential mode, if transcoding is carried out to be horizontal screen videos, when the video width height ratio is larger than or equal to 16:9, using a horizontal edge as a reference edge, when the video width height ratio is smaller than 16:9, using a vertical edge as a reference edge,
if transcoding into a vertical screen video, when the video width height ratio is greater than or equal to 9:16, using the horizontal edge as a reference edge, when the video width height ratio is less than 9:16, using the vertical edge as a reference edge,
and calculating the size of the transcoded video adaptive to the maximum resolution according to the reference edge and the maximum resolution, and transcoding by using the size of the transcoded video as a video transcoding parameter to obtain a transcoded video and finish video transcoding.
6. The method as claimed in claim 5, wherein the specific implementation process for determining the type group of the video file suitable for transcoding according to the video bandwidth height information comprises the following steps:
the method comprises the steps of calculating the number of pixels of a video and the aspect ratio of the video according to obtained video width height information, determining the definition level capable of providing a transcoded video according to the number of pixels of the video and the aspect ratio of the video, inquiring a database according to the definition level, obtaining the maximum resolution parameter of a transcoding target video, and accordingly determining the type group of a video file suitable for transcoding according to the maximum resolution parameter.
7. The method for controlling video transcoding priority order of claim 5, further comprising, after step S4 and before step S5, step S4-5: determining whether the video file is suitable for transcoding, if not, marking the video file, and not transcoding the marked video file; otherwise, step S5 is executed.
8. The method of claim 5, wherein if the width and/or height of the transcoded video size adapted at the maximum resolution is calculated to be odd based on the reference edge and the maximum resolution, the odd width and/or height is replaced by the nearest even number larger than the odd number, and both the width and height are even.
9. The method as claimed in claim 5, wherein after the step S6, the method further comprises writing the transcoded video file information into a transcoded video data table, where the transcoded video data table stores the MD5, video resolution, code rate, transcoding standard used, whether a watermark is superimposed during transcoding, video duration, transcoding time, and file size information.
10. A processing terminal, characterized in that it comprises,
a memory for storing program instructions;
a processor for executing said program instructions to perform the steps of the video transcoding priority order control method according to any of claims 1 to 9.
CN201910909457.7A 2019-09-24 2019-09-24 Video transcoding priority order control method and processing terminal Active CN110505523B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910909457.7A CN110505523B (en) 2019-09-24 2019-09-24 Video transcoding priority order control method and processing terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910909457.7A CN110505523B (en) 2019-09-24 2019-09-24 Video transcoding priority order control method and processing terminal

Publications (2)

Publication Number Publication Date
CN110505523A CN110505523A (en) 2019-11-26
CN110505523B true CN110505523B (en) 2020-06-30

Family

ID=68592742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910909457.7A Active CN110505523B (en) 2019-09-24 2019-09-24 Video transcoding priority order control method and processing terminal

Country Status (1)

Country Link
CN (1) CN110505523B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111182324B (en) * 2020-01-13 2020-10-30 杭州阿启视科技有限公司 Video data processing method and server
CN111930486B (en) * 2020-07-30 2023-11-17 中国工商银行股份有限公司 Task selection data processing method, device, equipment and storage medium
CN114389907A (en) * 2022-01-19 2022-04-22 德普深(厦门)数据科技有限公司 Online conference video stream processing method based on multi-source information fusion

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778011A (en) * 2014-01-21 2014-05-07 国家电网公司 Method for fairly and randomly scheduling tasks of service platform in electric power system
CN106375319A (en) * 2016-09-06 2017-02-01 上海爱数信息技术股份有限公司 Audio and video transcoding scheduling method, apparatus, device and system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090240736A1 (en) * 2008-03-24 2009-09-24 James Crist Method and System for Creating a Personalized Multimedia Production
CN102137128A (en) * 2010-01-27 2011-07-27 腾讯科技(深圳)有限公司 Method and device for balancing load of cluster service
CN102223729B (en) * 2010-04-16 2016-06-29 中兴通讯股份有限公司 Control machine type communication device and access the method and system of network
CN101873482B (en) * 2010-07-02 2011-08-31 上海交通大学 Real-time streaming media cluster transcoding system
CN102098217B (en) * 2011-01-14 2013-08-07 中国科学技术大学 Probability-based multipriority queue scheduling method
CN103458270B (en) * 2013-09-09 2017-01-18 融创天下(上海)科技发展有限公司 video transcoding system and method
CN104202305B (en) * 2014-08-13 2016-04-27 腾讯科技(深圳)有限公司 A kind of trans-coding treatment method, device and server
CN107203365B (en) * 2016-03-17 2020-09-08 阿里巴巴集团控股有限公司 Random number generation and acquisition method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778011A (en) * 2014-01-21 2014-05-07 国家电网公司 Method for fairly and randomly scheduling tasks of service platform in electric power system
CN106375319A (en) * 2016-09-06 2017-02-01 上海爱数信息技术股份有限公司 Audio and video transcoding scheduling method, apparatus, device and system

Also Published As

Publication number Publication date
CN110505523A (en) 2019-11-26

Similar Documents

Publication Publication Date Title
CN111314741B (en) Video super-resolution processing method and device, electronic equipment and storage medium
CN110505523B (en) Video transcoding priority order control method and processing terminal
US9177359B2 (en) Information processor, cloud platform, information processing method, and computer program product thereof
CN110392306B (en) Data processing method and equipment
CN102882829A (en) Transcoding method and system
US20160217341A1 (en) Encoding method and encoder
US20120308147A1 (en) Image processing device, image processing method, and program
CN110572713B (en) Transcoding method and processing terminal for adaptive video bandwidth ratio
CN110166798B (en) Down-conversion method and device based on 4K HDR editing
WO2024183682A1 (en) Video coding method and apparatus, and electronic device, storage medium and program product
US8548275B2 (en) Image processing device and image processing method
US9456180B2 (en) Image processing apparatus, communication system, and computer program
CN109996116B (en) Method for improving video resolution, terminal and readable storage medium
CN110662088B (en) Duplicate removal method and processing terminal for preventing video from being transcoded repeatedly
CN114630193B (en) Picture optimization method and system in short video
CN113068050B (en) Method and device for determining sample point adaptive compensation mode of tree-shaped coding block
CN114390363A (en) Adaptation method, device, system and storage medium of encoder
US8634669B2 (en) Fast implementation of context selection of significance map
CN107729387B (en) Video thumbnail selection method, storage medium and electronic device
CN105898404A (en) Priority control method and device of transcoding system
CN111311699A (en) Picture compression method and device
CN111754387B (en) Image processing method and device
CN117011146B (en) Image scaling method and device, electronic equipment and storage medium
CN117435112B (en) Data processing method, system and device, electronic equipment and storage medium
CN114827638B (en) VR video cloud live broadcast method, device and equipment

Legal Events

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