WO2013107157A1 - 视频转换的方法及装置 - Google Patents
视频转换的方法及装置 Download PDFInfo
- Publication number
- WO2013107157A1 WO2013107157A1 PCT/CN2012/077799 CN2012077799W WO2013107157A1 WO 2013107157 A1 WO2013107157 A1 WO 2013107157A1 CN 2012077799 W CN2012077799 W CN 2012077799W WO 2013107157 A1 WO2013107157 A1 WO 2013107157A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- quality
- resolution
- video source
- video
- 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.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/115—Selection of the code volume for a coding unit prior to coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/154—Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/172—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/40—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/23418—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing 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/44008—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing 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/4402—Processing 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
Definitions
- the present invention relates to the field of digital media technologies, and in particular, to a video conversion method and apparatus.
- Video conversion technology is widely used in video broadcast transcoding, video surveillance, digital media adapters, and high-definition video conferencing.
- Video conversion refers to converting a video stream that has been compression-coded into another video stream to accommodate different network bandwidths, different terminal processing capabilities, and different user requirements.
- One of the current video conversion methods is that different resolutions are preset to correspond to different code rates, for example, a resolution of 320 * 240, a corresponding code rate of 1 00000 bits per second; and, for example, 640 * 480 , a corresponding code rate of 120000 Bits per second, etc., at the time of video conversion, the code rate corresponding to the resolution can be known according to the resolution to be converted, and the code rate corresponding to the resolution can be used as the output code rate when outputting the video.
- there is another video conversion method that divides the output bit rate into several grades according to actual needs, for example, the first file, the output code rate is 90% of the input code rate; the second file output code rate is 80 of the input code rate. %, etc., in the video conversion, according to actual needs, such as different transmission bandwidth, select different grades to select the output code rate.
- the video conversion method of the prior art uses a fixed relationship of resolution and code rate or a fixed relationship between transmission bandwidth and code rate to perform video. Conversion, the quality of the target video after video conversion cannot be guaranteed, which affects the user experience.
- the embodiment of the invention provides a method and a device for video conversion, which can solve the problem of low target video quality and poor user experience after video conversion in the prior art.
- a video conversion method including: receiving a video source, acquiring a compression distortion quality of a video source; acquiring the video according to a compression distortion quality of the video source a transcoding strategy corresponding to the compression distortion quality of the source, and determining, according to the transcoding policy, whether the video source needs to be transcoded; if the video source needs transcoding, generating a transcoding parameter according to the transcoding policy,
- the transcoding strategy includes a target video quality, and the transcoding parameters include a target resolution, a target frame rate, and a target code rate;
- a device for video conversion comprising: a video source receiving unit, configured to receive a video source, and obtain a compression distortion quality of the video source; and a transcoding strategy acquiring unit, configured to acquire and describe the compression distortion quality according to the video source a transcoding strategy corresponding to the compression distortion quality of the video source, and determining, according to the transcoding policy, whether the video source needs to be transcoded; and a generating unit, configured to: if the video source needs to be transcoded, according to the transcoding strategy Generating a transcoding parameter, where the transcoding strategy includes a target video quality, where the transcoding parameter includes a target resolution, a target frame rate, and a target code rate;
- a transcoding unit configured to convert the video source according to the target resolution, the target frame rate, and the target bit rate, to generate a transcoded video.
- the method and device for video conversion provided by the embodiment of the present invention, by receiving a video source, Obtaining a compression distortion quality of the video source, and obtaining a corresponding transcoding policy, determining, by the transcoding policy, whether the video source needs to be transcoded, and if the video source needs to be transcoded, according to the
- the code strategy generates a transcoding parameter, and converts the video source according to the transcoding parameter, so that after the video source is converted, the target video quality is high, and the user experience is improved.
- the video conversion method and apparatus provided by the embodiments of the present invention can solve the problem that the target video quality is low and the user experience is poor after the video conversion in the prior art.
- FIG. 1 is a flowchart of a method for video conversion according to an embodiment of the present invention
- FIG. 2 is a flowchart of a method for video conversion according to another embodiment of the present invention.
- FIG. 3 is a flowchart of a method for video conversion according to another embodiment of the present invention.
- FIG. 4 is a schematic structural diagram 1 of a device for video conversion according to an embodiment of the present invention
- FIG. 5 is a schematic structural diagram 2 of a device for video conversion according to an embodiment of the present invention.
- the execution method of the video conversion method provided by the embodiment of the present invention is a video conversion device, which can be applied to a network device (such as a network server) or a terminal device (such as a mobile phone mobile terminal, a tablet computer, a notebook computer). Wait) .
- a network device such as a network server
- a terminal device such as a mobile phone mobile terminal, a tablet computer, a notebook computer. Wait
- the method for video conversion provided by the embodiment of the present invention includes: Step 1 01: Receive a video source, and obtain a compression distortion quality of the video source.
- Compression distortion is the distortion caused by video coding compression, which is the basis of different video frequencies that are encoded at different code rates and only considers the compression of the underlying video quality.
- the method before the receiving the video source, acquiring the compression distortion quality of the video source, the method further includes: setting a correspondence between the compression distortion quality and the transcoding policy, where the specific implementation manner may be acquiring terminal information of multiple terminals, for example, Get information on the resolution of various mobile phones, tablets, laptops, etc., but not limited to this.
- Step 1 02 Obtain a transcoding policy corresponding to the compression distortion quality of the video source according to the compression distortion quality of the video source, and determine, according to the transcoding policy, whether the video source needs to be transcoded.
- Step 1 03 If the video source needs to be transcoded, generate a transcoding parameter according to the transcoding policy.
- the transcoding policy includes a target video quality, and the transcoding parameters include a target resolution, a target frame rate, and a target code rate. If the video source does not need to be transcoded, when the video source is needed, the code stream of the video source is directly output.
- Step 1 04 Convert the video source according to the target resolution, the target frame rate, and the target bit rate to generate a transcoded video.
- the transcoding type that can be used to convert the video source is real-time transcoding and offline switching. Code or multi-stream encoding, but not limited to this. Further, if the compression distortion quality of the video source corresponds to a transcoding strategy with multiple grades, the video source is converted into one or more transcoded videos corresponding to the transcoding strategy of the one or more grades, Obtaining terminal information, where the terminal information includes a resolution and a frame rate of the terminal; and acquiring a transcoded video corresponding to the resolution of the terminal according to the resolution and the frame rate of the terminal.
- the transcoded video with the resolution closest to or equal to 320 * 240 and the frame rate closest to or equal to 60f ps is obtained.
- the method for video conversion provided by the embodiment of the present invention is to obtain a corresponding transcoding policy by receiving a video source and obtaining a compression distortion quality of the video source, and determining, by the transcoding policy, whether the video source needs to be transcoded. Transmitting a transcoding parameter according to the transcoding policy, and converting the video source according to the transcoding parameter, so that the target video quality is higher after the video source is converted, where the video source needs to be transcoded. , improving the user experience.
- the video conversion method and apparatus provided by the embodiments of the present invention can solve the problem that the target video quality is low and the user experience is poor after the video conversion in the prior art.
- a method for video conversion according to another embodiment of the present invention in which the current network bandwidth is unknown, the method includes:
- Step 201 Receive a video source, and obtain a video stream parameter value of the video source.
- the video stream parameter value includes a code rate of the video source, a resolution of the video source, and a frame rate of the video source.
- Step 202 Obtain a distortion parameter corresponding to a resolution of the video source according to a resolution of the video source.
- the distortion parameter includes a highest quality of the video sequence, a code rate point of the average score of the subjective points of the video sequence, an adjustment factor, and a complexity factor.
- Step 2 03 Acquire a compression distortion quality of the video source according to a code rate of the video source and a highest quality of the video sequence, a code rate point of an average score of the subjective points of the video sequence, an adjustment factor, and a complexity factor.
- the acquiring the compression distortion model video quality of the video source may specifically adopt a compression distortion model formula
- ⁇ / y ee . ⁇ g is the compression distortion quality of the video source
- a, b, c, and ⁇ are the distortion parameters corresponding to the resolution of the video source
- ⁇ is the highest quality of the video sequence
- b is the code rate point of the average score of the subjective points of the video sequence
- c To adjust the factor
- ⁇ is the complexity factor
- b ⁇ ra ⁇ is the code rate of the video source.
- a, b, c, and ⁇ can have different values for different resolutions of the video source, but are not limited to this.
- the complexity factor ⁇ may be generated according to a code rate, a frame type, and a frame size of the video source, and the value range is [- 1, 1 ]. When the range is exceeded, the [_1, 1 ] is intercepted.
- the complexity factor ⁇ can be based on a formula
- Bitrate is the code rate of the video source
- ⁇ —size is the size of the video source/frame, which may be the size of one I frame in the video source, or the average of the size of any multiple I frames
- P— Size is the size of the frame in the video source. It can be the size of a frame in the video source, or the average of the size of any number of / 5 frames.
- W is the spatial complexity factor, the space complexity adjustment factor, and the time.
- the complexity factor and b2 are time complexity adjustment factors. For different video sources or different video sources, al, a2, bl, and b2 may have different values, but are not limited thereto.
- the compression distortion quality of the video source may be represented by a score when actually represented. For example, if the 5-point scale is used, the value range is [1, 5]. When the range is exceeded, [1, 5] is intercepted. For example, if the calculated score is 6 points, the value is 5 points.
- Step 204 Obtain a corresponding transcoding policy according to a compression distortion quality of the video source and a resolution of the video source, and determine, according to the transcoding policy, whether the video source needs to be transcoded.
- the corresponding transcoding strategy when the corresponding transcoding strategy is obtained according to the compression distortion quality of the video source and the resolution of the video source, the resolution of the terminal with a lower resolution may be used as the lowest resolution or the previous one. The experience value is used as the lowest resolution.
- the corresponding transcoding strategy is selected according to the resolution of the video source and the minimum resolution, but is not limited thereto. Step 205: If the video source needs to be transcoded, generate a target resolution and a target frame rate according to the transcoding policy and a resolution of the video source and a frame rate of the video source.
- the transcoding policy has a correspondence between a resolution of the video source and a target resolution, and a correspondence between a frame rate of the video source and a target frame rate, and the video source distinguishes as shown in Table 1.
- the target video quality reaches 3 or greater than 3 points 1
- the frame rate is halved, and the target video quality is less than or equal to 4 points 2
- the target video quality is 3 greater than 4 points 2
- the frame rate is halved, and the target video quality is up to
- the frame rate is halved, and the target video quality is less than or equal to 4 points 2
- the target video quality reaches 4 points.
- the resolution of the video source is halved, the frame rate is unchanged, and the target video quality is greater than 4 points.
- Step 206 Determine whether the leveling of n is the same. If
- Step 207 is performed. Otherwise, step 208 is performed.
- the target video quality is a target compression distortion quality, acquiring a distortion parameter corresponding to the target resolution according to the target resolution, and generating a target according to the target compression distortion quality and a distortion parameter corresponding to the target resolution. Code rate. Go to step 213.
- different distortion parameters can be obtained according to different target resolutions, but it is not limited to this.
- the generating a target code rate according to the target compression distortion quality and the distortion parameter may specifically adopt a compression distortion model formula a-I
- the target video quality is a target frame rate distortion quality
- the rate and the distortion parameter corresponding to the target resolution generate a target code rate.
- the generating a target code rate according to the target frame rate distortion quality, a target frame rate, and the distortion parameter may be specifically determined by the following formula: a compression distortion model formula: Resolution distortion model formula:
- Quality resolution Quality encoding * (p * scale + q) Frame rate distortion model formula:
- Quality framerate Quality resolution * (m * In (- -) + )
- the factor in the resolution distortion model formula has no influence on the size of the generated target code rate, that is, the resolution distortion model formula:
- PCT/CN2012/077799 means that when the resolution is constant, the resolution distortion quality is equal to the compression distortion quality.
- the target code rate is: , ° bitraie
- the target video quality of the eight fans is the target dance rate distortion quality. According to the target, the distortion parameter corresponding to the target resolution is taken, and the distortion is determined according to the target.
- Cup ⁇ code rate points The execution step is based on frequency 2 source 1 3 .
- the resolution and the distortion parameter corresponding to the target resolution are generated, and the target is generated according to the target potassium-disorder distortion quality, the target resolution, the split rate of the video source, and the distortion parameter corresponding to the target resolution.
- the code rate can be specified by the following formula:
- the resolution distortion quality is:
- Titrate ⁇ * ( ⁇ ⁇ ) c
- the target video quality is the target frame rate distortion quality
- the distortion parameter corresponding to the target resolution is obtained according to the target resolution, according to the target frame rate distortion quality
- the target resolution, the target frame rate, the resolution of the video source, and the distortion parameter corresponding to the target resolution generate a target code rate.
- the generating the target code rate according to the target frame rate distortion quality, the target resolution, the target frame rate, the resolution of the video source, and the distortion parameter may be specifically determined by the following formula: Distortion model formula: Resolution distortion model formula:
- Quality resolution Quality encoding * (p * scale + q) Frame rate distortion model formula:
- the target bit rate Titrate ⁇ * ( Q ⁇ )
- Framerate is the target rate.
- the target compression distortion quality increases as the code rate increases until a maximum value decreases as the complexity factor increases; the target resolution distortion quality follows the target resolution Decreased as the ratio of the resolution of the video source increases.
- Step 21 Convert the video source according to the target resolution, the target frame rate, and the target bit rate to generate a transcoded video.
- the transcoding type that can be used to convert the video source is real-time transcoding, offline transcoding, or multi-code stream encoding, but is not limited thereto.
- Step 214 Store the transcoded video or send the transcoded video to the terminal.
- a video conversion method by receiving a video source, obtaining a compression distortion quality of the video source, and acquiring a corresponding transcoding policy, determining, by the transcoding policy, whether the video source needs Transcoding, in the case that the video source needs to be transcoded, generate a transcoding parameter according to the transcoding policy, and convert the video source according to the transcoding parameter, so that the target video quality after the video source is converted Higher, improving the user experience.
- the video conversion method and apparatus provided by the embodiments of the present invention can solve the problem that the target video quality is low and the user experience is poor after the video conversion in the prior art.
- a method for video conversion according to another embodiment of the present invention in which a current network bandwidth is known, the method includes:
- Step 301 Receive a video source, and obtain a video stream parameter value of the video source.
- the video stream parameter value includes a code rate of the video source, a resolution of the video source, and a frame rate of the video source. For details, refer to step 201 in Figure 2, and details are not described here.
- Step 302 Obtain a distortion parameter corresponding to a resolution of the video source according to a resolution of the video source.
- the distortion parameter includes a highest quality of the video sequence, a code rate point of the average score of the subjective points of the video sequence, an adjustment factor, and a complexity factor. For details, refer to step 202 in Figure 2, and details are not described here.
- Step 303 According to the code rate of the video source and the highest quality of the video sequence, the video sequence is The code rate point, the adjustment factor, and the complexity factor of the average score of the score are obtained to obtain the compression distortion quality of the video source.
- the code rate point, the adjustment factor, and the complexity factor of the average score of the score are obtained to obtain the compression distortion quality of the video source.
- Step 304 Obtain a transcoding policy corresponding to a compression distortion quality of the video source according to a compression distortion quality of the video source, and determine, according to the transcoding policy, whether the video source needs to be transcoded.
- Step 305 If the video source needs to be transcoded, generate a target code rate according to the transcoding policy and the network bandwidth.
- the transcoding policy has a corresponding relationship between the network bandwidth and the target code rate set in advance.
- the transcoding strategy includes a target video quality.
- the target video quality includes target compression distortion quality, target resolution distortion quality, and target frame rate distortion quality. Specifically, when the target code rate is set, the target code rate is smaller or equal to the network bandwidth.
- Model video quality is less than 3 minutes 0 No transcoding operation
- the target video quality is greater than or equal to 3 points 1
- the target video is greater than 4 points 1
- Step 306 According to the distortion number, the target resolution distortion quality, and the target according to the target Wherein, according to the distortion number, the target resolution distortion quality, and the target of the target, the following formula may be specifically adopted: a compression distortion model formula:
- Quality resolution Quality encoding * (p * scale + q) Quality resolution
- Step 307 Generate the target frame rate according to the distortion parameter, the target frame rate distortion quality, and the target code rate.
- the resolution distortion quality is equal to the compression distortion quality.
- the frame rate distortion quality is equal to the resolution distortion quality.
- Qitality resohltion is the target resolution distortion quality
- Qucdityf is the target frame rate distortion quality
- abc » dpq and ⁇ are the distortion parameters
- a is the highest quality of the video sequence
- b is the average score of the subjective points of the video sequence Rate point
- c is the adjustment factor / is the complexity factor
- ⁇ is the resolution scaling factor
- q is the resolution scaling adjustment factor
- m is the frame rate attenuation factor
- « is the frame rate attenuation adjustment factor
- b Urate is the target code Rate
- scale is the ratio of the target resolution to the resolution of the video source;
- Framerate is the target rate.
- the target compression distortion quality increases as the code rate increases until a maximum value decreases as the complexity factor increases; the target resolution distortion quality follows the target resolution and the video source Decrease in the ratio of resolution; As the resolution increases, the influence of the frame rate on the video quality will become larger. That is, as the resolution increases, the smaller the frame rate, the larger the frame rate attenuation factor, and the worse the frame rate distortion quality.
- Step 308 Convert the video source according to the target resolution, the target frame rate, and the target code rate to generate a transcoded video.
- the target resolution the target resolution
- the target frame rate the target frame rate
- the target code rate the target code rate
- the transcoding type that can be used to convert the video source is real-time transcoding, offline transcoding, or multi-code stream encoding, but is not limited thereto.
- Step 309 Store the transcoded video or send the transcoded video to the terminal.
- Step 214 in Figure 2 For the specific implementation, refer to step 214 in Figure 2, and details are not described herein.
- the method for video conversion according to another embodiment of the present invention is to obtain a corresponding transcoding policy by receiving a video source and obtaining a compression distortion quality of the video source, and determining, by the transcoding policy, whether the video source needs to be Transcoding, in the case that the video source needs to be transcoded, generate a transcoding parameter according to the transcoding policy, and convert the video source according to the transcoding parameter, so that the target video quality after the video source is converted Higher, improving the user experience.
- the video conversion method and apparatus provided by the embodiments of the present invention can solve the problem that the target video quality is low and the user experience is poor after the video conversion in the prior art.
- formulas provided in the embodiments of the present invention may be in an additive form, a product form, or a combination of an additive form and a product form, but are not limited thereto.
- each formula provided by the embodiment of the present invention is performed in a video conversion device, and the video conversion device can be applied to a network device (such as a network server) or a terminal device (such as a mobile phone mobile terminal or a tablet). Computer, laptop, etc.). If the computing capability of the network device or the terminal device is poor and cannot meet the computing requirement, the corresponding relationship between the operation result and the known condition may be set in advance by using each formula provided by the solution, and the corresponding relationship may be found by using the corresponding relationship. To the desired result of the operation, but not limited to this. As shown in FIG.
- an apparatus for video conversion includes: a video source receiving unit 41, configured to receive a video source, and obtain a compression distortion quality of the video source. the amount.
- the transcoding policy obtaining unit 42 is configured to obtain, according to the compression distortion quality of the video source, a transcoding policy corresponding to the compression distortion quality of the video source, and determine, according to the transcoding policy, whether the video source needs to be rotated. code.
- the generating unit 43 is configured to generate a transcoding parameter according to the transcoding policy if the video source needs to be transcoded.
- the transcoding policy includes a target video quality, and the transcoding parameters include a target resolution, a target frame rate, and a target code rate.
- the transcoding unit 44 is configured to convert the video source according to the target resolution, the target frame rate, and the target bit rate to generate a transcoded video.
- the device for video conversion provided by the embodiment of the present invention may be applied to a network device (such as a network server) or a terminal device (such as a mobile phone mobile terminal, a tablet computer, a notebook computer, etc.), but is not limited thereto. Further, as shown in FIG.
- the method further includes: a setting unit 45, configured to set a correspondence between the compression distortion quality and the transcoding policy.
- the setting unit 45 includes: an obtaining module 451, configured to acquire terminal information of multiple terminals.
- the setting module 452 is configured to set a correspondence between the compression distortion quality and the transcoding policy according to the terminal information of each terminal.
- the setting module 452 is configured to set a correspondence between the compression distortion quality and the transcoding policy according to the terminal information of each terminal.
- the video source receiving unit 41 includes: a parameter value obtaining module 411, configured to acquire a video code stream parameter value of the video source, where the video code stream parameter value includes a video source. Rate, the resolution of the video source, and the frame rate of the video source.
- the distortion parameter obtaining module 412 is configured to obtain, according to the resolution of the video source, a distortion parameter corresponding to a resolution of the video source, where the distortion parameter includes a code of a highest quality of the video sequence and an average score of the subjective points of the video sequence. Rate point, adjustment factor and complexity factor.
- a parameter value obtaining module 411 configured to acquire a video code stream parameter value of the video source, where the video code stream parameter value includes a video source.
- Rate the resolution of the video source
- the frame rate of the video source for the specific implementation, refer to step 201 in Figure 2, and details are not described herein.
- the distortion parameter obtaining module 412 is configured to obtain, according to the resolution of the video source, a distortion parameter corresponding to a resolution
- the compression distortion quality acquisition module 413 is configured to acquire compression distortion quality of the video source according to a code rate of the video source and a highest quality of the video sequence, a code rate point of an average score of the subjective points of the video sequence, an adjustment factor, and a complexity factor. .
- a code rate of the video source corresponds to a code rate of the video source and a highest quality of the video sequence, a code rate point of an average score of the subjective points of the video sequence, an adjustment factor, and a complexity factor.
- the compression distortion quality of the video source corresponds to one or more grade transcoding strategies, the video source is converted into one or more transitions with the one or more grades.
- the transcoding video corresponding to the code policy further includes: a transcoding video selecting unit 46, configured to acquire terminal information, where the terminal information includes a resolution and a frame rate of the terminal, and according to the resolution of the terminal The rate and frame rate acquire a transcoded video corresponding to the resolution of the terminal.
- a transcoding video selecting unit 46 configured to acquire terminal information, where the terminal information includes a resolution and a frame rate of the terminal, and according to the resolution of the terminal The rate and frame rate acquire a transcoded video corresponding to the resolution of the terminal.
- the first parameter value obtaining unit 47 is configured to obtain a video code stream parameter value of the video source, where the video code stream parameter value includes a code rate of the video source, a resolution of the video source, and a frame rate of the video source.
- the generating unit 43 includes: a first generating module 431, configured to generate a target resolution according to the transcoding policy, a resolution of the video source, and a frame rate of the video source, if the video source needs to be transcoded Target frame rate.
- the second generation module 432 is configured to generate a target code rate according to the target resolution, the target frame rate, and the target video quality. For the specific implementation, refer to steps 209-212 in Figure 2, and details are not described herein. Further, as shown in FIG.
- the transcoding policy obtaining unit 42 includes: a transcoding policy acquiring module 421, configured to acquire a corresponding retransmission according to a compression distortion quality of the video source and a resolution of the video source. Code strategy.
- the second generation module 432 includes: a first generation submodule 4321, configured to: if the target resolution and the resolution of the video source compress the distortion quality, according to the The target resolution acquires a corresponding distortion parameter, and generates a target code rate according to the target compression distortion quality and the distortion parameter.
- a transcoding policy acquiring module 421 configured to acquire a corresponding retransmission according to a compression distortion quality of the video source and a resolution of the video source. Code strategy.
- the second generation module 432 includes: a first generation submodule 4321, configured to: if the target resolution and the resolution of the video source compress the distortion quality, according to the The target resolution acquires a corresponding distortion parameter, and generates a target code rate according to the target compression distortion quality and the distortion parameter.
- a second generation sub-module 4322 configured to acquire a corresponding distortion parameter according to the target resolution, if the target resolution and the resolution target resolution distortion quality of the video source, according to the The target resolution distortion quality, the target resolution, the resolution of the video source, and the distortion parameter generate a target code rate.
- a third generation submodule 4323 configured to acquire a corresponding distortion parameter according to the target resolution according to the target resolution and a resolution target frame rate distortion quality of the video source, according to the target frame rate distortion quality, The target frame rate and the distortion parameter generate a target code rate.
- step 21 0 in Figure 2 and details are not described herein.
- a fourth generation sub-module 4324 configured to acquire a corresponding distortion parameter according to the target resolution, if the target resolution and the resolution of the video source are the target frame rate distortion quality, according to the target frame rate distortion quality,
- the target resolution, the target frame rate, the resolution of the video source, and the distortion parameter generate a target code rate.
- the generating unit 43 includes: a network bandwidth acquiring module 433, configured to acquire a current network bandwidth.
- the third generation module 434 is configured to generate a target code rate according to the transcoding policy and the network bandwidth.
- the fourth generation module 435 is configured to generate a target resolution and a target frame rate according to the target video quality and the target code rate. For the specific implementation, refer to steps 306-307 in Figure 3, and details are not described herein.
- the method includes: The second parameter value obtaining unit 48 is configured to obtain a video code stream parameter value of the video source, where the video code stream parameter value includes a code rate of the video source, a resolution of the video source, and a frame rate of the video source. For details, refer to step 301 in Figure 3, and details are not described herein. Further, as shown in FIG.
- the fourth generation module 435 includes: a distortion parameter acquisition sub-module 4351, configured to acquire a corresponding distortion parameter according to a resolution of the video source. For details, refer to step 302 in Figure 3, and details are not described herein. a fifth generation sub-module 4352, configured to generate a target resolution according to the distortion parameter, the target resolution distortion, and a ratio of the target resolution to a resolution of the video source and a resolution of the video source. . For details, refer to step 306 in Figure 3, and details are not described herein.
- the sixth generation submodule 4353 is configured to generate the target frame rate according to the distortion parameter, the target frame rate distortion quality, and the target code rate. For details, refer to step 307 in Figure 3, and details are not described here.
- the device for video conversion receives the video source through the video source receiving unit, and obtains the compression distortion quality of the video source, and then obtains a corresponding transcoding policy by using the transcoding policy acquiring unit, and performs the transcoding through the transcoding.
- the policy determines whether the video source needs to be transcoded. In a case that the video source needs to be transcoded, the generating unit generates a transcoding parameter according to the transcoding policy, and the transcoding unit converts the video source according to the transcoding parameter. After the video source is converted, the target video quality is high, which improves the user experience. Compared with the prior art, the present invention can solve the problem that the target video quality is low and the user experience is poor after the video conversion in the prior art.
- the present invention can be implemented by means of software plus necessary general hardware, and of course, by hardware, but in many cases, the former is a better implementation. .
- the technical solution of the present invention may be in the form of a software product in essence or in part contributing to the prior art.
- the computer software product is stored in a readable storage medium, such as a floppy disk, a hard disk or an optical disk of a computer, and includes a plurality of instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.)
- a computer device which may be a personal computer, a server, a network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
本发明公开了一种视频转换的方法及装置,涉及数字媒体技术领域,解决了现有技术中的视频转换后,目标视频质量低、用户体验差的问题。技术方案包括:接收视频源,获取视频源的压缩失真质量,根据视频源的压缩失真质量获取与视频源的压缩失真质量相对应的转码策略,并根据转码策略判断视频源是否需要转码,若视频源需要转码,根据转码策略生成转码参数,转码策略包括目标视频质量,转码参数包括目标分辨率、目标帧率以及目标码率,根据目标分辨率、目标帧率以及目标码率转换视频源,生成转码视频。本发明能够应用于网络设备(如网络服务器)或终端设备(如手机移动终端、平板电脑、笔记本电脑)中。
Description
视频转换的方法及装置 本申请要求于 2 01 2 年 01 月 1 9 日提交中国专利局、 申请号为 2 01 2 1 001 775 1 . 5 , 发明名称为 "视频转换的方法及装置" 的中国专 利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及数字媒体技术领域, 尤其涉及一种视频转换的方法及装 置。
背景技术
视频转换技术广泛应用于视频广播转码、视频监控、数字媒体适配器、 及高清视频会议等场景中。视频转换是指将已经压缩编码的视频码流转换 为另一个视频码流, 以适应不同的网络带宽、 不同的终端处理能力及不同 的用户需求等。
当前的视频转换方法中,有一种是预先设置了不同的分辨率对应于不 同的码率, 例如分辨率 320 * 240 , 对应码率 1 00000 比特每秒; 又例如 640 * 480 , 对应码率 120000比特每秒等, 在视频转换时根据要转换成的分 辨率, 即可获知所述分辨率对应的码率, 在输出视频时以所述分辨率对应 的码率作为输出码率即可。 另外, 还有一种视频转换方法按照实际需求, 将输出码率划分为几个档次, 例如第一档, 输出码率为输入码率的 90% ; 第二档输出码率为输入码率的 80%等, 则在视频转换时, 根据实际需求, 例如不同传输带宽情况下, 选择不同的档次进行输出码率的选择。
在实现本发明实施例的过程中,发明人发现现有技术中至少存在如下 问题:现有技术的视频转换方法采用分辨率和码率的固定关系或传输带宽 与码率的固定关系来进行视频转换, 无法保证视频转换后的目标视频质 量, 影响了用户的体验。
发明内容
本发明实施例提供一种视频转换的方法及装置,能够解决现有技术中 的视频转换后, 目标视频质量低、 用户体验差的问题。
为达到上述目的, 本发明的实施例采用如下技术方案: 一种视频转换的方法, 包括: 接收视频源, 获取视频源的压缩失真质量; 根据所述视频源的压缩失真质量获取与所述视频源的压缩失真质量 相对应的转码策略, 并根据所述转码策略判断所述视频源是否需要转码; 若所述视频源需要转码, 根据所述转码策略生成转码参数, 所述转码 策略包括目标视频质量, 所述转码参数包括目标分辨率、 目标帧率以及目 标码率;
根据所述目标分辨率、 目标帧率以及目标码率转换所述视频源, 生成 转码视频。 一种视频转换的装置, 包括: 视频源接收单元, 用于接收视频源, 并获取视频源的压缩失真质量; 转码策略获取单元, 用于根据所述视频源的压缩失真质量获取与所述 视频源的压缩失真质量相对应的转码策略,并根据所述转码策略判断所述 视频源是否需要转码; 生成单元, 用于若所述视频源需要转码, 根据所述转码策略生成转码 参数, 所述转码策略包括目标视频质量, 所述转码参数包括目标分辨率、 目标帧率以及目标码率;
转码单元, 用于根据所述目标分辨率、 目标帧率以及目标码率转换所 述视频源, 生成转码视频。
本发明实施例提供的视频转换的方法及装置, 由于通过接收视频源,
并获取得到视频源的压缩失真质量, 进而获取相应的转码策略, 通过所述 转码策略判断所述视频源是否需要转码, 在所述视频源需要转码的情况 下, 根据所述转码策略生成转码参数, 并根据所述转码参数转换所述视频 源, 使得所述视频源转换后, 目标视频质量较高, 提高了用户的体验。 与 现有技术相比,本发明实施例提供的视频转换的方法及装置能够解决现有 技术中的视频转换后, 目标视频质量低、 用户体验差的问题。
附图说明 实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员 来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的 附图。
图 1为本发明实施例提供的视频转换的方法的流程图;
图 2为本发明又一实施例提供的视频转换的方法的流程图;
图 3为本发明另一实施例提供的视频转换的方法的流程图;
图 4为本发明实施例提供的一种视频转换的装置的结构示意图一; 图 5为本发明实施例提供的一种视频转换的装置的结构示意图二。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进 行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没 有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的 范围。
为使本发明技术方案的优点更加清楚,下面结合附图和实施例对本发 明作伴细说明。
值得说明的是,本发明实施例提供的视频转换的方法的执行主体为一 种视频转换的装置,可以应用在网络设备(如网络服务器)或终端设备(如 手机移动终端、 平板电脑、 笔记本电脑等) 。
如图 1所示, 本发明实施例提供的视频转换的方法, 所述方法包括: 步骤 1 01、 接收视频源, 获取视频源的压缩失真质量。
压缩失真是由于视频编码压缩造成的失真,所述压缩失真质量是不同 视频源编码为不同码率后只考虑压缩的基础视频质量。
具体的,在所述接收视频源,获取视频源的压缩失真质量之前还包括: 设置压缩失真质量与所述转码策略的对应关系,其具体实现方式可以 为获取多个终端的终端信息, 例如获取到各种手机、 平板电脑、 笔记本电 脑等的分辨率等信息, 但不仅局限于此。
根据每个终端的终端信息设置压缩失真质量与所述转码策略的对应 关系。 例如根据手机一的终端信息, 在压缩失真质量为 3分的情况下, 设 置转码策略为策略一; 而根据平板电脑一的终端信息, 在压缩失真质量为 3分的情况下, 设置转码策略为策略二; 由于手机一与平板电脑一的终端 信息不相同, 则在压缩失真质量都是 3分的情况下, 所述策略一与策略二 可以不相同, 但不仅局限于此。 步骤 1 02、 根据所述视频源的压缩失真质量获取与所述视频源的压缩 失真质量相对应的转码策略,并根据所述转码策略判断所述视频源是否需 要转码。 步骤 1 03、 若所述视频源需要转码, 根据所述转码策略生成转码参数。 其中, 所述转码策略包括目标视频质量, 所述转码参数包括目标分辨 率、 目标帧率以及目标码率。 其中, 若所述视频源不需要转码, 则在需要所述视频源时, 直接输出 所述视频源的码流。
步骤 1 04、 根据所述目标分辨率、 目标帧率以及目标码率转换所述视 频源, 生成转码视频。
其中, 所述转换所述视频源可以采用的转码类型为实时转码、 离线转
码或多码流编码, 但不仅局限于此。 进一步的, 若所述视频源的压缩失真质量对应有多个档次的转码策 略,所述视频源转换为一个或多个与所述一个或多个档次的转码策略对应 的转码视频,获取终端信息,所述终端信息包括所述终端的分辨率及帧率; 根据所述终端的分辨率及帧率获取与所述终端的分辨率对应的转码 视频。 例如若手机的分辨率为 320 * 240 , 帧率为 60f p s , 则在获取转码视 频时, 获取分辨率最接近或者等于 320 * 240 , 帧率最接近或者等于 60f ps 的转码视频。
本发明实施例提供的视频转换的方法, 由于通过接收视频源, 并获取 得到视频源的压缩失真质量, 进而获取相应的转码策略, 通过所述转码策 略判断所述视频源是否需要转码, 在所述视频源需要转码的情况下, 根据 所述转码策略生成转码参数, 并根据所述转码参数转换所述视频源, 使得 所述视频源转换后, 目标视频质量较高, 提高了用户的体验。 与现有技术 相比,本发明实施例提供的视频转换的方法及装置能够解决现有技术中的 视频转换后, 目标视频质量低、 用户体验差的问题。
为了使本发明实施例更加清楚,下面针对本发明实施例做更详细的说 明。
如图 2所示, 本发明又一实施例提供的视频转换的方法, 在所述方法 中, 当前的网络带宽未知, 所述方法包括:
步骤 201、 接收视频源, 获取所述视频源的视频码流参数值。
其中, 所述视频码流参数值包括视频源的码率、视频源的分辨率和视 频源的帧率。
步骤 202、 根据所述视频源的分辨率获取得到与所述视频源的分辨率 对应的失真参数。
其中, 所述失真参数包括视频序列最高质量、 视频序列主观分的平均 分的码率点、 调节因子及复杂度因子。
步骤 2 03、 根据所述视频源的码率及视频序列最高质量、 视频序列主 观分的平均分的码率点、调节因子及复杂度因子获取所述视频源的压缩失 真质量。 具体的, 所述获取视频源的压缩失真模型视频质量, 具体可以通过压 缩失真模型公式
Quality =
得到, 但不仅局限于此。 此处, ^/ yee。^g为视频源的压缩失真质量, a、 b、 c及 ί 为视频源的分辨率对应的失真参数, α为视频序列最高质量、 b 为视频序列主观分的平均分的码率点、 c为调节因子、 ί 为复杂度因子, b^ra^为视频源的码率。 a、 b、 c及 ί 对于视频源的不同分辨率可以有不 同的值, 但不仅局限于此。
其中, 所述复杂度因子 ί 可以根据视频源的码率、 帧类型、 帧大小进 行生成, 其取值范围为 [- 1, 1 ] , 当超出该范围时, 截取到 [_1,1 ] , 所述复 杂度因子 ί 可以根据公式
d = al , b r^ + a2 + bl , P_siz + b2
I _ size I _ size
得到, 但不仅局限于此。
其中, bitrate为视频源的码率; Ι—size为视频源中 /帧的大小, 可以 是视频源中某一个 I帧的大小, 也可以是任意多个 I帧的大小的平均值; P—size为视频源中 帧的大小, 可以是视频源中某一个 帧的大小, 也 可以是任意多个/5帧的大小的平均值; W为空间复杂度因子、 为空间 复杂度调整因子、 时间复杂度因子、 b2为时间复杂度调整因子, 对于 不同的视频源或不同的视频源的分辨率, al、 a2、 bl、 b2 可以有不同的 取值, 但不仅局限于此。
其中,所述视频源的压缩失真质量在实际表示时,可以采用评分表示,
例如采用 5分制, 则取值范围为 [ 1, 5] , 当超出该范围时, 截取到 [ 1,5 ] , 例如若计算得到的评分为 6分, 则取值为 5分。
步骤 204、 根据所述视频源的压缩失真质量以及所述视频源的分辨率 获取相应的转码策略, 并根据所述转码策略判断所述视频源是否需要转 码。
可选的,在根据所述视频源的压缩失真质量以及所述视频源的分辨率 获取相应的转码策略,可以以某个分辨率较低的终端的分辨率作为最低分 辨率或者以以往的经验值作为最低分辨率, 在获取转码策略时, 根据所述 视频源的分辨率与所述最低分辨率的大小选择相应的转码策略,但不仅局 限于此。 步骤 205、 若所述视频源需要转码, 根据所述转码策略以及所述视频 源的分辨率和视频源的帧率生成目标分辨率及目标帧率。 具体的, 所述转码策略中有所述视频源的分辨率与目标分辨率的对应 关系以及视频源的帧率与目标帧率的对应关系,如表 1所示的一种在视频 源分辨率小于最低终端分辨率时的转码策略,该策略主要通过帧率进行调 节。
种转码策略方案:
视频源的 档 各档次转码策略
压缩失真 次
模型视频质量
小于 3分 0 不进行转码操作
采用视频源的帧率及分辨率, 目标视频质量达到 3 大于等于 3分 1
分
且
采用视频源的分辨率, 帧率减半, 目标视频质量达 小于等于 4分 2
到 3分
采用视频源的帧率及分辨率, 目标视频质量达到 4
1
分
采用视频源的帧率及分辨率, 目标视频质量达到 3 大于 4分 2
分
采用视频源的分辨率, 帧率减半, 目标视频质量达
3
到 3分 如表 2所示的一种在视频源分辨率大于等于最低终端分辨率时的转码 策略, 该策略主要通过分辨率进行调节。
表 2、 另一种转码策略方案:
视频源的 档 各档次转码策略
压缩失真 次
模型视频质
里
小于 2分 0 不进行转码操作
大于等于 2分 采用最低终端分辨率, 帧率减半, 目标视频质量达到 且 1 3分
小于等于 3分 采用视频源的分辨率减半, 帧率不变, 目标视频质量 大于等于 3分 1
达到 3. 5分
且
采用最低终端分辨率, 帧率减半, 目标视频质量达到 小于等于 4分 2
3. 5分
1 采用视频源的帧率及分辨率, 目标视频质量达到 4分 采用视频源的分辨率减半, 帧率不变, 目标视频质量 大于 4分 2
达到 3. 5分
3 采用最低终端分辨率, 帧率减半, 目标视频质量达到
, 执行步骤 207, 否则执行步 骤 208 步骤 207、 判断所述目标帧率与所述视频源的帧率是否相同。 若所述 目标帧率与所述视频源的帧率相同, 执行步骤 209, 否则执行步骤 210。 步骤 208、 判断所述目标帧率与所述视频源的帧率是否相同。 若所述 目标帧率与所述视频源的帧率相同, 执行步骤 211, 否则执行步骤 212。 步骤 209、 所述目标视频质量为目标压缩失真质量, 根据所述目标分 辨率获取所述目标分辨率对应的失真参数,根据所述目标压缩失真质量及 所述目标分辨率对应的失真参数生成目标码率。 执行步骤 213。 其中, 根据不同的目标分辨率可以获取到不同的失真参数, 但不仅局 限于此。 具体的, 所述根据所述目标压缩失真质量及所述失真参数生成目标码 率, 具体可以通过压缩失真模型公式 a— I
Quality ' -(· -) + d
, , titrate..
1 + ( ~; ~ )
b
即为:
titrate = b * ( ) c
a + d— Quality 步骤 2 1 0、 所述目标视频质量为目标帧率失真质量, 根据所述目标分 辨率获取所述目标分辨率对应的失真参数, 根据所述目标帧率失真质量、 目标帧率及所述目标分辨率对应的失真参数生成目标码率。 执行步骤 21 3。 具体的, 所述根据所述目标帧率失真质量、 目标帧率及所述失真参数 生成目标码率, 具体可以通过以下公式: 压缩失真模型公式:
分辨率失真模型公式:
Quality resolution = Quality encoding * (p * scale + q) 帧率失真模型公式:
Quality framerate = Quality resolution * (m * In (- -) + )
得到。
其中, 由于所述目标分辨率与所述视频源的分辨率相同, 则分辨率失 真模型公式中的因素对生成目标码率的大小无影响,即分辨率失真模型公 式:
Quality resolution = Quality encoding * (p * scale + q) 表示为 Quality resolution = Quality encoding
13/107157
PCT/CN2012/077799 即为当分辨率不变时, 分辨率失真质量等于压缩失真质量
杯^码率分。 执行步據频 2源1 3的。 分辨率及所迷目标分辨率对应的失真参数生成 具体的, 所述根据所迷目标分鉀率失真质量、 目标分辨率、 视频源的 分舞率及所述目标分辨率对应的失真参数生成目标码率,具体可以通过以 下公式:
压缩失真模型公式:
Quality encoding - " - ( ) + d
分辨率失真模型公式:
QUallty * (p * SCale + q) 得到。 由于目标 与所述视频源的 相等, 顺述
于分辨率失真质量。 卞 并 人 则所迷目标码率为:
冬
_ 1 I
titrate = ό * ( ― ~~ )c
Quality resolution
a + d - p * scale + q 步骤 2 1 2、 所述目标视频质量为目标帧率失真质量, 根据目标分辨率 获取所述目标分辨率对应的失真参数, 根据所述目标帧率失真质量、 所述 目标分辨率、 所述目标帧率、 所述视频源的分辨率以及所述目标分辨率对 应的失真参数生成目标码率。 执行步骤 2 1 3。 具体的, 所述根据所述目标帧率失真质量、 所述目标分辨率、 所述目 标帧率、 所述视频源的分辨率以及所述失真参数生成目标码率, 具体可以 通过以下公式: 压缩失真模型公式:
分辨率失真模型公式:
Quality resolution = Quality encoding * (p * scale + q) 帧率失真模型公式:
Quality = Quality resolulion * (m * In (- -) + )
则所述目标码率为
titrate = ό * ( Q ^
Quality
^ { 1000 、
m * ln( ) + n
a + d
p * scale + q 其中, 上述步骤 2 o9_2 i 2 的公式中, gwa/ f。^g为目标压缩失真质 量, M"/ yrei。to。„为目标分辨率失真质量, 为目标帧率失真 质量; a、 b、 c、 d、 p、 q、 w及"为所述失真参数; a为视频序列最高质量; b为视频序列主观分的平均分的码率点; c为调节因子; 为复杂度因子; ρ为分辨率缩放因子; q为分辨率缩放调整因子; m为帧率衰减因子、; n为帧率衰减调整因子; titrate为目标码率; scale为目标分辨率与视频源的分辨率的比值;
framerate为目标†贞率。
所述目标压缩失真质量随所述码率的增加而增大直至为最大值,随所 述复杂度因子的增加而减小;所述目标分辨率失真质量随所述目标分辨率
与视频源的分辨率的比值的增加而减小。
随着分辨率的增大, 帧率对于视频质量的影响将会变大, 即随着分辨 率的增大, 帧率越小帧率衰减因子越大, 帧率失真质量越差。 步骤 21 3、 根据所述目标分辨率、 目标帧率以及目标码率转换所述视 频源, 生成转码视频。 其中, 所述转换所述视频源可以采用的转码类型为实时转码、 离线转 码或多码流编码, 但不仅局限于此。
步骤 214、 存储所述转码视频或发送所述转码视频到终端。
本发明又一实施例提供的视频转换的方法, 由于通过接收视频源, 并 获取得到视频源的压缩失真质量, 进而获取相应的转码策略, 通过所述转 码策略判断所述视频源是否需要转码, 在所述视频源需要转码的情况下, 根据所述转码策略生成转码参数, 并根据所述转码参数转换所述视频源, 使得所述视频源转换后, 目标视频质量较高, 提高了用户的体验。 与现有 技术相比,本发明实施例提供的视频转换的方法及装置能够解决现有技术 中的视频转换后, 目标视频质量低、 用户体验差的问题。
如图 3所示, 本发明另一实施例提供的视频转换的方法, 在所述方法 中, 当前的网络带宽已知, 所述方法包括:
步骤 301、 接收视频源, 获取所述视频源的视频码流参数值。
其中, 所述视频码流参数值包括视频源的码率、视频源的分辨率和视 频源的帧率。 其具体实现方式参见图 2中步骤 201所示, 此处不再贅述。
步骤 302、 根据所述视频源的分辨率获取得到与所述视频源的分辨率 对应的失真参数。
其中, 所述失真参数包括视频序列最高质量、 视频序列主观分的平均 分的码率点、 调节因子及复杂度因子。 其具体实现方式参见图 2 中步骤 202所示, 此处不再贅述。
步骤 303、 根据所述视频源的码率及视频序列最高质量、 视频序列主
观分的平均分的码率点、调节因子及复杂度因子获取所述视频源的压缩失 真质量。 实现方式参见图 2中步骤 203所示, 此处不再贅述。
步骤 304、 根据所述视频源的压缩失真质量获取与所述视频源的压缩 失真质量相对应的转码策略,并根据所述转码策略判断所述视频源是否需 要转码。 步骤 305、 若所述视频源需要转码, 根据所述转码策略以及所述网络 带宽生成目标码率。 其中, 所述转码策略中有预先设置的所述网络带宽与所述目标码率的 对应关系。 其中, 所述转码策略包括目标视频质量。 所述目标视频质量包括目标 压缩失真质量、 目标分辨率失真质量及目标帧率失真质量。 具体的, 在设置所述目标码率时, 所述目标码率比所述网络带宽小或 相等。
例如, 如表 3所示的另一种转码策略方案
视频源的 档次 各档次转码策略
压缩失真
模型视频质量 小于 3分 0 不进行转码操作
采用与网络带宽值相同的码率, 目标视频质量 大于等于 3分 1
达到 3分
且
采用网络带宽值的 3/ 4为目标码率, 目标视频 小于等于 4分 2
质量达到 3分
采用网络带宽值的 1 / 2为目标码率, 目标视频 大于 4分 1
质量达到 4分
采用网络带宽值的 1 / 2为目标码率, 目标视频 冬寻 2
质量达到 3分
采用网络带宽值的 1 /4为目标码率, 目标视频
3
质量达到 3分 值得说明的是, 上述表 3中的转码策略仅为本实施例中的一个具体实 例, 在此对本发明的转码策略的实现不作限定。 步骤 306、 根据所述失真 数、 所述目标分辨率失真质量及所述目标 并根据所述目标
其中, 所述根据所述失真 数、 所述目标分辨率失真质量及所述目标 所述目 具体可以通过以 下公式: 压缩失真模型公式:
Quality . - a - ( ) +
encodins " \ , ti」tra… ~ d
te,
1 + (丁 ) 分辨率失真模型公式:
Quality resolution = Quality encoding * (p * scale + q)
Quality resolution
一 ( <3 - l + d
. Mtrate . c
scale =
P 步骤 307、 根据所述失真参数、 所述目标帧率失真质量及所述目标码 率生成所述目标帧率。 其中, 所述根据所述失真参数、 所述目标帧率失真质量及所述目标码 率生成所述目标帧率, 具 压缩失真模型公式:
Quality encodmg = a - { W
1 + (丁) 分辨率失真模型公式:
Quality resohllion = Quality encodmg * (p * scale + q) 帧率失真模型公式:
Q * * H r , ) + 得到。 则所述目标帧率为
1000
其中, 当分辨率不变时, 分辨率失真质量等于压缩失真质量。 当帧率 不变时, 帧率失真质量等于分辨率失真质量。 其中, 在上述步骤 306— 307所示的公式中, ρΜβ/ > 。 为目标压缩 失真质量, Qitalityresohltion为目标分辨率失真质量, Qucdityf 为目标帧 率失真质量; a b c » d p q 及〃为所述失真参数; a为视频序列最高质量; b为视频序列主观分的平均分的码率点; c为调节因子 / 为复杂度因子; ρ为分辨率缩放因子; q为分辨率缩放调整因子; m为帧率衰减因子; «为帧率衰减调整因子; b Urate为目标码率; scale为目标分辨率与视频源的分辨率的比值;
framerate为目标†贞率。
所述目标压缩失真质量随所述码率的增加而增大直至为最大值,随所 述复杂度因子的增加而减小;所述目标分辨率失真质量随所述目标分辨率 与视频源的分辨率的比值的增加而减小;
随着分辨率的增大, 帧率对于视频质量的影响将会变大, 即随着分辨 率的增大, 帧率越小帧率衰减因子越大, 帧率失真质量越差。
步骤 308、 根据所述目标分辨率、 目标帧率以及目标码率转换所述视 频源, 生成转码视频。 其具体实现方式参见图 2中步骤 21 3所示, 此处不 再赘述。
其中, 所述转换所述视频源可以采用的转码类型为实时转码、 离线转 码或多码流编码, 但不仅局限于此。
步骤 309、 存储所述转码视频或发送所述转码视频到终端。 其具体实 现方式参见图 2中步骤 214所示, 此处不再贅述。
本发明另一实施例提供的视频转换的方法, 由于通过接收视频源, 并 获取得到视频源的压缩失真质量, 进而获取相应的转码策略, 通过所述转 码策略判断所述视频源是否需要转码, 在所述视频源需要转码的情况下, 根据所述转码策略生成转码参数, 并根据所述转码参数转换所述视频源, 使得所述视频源转换后, 目标视频质量较高, 提高了用户的体验。 与现有 技术相比,本发明实施例提供的视频转换的方法及装置能够解决现有技术 中的视频转换后, 目标视频质量低、 用户体验差的问题。
值得说明的是, 本发明实施例提供的各个公式可以为加性形式, 乘积 形式, 也可以是加性形式与乘积形式的组合, 但不仅局限于此。
值得说明的是,本发明实施例提供的各个公式的计算在一种视频转换 的装置中进行, 所述视频转换装置可以应用在网络设备 (如网络服务器) 或终端设备(如手机移动终端、 平板电脑、 笔记本电脑等) 。 若所述网络 设备或终端设备的运算能力较差, 无法满足运算需求时, 则可以预先通过 本方案提供的各个公式设置出运算结果与已知条件的对应关系,则可通过 所述对应关系查找到所需的运算结果, 但不仅局限于此。 如图 4所示, 本发明实施例提供的一种视频转换的装置, 包括: 视频源接收单元 41 , 用于接收视频源, 并获取视频源的压缩失真质
量。 其具体实现方式参见图 1 中步骤 101所示, 此处不再贅述。 转码策略获取单元 42,用于根据所述视频源的压缩失真质量获取与所 述视频源的压缩失真质量相对应的转码策略,并根据所述转码策略判断所 述视频源是否需要转码。 其具体实现方式参见图 1 中步骤 102所示, 此处 不再赘述。 生成单元 43, 用于若所述视频源需要转码,根据所述转码策略生成转 码参数。 其中, 所述转码策略包括目标视频质量, 所述转码参数包括目标分辨 率、 目标帧率以及目标码率。 其具体实现方式参见图 1 中步骤 103所示, 此处不再贅述。 转码单元 44, 用于根据所述目标分辨率、 目标帧率以及目标码率转 换所述视频源,生成转码视频。其具体实现方式参见图 1 中步骤 104所示, 此处不再贅述。 值得说明的是,本发明实施例提供的一种视频转换的装置可以应用在 网络设备(如网络服务器)或终端设备(如手机移动终端、 平板电脑、 笔 记本电脑等), 但不仅局限于此。 进一步的, 如图 5所示, 在所述视频源接收单元 41之前, 还包括: 设置单元 45, 用于设置压缩失真质量与所述转码策略的对应关系。 其具体实现方式可以参见图 1 中步骤 101的具体说明, 此处不再贅述。 进一步的, 如图 5所示, 所述设置单元 45, 包括: 获取模块 451, 用于获取多个终端的终端信息。 其具体实现方式可以 参见图 1 中步骤 101的具体说明, 此处不再贅述。
设置模块 452, 用于根据每个终端的终端信息设置压缩失真质量与所 述转码策略的对应关系。其具体实现方式可以参见图 1 中步骤 101的具体 说明, 此处不再贅述。 进一步的, 如图 5所示, 所述视频源接收单元 41, 包括: 参数值获取模块 411, 用于获取所述视频源的视频码流参数值, 所述 视频码流参数值包括视频源的码率, 视频源的分辨率和视频源的帧率。 其 具体实现方式参见图 2中步骤 201所示, 此处不再贅述。 失真参数获取模块 412, 用于根据所述视频源的分辨率获取得到与所 述视频源的分辨率对应的失真参数, 所述失真参数包括视频序列最高质 量、 视频序列主观分的平均分的码率点、 调节因子及复杂度因子。 其具体 实现方式参见图 2中步骤 202所示, 此处不再贅述。 压缩失真质量获取模块 413, 用于根据所述视频源的码率及视频序列 最高质量、视频序列主观分的平均分的码率点、 调节因子及复杂度因子获 取所述视频源的压缩失真质量。其具体实现方式参见图 2中步骤 203所示, 此处不再贅述。 进一步的, 如图 5所示, 若所述视频源的压缩失真质量对应有一个或 多个档次的转码策略,所述视频源转换为一个或多个与所述一个或多个档 次的转码策略对应的转码视频, 所述装置, 还包括: 转码视频选择单元 46, 用于获取终端信息, 所述终端信息包括所述终 端的分辨率及帧率,并根据所述终端的分辨率及帧率获取与所述终端的分 辨率对应的转码视频。其具体实现方式可以参见图 1 中步骤 104的具体说 明, 此处不再贅述。 进一步的, 如图 5所示, 在网络带宽未知时, 在所述生成单元 43之 前包括:
第一参数值获取单元 47 , 用于获取所述视频源的视频码流参数值, 所 述视频码流参数值包括视频源的码率、 视频源的分辨率和视频源的帧率。 其具体实现方式可以参见图 2中步骤 201所示, 此处不再贅述。 所述生成单元 43 , 包括: 第一生成模块 431 , 用于若所述视频源需要转码, 根据所述转码策略 以及所述视频源的分辨率和视频源的帧率生成目标分辨率及目标帧率。其 具体实现方式可以参见图 2中步骤 205所示, 此处不再贅述。 第二生成模块 432 , 用于根据所述目标分辨率、 目标帧率以及所述目 标视频质量生成目标码率。 其具体实现方式可以参见图 2中步骤 209-212 所示, 此处不再贅述。 进一步的, 如图 5所示, 所述转码策略获取单元 42 , 包括: 转码策略获取模块 421 , 用于根据所述视频源的压缩失真质量以及所 述视频源的分辨率获取相应的转码策略。 其具体实现方式可以参见图 2 中步骤 204所示, 此处不再贅述。 进一步的, 如图 5所示, 所述第二生成模块 432 , 包括: 第一生成子模块 4321 ,用于若所述目标分辨率与所述视频源的分辨率 标压缩失真质量, 根据所述目标分辨率获取对应的失真参数, 根据所述目 标压缩失真质量及所述失真参数生成目标码率。其具体实现方式可以参见 图 2中步骤 209所示, 此处不再贅述。 第二生成子模块 4322 ,用于若所述目标分辨率与所述视频源的分辨率 目标分辨率失真质量, 根据所述目标分辨率获取对应的失真参数, 根据所
述目标分辨率失真质量、 目标分辨率、 视频源的分辨率及所述失真参数生 成目标码率。 其具体实现方式可以参见图 2中步骤 21 1所示, 此处不再贅 述。 第三生成子模块 4323 ,用于若所述目标分辨率与所述视频源的分辨率 目标帧率失真质量, 根据所述目标分辨率获取对应的失真参数, 根据所述 目标帧率失真质量、 目标帧率及所述失真参数生成目标码率。 其具体实现 方式可以参见图 2中步骤 21 0所示, 此处不再贅述。 第四生成子模块 4324 , 用于若所述目标分辨率与所述视频源的分辨 量为目标帧率失真质量, 根据目标分辨率获取对应的失真参数, 根据所述 目标帧率失真质量、 所述目标分辨率、 所述目标帧率、 所述视频源的分辨 率以及所述失真参数生成目标码率。其具体实现方式可以参见图 2中步骤 212所示, 此处不再贅述。 进一步的, 如图 5所示, 在网络带宽已知时, 所述生成单元 43 , 包括: 网络带宽获取模块 433 , 用于获取当前网络带宽。 其具体实现方式可 以参见图 3中步骤 305所示, 此处不再贅述。 第三生成模块 434 , 用于根据所述转码策略以及所述网络带宽生成目 标码率。 其具体实现方式可以参见图 3中步骤 305所示, 此处不再贅述。 第四生成模块 435 , 用于根据所述目标视频质量以及所述目标码率生 成目标分辨率和目标帧率。 其具体实现方式可以参见图 3中步骤 306- 307 所示, 此处不再贅述。 进一步的, 如图 5所示, 在所述生成单元 43之前包括:
第二参数值获取单元 48 , 用于获取所述视频源的视频码流参数值, 所 述视频码流参数值包括视频源的码率、 视频源的分辨率和视频源的帧率。 其具体实现方式可以参见图 3中步骤 301所示, 此处不再贅述。 进一步的, 如图 5所示, 所述第四生成模块 435 , 包括: 失真参数获取子模块 4351 ,用于根据所述视频源的分辨率获取对应的 失真参数。其具体实现方式可以参见图 3中步骤 302所示,此处不再贅述。 第五生成子模块 4352 , 用于根据所述失真参数、 所述目标分辨率失真 并根据所述目标分辨率与所述视频源的分辨率的比值及所述视频源的分 辨率生成目标分辨率。 其具体实现方式可以参见图 3中步骤 306所示, 此 处不再赘述。
第六生成子模块 4353 , 用于根据所述失真参数、 所述目标帧率失真 质量及所述目标码率生成所述目标帧率。 其具体实现方式可以参见图 3 中步骤 307所示, 此处不再贅述。
本发明实施例提供的视频转换的装置,由于通过视频源接收单元接收 视频源, 并获取得到视频源的压缩失真质量, 进而通过转码策略获取单元 获取相应的转码策略, 通过所述转码策略判断所述视频源是否需要转码, 在所述视频源需要转码的情况下,生成单元根据所述转码策略生成转码参 数,转码单元根据所述转码参数转换所述视频源 ,使得所述视频源转换后 , 目标视频质量较高, 提高了用户的体验。 与现有技术相比, 本发明能够解 决现有技术中的视频转换后, 目标视频质量低、 用户体验差的问题。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到 本发明可借助软件加必需的通用硬件的方式来实现, 当然也可以通过硬 件, 但很多情况下前者是更佳的实施方式。 基于这样的理解, 本发明的技 术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式
体现出来, 该计算机软件产品存储在可读取的存储介质中, 如计算机的软 盘, 硬盘或光盘等, 包括若干指令用以使得一台计算机设备(可以是个人 计算机, 服务器, 或者网络设备等) 执行本发明各个实施例所述的方法。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局 限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可 轻易想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明 的保护范围应所述以权利要求的保护范围为准。
Claims
1、 一种视频转换的方法, 其特征在于, 包括: 接收视频源, 获取视频源的压缩失真质量; 根据所述视频源的压缩失真质量获取与所述视频源的压缩失真质量相 对应的转码策略, 并根据所述转码策略判断所述视频源是否需要转码; 若所述视频源需要转码, 根据所述转码策略生成转码参数, 所述转码 策略包括目标视频质量, 所述转码参数包括目标分辨率、 目标帧率以及目 标码率; 根据所述目标分辨率、 目标帧率以及目标码率转换所述视频源, 生成 转码视频。
2、 根据权利要求 1所述的方法, 其特征在于, 在所述接收视频源, 获 取视频源的压缩失真质量之前, 还包括: 设置压缩失真质量与所述转码策略的对应关系。
3、 根据权利要求 2所述的方法, 其特征在于, 所述设置压缩失真质量 与所述转码策略的对应关系, 具体包括: 获取多个终端的终端信息; 根据每个终端的终端信息设置压缩失真质量与所述转码策略的对应关 系。
4、 根据权利要求 1所述的方法, 其特征在于, 所述接收视频源, 获取 视频源的压缩失真质量, 包括: 获取所述视频源的视频码流参数值, 所述视频码流参数值包括视频源
的码率, 视频源的分辨率和视频源的帧率; 根据所述视频源的分辨率获取得到与所述视频源的分辨率对应的失真 参数, 所述失真参数包括视频序列最高质量、 视频序列主观分的平均分的 码率点、 调节因子及复杂度因子; 根据所述视频源的码率及视频序列最高质量、 视频序列主观分的平均 分的码率点、 调节因子及复杂度因子获取所述视频源的压缩失真质量。
5、 根据权利要求 4所述的方法, 其特征在于, 所述根据所述视频源的 码率及视频序列最高质量、 视频序列主观分的平均分的码率点、 调节因子 及复杂度因子获取所述视频源的压缩失真质量, 具体通过压缩失真模型公 式
得到; 其中, ^ualityecoding为目标压缩失真质量;
a为视频序列最高质量; b为视频序列主观分的平均分的码率点; c为调节因子;
为复杂度因子。
6、 根据权利要求 1所述的方法, 其特征在于, 若所述视频源的压缩失
真质量对应有一个或多个档次的转码策略, 所述视频源转换为一个或多个 与所述一个或多个档次的转码策略对应的转码视频, 所述方法, 还包括: 获取终端信息, 所述终端信息包括所述终端的分辨率及帧率 转码视
7、 根据权利要求 1所述的方法, 其特征在于, 在网络带宽未知时, 在 所述若所述视频源需要转码, 根据所述转码策略生成转码参数, 之前包括: 获取所述视频源的视频码流参数值, 所述视频码流参数值包括视频源 的码率、 视频源的分辨率和视频源的帧率; 所述若所述视频源需要转码, 根据所述转码策略生成转码参数, 包括: 若所述视频源需要转码, 根据所述转码策略以及所述视频源的分辨率
根据所述目标分辨率、 目标帧率以及所述目标视频质量生成目标码率。
8、 根据权利要求 7所述的方法, 其特征在于, 所述根据所述视频源的 压缩失真质量获取与所述视频源的压缩失真质量相对应的转码策略, 包括: 根据所述视频源的压缩失真质量以及所述视频源的分辨率获取相应的 转码策略。
9、 根据权利要求 7所述的方法, 其特征在于, 所述根据所述目标分辨 率、 目标帧率以及目标视频质量生成目标码率, 具体包括:
视频源的帧率相同, 则所述目标视频质量为目标压缩失真质量, 根据所述 目标分辨率获取所述目标分辨率对应的失真参数, 根据所述目标压缩失真
质量及所述目标分辨率对应的失真参数生成目标码率;
述视频源的帧率相同, 则所述目标视频质量为目标分辨率失真质量, 根据 率失真质量、 目标分辨率、 视频源的分辨率及所述目标分辨率对应的失真 参数生成目标码率;
视频源的帧率不相同, 则所述目标视频质量为目标帧率失真质量, 根据所 述目标分辨率获取所述目标分辨率对应的失真参数, 根据所述目标帧率失 真质量、 目标帧率及所述目标分辨率对应的失真参数生成目标码率;
述视频源的帧率不相同, 则所述目标视频质量为目标帧率失真质量, 根据 失真质量、 所述目标分辨率、 所述目标帧率、 所述视频源的分辨率以及所 述目标分辨率对应的失真参数生成目标码率。
1 0、 根据权利要求 9 所述的方法, 其特征在于, 所述根据所述目标压 缩失真质量及所述目标分辨率对应的失真参数生成目标码率, 具体通过压 缩失真模型公式
得到; 所述根据所述目标分辨率失真质量、 目标分辨率、 视频源的分辨率及 所述目标分辨率对应的失真参数生成目标码率, 具体通过以下公式:
压缩失真模型公式:
分辨率失真模型公式:
Quality resolution = Quality encoding * (p * scale + q) 得到; 所述根据所述目标帧率失真质量、 目标帧率及所述目标分辨率对应的 失真参数生成目标码率, 具体通过以下公式: 压缩失真模型公式:
分辨率失真模型公式:
Quality resolution = Quality encoding * (p * scale + q) 帧率失真模型公式:
Quality fiamerate = Quality resolution * (m * ln( r 1000 ) + n)
分辨率失真模型公式:
Quality resolution = Quality encoding * (p * scale + q) 帧率失真模型公式:
Quality framerate = Quality resolution * (m * ln( r ) + n)
得到; 其中, Quality ecoding为目标压缩失真质量, Quality resohltion为目标分辨率 失真质量, Qualityfra 为目标帧率失真质量; a b c d p q 及 为所述失真参数; a为视频序列最高质量; b为视频序列主观分的平均分的码率点; c为调节因子; 为复杂度因子; 为分辨率缩放因子; 为分辨率缩放调整因子;
为帧率衰减因子、; «为帧率衰减调整因子; bitrate为目标码率; scale为目标分辨率与视频源的分辨率的比值; framerate为目标帧率;
所述目标压缩失真质量随所述码率的增加而增大直至为最大值, 随所 述复杂度因子的增加而减小; 所述目标分辨率失真质量随所述目标分辨率 与视频源的分辨率的比值的增加而减小; 随着分辨率的增大, 帧率对于视频质量的影响变大, 即随着分辨率的 增大, 帧率越小帧率衰减因子越大, 帧率失真质量越差。
1 1、 根据权利要求 1 所述的方法, 其特征在于, 在网络带宽已知时, 所述若所述视频源需要转码, 根据所述转码策略生成转码参数, 包括: 获取当前网络带宽; 根据所述转码策略以及所述网络带宽生成目标码率; 根据所述目标视频质量以及所述目标码率生成目标分辨率和目标帧 率。
1 2、 根据权利要求 1 1所述的方法, 其特征在于, 在所述若所述视频源 需要转码, 根据所述转码策略生成转码参数, 之前包括: 获取所述视频源的视频码流参数值, 所述视频码流参数值包括视频源 的码率、 视频源的分辨率和视频源的帧率; 所述目标视频质量包括目标压缩失真质量、 目标分辨率失真质量及目
冬
标帧率失真质量, 所述根据所述目标视频质量以及所述目标码率生成目标 分辨率和目标帧率, 具体包括: 根据所述视频源的分辨率获取对应的失真参数; 根据所述失真参数、 所述目标分辨率失真质量及所述目标码率生成所 述目标分辨率与所述视频源的分辨率的比值, 并根据所述目标分辨率与所
根据所述失真参数、 所述目标帧率失真质量及所述目标码率生成所述 目标帧率。
1 3、 根据权利要求 1 2所述的方法, 其特征在于, 所述根据所述失真参 数、 所述目标分辨率失真质量
视频源的分辨率的比值, 具体通过以下公式: 压缩失真模型公式:
Quality enc , + d
encodins
分辨率失真模型公式:
Quality resolution = Quality encoding * (p * scale + q)
所述根据所述失真参数、 所述目标帧率失真质量及所述目标码率生成 所述目标帧率, 具体通过以下公式: 压缩失真模型公式:
分辨率失真模型公式:
Quality resolution = Quality encoding * (p * scale + q) 帧率失真模型公式:
QuaUty erate = Quality resolution * (m * In (- -) 得到; 其中, Quality ecoding为目标压缩失真质量, Quality resoiution为目标分辨率 失真质量, Qualityframerate为目标帧率失真质量; a、 b、 c、 d、 p、 q、 及 为所述失真参数; a为视频序列最高质量; b为视频序列主观分的平均分的码率点; c为调节因子 / 为复杂度因子; 为分辨率缩放因子; 为分辨率缩放调整因子; 为帧率衰减因子; «为帧率衰减调整因子; bitrate为目标码率;
scale为目标分辨率与视频源的分辨率的比值; framerate为目标帧率。
所述目标压缩失真质量随所述码率的增加而增大直至为最大值, 随所 述复杂度因子的增加而减小; 所述目标分辨率失真质量随所述目标分辨率 与视频源的分辨率的比值的增加而减小; 随着分辨率的增大, 帧率对于视频质量的影响将会变大, 即随着分辨 率的增大, 帧率越小帧率衰减因子越大, 帧率失真质量越差。
14、 根据权利要求 1 -1 3任一项所述的方法, 其特征在于, 所述转码为 实时转码、 离线转码或多码流编码。
1 5、 一种视频转换的装置, 其特征在于, 包括: 视频源接收单元, 用于接收视频源, 并获取视频源的压缩失真质量; 转码策略获取单元, 用于根据所述视频源的压缩失真质量获取与所述 视频源的压缩失真质量相对应的转码策略, 并根据所述转码策略判断所述 视频源是否需要转码; 生成单元, 用于若所述视频源需要转码, 根据所述转码策略生成转码 参数, 所述转码策略包括目标视频质量, 所述转码参数包括目标分辨率、 目标帧率以及目标码率; 转码单元, 用于根据所述目标分辨率、 目标帧率以及目标码率转换所 述视频源, 生成转码视频。
1 6、 根据权利要求 1 5所述的装置, 其特征在于, 在所述视频源接收单 元之前, 还包括: 设置单元, 用于设置压缩失真质量与所述转码策略的对应关系。
1 7、根据权利要求 1 6所述的装置, 其特征在于, 所述设置单元, 包括: 获取模块, 用于获取多个终端的终端信息; 设置模块, 用于根据每个终端的终端信息设置压缩失真质量与所述转 码策略的对应关系。
1 8、根据权利要求 1 5所述的装置,其特征在于,所述视频源接收单元, 包括: 参数值获取模块, 用于获取所述视频源的视频码流参数值, 所述视频 码流参数值包括视频源的码率, 视频源的分辨率和视频源的帧率; 失真参数获取模块, 用于根据所述视频源的分辨率获取得到与所述视 频源的分辨率对应的失真参数, 所述失真参数包括视频序列最高质量、 视 频序列主观分的平均分的码率点、 调节因子及复杂度因子; 压缩失真质量获取模块, 用于根据所述视频源的码率及视频序列最高 质量、 视频序列主观分的平均分的码率点、 调节因子及复杂度因子获取所 述视频源的压缩失真质量。
1 9、 根据权利要求 1 5所述的装置, 其特征在于, 若所述视频源的压缩 失真质量对应有一个或多个档次的转码策略, 所述视频源转换为一个或多 个与所述一个或多个档次的转码策略对应的转码视频, 所述装置, 还包括: 转码视频选择单元, 用于获取终端信息, 所述终端信息包括所述终端 率对应的转码视频。
20、 根据权利要求 1 5所述的装置, 其特征在于, 在网络带宽未知时, 在所述生成单元之前包括:
第一参数值获取单元, 用于获取所述视频源的视频码流参数值, 所述 视频码流参数值包括视频源的码率、 视频源的分辨率和视频源的帧率; 所述生成单元, 包括: 第一生成模块, 用于若所述视频源需要转码, 根据所述转码策略以及 所述视频源的分辨率和视频源的帧率生成目标分辨率及目标帧率; 第二生成模块, 用于根据所述目标分辨率、 目标帧率以及所述目标视 频质量生成目标码率。
21、 根据权利要求 20所述的装置, 其特征在于, 所述转码策略获取单 元, 包括: 转码策略获取模块, 用于根据所述视频源的压缩失真质量以及所述视 频源的分辨率获取相应的转码策略。
22、 根据权利要求 20所述的装置, 其特征在于, 所述第二生成模块, 包括:
且所述目标帧率与所述视频源的帧率相同, 则所述目标视频质量为目标压 缩失真质量, 根据所述目标分辨率获取对应的失真参数, 根据所述目标压 缩失真质量及所述失真参数生成目标码率;
同且所述目标帧率与所述视频源的帧率相同, 则所述目标视频质量为目标 分辨率失真质量, 根据所述目标分辨率获取对应的失真参数, 根据所述目 标分辨率失真质量、 目标分辨率、 视频源的分辨率及所述失真参数生成目 标码率;
且所述目标帧率与所述视频源的帧率不相同, 则所述目标视频质量为目标 帧率失真质量, 根据所述目标分辨率获取对应的失真参数, 根据所述目标 帧率失真质量、 目标帧率及所述失真参数生成目标码率; 第四生成子模块, 用于若所述目标分辨率与所述视频源的分辨率不相 同且所述目标帧率与所述视频源的帧率不相同, 则所述目标视频质量为目 标帧率失真质量, 根据目标分辨率获取对应的失真参数, 根据所述目标帧 率失真质量、 所述目标分辨率、 所述目标帧率以及所述失真参数生成目标 码率。
23、 根据权利要求 15所述的装置, 其特征在于, 在网络带宽已知时, 所述生成单元, 包括: 网络带宽获取模块, 用于获取当前网络带宽; 第三生成模块, 用于根据所述转码策略以及所述网络带宽生成目标码 率; 第四生成模块, 用于根据所述目标视频质量以及所述目标码率生成目 标分辨率和目标帧率。
24、 根据权利要求 23所述的装置, 其特征在于, 在所述生成单元之前 包括: 第二参数值获取单元, 用于获取所述视频源的视频码流参数值, 所述 视频码流参数值包括视频源的码率、 视频源的分辨率和视频源的帧率; 所述第四生成模块, 包括:
所述目标分辨率失真质量
成目标分辨率 第六生成子模块, 用于根据所述失真参数、 所述目标帧率失真质量及 所述目标码率生成所述目标帧率。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP12865627.9A EP2800388A4 (en) | 2012-01-19 | 2012-06-28 | VIDEO REVERSE PROCESS AND DEVICE |
| US14/335,119 US9872021B2 (en) | 2012-01-19 | 2014-07-18 | Video conversion method and apparatus |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210017751.5A CN103220550B (zh) | 2012-01-19 | 2012-01-19 | 视频转换的方法及装置 |
| CN201210017751.5 | 2012-01-19 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US14/335,119 Continuation US9872021B2 (en) | 2012-01-19 | 2014-07-18 | Video conversion method and apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2013107157A1 true WO2013107157A1 (zh) | 2013-07-25 |
Family
ID=48798563
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2012/077799 Ceased WO2013107157A1 (zh) | 2012-01-19 | 2012-06-28 | 视频转换的方法及装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US9872021B2 (zh) |
| EP (1) | EP2800388A4 (zh) |
| CN (1) | CN103220550B (zh) |
| WO (1) | WO2013107157A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111597384A (zh) * | 2020-04-28 | 2020-08-28 | 深圳市商汤科技有限公司 | 视频源管理方法及相关装置 |
Families Citing this family (34)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9100689B2 (en) * | 2010-03-24 | 2015-08-04 | Google Technology Holdings LLC | Moving content between set top box and end devices in home |
| KR102085270B1 (ko) * | 2013-08-12 | 2020-03-05 | 삼성전자 주식회사 | 가장 작은 왜곡 값을 갖는 해상도를 선택하는 이미지 처리 방법과 상기 방법을 수행하는 장치들 |
| CN104010232B (zh) * | 2014-05-23 | 2017-12-12 | 惠州Tcl移动通信有限公司 | 一种智能播放在线视频的方法、系统、播放器及移动终端 |
| CN105592322B (zh) * | 2014-09-19 | 2019-06-28 | 青岛海尔电子有限公司 | 一种媒体数据的优化方法及装置 |
| CN104410903A (zh) * | 2014-12-25 | 2015-03-11 | 安科智慧城市技术(中国)有限公司 | 一种基于移动终端的视频转码方法和系统 |
| CN105828183B (zh) * | 2015-01-04 | 2017-12-05 | 华为技术有限公司 | 视频帧处理方法及视频帧处理芯片 |
| KR102432804B1 (ko) * | 2015-06-02 | 2022-08-16 | 한화테크윈 주식회사 | Mjpeg 압축방식을 이용하는 영상촬영장치 |
| EP3311334A4 (en) * | 2015-06-18 | 2019-08-07 | Wizr | DEMATERIALIZED PLATFORM WITH SYNCHRONIZATION OF MULTIPLE CAMERAS |
| CN105120261B (zh) * | 2015-09-18 | 2018-11-02 | 北京百度网讯科技有限公司 | 用于生成多码率视频的方法和装置 |
| CN106856570B (zh) | 2015-12-08 | 2018-08-24 | 阿里巴巴集团控股有限公司 | 一种转码方法及装置 |
| CN106856571B (zh) | 2015-12-09 | 2019-12-06 | 阿里巴巴集团控股有限公司 | 一种转码方法及装置 |
| CN105592081A (zh) * | 2015-12-18 | 2016-05-18 | 内蒙古安达文化传媒有限责任公司 | 一种终端与服务器之间的视频转换方法 |
| WO2018032132A1 (zh) * | 2016-08-14 | 2018-02-22 | 何兰 | 电脑视频转手机端时的专利信息推送方法和转发系统 |
| WO2018032130A1 (zh) * | 2016-08-14 | 2018-02-22 | 何兰 | 视频转化技术的数据采集方法和转发系统 |
| US10834406B2 (en) | 2016-12-12 | 2020-11-10 | Netflix, Inc. | Device-consistent techniques for predicting absolute perceptual video quality |
| CN109660824B (zh) * | 2017-10-10 | 2022-07-12 | 阿里巴巴(中国)有限公司 | 一种视频提供、处理方法、视频处理装置及服务器 |
| KR102464757B1 (ko) * | 2018-03-29 | 2022-11-09 | 삼성전자주식회사 | 비디오 데이터를 스트리밍하는 시스템 및 방법 |
| CN109040801B (zh) * | 2018-07-19 | 2019-07-09 | 北京达佳互联信息技术有限公司 | 媒体码率自适应方法、装置、计算机设备及存储介质 |
| US11128869B1 (en) | 2018-10-22 | 2021-09-21 | Bitmovin, Inc. | Video encoding based on customized bitrate table |
| CN109348276B (zh) * | 2018-11-08 | 2019-12-17 | 北京微播视界科技有限公司 | 视频画面调整方法、装置、计算机设备和存储介质 |
| CN110418194B (zh) * | 2019-07-19 | 2022-03-25 | 咪咕文化科技有限公司 | 一种视频分发方法及基站 |
| CN112584182B (zh) * | 2019-09-30 | 2024-01-09 | 华为云计算技术有限公司 | 多码率直播转码的数据包封装方法以及相关设备 |
| CN111277827B (zh) | 2020-02-24 | 2022-12-20 | 腾讯科技(深圳)有限公司 | 一种视频数据处理方法、装置、设备以及可读存储介质 |
| CN111327950B (zh) * | 2020-03-05 | 2021-08-06 | 腾讯科技(深圳)有限公司 | 一种视频转码方法及装置 |
| CN111556321A (zh) * | 2020-04-24 | 2020-08-18 | 西安万像电子科技有限公司 | 视频解码方法、装置和系统 |
| EP3942836A1 (en) * | 2020-05-19 | 2022-01-26 | Google LLC | Dynamic parameter selection for quality-normalized video transcoding |
| CN111787328B (zh) * | 2020-07-27 | 2022-11-04 | 北京金山云网络技术有限公司 | 一种视频转码方法、装置、电子设备及存储介质 |
| CN114125344B (zh) | 2020-08-31 | 2023-06-23 | 京东方科技集团股份有限公司 | 视频处理装置及方法、监视器设备、计算机设备、介质 |
| CN112367524B (zh) * | 2020-12-08 | 2022-08-09 | 重庆邮电大学 | 一种全景视频编码方法 |
| CN113038222B (zh) * | 2021-03-08 | 2023-11-10 | Oppo广东移动通信有限公司 | 视频处理方法、装置、电子设备及存储介质 |
| CN113949877B (zh) * | 2021-10-18 | 2025-01-21 | 湖南快乐阳光互动娱乐传媒有限公司 | 一种转码码率确定方法及装置 |
| US11902580B2 (en) * | 2021-12-08 | 2024-02-13 | Bitmovin, Inc. | Low-latency online per-title encoding |
| CN114390290B (zh) * | 2022-01-26 | 2025-03-28 | 湖南快乐阳光互动娱乐传媒有限公司 | 一种视频处理方法、装置、设备及存储介质 |
| CN117729350B (zh) * | 2023-09-26 | 2025-02-25 | 书行科技(北京)有限公司 | 一种视频数据处理方法、装置、设备及可读存储介质 |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030185453A1 (en) * | 2002-03-27 | 2003-10-02 | Eastman Kodak Company | Producing and encoding rate-distortion information allowing optimal transcoding of compressed digital image |
| US20050008074A1 (en) * | 2003-06-25 | 2005-01-13 | Van Beek Petrus J.L. | Wireless video transmission system |
| US20070053427A1 (en) * | 2002-05-29 | 2007-03-08 | Canon Kabushiki Kaisha | Method and device for selecting a transcoding method from a set of transcoding methods |
| CN1943240A (zh) * | 2004-02-13 | 2007-04-04 | 惠普开发有限公司 | 媒体数据代码转换设备 |
| CN101068355A (zh) * | 2007-06-05 | 2007-11-07 | 南京大学 | Mpeg-2到h.264码的快速转换方法 |
| CN101188756A (zh) * | 2007-12-04 | 2008-05-28 | 武汉大学 | 一种mpeg-4 sp到avs视频转码方法 |
| CN101677405A (zh) * | 2008-09-19 | 2010-03-24 | 香港科技大学 | 针对压缩视频的基于转码的鲁棒性流媒体技术和系统 |
| CN101842812A (zh) * | 2007-11-02 | 2010-09-22 | 高等技术学校 | 用于数字图像转码中的参数质量感知选择的系统和方法 |
| CN101888547A (zh) * | 2010-06-18 | 2010-11-17 | 西安电子科技大学 | 基于直接模式选择的h.264/avc快速转码方法及装置 |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6532593B1 (en) | 1999-08-17 | 2003-03-11 | General Instrument Corporation | Transcoding for consumer set-top storage application |
| US7213072B2 (en) | 2001-05-08 | 2007-05-01 | Nokia Mobile Phones | Method and apparatus for transcoding content with permissible operations authorized by content creator |
| US7400774B2 (en) * | 2002-09-06 | 2008-07-15 | The Regents Of The University Of California | Encoding and decoding of digital data using cues derivable at a decoder |
| US20050232497A1 (en) | 2004-04-15 | 2005-10-20 | Microsoft Corporation | High-fidelity transcoding |
| KR100621581B1 (ko) * | 2004-07-15 | 2006-09-13 | 삼성전자주식회사 | 기초 계층을 포함하는 비트스트림을 프리디코딩,디코딩하는 방법, 및 장치 |
| WO2006126974A1 (en) * | 2005-04-11 | 2006-11-30 | Tubitak Bilten | Optimal video adaptation for resource constrained mobile devices based on subjective utility models |
| US8761248B2 (en) * | 2006-11-28 | 2014-06-24 | Motorola Mobility Llc | Method and system for intelligent video adaptation |
| CN101998117B (zh) * | 2009-08-13 | 2013-01-30 | 华为技术有限公司 | 视频转码方法和装置 |
| US8897370B1 (en) * | 2009-11-30 | 2014-11-25 | Google Inc. | Bitrate video transcoding based on video coding complexity estimation |
| US9020254B2 (en) * | 2011-12-15 | 2015-04-28 | Microsoft Technology Licensing, Llc | Dynamic image quality checker for use in image transcoding |
-
2012
- 2012-01-19 CN CN201210017751.5A patent/CN103220550B/zh active Active
- 2012-06-28 WO PCT/CN2012/077799 patent/WO2013107157A1/zh not_active Ceased
- 2012-06-28 EP EP12865627.9A patent/EP2800388A4/en not_active Withdrawn
-
2014
- 2014-07-18 US US14/335,119 patent/US9872021B2/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030185453A1 (en) * | 2002-03-27 | 2003-10-02 | Eastman Kodak Company | Producing and encoding rate-distortion information allowing optimal transcoding of compressed digital image |
| US20070053427A1 (en) * | 2002-05-29 | 2007-03-08 | Canon Kabushiki Kaisha | Method and device for selecting a transcoding method from a set of transcoding methods |
| US20050008074A1 (en) * | 2003-06-25 | 2005-01-13 | Van Beek Petrus J.L. | Wireless video transmission system |
| CN1943240A (zh) * | 2004-02-13 | 2007-04-04 | 惠普开发有限公司 | 媒体数据代码转换设备 |
| CN101068355A (zh) * | 2007-06-05 | 2007-11-07 | 南京大学 | Mpeg-2到h.264码的快速转换方法 |
| CN101842812A (zh) * | 2007-11-02 | 2010-09-22 | 高等技术学校 | 用于数字图像转码中的参数质量感知选择的系统和方法 |
| CN101188756A (zh) * | 2007-12-04 | 2008-05-28 | 武汉大学 | 一种mpeg-4 sp到avs视频转码方法 |
| CN101677405A (zh) * | 2008-09-19 | 2010-03-24 | 香港科技大学 | 针对压缩视频的基于转码的鲁棒性流媒体技术和系统 |
| CN101888547A (zh) * | 2010-06-18 | 2010-11-17 | 西安电子科技大学 | 基于直接模式选择的h.264/avc快速转码方法及装置 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111597384A (zh) * | 2020-04-28 | 2020-08-28 | 深圳市商汤科技有限公司 | 视频源管理方法及相关装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP2800388A4 (en) | 2014-11-19 |
| CN103220550B (zh) | 2016-12-07 |
| EP2800388A1 (en) | 2014-11-05 |
| US20140348246A1 (en) | 2014-11-27 |
| CN103220550A (zh) | 2013-07-24 |
| US9872021B2 (en) | 2018-01-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2013107157A1 (zh) | 视频转换的方法及装置 | |
| US10848766B2 (en) | Adjusting encoding frame size based on available network bandwith | |
| US8635357B2 (en) | Dynamic selection of parameter sets for transcoding media data | |
| CN103636229B (zh) | 分发音视频内容 | |
| EP3506640A1 (en) | Content-aware predictive bitrate ladder | |
| CN106688239B (zh) | 视频下载方法、装置及系统 | |
| WO2015183910A1 (en) | Method and apparatus of content-based self-adaptive video transcoding | |
| CN104219539B (zh) | 一种基于td-lte信道检测的视频编码与传输的方法 | |
| EP3016395B1 (en) | Video encoding device and video encoding method | |
| US20120086815A1 (en) | Rapidly initializing and dynamically adjusting media streams | |
| CN106165418B (zh) | 译码视频数据的设备、方法及计算机可读媒体 | |
| US20150249848A1 (en) | Intelligent Video Quality Adjustment | |
| US9818422B2 (en) | Method and apparatus for layered compression of multimedia signals for storage and transmission over heterogeneous networks | |
| US20130208075A1 (en) | Encoding processing for conferencing systems | |
| US20160277468A1 (en) | Adapting Encoded Bandwidth | |
| CN102158693A (zh) | 自适应解码嵌入式视频比特流的方法及接收系统 | |
| Menon et al. | Energy-efficient multi-codec bitrate-ladder estimation for adaptive video streaming | |
| JP6644766B2 (ja) | ディスプレイストリーム圧縮のためにバッファ満杯を決定するためのシステムおよび方法 | |
| US12439057B2 (en) | Coding parameter deriving apparatus, coding parameter deriving method and program | |
| CN107846595B (zh) | 一种视频编码的方法和视频编码器 | |
| Miao et al. | Resource allocation for cloud-based free viewpoint video rendering for mobile phones | |
| Rajendran et al. | Energy-Quality-aware Variable Framerate Pareto-Front for Adaptive Video Streaming | |
| KR20120012089A (ko) | 스케일러블 비디오 코딩기법을 활용하는 영상 제공 시스템 및 그 방법 | |
| Malekzadeh | IP video compression comparison for smartphones in big data era | |
| Antong et al. | Quality assessment of videos compressed by HEVC based on video content complexity |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 12865627 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2012865627 Country of ref document: EP |











