CN110062262B - Transcoding control method and device for video data, electronic equipment and storage medium - Google Patents

Transcoding control method and device for video data, electronic equipment and storage medium Download PDF

Info

Publication number
CN110062262B
CN110062262B CN201910293268.1A CN201910293268A CN110062262B CN 110062262 B CN110062262 B CN 110062262B CN 201910293268 A CN201910293268 A CN 201910293268A CN 110062262 B CN110062262 B CN 110062262B
Authority
CN
China
Prior art keywords
video data
original video
code rate
determining
transcoding
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
CN201910293268.1A
Other languages
Chinese (zh)
Other versions
CN110062262A (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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910293268.1A priority Critical patent/CN110062262B/en
Publication of CN110062262A publication Critical patent/CN110062262A/en
Application granted granted Critical
Publication of CN110062262B publication Critical patent/CN110062262B/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/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/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • 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/439Processing of audio elementary streams
    • 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
    • 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/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
    • 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/81Monomedia components thereof
    • H04N21/8106Monomedia components thereof involving special audio data, e.g. different tracks for different languages

Landscapes

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

Abstract

The present disclosure provides a transcoding control method, apparatus, electronic device and storage medium for video data, wherein the method includes: determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information of the original video data to be processed, and transcoding the original video data again according to the code rate and the key frame interval to obtain target video data corresponding to the code rate and the key frame interval. Therefore, the code rate is controlled by combining the video parameter information of the video data to be processed, the code rate control in the transcoding process is realized, and the target video with the code rate and the key frame interval according with the video parameters is transcoded.

Description

Transcoding control method and device for video data, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for controlling transcoding of video data, an electronic device, and a storage medium.
Background
With the development of mobile internet, more and more content providers carry service contents by developing applications. Taking the short video application as an example, the short video application provides various short videos for users to entertain and/or learn.
At present, in the process of sharing videos by using short video APPs, short video applications transcode video data to be published. In the related technology, in the process of transcoding video data, the transcoded code rate is not controlled, so that the actually transcoded video code rate has large fluctuation, and further the failure rate of uploading video data by a short video application program is high.
Disclosure of Invention
The invention provides a transcoding control method and device for video data, electronic equipment and a storage medium.
An embodiment of the first aspect of the present disclosure provides a transcoding control method for video data, including: acquiring original video data to be processed; determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information of the original video data; and transcoding the original video data again to output target video data corresponding to the code rate and the key frame interval.
The transcoding control method of the video data determines a code rate and a key frame interval corresponding to original video data according to video parameter information of the original video data to be processed, and performs transcoding again on the original video data according to the code rate and the key frame interval to obtain target video data corresponding to the code rate and the key frame interval. Therefore, the code rate is controlled by combining the video parameter information of the video data to be processed, the code rate control in the transcoding process is realized, and the target video with the code rate and the key frame interval according with the video parameters is transcoded.
In an embodiment of the present disclosure, before the determining, according to the video parameter information of the original video data, a bitrate and a key frame interval corresponding to the original video data, the method further includes: determining that the original video data needs to be re-transcoded.
In one embodiment of the present disclosure, further comprising: acquiring motion information of the electronic equipment when recording the original video data; and determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information and the motion information.
In one embodiment of the present disclosure, the determining that the original video data needs to be re-transcoded includes at least one of: identifying that the video frame rate of the original video data exceeds a preset frame rate threshold, and determining that the original video data needs to be transcoded again; identifying that the original video data is imported by a user, and determining that the original video data needs to be transcoded again; identifying a special effect or a preset special effect used by the original video data, and determining that the original video data needs to be transcoded again; and identifying that the size of the original video data exceeds a preset threshold value, and determining that the original video data needs to be transcoded again.
In one embodiment of the present disclosure, further comprising: acquiring special effect use information of the original video data; and determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information and the special effect use information.
An embodiment of a second aspect of the present disclosure provides a transcoding control apparatus for video data, including: the first acquisition module is used for acquiring original video data to be processed; the first determining module is used for determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information of the original video data; and the transcoding module is used for transcoding the original video data again so as to output target video data corresponding to the code rate and the key frame interval.
The transcoding control device for video data determines a code rate and a key frame interval corresponding to original video data according to video parameter information of the original video data to be processed, and re-transcodes the original video data according to the code rate and the key frame interval to obtain target video data corresponding to the code rate and the key frame interval. Therefore, the code rate is controlled by combining the video parameter information of the video data to be processed, the code rate control in the transcoding process is realized, and the target video with the code rate and the key frame interval according with the video parameters is transcoded.
In one embodiment of the present disclosure, the apparatus further comprises: a second determining module, configured to determine that the original video data needs to be re-transcoded.
In one embodiment of the present disclosure, further comprising: the second acquisition module is used for acquiring the motion information of the electronic equipment when recording the original video data; and the first determining module is further used for determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information and the motion information.
In an embodiment of the disclosure, the second determining module determines that the original video data needs to be transcoded again specifically by at least one of: identifying that the video frame rate of the original video data exceeds a preset frame rate threshold, and determining that the original video data needs to be transcoded again; identifying that the original video data is imported by a user, and determining that the original video data needs to be transcoded again; identifying a special effect or a preset special effect used by the original video data, and determining that the original video data needs to be transcoded again; and identifying that the size of the original video data exceeds a preset threshold value, and determining that the original video data needs to be transcoded again.
In one embodiment of the present disclosure, further comprising: the third acquisition module is used for acquiring special effect use information of the original video data; the first determining module is further configured to determine a code rate and a key frame interval corresponding to the original video data according to the video parameter information and the special effect usage information.
In an embodiment of the third aspect of the present disclosure, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the program for executing the transcoding control method for video data described above.
A fourth aspect of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, the program being executed by a processor for executing the transcoding control method for video data described above.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The foregoing and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a transcoding control method for video data according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another transcoding control method for video data according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another transcoding control method for video data according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a transcoding control apparatus for video data according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of another apparatus for controlling transcoding of video data according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of another apparatus for controlling transcoding of video data according to an embodiment of the present disclosure;
fig. 7 is a schematic hardware configuration diagram of an electronic device that executes a transcoding control method for video data according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure.
A transcoding control method, apparatus, electronic device, and storage medium of video data according to an embodiment of the present disclosure are described below with reference to the drawings.
Fig. 1 is a flowchart illustrating a transcoding control method for video data according to an embodiment of the present disclosure.
As shown in fig. 1, the transcoding control method of video data includes:
s101, acquiring original video data to be processed.
The transcoding control method for video data according to the embodiment of the present disclosure is configured in a transcoding control apparatus for video data, and the transcoding control apparatus for video data may be set in an application having a video sharing function, and the application may be set in an electronic device or a server, which is not limited in this embodiment.
The electronic device may include, but is not limited to, a mobile phone, a tablet computer, a wearable device, and the like, and the embodiment is not limited thereto.
The implementation of the present disclosure is described by taking a user publishing a video using a short video-like application in an electronic device as an example.
It should be noted that, in the process that the user issues the video through the short video application program, the video data to be processed may be video data directly recorded by the user through the short video application program, may also be video data locally imported by the user, and may also be video data generated by the short video application program according to multiple pictures through locally importing multiple pictures by the user, which is not limited in this embodiment.
S102, determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information of the original video data.
The video parameter information may include, but is not limited to, a video frame rate, a video resolution, and the like, which is not limited by this embodiment.
As a possible implementation manner, the video frame rate and the video resolution in the video parameter information of the original video data are obtained, and the code rate and the key frame interval corresponding to the original video data are determined according to the video frame rate and the video resolution.
It should be noted that, generally, the higher the resolution of the video is, the higher the determined bitrate corresponding to the original video data is; the higher the video frame rate, the higher the determined bitrate corresponding to the original video data.
It should be noted that the key frame interval refers to an interval between I frames in the original video data, that is, the key frame interval is an I frame interval.
And S103, transcoding the original video data again to output target video data corresponding to the code rate and the key frame interval.
Specifically, after the code rate and the key frame interval corresponding to the original video data are determined, the target video data corresponding to the code rate and the key frame interval can be output when the encoder is controlled to re-encode the original video data according to the code rate and the key frame interval.
According to the transcoding control method of the video data, the code rate and the key frame interval corresponding to the original video data are determined according to the video parameter information of the original video data to be processed, and the original video data are transcoded again according to the code rate and the key frame interval, so that target video data corresponding to the code rate and the key frame interval are obtained. Therefore, the code rate is controlled by combining the video parameter information of the video data to be processed, the code rate control in the transcoding process is realized, and the target video with the code rate and the key frame interval according with the video parameters is transcoded.
The disclosed embodiment provides another transcoding control method for video data, which is a further extension and optimization of the method shown in fig. 1.
Fig. 2 is a flowchart illustrating another transcoding control method for video data according to an embodiment of the present disclosure.
As shown in fig. 2, the transcoding control method for video data includes:
s201, acquiring original video data to be processed.
S202, whether the original video data needs to be transcoded again is determined.
It should be noted that, in different application scenarios, it is determined that the original video data needs to be transcoded in different ways, for example, the following are described:
as an example, it is identified that the video frame rate of the original video data exceeds a preset frame rate threshold, and it is determined that the original video data needs to be transcoded again.
Specifically, whether the video frame rate of the original video data exceeds a preset frame rate threshold or not can be judged according to the video parameter information, and if the video frame rate exceeds the preset frame rate threshold, the original video data is determined to need transcoding again.
As another example, identifying the original video data as imported by the user, it is determined that the original video data needs to be re-transcoded.
Specifically, whether the original video data is imported by a user is judged, and if the original video data is imported by the user, the fact that the original video data needs to be transcoded again is determined
As a possible implementation manner, whether the original video data is imported by the user is determined, and whether the original video data is imported by the user may be determined, where if the original video data is marked with an import identifier, it is determined that the original video data needs to be transcoded again.
It should be noted that, the original video data is marked with an import identifier, which indicates that the original video data is the video data imported from the local by the user.
As another example, identifying that the original video data uses special effects, it is determined that the original video data needs to be re-transcoded.
Specifically, it may be determined whether the original video data uses a special effect, where if the original video data uses a special effect, it is determined that the original video data needs to be transcoded again.
As a possible implementation manner, whether the original video data uses a special effect is judged, whether the original video data to be processed uses the special effect can be judged by judging whether the original video data is marked with a special effect identifier, if the original video data is marked with the special effect identifier, the original video data to be processed uses the special effect is judged, and if the original video data is marked with any special effect identifier, the original video data to be processed does not use the special effect.
As another example, identifying that the original video data uses a preset special effect, it is determined that the original video data needs to be re-transcoded.
The preset special effect is a special effect for adding a special effect to video image data in original video data. The preset effects may include, but are not limited to, color filters, effect filters, any effect such as stickers, watermarks, text, paintbrushes, etc., as the implementation defines.
As another example, it is determined that the original video data needs to be re-transcoded if it is identified that the size of the original video data exceeds a preset threshold.
Specifically, when it is required to determine whether the original video data is transcoded, it may be determined whether the size of the original video data to be processed exceeds a preset threshold, and if the size of the original video data exceeds the preset threshold, it is determined that the original video data needs to be transcoded again.
It can be understood that the size of the original video data may be calculated according to the video code rate and the video duration, or may be obtained by reading the video parameter information of the video data, which is not limited in this embodiment.
S203, performing encapsulation processing on the original video data, or copying a video name of the original video data.
In order to avoid resource waste caused by performing encapsulation processing again on the original video data meeting the requirements, as an exemplary implementation manner, before performing encapsulation processing on the original video data, it may be further determined whether an audio track and/or a video track of the original video data is added with a special effect, and if the audio track and/or the video track is added with the special effect, the audio track and the video track of the original video data are repackaged according to the special effect used on the audio track and/or the video track of the original video data.
When the audio track and/or the video track of the original video data are not added with special effects, transcoding processing and packaging processing of the original video data are not needed, and at the moment, the video name of the original video data can be directly copied.
And S204, determining code rate and key frames corresponding to the original video data according to the video parameter information of the original video data.
S205, re-transcoding the original video data to output target video data corresponding to the bitrate and the key frame interval.
As an exemplary embodiment, in order to share the target video data so that the user can view the target video data on the video platform, the target video data may also be published to the video platform after S205 is performed.
In practical application, in the process of publishing video data to a video platform, a user may use a special effect for a video track and/or an audio track of the video data through a short video-class application program, as an exemplary embodiment, in order to enable the user to view a video to which a corresponding special effect is added on the video platform, before publishing target video data to the video platform, the target video data may be repackaged, and the target video data after being capsulated is published to the video platform.
Specifically, the video track and the audio track of the video data are repackaged according to the special effect used on the video track and/or the audio track of the video data, and the target video data after being packaged is released to the video platform.
The transcoding control method of the video data of the embodiment of the disclosure acquires original video data to be processed, judges whether the original video data needs transcoding, determines a code rate and a key frame interval corresponding to the original video data according to video parameter information of the original video data to be processed when the original video data needs transcoding, and re-transcodes the original video data according to the code rate and the key frame interval to obtain target video data corresponding to the code rate and the key frame interval. Therefore, for the video data needing transcoding, the control of the code rate and the key frame interval in the transcoding process is realized by combining the video parameter information of the video data, and the target video with the code rate and the key frame interval conforming to the video parameters is transcoded.
The disclosed embodiment provides another transcoding control method for video data, which is a further extension and optimization of the method shown in fig. 1.
Fig. 3 is a flowchart illustrating another transcoding control method for video data according to an embodiment of the present disclosure.
As shown in fig. 3, the transcoding control method of video data includes:
s301, acquiring original video data to be processed.
S302, determining whether the original video data is imported by the user, if yes, executing S307 and S310, and if no, executing S303.
S303, determine whether the original video data uses special effects, if yes, execute S304.
It should be noted that, if the original video data does not use a special effect, it is determined that the original video data does not need to be transcoded again.
S304, judging whether the original video data uses a preset special effect, if so, executing S308-S310, otherwise, executing S305.
The preset special effects may include, but are not limited to, color filters, special effect filters, any stickers, watermarks, texts, paintbrushes, and other special effects, which is limited by this implementation.
The preset special effect is a special effect for adding a special effect to video image data in original video data.
S305, determining whether a special effect is added to the audio track and/or the video track of the original video data, if yes, executing S306.
As a possible implementation manner, whether to add a special effect to the audio track and/or the video track of the original video data may be determined by determining whether the audio track and the video track of the original video data are marked with a special effect identifier.
If the audio track and the video track of the original video data are marked with special effect marks, the audio track and the video track of the original video data are judged to be added with special effects.
If the audio track of the original video data is marked with the special effect identification, but the video track is not marked with the special effect identification, the audio track of the original video data is judged to be added with the special effect.
If the video track of the original video data is marked with the special effect identification, but the audio track is not marked with the special effect identification, the video track of the original video data is judged to be added with the special effect.
S306, repackaging the audio track and the video track of the original video data according to the special effect added to the audio track and/or the video track of the original video data.
As an exemplary embodiment, after repackaging the audio track and the video track of the original video data, the video data may be distributed to the video platform after being packaged so that the video data may be shared with other users.
S307, according to the video parameter information of the original video data, determining the code rate and the key frame interval corresponding to the original video data.
S308, acquiring the motion information of the electronic equipment when recording the original video data.
The motion information of the electronic device during recording of the original video data can be obtained through motion information measured by a gyroscope in the electronic device.
S309, determining the video parameter information according to the original video data according to the video parameter information and the motion information of the original video data.
It should be noted that, in the process of recording the original video data, the motion information of the electronic device has a certain influence on the determined code rate and the key frame interval.
In the process of recording original video data, the more drastic the motion amplitude of the electronic device is, and during encoding, the higher the code rate of the video data output by the encoder is required to be, the smaller the key frame interval is.
S310, transcoding the original video data again to output target video data corresponding to the code rate and the key frame interval.
The transcoding control method of the video data of the disclosed embodiment obtains original video data to be processed, and judges whether the original video data is marked with an import mark, if so, determines the code rate and key frames corresponding to the original video data according to the video parameter information of the original video data, and re-transcodes the original video data to output target video data corresponding to the code rate and key frame intervals, and determines whether the original video data needs transcoding by combining the special effect use condition of the original video data when the original video data is not marked with the import mark, and determines the code rate and key frame intervals corresponding to the original video data by combining the video parameter information and motion information of the original video data when transcoding processing is needed, and controls the transcoding of the original video data among frames according to the determined code rate and key, to output the target video data spaced from the bitrate and key frame. Therefore, whether the original video data need transcoding is determined by combining the condition of the original video data, and when transcoding is needed, the control of the code rate and the key frame interval in the transcoding process is realized by combining the video parameter information of the video data and the motion information of the electronic equipment, and the target data of which the code rate and the key frame interval accord with the video parameters and the motion information is transcoded.
It should be noted that, after adding special effects to the original video data through the short video application program, some of the added special effects (for example, a time special effect flashes, slow motions, etc.) may also affect the frame rate of the original video, and further affect the determined bitrate. Therefore, as an exemplary embodiment, in order to increase the determined bitrate corresponding to the original video data, special effect usage information of the original video data may also be acquired, and then, according to the video parameter information and the special effect usage information, the bitrate and the key frame interval corresponding to the original video data are determined.
In practical applications, generally, the higher the bitrate of a video, the higher the definition of the video, but the higher the performance requirement of the electronic device. Therefore, in order to enable electronic devices with various configurations to play corresponding video data, based on any of the above embodiments, before transcoding the original video data again, the embodiment of the present disclosure may further determine that a bitrate corresponding to the original video data is less than or equal to a preset bitrate threshold.
Specifically, whether the code rate exceeds a preset code rate threshold or not can be judged, if the code rate exceeds the preset code rate threshold, the code rate is adjusted to be the preset code rate threshold, and then, according to the key frame interval and the adjusted code rate, the original video data are transcoded again so as to output target video data corresponding to the key frame interval and the adjusted code rate.
If the code rate threshold is smaller than or equal to the preset code rate threshold, transcoding the original video data again directly, and outputting target video data corresponding to the code rate and the key frame interval.
The embodiment of the disclosure also provides a transcoding control device of video data.
Fig. 4 is a schematic structural diagram of a transcoding control apparatus for video data according to an embodiment of the present disclosure.
As shown in fig. 4, the apparatus for controlling transcoding of video data may include a first obtaining module 110, a first determining module 120, and a transcoding module 130, wherein:
the first obtaining module 110 is configured to obtain original video data to be processed.
The first determining module 120 is configured to determine a code rate and a key frame interval corresponding to original video data according to video parameter information of the original video data.
And the transcoding module 130 is configured to perform transcoding again on the original video data to output target video data corresponding to the bitrate and the key frame interval.
In an embodiment of the present disclosure, to avoid resource waste caused by transcoding the video data that meets the requirement, on the basis of fig. 4, as shown in fig. 5, the apparatus further includes:
a second determining module 140, configured to determine that the original video data needs to be re-transcoded.
In an embodiment of the disclosure, the second determining module 140 determines that the original video data needs to be transcoded again specifically by at least one of: identifying that the video frame rate of the original video data exceeds a preset frame rate threshold, and determining that the original video data needs to be transcoded again; identifying that the original video data is imported by a user, and determining that the original video data needs to be transcoded again; identifying a special effect or a preset special effect used by the original video data, and determining that the original video data needs to be transcoded again; and identifying that the size of the original video data exceeds a preset threshold value, and determining that the original video data needs to be transcoded again.
In one embodiment of the present disclosure, when recording video data, the motion information of the electronic device also affects the determined bitrate and the determined key frame interval, and therefore, as shown in fig. 5, the apparatus further includes:
the second obtaining module 150 is configured to obtain motion information of the electronic device when recording the original video data.
And the first determining module is further used for determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information and the motion information.
In another embodiment of the present disclosure, on the basis of the embodiment of the apparatus shown in fig. 5, as shown in fig. 6, the apparatus further includes:
a third obtaining module 160, configured to obtain special effect usage information of the original video data.
The first determining module 120 is further configured to determine a code rate and a key frame interval corresponding to the original video data according to the video parameter information and the special effect usage information.
In addition, as an exemplary embodiment, the apparatus may further include a fourth obtaining module (not shown in the figure), which is specifically configured to obtain motion information of the electronic device when recording the original video data, and obtain special effect usage information of the original video data.
Correspondingly, the first determining module 120 is further configured to determine a code rate and a key frame interval corresponding to the original video data according to the motion information, the special effect usage information, and the video information.
Based on any one of the above embodiments, the apparatus may further include: and a second determining module (not shown in the figure) for determining whether the code rate exceeds a preset code rate threshold. And an adjusting module (not shown in the figure) for adjusting the code rate to the preset code rate threshold if the code rate exceeds the preset code rate threshold.
A transcoding module having means for: and if the code rate threshold is less than or equal to the preset code rate threshold, transcoding the original video data again.
It should be noted that the foregoing explanation of the embodiment of the transcoding control method for video data is also applicable to the transcoding control apparatus for video data of this embodiment, and the implementation principle is similar, and is not repeated here.
The transcoding control device for video data determines a code rate and a key frame interval corresponding to original video data according to video parameter information of the original video data to be processed, and re-transcodes the original video data according to the code rate and the key frame interval to obtain target video data corresponding to the code rate and the key frame interval. Therefore, the code rate is controlled by combining the video parameter information of the video data to be processed, the code rate control in the transcoding process is realized, and the target video with the code rate and the key frame interval according with the video parameters is transcoded.
In order to implement the foregoing embodiments, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor, and is used to execute the transcoding control method for video data of the foregoing embodiments.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device includes:
memory 1001, processor 1002, and computer programs stored on memory 1001 and executable on processor 1002.
The processor 1002 executes the program to implement the transcoding control method of video data provided in the above-described embodiment.
Further, the electronic device further includes:
a communication interface 1003 for communicating between the memory 1001 and the processor 1002.
A memory 1001 for storing computer programs that may be run on the processor 1002.
Memory 1001 may include high-speed RAM memory and may also include non-volatile memory (e.g., at least one disk memory).
The processor 1002 is configured to implement the instant feedback method of recommendation information according to the above embodiment when executing a program.
If the memory 1001, the processor 1002, and the communication interface 1003 are implemented independently, the communication interface 1003, the memory 1001, and the processor 1002 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
Optionally, in a specific implementation, if the memory 1001, the processor 1002, and the communication interface 1003 are integrated on one chip, the memory 1001, the processor 1002, and the communication interface 1003 may complete communication with each other through an internal interface.
The processor 1002 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present disclosure.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware that is related to instructions of a program, and the program may be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (5)

1. A method for transcoding control of video data, comprising:
determining that the original video data needs to be re-transcoded, comprising: identifying that the original video data is imported by a user, and determining that the original video data needs to be transcoded again;
acquiring original video data to be processed;
determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information of the original video data;
transcoding the original video data again to output target video data corresponding to the code rate and the key frame interval;
the method further comprises the following steps:
acquiring special effect use information of the original video data;
determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information and the special effect use information;
acquiring motion information of the electronic equipment when recording the original video data;
and determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information and the motion information.
2. The method of claim 1, wherein the determining that the original video data requires re-transcoding comprises at least one of:
identifying that the video frame rate of the original video data exceeds a preset frame rate threshold, and determining that the original video data needs to be transcoded again;
identifying a special effect or a preset special effect used by the original video data, and determining that the original video data needs to be transcoded again;
and identifying that the size of the original video data exceeds a preset threshold value, and determining that the original video data needs to be transcoded again.
3. An apparatus for controlling transcoding of video data, comprising:
a second determining module, configured to determine that the original video data needs to be re-transcoded, including: identifying that the original video data is imported by a user, and determining that the original video data needs to be transcoded again;
the first acquisition module is used for acquiring original video data to be processed;
the first determining module is used for determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information of the original video data;
the transcoding module is used for transcoding the original video data again so as to output target video data corresponding to the code rate and the key frame interval;
the third acquisition module is used for acquiring special effect use information of the original video data;
the first determining module is further used for determining a code rate and a key frame interval corresponding to the original video data according to the video parameter information and the special effect use information;
the second acquisition module is used for acquiring the motion information of the electronic equipment when recording the original video data;
the first determining module is further configured to determine a code rate and a key frame interval corresponding to the original video data according to the video parameter information and the motion information.
4. An electronic device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform a method of transcoding video data as claimed in any of claims 1-2 above.
5. A computer-readable storage medium storing computer instructions for causing a computer to execute the method for controlling transcoding of video data according to any one of claims 1 to 2.
CN201910293268.1A 2019-04-12 2019-04-12 Transcoding control method and device for video data, electronic equipment and storage medium Active CN110062262B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910293268.1A CN110062262B (en) 2019-04-12 2019-04-12 Transcoding control method and device for video data, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910293268.1A CN110062262B (en) 2019-04-12 2019-04-12 Transcoding control method and device for video data, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110062262A CN110062262A (en) 2019-07-26
CN110062262B true CN110062262B (en) 2022-05-03

Family

ID=67318950

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910293268.1A Active CN110062262B (en) 2019-04-12 2019-04-12 Transcoding control method and device for video data, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110062262B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112702632B (en) * 2019-10-22 2022-12-30 中国移动通信集团吉林有限公司 Live program injection method, device, system, storage medium and computer equipment
CN111193924B (en) * 2019-12-26 2022-01-25 腾讯科技(深圳)有限公司 Method and device for determining video code rate, computer equipment and storage medium
CN111787328B (en) * 2020-07-27 2022-11-04 北京金山云网络技术有限公司 Video transcoding method and device, electronic equipment and storage medium
CN112165653B (en) * 2020-09-28 2022-04-15 中国建设银行股份有限公司 Video playing method, device and equipment
CN112492310A (en) * 2020-11-19 2021-03-12 创盛视联数码科技(北京)有限公司 Video transcoding method and device, electronic equipment and storage medium
CN112929701B (en) * 2021-02-04 2023-03-17 浙江大华技术股份有限公司 Video coding method, device, equipment and medium
CN114679592A (en) * 2022-02-07 2022-06-28 上海哔哩哔哩科技有限公司 Edge cluster scheduling method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101990087A (en) * 2010-09-28 2011-03-23 深圳中兴力维技术有限公司 Wireless video monitoring system and method for dynamically regulating code stream according to network state
CN102377730A (en) * 2010-08-11 2012-03-14 中国电信股份有限公司 Audio/video signal processing method and mobile terminal
CN103561279A (en) * 2013-10-10 2014-02-05 中兴通讯股份有限公司 Method and system for playing multi-media file and cloud transcoding service device
CN103581741A (en) * 2012-07-26 2014-02-12 三星电子(中国)研发中心 Special-effect playing device and method
CN103686227A (en) * 2012-09-17 2014-03-26 南京中兴力维软件有限公司 Method, device and system for capturing and coding audio/video of mobile terminal
CN104967893A (en) * 2014-07-10 2015-10-07 腾讯科技(北京)有限公司 Video generation method and apparatus for portable electronic equipment
CN107277568A (en) * 2017-08-16 2017-10-20 广州市千钧网络科技有限公司 A kind of plug-flow configuration parameter dynamic adjusting method and device
CN108040286A (en) * 2017-11-28 2018-05-15 北京潘达互娱科技有限公司 Video previewing method, device, electronic equipment and computer-readable recording medium
CN108737884A (en) * 2018-05-31 2018-11-02 腾讯科技(深圳)有限公司 A kind of content recordal method and its equipment, storage medium, electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010030569A2 (en) * 2008-09-09 2010-03-18 Dilithium Networks, Inc. Method and apparatus for transmitting video
CN101695129B (en) * 2009-10-09 2012-05-16 中兴通讯股份有限公司 Method and system for realizing video monitoring by mobile terminal supporting multimodes
KR101568063B1 (en) * 2013-11-06 2015-11-10 건국대학교 산학협력단 Method for transcoding mutimedia, and hadoop-based mulimedia transcoding system operating the same
CN104811747A (en) * 2015-04-27 2015-07-29 无锡天脉聚源传媒科技有限公司 Video transcode method and device
CN105898448A (en) * 2015-12-14 2016-08-24 乐视云计算有限公司 Submission method and device of transcoding attribute information

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102377730A (en) * 2010-08-11 2012-03-14 中国电信股份有限公司 Audio/video signal processing method and mobile terminal
CN101990087A (en) * 2010-09-28 2011-03-23 深圳中兴力维技术有限公司 Wireless video monitoring system and method for dynamically regulating code stream according to network state
CN103581741A (en) * 2012-07-26 2014-02-12 三星电子(中国)研发中心 Special-effect playing device and method
CN103686227A (en) * 2012-09-17 2014-03-26 南京中兴力维软件有限公司 Method, device and system for capturing and coding audio/video of mobile terminal
CN103561279A (en) * 2013-10-10 2014-02-05 中兴通讯股份有限公司 Method and system for playing multi-media file and cloud transcoding service device
CN104967893A (en) * 2014-07-10 2015-10-07 腾讯科技(北京)有限公司 Video generation method and apparatus for portable electronic equipment
CN107277568A (en) * 2017-08-16 2017-10-20 广州市千钧网络科技有限公司 A kind of plug-flow configuration parameter dynamic adjusting method and device
CN108040286A (en) * 2017-11-28 2018-05-15 北京潘达互娱科技有限公司 Video previewing method, device, electronic equipment and computer-readable recording medium
CN108737884A (en) * 2018-05-31 2018-11-02 腾讯科技(深圳)有限公司 A kind of content recordal method and its equipment, storage medium, electronic equipment

Also Published As

Publication number Publication date
CN110062262A (en) 2019-07-26

Similar Documents

Publication Publication Date Title
CN110062262B (en) Transcoding control method and device for video data, electronic equipment and storage medium
US10140105B2 (en) Converting source code
JP6466574B2 (en) Cloud streaming service system, cloud streaming service method using optimal GPU, and apparatus therefor
JP2005110215A (en) System for storing image data and method for forming image file container
EP3147905A1 (en) Bandwidth limited dynamic frame rate video trick play
CN109889894A (en) Media file coding/decoding method, device and storage medium
CN107220063B (en) Dynamic wallpaper generation method and device
CN105893161A (en) Method and apparatus for calling resource in software program
US10419798B2 (en) Method and apparatus for just-in-time transcoding
WO2016118668A1 (en) Multiple protocol media streaming
CN112995698A (en) Video playing method, client, service platform and intelligent conference system
CN109660859A (en) A kind of animated show method and mobile terminal
CN112138376A (en) Cloud game archiving method and device and electronic equipment
CN103685209A (en) A source-tracing processing method of Internet media files, a server, and a communication system
CN101692710A (en) Pseudo random number generator management method device and film grain simulation method device
CN111314737B (en) Video transcoding method and device
CN111126493B (en) Training method and device for deep learning model, electronic equipment and storage medium
CN110062278A (en) Video data issues method, apparatus, electronic equipment and storage medium
US10250405B2 (en) Advertisement management of internet communication with devices on a mobile platform
CN112449209B (en) Video storage method and device, cloud server and computer readable storage medium
CN112084445B (en) Information processing system, method, apparatus, and storage medium
CN109165023B (en) Method, device and equipment for modifying ISO (International organization for standardization) mirror image file
US20140293296A1 (en) Printing frames of a video
US20230121095A1 (en) Image capturing apparatus capable of guaranteeing authenticity of digital image, management system, control method, and storage medium
CN111246215A (en) Video format conversion method and terminal

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