CN107205164B - Video transcoding method and device - Google Patents

Video transcoding method and device Download PDF

Info

Publication number
CN107205164B
CN107205164B CN201610158898.4A CN201610158898A CN107205164B CN 107205164 B CN107205164 B CN 107205164B CN 201610158898 A CN201610158898 A CN 201610158898A CN 107205164 B CN107205164 B CN 107205164B
Authority
CN
China
Prior art keywords
video
transcoding
segment
target video
target
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
CN201610158898.4A
Other languages
Chinese (zh)
Other versions
CN107205164A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201610158898.4A priority Critical patent/CN107205164B/en
Publication of CN107205164A publication Critical patent/CN107205164A/en
Application granted granted Critical
Publication of CN107205164B publication Critical patent/CN107205164B/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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234336Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by media transcoding, e.g. video is transformed into a slideshow of still pictures or audio is converted into text
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
    • H04N21/26225Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints involving billing parameters, e.g. priority for subscribers of premium services
    • 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/440236Processing 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 media transcoding, e.g. video is transformed into a slideshow of still pictures, audio is converted into text
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a video transcoding method and a video transcoding device, wherein the method comprises the following steps: acquiring initial transcoding video segments corresponding to a target video according to a detected target video transcoding trigger condition, wherein the target video corresponds to a set number of video segments arranged according to a video playing sequence; determining a first quantity value of a video segment subjected to concurrent transcoding according to a real-time pressure parameter of a transcoding system; and acquiring a video segment to be transcoded corresponding to the target video according to the starting transcoded video segment and the first quantity value, and performing concurrent transcoding on the video segment to be transcoded. By adopting the method, the technical problems that the transcoding system is greatly influenced by the playing behavior of the user and the utilization rate of the transcoding system is poor in the prior art can be solved.

Description

Video transcoding method and device
Technical Field
The present invention relates to multimedia technologies, and in particular, to a method and an apparatus for transcoding a video.
Background
In the prior art, video transcoding is an important link in the video production process. The video transcoding means that a video code stream which is compressed and coded is converted into another video code stream so as to adapt to different network bandwidths, different terminal processing capacities and different user requirements. Video transcoding is essentially a process of decoding first and then encoding.
Fig. 1 is a schematic diagram of a video transcoding method in the prior art, and as shown in fig. 1, when a target video transcoding trigger condition 101 is detected, a transcoding system divides a video into a large number of video segments with fixed time duration, that is, a first video segment 102, a second video segment 103, and a third video segment 104, … …, then performs concurrent transcoding on all the video segments by using a distributed transcoding sub-server, and then a central control module merges the results of the distributed transcoding by using a greedy algorithm, so as to achieve the purpose of performing fast transcoding on the video.
However, with the continuous update of video coding algorithms, various videos are more and more widely applied, the demand of video transcoding is more and more increased, the requirement of transcoding all videos by using a distributed transcoding server to perform segmentation and concurrent transcoding on all videos is high on computing resources, the pressure of a transcoding system is greatly influenced by the playing behavior of a user, the transcoding system bears very high pressure in a time period when the user intensively plays online videos, and a large amount of computing resources of the transcoding system are idle in a time period when the user plays online videos at a small time period, so that the utilization rate of the transcoding system is poor.
Disclosure of Invention
In view of this, embodiments of the present invention provide a video transcoding method and apparatus, so as to solve the technical problems in the prior art that a transcoding system is greatly affected by a user playing behavior, and a utilization rate of the transcoding system is poor.
In a first aspect, an embodiment of the present invention provides a video transcoding method, where the method includes:
acquiring initial transcoding video segments corresponding to a target video according to a detected target video transcoding trigger condition, wherein the target video corresponds to a set number of video segments arranged according to a video playing sequence;
determining a first quantity value of a video segment subjected to concurrent transcoding according to a real-time pressure parameter of a transcoding system;
and acquiring a video segment to be transcoded corresponding to the target video according to the starting transcoded video segment and the first quantity value, and performing concurrent transcoding on the video segment to be transcoded.
In a second aspect, an embodiment of the present invention further provides a video transcoding apparatus, where the apparatus includes:
the acquisition module is used for acquiring an initial transcoding video segment corresponding to a target video according to a detected target video transcoding trigger condition, wherein the target video corresponds to a set number of video segments which are arranged according to a video playing sequence;
the first quantity value determining module is used for determining a first quantity value of a video segment subjected to concurrent transcoding according to the real-time pressure parameter of the transcoding system;
and the transcoding module is used for acquiring the video segment to be transcoded corresponding to the target video by the user according to the starting transcoded video segment and the first numerical value, and performing concurrent transcoding on the video segment to be transcoded.
According to the video transcoding method and device provided by the embodiment of the invention, the initial transcoding video segment is obtained according to the target video transcoding trigger condition, the first quantity value of the transcoding video segment is determined according to the real-time pressure parameter of the transcoding system, and then the video segment to be transcoded is transcoded concurrently according to the initial transcoding video segment and the first quantity value. By adopting the method, the calculation pressure of the transcoding system in the transcoding peak period can be effectively reduced, so that the technical problems that the transcoding system is greatly influenced by the playing behavior of a user and the utilization rate of the transcoding system is poor in the prior art are solved.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a schematic diagram of a video transcoding method in the prior art;
fig. 2 is a schematic flowchart of a video transcoding method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a video transcoding method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a video transcoding method according to a second embodiment of the present invention;
fig. 5 is a flowchart illustrating a video transcoding method according to a third embodiment of the present invention;
fig. 6 is a flowchart illustrating a video transcoding method according to a fourth embodiment of the present invention;
fig. 7 is a block diagram of a video transcoding device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings.
Example one
Fig. 1 is a flowchart illustrating a video transcoding method according to an embodiment of the present invention. The embodiment is applicable to the case of transcoding video. The method may be performed by a video transcoding device, wherein the device may be implemented by software and/or hardware and may generally be integrated in a server. As shown in fig. 1, the video transcoding method provided in this embodiment may specifically include:
s210, according to the detected target video transcoding trigger condition, obtaining a starting transcoding video segment corresponding to the target video, wherein the target video corresponds to a set number of video segments arranged according to a video playing sequence.
For example, the target video transcoding trigger condition may be detected before the target video is played, or may be detected during the target video is played, and is not particularly limited herein. And acquiring initial transcoding video segments corresponding to the target video according to the detected target video transcoding triggering condition, wherein the target video is specifically video segments which are arranged according to a video playing sequence from front to back in playing time and are set in number.
In a specific application scenario of this embodiment, various network disk or cloud disk services provide a network storage space for a user to store a private file, and also provide a function of playing a video stored in a network on line for the user, where a video format stored in the network is generally not suitable for the user to directly play, and in order to enable smooth online playing of a user video, it means that the user video needs to be transcoded into a streaming media format suitable for online playing.
For example, when a user clicks to play a target video stored in a network, the target video transcoding trigger condition may be generated.
In the application scenario, it is considered that different users may play the same hot video in the network disk, so that, in order to save network resources as much as possible, after one time of transcoding one video, a corresponding decoded file may be stored, at this time, after another user clicks to play the video again, the decoded file may be directly obtained without transcoding, so that it is ensured that each video in the network disk is transcoded only once.
Correspondingly, in this embodiment, the starting transcoded video segment specifically refers to a first video segment that needs to be transcoded. Typically, if no mechanism for storing the transcoded file is provided, the starting transcoded video segment may be the first video segment of the target video; if a mechanism for storing the transcoded file is provided, the starting transcoded video segment may be a first video segment that is not stored with a corresponding transcoded file, which is not limited in this embodiment.
S220, determining a first quantity value of the video segments subjected to concurrent transcoding according to the real-time pressure parameter of the transcoding system.
Further, the transcoding system real-time pressure parameter may be determined by at least one of: CPU memory occupation, storage node number and distributed message quantity.
For example, the memory footprint of the current CPU, the number of nodes that have been stored, and the number of distributed messages that are affected by the user's play behavior all affect the real-time transcoding pressure of the transcoding system. According to the real-time pressure parameter of the transcoding system, the number of the video segments which can be transcoded concurrently currently can be determined, that is, the first number value of the video segments which can be transcoded concurrently can be determined.
In this embodiment, it is creatively proposed that, when a video file stored in a network needs to be transcoded, instead of dividing a video into video segments and then transcoding all the video segments, the number of the video segments to be transcoded concurrently is determined according to a real-time pressure parameter of a current transcoding system.
When the real-time pressure of the transcoding system is higher, a smaller first quantity value can be selected, and when the real-time pressure of the transcoding system is lower, a larger first quantity value can be selected. Typically, the first quantity value is less than the total number of video segments of the target video.
In a specific example, the first quantity value N may be calculated by the formula N ═ N + [ k1(a-a1) + k2(B-B2) + k3(C-C3) ];
wherein n is a preset reference transcoding quantity value; a is a preset CPU memory occupancy rate threshold value; b is a preset storage node number threshold value; c is a preset distributed message quantity threshold value; a1 is real-time CPU memory occupancy rate; b2 is the number of real-time storage nodes; c3 is the real-time distributed message number; k1, k2 and k3 are preset proportionality coefficients.
Of course, it is understood that the first quantity value may be calculated in other manners, and the embodiment is not limited thereto.
S230, according to the starting transcoding video segment and the first quantity value, obtaining a video segment to be transcoded corresponding to the target video, and performing concurrent transcoding on the video segment to be transcoded.
Illustratively, according to the starting transcoded video segment and the first quantitative value, a to-be-transcoded video segment corresponding to the target video can be obtained, the to-be-transcoded video segment is obtained, and the to-be-transcoded video segment is concurrently transcoded.
Specifically, the video segments to be transcoded with the first quantitative value may be sent to transcoding sub-servers with the same number as the first quantitative value, so as to instruct the transcoding sub-servers to transcode the video segments to be transcoded in parallel at the same time. Each video segment to be transcoded is sent to a transcoding sub-server so as to instruct the transcoding sub-server to perform concurrent transcoding on the video segments to be transcoded with the first numerical value at the same time.
The video transcoding method provided by the embodiment of the invention obtains the initial transcoding video segment according to the target video transcoding triggering condition, determines the first quantity value of the transcoding video segment according to the real-time pressure parameter of the transcoding system, and then performs concurrent transcoding on the video segment to be transcoded according to the initial transcoding video segment and the first quantity value. By adopting the method, the calculation pressure of the transcoding system in the transcoding peak period can be effectively reduced, so that the technical problems that the transcoding system is greatly influenced by the playing behavior of a user and the utilization rate of the transcoding system is poor in the prior art are solved.
In a preferred implementation manner of this embodiment, the video transcoding method may further include:
storing the concurrent transcoding result in a transcoding file database;
the transcoding file database stores video identification, segment numbers of video segments corresponding to the videos determined by the video identification and video decoding files corresponding to the segment numbers;
correspondingly, the concurrent transcoding result includes: the video identification of the target video, the segment number corresponding to the video segment of the first quantity value, and the video decoding file corresponding to the segment number.
Illustratively, after the video segments with the first quantity value are transcoded concurrently according to the real-time pressure parameters of the transcoding system, the result of the concurrent transcoding can be stored in a transcoding file database, so that the same video segment can be transcoded only once. The transcoding file database may include a video identification of the target video, a segment number corresponding to the first quantity value of video segments, and a video decoding file corresponding to the segment number.
Further, fig. 3 is a schematic diagram of a video transcoding method according to an embodiment of the present invention, as shown in fig. 3, when a first trigger condition 301 of target video transcoding is detected, concurrently transcoding a first number of video segments according to a real-time pressure parameter of a transcoding system, where the first number may be 1, that is, transcoding a first video segment 302; when the target video re-triggering condition 303 is detected, the subsequent video segments 304 after the first quantity value are transcoded concurrently according to the transcoding system real-time pressure parameter again, where the subsequent video segments may include the second video segment 3041, the third video segments 3042, … …, and the specific number of the subsequent video segments is determined by the transcoding system real-time pressure parameter. Therefore, the transcoding system can determine the transcoding concurrency number of the target video according to the real-time pressure parameter, the transcoding pressure can be shared in the transcoding time process, the pressure of the transcoding system in the peak transcoding period is reduced, and the utilization rate of the transcoding system in the non-peak period is improved.
Further, the target video transcoding trigger condition may further include:
the user grade value of the target video playing client;
correspondingly, determining a first quantity value of the video segments to be transcoded concurrently according to the real-time pressure parameter of the transcoding system may include:
and determining a first numerical value of the video segments subjected to concurrent transcoding according to the real-time pressure parameter of the transcoding system and the user grade value.
For example, the target video transcoding trigger condition may further include a user level value of the target video playing client, that is, it is determined whether the target video user is a VIP (member Person) user or a paid user, and if the target video user is a VIP user or a paid user, the first quantity value of the video segments that can be transcoded concurrently is determined according to the transcoding system real-time pressure parameter and the user level value. For example, if the target video user is a VIP user, the transcoding service may be preferentially performed on the VIP user under the condition that the real-time pressure parameter of the transcoding system is considered, or a first quantity value as large as possible is set on the VIP user under the condition that the requirements of the transcoding system are met.
Example two
The present embodiment provides a video transcoding method based on the foregoing embodiments. Fig. 4 is a flowchart illustrating a video transcoding method according to a second embodiment of the present invention. As shown in fig. 4, the video transcoding method provided in this embodiment may include:
and S410, inquiring the transcoding file database according to the target video playing request.
Illustratively, the transcoded file database is queried in accordance with a user's target video playback request. Here, the transcoding file database may be queried according to a target video playing request before video playing.
S420, if the video decoding file corresponding to the target video is not stored in the transcoding file database, generating the target video transcoding trigger condition.
For example, if a video transcoding file corresponding to a target video is not stored in the transcoding file database, it may be determined that the target video has not undergone transcoding behavior, and a target video transcoding trigger condition is generated.
S430, obtaining a first video segment of the target video as the starting transcoding video segment.
Illustratively, since the target video has not yet undergone transcoding behavior, the first video segment of the target video is obtained as the starting transcoded video segment.
S440, determining a first quantity value of the video segments subjected to concurrent transcoding according to the real-time pressure parameter of the transcoding system.
S450, according to the starting transcoding video segment and the first quantity value, obtaining a video segment to be transcoded corresponding to the target video, and performing concurrent transcoding on the video segment to be transcoded.
According to the video transcoding method provided by the embodiment of the invention, when a video decoding file corresponding to the target video is not stored in the transcoding file database, a target video transcoding trigger condition is generated, the first video segment of the target video is obtained as an initial transcoding video segment, and then the video segment to be transcoded is transcoded concurrently according to the real-time pressure parameter of the transcoding system. By adopting the method, the playing experience of a user is not influenced, and meanwhile, the transcoding trigger condition can be generated in time, the initial transcoding video segment is determined, and the peak pressure of a transcoding system is reduced.
EXAMPLE III
The present embodiment provides a video transcoding method based on the foregoing embodiments. Fig. 5 is a flowchart illustrating a video transcoding method according to a third embodiment of the present invention. As shown in fig. 5, the video transcoding method provided in this embodiment may include:
and S510, inquiring the transcoding file database according to the target video playing request.
Illustratively, the transcoded file database is queried in accordance with a user's target video playback request. Here, the transcoding file database may be queried according to a target video playing request before video playing.
S520, if the number of the video decoding files corresponding to the target video and stored in the transcoding file database is smaller than a number threshold, generating the target video transcoding trigger condition.
For example, the number threshold may be preset, and if the number of video decoding files corresponding to the target video, which stores the number of decoding video files in the transcoding file database, is less than the preset number threshold, the target video transcoding trigger condition is generated. The number threshold may be preset according to actual conditions, and is not specifically limited herein.
S530, obtaining the last video decoding file which is stored in the transcoding file database and corresponds to the target video, and obtaining a segment number N corresponding to the video decoding file, wherein N is a positive integer.
For example, since the video transcoding behavior transcodes in the chronological order of the playing time of the video sequence, that is, the video segment that is transcoded first must be the video segment with the playing time being the first. Here, the last video decoding file stored in the file database and corresponding to the target video is obtained, that is, the last video decoding file in the playing order corresponding to the target video, which is sorted according to the video playing time, is obtained, and the segment number N corresponding to the video decoding file is obtained, where N may be a positive integer.
And S540, acquiring the video segment with the segment number of N +1 in the target video as the starting transcoding video segment.
Illustratively, the video segment with the segment number N is the last video decoding file corresponding to the target video, and therefore, the video segment with the segment number N +1 in the target video is obtained as the starting transcoded video segment.
And S550, determining a first quantity value of the video segments subjected to concurrent transcoding according to the real-time pressure parameter of the transcoding system.
And S560, acquiring the video segment to be transcoded corresponding to the target video according to the starting transcoded video segment and the first quantitative value, and performing concurrent transcoding on the video segment to be transcoded.
In the video transcoding method provided by the third embodiment of the present invention, when the number of video decoding files corresponding to the target video and stored in the transcoding file database is smaller than the number threshold, a target video transcoding trigger condition is generated, a last video decoding file corresponding to the target video and a segment number N corresponding to the last video decoding file are obtained, then a video segment with a segment number N +1 is used as the initial transcoding video segment, and then the video segments to be transcoded are concurrently transcoded according to the real-time pressure parameter of the transcoding system. The embodiment and the second embodiment of the invention are both preferred embodiments, and the video transcoding method provided by the invention has the same beneficial effects, can generate transcoding trigger conditions in time, determine the initial transcoding video segment and reduce the peak pressure of a transcoding system without influencing the playing experience of a user.
Example four
The present embodiment provides a video transcoding method based on the foregoing embodiments. Fig. 6 is a flowchart illustrating a video transcoding method according to a fourth embodiment of the present invention. As shown in fig. 6, the video transcoding method provided in this embodiment may include:
s610, in the process of playing the target video, acquiring the first segment number corresponding to the currently played video segment in real time, and inquiring the transcoding file database.
For example, in the target video playing process, the segment number of the currently playing video segment is obtained in real time, the segment number of the currently playing video segment may be marked as the first segment number, and the transcoded file database is queried.
S620, obtaining the last video decoding file which is stored in the transcoding file database and corresponds to the target video, and obtaining a second segment number M corresponding to the video decoding file, wherein M is a positive integer.
For example, obtaining the last video decoding file corresponding to the target video and the segment number thereof stored in the transcoding file database may mark the segment number of the last video decoding file as a second segment number M, where M may be a positive integer.
S630, if the difference value between the first segment number and the second segment number meets a preset transcoding threshold condition, generating the target video transcoding trigger condition.
Illustratively, the preset transcoding threshold condition may be set according to an actual situation, and only needs to be satisfied without affecting the continuity of video playing. And under the condition that the difference value between the first segment number and the second segment number meets a preset transcoding threshold condition, generating a target video transcoding trigger condition.
And S640, acquiring a video segment with a segment number of M +1 in the target video as the starting transcoding video segment.
Illustratively, the video segment with segment number M is the last video decoding file corresponding to the target video, and therefore, the video segment with segment number M +1 in the target video is obtained here as the starting transcoded video segment.
S650, determining a first quantity value of the video segments subjected to concurrent transcoding according to the real-time pressure parameter of the transcoding system.
S660, obtaining the video segment to be transcoded corresponding to the target video according to the starting transcoded video segment and the first quantity value, and performing concurrent transcoding on the video segment to be transcoded.
In the video transcoding method provided by the third embodiment of the present invention, in the target video playing process, if a difference between segment numbers of a video segment being played and a last video segment corresponding to a target video meets a preset transcoding threshold condition, a target video transcoding trigger condition is generated, then a video segment with a segment number of M +1 is used as the initial transcoding video segment, and then a video segment to be transcoded is concurrently transcoded according to a real-time pressure parameter of a transcoding system. The embodiment of the invention, the second embodiment and the third embodiment are both preferred embodiments, and the video transcoding method has the same beneficial effects and can generate transcoding triggering conditions in time, determine the initial transcoding video segment and reduce the peak pressure of a transcoding system without influencing the playing experience of a user.
EXAMPLE five
Fig. 7 is a block diagram of a video transcoding apparatus according to a fifth embodiment of the present invention, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in a server. The present embodiment may be applied to a case of transcoding video, and as shown in fig. 7, the apparatus includes: an obtaining module 701, a first quantity value determining module 702 and a transcoding module 703.
The acquiring module 701 is configured to acquire, according to a detected target video transcoding trigger condition, an initial transcoding video segment corresponding to a target video, where the target video corresponds to a set number of video segments arranged according to a video playing sequence; a first quantity value determining module 702, configured to determine, according to the real-time pressure parameter of the transcoding system, a first quantity value of a video segment for concurrent transcoding; and a transcoding module 703, configured to obtain a to-be-transcoded video segment corresponding to the target video according to the start transcoded video segment and the first quantitative value, and perform concurrent transcoding on the to-be-transcoded video segment.
The video transcoding device provided by the fifth embodiment of the invention acquires the initial transcoding video segment according to the target video transcoding trigger condition, determines the first numerical value of the transcoding video segment according to the real-time pressure parameter of the transcoding system, and then performs concurrent transcoding on the video segment to be transcoded according to the initial transcoding video segment and the first numerical value. By adopting the device, the calculation pressure of the transcoding system in the peak transcoding period can be effectively reduced, and the technical problems that the transcoding system is greatly influenced by the playing behavior of a user and the utilization rate of the transcoding system is poor in the prior art are solved.
Further, the apparatus may further include:
the storage module is used for storing the concurrent transcoding result in a transcoding file database;
the transcoding file database stores video identification, segment numbers of video segments corresponding to the videos determined by the video identification and video decoding files corresponding to the segment numbers;
correspondingly, the concurrent transcoding result includes: the video identification of the target video, the segment number corresponding to the video segment of the first quantity value, and the video decoding file corresponding to the segment number.
Further, the obtaining module 701 may include:
the first query unit is used for querying the transcoding file database according to the target video playing request;
a first trigger condition generating unit, configured to generate the target video transcoding trigger condition if a video decoding file corresponding to the target video is not stored in the transcoding file database;
and the first acquisition unit is used for acquiring a first video segment of the target video as the starting transcoding video segment.
Further, the obtaining module 701 may include:
the second query unit is used for querying the transcoding file database according to the target video playing request;
a second trigger condition generating unit, configured to generate the target video transcoding trigger condition if the number of video decoding files corresponding to the target video and stored in the transcoding file database is smaller than a number threshold;
a first number obtaining unit, configured to obtain a last video decoding file stored in the file database and corresponding to the target video, and obtain a segment number N corresponding to the video decoding file, where N is a positive integer;
and the second acquisition unit is used for acquiring the video segment with the segment number of N +1 in the target video as the starting transcoding video segment.
Further, the obtaining module 701 may include:
the third query unit is used for acquiring the first segment number corresponding to the currently played video segment in real time in the target video playing process and querying the transcoding file database;
a second number obtaining unit, configured to obtain a last video decoding file stored in the file database and corresponding to the target video, and obtain a second segment number M corresponding to the video decoding file, where M is a positive integer;
a third trigger condition generating unit, configured to generate the target video transcoding trigger condition if a difference between the first segment number and the second segment number satisfies a preset transcoding threshold condition;
and the third obtaining unit is used for obtaining the video segment with the segment number of M +1 in the target video as the starting transcoding video segment.
Further, the transcoding system real-time pressure parameter is determined by at least one of the following parameters:
CPU memory occupation, storage node number and distributed message quantity.
Further, the target video transcoding trigger condition may further include:
the user grade value of the target video playing client;
accordingly, the first quantity value determining module 702 may include:
and the first quantity value determining unit is used for determining a first quantity value of the video segment subjected to concurrent transcoding according to the real-time pressure parameter of the transcoding system and the user grade value.
Further, the transcoding module 703 may include:
and the transcoding unit is used for sending the video segments to be transcoded with the first quantity value to transcoding sub-servers with the same quantity as the first quantity value so as to instruct the transcoding sub-servers to perform parallel transcoding on the video segments to be transcoded at the same time.
The video transcoding device provided by the fifth embodiment of the invention belongs to the same inventive concept as the video transcoding method provided by any embodiment of the invention, can execute the video transcoding method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the video transcoding method. For details of the video transcoding method provided in any embodiment of the present invention, reference may be made to the technical details not described in detail in this embodiment.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (14)

1. A method of video transcoding, comprising:
acquiring initial transcoding video segments corresponding to a target video according to a detected target video transcoding trigger condition, wherein the target video corresponds to a set number of video segments arranged according to a video playing sequence; when a user clicks and plays a target video stored in a network, triggering the target video transcoding condition; the target video is located on the network disk;
determining a first quantity value of a video segment subjected to concurrent transcoding according to a real-time pressure parameter of a transcoding system;
acquiring a video segment to be transcoded corresponding to the target video according to the starting transcoded video segment and the first quantity value, and performing concurrent transcoding on the video segment to be transcoded;
according to the starting transcoding video segment and the first quantity value, obtaining a video segment to be transcoded corresponding to the target video, and performing concurrent transcoding on the video segment to be transcoded, wherein the method comprises the following steps:
and sending the video segments to be transcoded with the first quantity value to transcoding sub-servers with the same quantity as the first quantity value so as to instruct the transcoding sub-servers to transcode the video segments to be transcoded in parallel at the same time.
2. The method of claim 1, further comprising:
storing the concurrent transcoding result in a transcoding file database;
the transcoding file database stores video identification, segment numbers of video segments corresponding to the videos determined by the video identification and video decoding files corresponding to the segment numbers;
correspondingly, the concurrent transcoding result includes: the video identification of the target video, the segment number corresponding to the video segment of the first quantity value, and the video decoding file corresponding to the segment number.
3. The method of claim 2, wherein obtaining a start transcoded video segment corresponding to the target video according to the detected target video transcoding trigger condition comprises:
inquiring the transcoding file database according to the target video playing request;
if the video decoding file corresponding to the target video is not stored in the transcoding file database, generating a target video transcoding trigger condition;
and acquiring a first video segment of the target video as the starting transcoding video segment.
4. The method of claim 2, wherein obtaining a start transcoded video segment corresponding to the target video according to the detected target video transcoding trigger condition comprises:
inquiring the transcoding file database according to the target video playing request;
if the number of the video decoding files corresponding to the target video and stored in the transcoding file database is smaller than a number threshold, generating a target video transcoding trigger condition;
acquiring a last video decoding file which is stored in the transcoding file database and corresponds to the target video, and acquiring a segment number N corresponding to the video decoding file, wherein N is a positive integer;
and acquiring a video segment with a segment number of N +1 in the target video as the starting transcoding video segment.
5. The method of claim 2, wherein obtaining a start transcoded video segment corresponding to the target video according to the detected target video transcoding trigger condition comprises:
in the process of playing a target video, acquiring a first segment number corresponding to a currently played video segment in real time, and querying the transcoding file database;
acquiring a last video decoding file which is stored in the transcoding file database and corresponds to the target video, and acquiring a second segment number M corresponding to the video decoding file, wherein M is a positive integer;
if the difference value between the first segment number and the second segment number meets a preset transcoding threshold condition, generating a target video transcoding trigger condition;
and acquiring a video segment with a segment number of M +1 in the target video as the starting transcoding video segment.
6. The method of claim 1, wherein the transcoding system real-time pressure parameters are determined by at least one of:
CPU memory occupation, storage node number and distributed message quantity.
7. The method of claim 1, wherein the target video transcoding trigger condition further comprises:
the user grade value of the target video playing client;
correspondingly, determining a first quantity value of the video segments subjected to concurrent transcoding according to the real-time pressure parameter of the transcoding system comprises the following steps:
and determining a first numerical value of the video segments subjected to concurrent transcoding according to the real-time pressure parameter of the transcoding system and the user grade value.
8. A video transcoding apparatus, comprising:
the acquisition module is used for acquiring an initial transcoding video segment corresponding to a target video according to a detected target video transcoding trigger condition, wherein the target video corresponds to a set number of video segments which are arranged according to a video playing sequence; when a user clicks and plays a target video stored in a network, triggering the target video transcoding condition; the target video is located on the network disk;
the first quantity value determining module is used for determining a first quantity value of a video segment subjected to concurrent transcoding according to the real-time pressure parameter of the transcoding system;
the transcoding module is used for acquiring a video segment to be transcoded corresponding to the target video according to the starting transcoded video segment and the first quantitative value, and performing concurrent transcoding on the video segment to be transcoded;
the transcoding module comprises a transcoding unit, and the transcoding unit is used for sending the video segments to be transcoded with the first numerical value to transcoding sub-servers with the same number as the first numerical value so as to indicate the transcoding sub-servers to transcode the video segments to be transcoded in parallel at the same time.
9. The apparatus of claim 8, further comprising:
the storage module is used for storing the concurrent transcoding result in a transcoding file database;
the transcoding file database stores video identification, segment numbers of video segments corresponding to the videos determined by the video identification and video decoding files corresponding to the segment numbers;
correspondingly, the concurrent transcoding result includes: the video identification of the target video, the segment number corresponding to the video segment of the first quantity value, and the video decoding file corresponding to the segment number.
10. The apparatus of claim 9, wherein the obtaining module comprises:
the first query unit is used for querying the transcoding file database according to the target video playing request;
a first trigger condition generating unit, configured to generate the target video transcoding trigger condition if a video decoding file corresponding to the target video is not stored in the transcoding file database;
and the first acquisition unit is used for acquiring a first video segment of the target video as the starting transcoding video segment.
11. The apparatus of claim 9, wherein the obtaining module comprises:
the second query unit is used for querying the transcoding file database according to the target video playing request;
a second trigger condition generating unit, configured to generate the target video transcoding trigger condition if the number of video decoding files corresponding to the target video and stored in the transcoding file database is smaller than a number threshold;
a first number obtaining unit, configured to obtain a last video decoding file stored in the transcoding file database and corresponding to the target video, and obtain a segment number N corresponding to the video decoding file, where N is a positive integer;
and the second acquisition unit is used for acquiring the video segment with the segment number of N +1 in the target video as the starting transcoding video segment.
12. The apparatus of claim 9, wherein the obtaining module comprises:
the third query unit is used for acquiring the first segment number corresponding to the currently played video segment in real time in the target video playing process and querying the transcoding file database;
a second number obtaining unit, configured to obtain a last video decoding file stored in the transcoding file database and corresponding to the target video, and obtain a second segment number M corresponding to the video decoding file, where M is a positive integer;
a third trigger condition generating unit, configured to generate the target video transcoding trigger condition if a difference between the first segment number and the second segment number satisfies a preset transcoding threshold condition;
and the third obtaining unit is used for obtaining the video segment with the segment number of M +1 in the target video as the starting transcoding video segment.
13. The apparatus of claim 8, wherein the transcoding system real-time pressure parameter is determined by at least one of:
CPU memory occupation, storage node number and distributed message quantity.
14. The apparatus of claim 8, wherein the target video transcoding trigger condition further comprises:
the user grade value of the target video playing client;
accordingly, the first quantity value determination module includes:
and the first quantity value determining unit is used for determining a first quantity value of the video segment subjected to concurrent transcoding according to the real-time pressure parameter of the transcoding system and the user grade value.
CN201610158898.4A 2016-03-18 2016-03-18 Video transcoding method and device Active CN107205164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610158898.4A CN107205164B (en) 2016-03-18 2016-03-18 Video transcoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610158898.4A CN107205164B (en) 2016-03-18 2016-03-18 Video transcoding method and device

Publications (2)

Publication Number Publication Date
CN107205164A CN107205164A (en) 2017-09-26
CN107205164B true CN107205164B (en) 2020-09-01

Family

ID=59904576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610158898.4A Active CN107205164B (en) 2016-03-18 2016-03-18 Video transcoding method and device

Country Status (1)

Country Link
CN (1) CN107205164B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109471715B (en) * 2018-09-17 2021-10-29 咪咕视讯科技有限公司 Method and device for scheduling transcoding task and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101951512A (en) * 2010-08-24 2011-01-19 中国科学院深圳先进技术研究院 Fragmentation transcoding method and system of live video and real-time video
CN102595242A (en) * 2012-03-12 2012-07-18 华为技术有限公司 Dynamic video regulation system, terminal and method
CN103458270A (en) * 2013-09-09 2013-12-18 深圳市融创天下科技股份有限公司 Video transcoding system and method
CN103731678A (en) * 2013-12-30 2014-04-16 世纪龙信息网络有限责任公司 Video file parallel transcoding method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110088076A1 (en) * 2009-10-08 2011-04-14 Futurewei Technologies, Inc. System and Method for Media Adaptation
US20130135525A1 (en) * 2011-11-30 2013-05-30 Mobitv, Inc. Fragment boundary independent closed captioning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101951512A (en) * 2010-08-24 2011-01-19 中国科学院深圳先进技术研究院 Fragmentation transcoding method and system of live video and real-time video
CN102595242A (en) * 2012-03-12 2012-07-18 华为技术有限公司 Dynamic video regulation system, terminal and method
CN103458270A (en) * 2013-09-09 2013-12-18 深圳市融创天下科技股份有限公司 Video transcoding system and method
CN103731678A (en) * 2013-12-30 2014-04-16 世纪龙信息网络有限责任公司 Video file parallel transcoding method and system

Also Published As

Publication number Publication date
CN107205164A (en) 2017-09-26

Similar Documents

Publication Publication Date Title
US9313249B2 (en) Systems and methods for estimating available bandwidth and performing initial stream selection when streaming content
CN110198495B (en) Method, device, equipment and storage medium for downloading and playing video
US11563992B2 (en) Video playback quality detection method and apparatus
US20200267445A1 (en) Determining a quality of experience metric based on uniform resource locator data
CN106604137B (en) Method and device for predicting video watching duration
CN110178377A (en) Initial bit rate selection for video transmission session
CN112312135B (en) Video publishing method and device, computer equipment and storage medium
CN111093094A (en) Video transcoding method, device and system, electronic equipment and readable storage medium
CN103780925A (en) On-line video-on-demand method and system based on moving platform
CN109168020A (en) Method for processing video frequency, device, calculating equipment and storage medium based on live streaming
US20240340473A1 (en) Method for just-in-time transcoding of byterange-addressable parts
Xie et al. Dynamic threshold based rate adaptation for HTTP live streaming
CN107205164B (en) Video transcoding method and device
CN114024973B (en) Resource scheduling method, device, server and system for direct broadcast cloud transcoding
CN111464835B (en) Online video output detection method based on dynamic verification and server
WO2015106383A1 (en) Method for assessing video quality and related device
CN116389799A (en) Transcoding processing method and device for audio and video code stream, electronic equipment and storage medium
CN114945097B (en) Video stream processing method and device
De Pinho et al. GloVE: A distributed environment for scalable video-on-demand systems
Thang et al. Video streaming over HTTP with dynamic resource prediction
CN115633191A (en) Video playing method, device, system, electronic equipment and readable storage medium
CN116527992A (en) Video playing resolution switching method and device
CN111818338A (en) Abnormal display detection method, device, equipment and medium
Ognenoski et al. Segment-based teletraffic model for MPEG-DASH
US20230328334A1 (en) Adaptive bit rate streaming

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