CN112153379A - Transcoding quality evaluation method and device, electronic equipment and computer storage medium - Google Patents
Transcoding quality evaluation method and device, electronic equipment and computer storage medium Download PDFInfo
- Publication number
- CN112153379A CN112153379A CN202011040279.8A CN202011040279A CN112153379A CN 112153379 A CN112153379 A CN 112153379A CN 202011040279 A CN202011040279 A CN 202011040279A CN 112153379 A CN112153379 A CN 112153379A
- Authority
- CN
- China
- Prior art keywords
- video
- resolution
- interpolation
- distortion value
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 143
- 238000013441 quality evaluation Methods 0.000 title claims abstract description 10
- 238000004364 calculation method Methods 0.000 claims abstract description 19
- 238000004590 computer program Methods 0.000 claims description 7
- 238000011156 evaluation Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 10
- 238000005070 sampling Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 5
- 230000004927 fusion Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
-
- 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
- H04N21/234309—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 by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
-
- 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
- H04N21/234363—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 by altering the spatial resolution, e.g. for clients with a lower screen resolution
-
- 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
- H04N21/440218—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 by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
-
- 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
- H04N21/440263—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 by altering the spatial resolution, e.g. for displaying on a connected PDA
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Television Systems (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
Abstract
The application provides a transcoding quality evaluation method, a transcoding quality evaluation device, electronic equipment and a computer storage medium, wherein the method comprises the following steps: firstly, acquiring a first video and a second video; the method comprises the steps that a first video is a source video, and a second video is a video obtained after transcoding is carried out on the source video; then, judging whether the resolution of the first video is consistent with the resolution of the second video; if the resolution of the first video is judged to be inconsistent with the resolution of the second video, adjusting the resolution of one of the first video and the second video to the resolution of the other video; calculating distortion values of videos with adjusted resolutions and videos with unadjusted resolutions in the first video and the second video; and finally, the transcoding quality of the video is obtained by using the code rate of the second video and the distortion value obtained by calculation. The method achieves the purpose of evaluating the video transcoding quality under the condition that the resolution of the video is changed before and after transcoding.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for evaluating transcoding quality, an electronic device, and a computer storage medium.
Background
At present, the video transcoding quality is generally evaluated according to two indexes, namely the distortion condition of the transcoded video and the code rate of the transcoded video. The Video code rate is very easy to obtain, and for Video distortion, when the resolution of the Video before and after transcoding is not changed, the Video code rate can be directly calculated by using conventional indexes such as Peak Signal to Noise Ratio (PSNR), Structural SIMilarity (SSIM), Video quality multi-method Assessment Fusion (VMAF) and the like.
However, under the condition that the resolution of the video before and after transcoding is changed, the distortion of the video before and after transcoding cannot be directly calculated at present, and therefore the quality of video transcoding cannot be evaluated.
Therefore, there is a need for a method that can evaluate the video transcoding quality even when the resolution of the video changes before and after transcoding.
Disclosure of Invention
In view of the above, the present application provides a transcoding quality evaluation method, apparatus, electronic device, and computer storage medium, which are used for evaluating video transcoding quality when the resolution of a video before and after transcoding is changed.
The first aspect of the present application provides a method for evaluating transcoding quality, including:
acquiring a first video and a second video; the first video is a source video, and the second video is a video obtained after transcoding the source video;
judging whether the resolution of the first video is consistent with the resolution of the second video;
if the resolution of the first video is judged to be inconsistent with the resolution of the second video, adjusting the resolution of one of the first video and the second video to the resolution of the other video;
calculating distortion values of videos with adjusted resolutions and videos with unadjusted resolutions in the first video and the second video;
and obtaining the transcoding quality of the video by using the code rate of the second video and the distortion value obtained by calculation.
Optionally, the adjusting the resolution of one of the first video and the second video to the resolution of the other video includes:
determining an interpolation mode adopted by the second video;
interpolating the second video by adopting an interpolation mode adopted by the second video to generate an adjusted second video; wherein the resolution of the adjusted second video is consistent with the resolution of the first video.
Optionally, the determining an interpolation mode adopted by the second video includes:
performing interpolation processing on the first video by adopting at least one preset interpolation mode to obtain an interpolated video; wherein the resolution of the interpolated video is consistent with the resolution of the second video;
respectively calculating a distortion value of each interpolated video and the second video;
and selecting an interpolation mode adopted by the interpolation video corresponding to the minimum distortion value of the interpolation video and the second video as an interpolation mode adopted by the second video.
Optionally, the adjusting the resolution of one of the first video and the second video to the resolution of the other video includes:
performing interpolation processing on the first video by adopting at least one preset interpolation mode to obtain an interpolated video; wherein the resolution of the interpolated video is consistent with the resolution of the second video;
wherein: if the adopted interpolation modes are multiple, the calculating the distortion value of the video with the adjusted resolution and the video without the adjusted resolution in the first video and the second video comprises:
respectively calculating a distortion value of each interpolated video and the second video;
and selecting the minimum distortion value in the distortion values of the interpolation video and the second video as the calculated distortion value.
Optionally, the adjusting the resolution of one of the first video and the second video to the resolution of the other video includes:
performing interpolation processing on the second video by adopting at least one preset interpolation mode to obtain an interpolated video; wherein a resolution of the interpolated video is consistent with a resolution of the first video;
wherein: if the adopted interpolation modes are multiple, the calculating the distortion value of the video with the adjusted resolution and the video without the adjusted resolution in the first video and the second video comprises:
respectively calculating a distortion value of each interpolated video and the first video;
and selecting the minimum distortion value in the distortion values of the interpolation video and the first video as the calculated distortion value.
Optionally, the method for evaluating transcoding quality further includes:
if the resolution of the first video is consistent with the resolution of the second video, calculating a distortion value of the second video and the first video;
and obtaining the transcoding quality of the video according to the code rate of the second video and the distortion value of the second video and the first video.
Optionally, the preset interpolation mode includes: bilinear interpolation, bicubic interpolation, Lanuss interpolation, and nearest neighbor interpolation.
Optionally, the calculating a distortion value between a video with an adjusted resolution and a video with an unadjusted resolution in the first video and the second video includes:
calculating distortion values of a video with adjusted resolution and a video without adjusted resolution in the first video and the second video by adopting any one of the following distortion value calculation methods; the method for calculating the distortion value comprises the following steps: and peak signal-to-noise ratio, structural similarity and video quality are evaluated and fused by multiple methods.
The second aspect of the present application provides an apparatus for evaluating transcoding quality, including:
an acquisition unit configured to acquire a first video and a second video; the first video is a source video, and the second video is a video obtained after transcoding the source video;
a judging unit configured to judge whether a resolution of the first video and a resolution of the second video are consistent;
an adjusting unit, configured to adjust a resolution of one of the first video and the second video to a resolution of the other video if the determining unit determines that the resolution of the first video is not consistent with the resolution of the second video;
a first calculating unit, configured to calculate a distortion value between a video with an adjusted resolution and a video without an adjusted resolution in the first video and the second video;
and the first confirming unit is used for obtaining the transcoding quality of the video by using the code rate of the second video and the distortion value obtained by calculation.
Optionally, the adjusting unit includes:
the determining unit is used for determining an interpolation mode adopted by the second video;
the generating unit is used for interpolating the second video in an interpolation mode adopted by the second video to generate an adjusted second video; wherein the resolution of the adjusted second video is consistent with the resolution of the first video.
Optionally, the determining unit includes:
the first interpolation unit is used for carrying out interpolation processing on the first video by adopting at least one preset interpolation mode to obtain an interpolated video; wherein the resolution of the interpolated video is consistent with the resolution of the second video;
a second calculation unit, configured to calculate a distortion value of each of the interpolated video and the second video, respectively;
and the first selecting unit is used for selecting an interpolation mode adopted by the interpolation video corresponding to the minimum distortion value of the interpolation video and the second video as the interpolation mode adopted by the second video.
Optionally, the adjusting unit includes:
the second interpolation unit is used for carrying out interpolation processing on the first video by adopting at least one preset interpolation mode to obtain an interpolated video; wherein the resolution of the interpolated video is consistent with the resolution of the second video;
wherein: if the interpolation method is multiple, the first calculating unit includes:
a first calculating subunit, configured to calculate a distortion value of each of the interpolated video and the second video, respectively;
and the second selecting unit is used for selecting the minimum distortion value in the distortion values of the interpolated video and the second video as the calculated distortion value.
Optionally, the adjusting unit includes:
the third interpolation unit is used for carrying out interpolation processing on the second video by adopting at least one preset interpolation mode to obtain an interpolated video; wherein a resolution of the interpolated video is consistent with a resolution of the first video;
wherein: if the interpolation method is multiple, the first calculating unit includes:
a second calculating subunit, configured to calculate a distortion value of each of the interpolated videos and the first video, respectively;
and the third selecting unit is used for selecting the minimum distortion value in the distortion values of the interpolated video and the first video as the calculated distortion value.
Optionally, the apparatus for evaluating transcoding quality further includes:
a third calculating unit, configured to calculate a distortion value of the second video and the first video if the determining unit determines that the resolution of the first video is consistent with the resolution of the second video;
and the second confirming unit is used for obtaining the transcoding quality of the video according to the code rate of the second video and the distortion value of the second video and the first video.
Optionally, the preset interpolation mode includes: bilinear interpolation, bicubic interpolation, Lanuss interpolation, and nearest neighbor interpolation.
Optionally, the first calculating unit is configured to calculate a distortion value of a video with an adjusted resolution and a video with an unadjusted resolution in the first video and the second video by using any one of the following distortion value calculating methods; the method for calculating the distortion value comprises the following steps: and peak signal-to-noise ratio, structural similarity and video quality are evaluated and fused by multiple methods.
A third aspect of the present application provides an electronic device comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of the first aspects.
A fourth aspect of the present application provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of the first aspect.
As can be seen from the above solutions, in the method, the apparatus, the electronic device, and the computer storage medium for evaluating transcoding quality provided in the present application, the method includes: firstly, acquiring a first video and a second video; the method comprises the steps that a first video is a source video, and a second video is a video obtained after transcoding is carried out on the source video; then, judging whether the resolution of the first video is consistent with the resolution of the second video; if the resolution of the first video is judged to be inconsistent with the resolution of the second video, adjusting the resolution of one of the first video and the second video to the resolution of the other video; calculating distortion values of videos with adjusted resolutions and videos with unadjusted resolutions in the first video and the second video; and finally, the transcoding quality of the video is obtained by using the code rate of the second video and the distortion value obtained by calculation. The method achieves the purpose of evaluating the video transcoding quality under the condition that the resolution of the video is changed before and after transcoding.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a specific flowchart of a transcoding quality evaluation method provided in an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for evaluating transcoding quality according to another embodiment of the present application;
fig. 3 is a flowchart illustrating a method for evaluating transcoding quality according to another embodiment of the present application;
fig. 4 is a flowchart illustrating a method for evaluating transcoding quality according to another embodiment of the present application;
fig. 5 is a flowchart illustrating a method for evaluating transcoding quality according to another embodiment of the present application;
fig. 6 is a schematic diagram of an apparatus for evaluating transcoding quality according to another embodiment of the present application;
fig. 7 is a schematic diagram of an apparatus for evaluating transcoding quality according to another embodiment of the present application;
fig. 8 is a schematic diagram of a determining unit according to another embodiment of the present application;
fig. 9 is a schematic diagram of an apparatus for evaluating transcoding quality according to another embodiment of the present application;
fig. 10 is a schematic diagram of an apparatus for evaluating transcoding quality according to another embodiment of the present application;
fig. 11 is a schematic diagram of an electronic device implementing an evaluation method of transcoding quality according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first", "second", and the like, referred to in this application, are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence of functions performed by these devices, modules or units, but the terms "include", or any other variation thereof are intended to cover a non-exclusive inclusion, so that a process, method, article, or apparatus that includes a series of elements includes not only those elements but also other elements that are not explicitly listed, or includes elements inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a method for evaluating transcoding quality, which specifically comprises the following steps as shown in fig. 1:
s101, acquiring a first video and a second video.
The first video is a source video, and the second video is a video obtained after transcoding the source video.
Specifically, a source video and a video obtained after transcoding the source video are obtained. It should be noted that, according to different application scenarios, the manner of obtaining the source video and the video obtained by transcoding the source video may be different, for example: the user wants to evaluate the transcoding quality of the source video and the video obtained after transcoding the source video, the user can actively upload the source video and the video obtained after transcoding the source video, further evaluate the transcoding quality of the source video and the video obtained after transcoding the source video, and finally show the transcoding quality to the user; or in the process of transcoding the video, obtaining each source video and the video obtained after transcoding each source video in real time, and further evaluating the transcoding quality of each source video and the video obtained after transcoding each source video.
S102, judging whether the resolution of the first video is consistent with the resolution of the second video.
Specifically, the resolution of the first video and the resolution of the second video are obtained, and whether the resolution of the first video and the resolution of the second video are consistent is determined, for example: the resolution of the first video is 320 × 180, and the resolution of the second video is 640 × 360, which indicates that the resolution of the first video is more than consistent with the resolution of the second video; the resolution of the first video and the resolution of the second video are both 640 × 360, which indicates that the resolution of the first video is consistent with the resolution of the second video. If the resolution of the first video is not consistent with the resolution of the second video, step S103 is executed.
Optionally, in another embodiment of the present application, an implementation manner of the method for evaluating transcoding quality further includes:
and if the resolution of the first video is consistent with the resolution of the second video, calculating the distortion value of the second video and the first video.
Specifically, the resolution of the first video is consistent with the resolution of the second video, that is, it is described that no up-sampling or down-sampling is performed during the process of transcoding the first video to obtain the second video, and distortion caused by the up-sampling or down-sampling of the video does not exist, so that the distortion value between the second video and the first video can be directly calculated. The method for calculating the distortion value of the second Video and the first Video may be directly calculated by using, but not limited to, conventional indexes such as Peak Signal to Noise Ratio (PSNR), Structural SIMilarity (SSIM), Video multi-method Assessment Fusion (VMAF), and the like, and is not limited herein.
And obtaining the transcoding quality of the video according to the code rate of the second video and the distortion value of the second video and the first video.
Specifically, the quality of transcoding the video at this time is judged according to the code rate of the second video and the distortion values of the second video and the first video, and it can be understood that the higher the transcoding distortion value is, the better the transcoding quality is under the same code rate; or the lower the code rate is under the same distortion value, the better the transcoding quality is.
S103, adjusting the resolution of one of the first video and the second video to the resolution of the other video.
Specifically, the resolution of the first video may be changed by up-sampling or down-sampling, so as to obtain a video with the resolution consistent with that of the second video; the resolution of the second video can also be changed by up-sampling or down-sampling, so that the video consistent with the resolution of the first video is obtained. Wherein up-sampling or down-sampling can be typically implemented using image interpolation. The image interpolation method may adopt, but is not limited to, bilinear interpolation, bicubic interpolation, lanoces interpolation, nearest neighbor interpolation, and the like, and is not limited herein.
And S104, calculating distortion values of the video with the adjusted resolution and the video without the adjusted resolution in the first video and the second video.
For example: the video subjected to resolution adjustment is a first video, and because the resolution of the video obtained after resolution adjustment of the first video is consistent with that of a second video, a distortion value of the video obtained after resolution adjustment of the first video and the second video can be calculated; similarly, if the video subjected to resolution adjustment is the second video, since the resolution of the video obtained after resolution adjustment of the second video is consistent with that of the first video, the distortion value of the video obtained after resolution adjustment of the second video and the first video can be calculated.
It should be noted that, the mode of calculating the distortion value between the video with the adjusted resolution and the video with the unadjusted resolution in the first video and the second video may be directly calculated by using, but not limited to, conventional indexes such as PSNR, SSIM, VMAF, and the like, and is not limited herein.
And S105, obtaining the transcoding quality of the video by using the code rate of the second video and the distortion value obtained by calculation.
Specifically, the quality of the current video transcoding is judged according to the code rate of the second video and the distortion value obtained by calculation, and it can be understood that the higher the transcoding distortion value is, the better the transcoding quality is under the same code rate; or the lower the code rate is under the same distortion value, the better the transcoding quality is.
According to the scheme, the method for evaluating the transcoding quality is provided, and comprises the steps of firstly, obtaining a first video and a second video; the method comprises the steps that a first video is a source video, and a second video is a video obtained after transcoding is carried out on the source video; then, judging whether the resolution of the first video is consistent with the resolution of the second video; if the resolution of the first video is judged to be inconsistent with the resolution of the second video, adjusting the resolution of one of the first video and the second video to the resolution of the other video; calculating distortion values of videos with adjusted resolutions and videos with unadjusted resolutions in the first video and the second video; and finally, the transcoding quality of the video is obtained by using the code rate of the second video and the distortion value obtained by calculation. The method achieves the purpose of evaluating the video transcoding quality under the condition that the resolution of the video is changed before and after transcoding.
Optionally, in another embodiment of the present application, an implementation manner of the transcoding quality evaluation method, as shown in fig. 2, includes:
s201, acquiring a first video and a second video.
The first video is a source video, and the second video is a video obtained after transcoding the source video.
It should be noted that the specific implementation process of step S201 is the same as the specific implementation process of step S101, and reference may be made to this.
S202, judging whether the resolution of the first video is consistent with the resolution of the second video.
It should be noted that the specific implementation process of step S202 is the same as the specific implementation process of step S102, and reference may be made to this process.
Specifically, if it is determined that the resolution of the first video is not consistent with the resolution of the second video, step S203 is executed.
Optionally, in another embodiment of the present application, an implementation manner of the method for evaluating transcoding quality further includes:
and if the resolution of the first video is consistent with the resolution of the second video, calculating the distortion value of the second video and the first video.
And obtaining the transcoding quality of the video according to the code rate of the second video and the distortion value of the second video and the first video.
It should be noted that the specific implementation process of this embodiment is the same as the specific implementation process of the above embodiments, and reference may be made to this.
And S203, determining an interpolation mode adopted by the second video.
Specifically, the interpolation mode most likely to be adopted in the process of transcoding the first video to obtain the second video is determined. It should be noted that, because the interpolation mode adopted by the second video is not known when the second video is obtained, the interpolation mode most likely adopted by the second video needs to be determined, so that in the subsequent step, the difference mode most likely adopted by the second video is adopted to restore the resolution of the second video to the resolution of the first video, thereby reducing distortion influence caused by changing the resolution in the process of transcoding the first video to obtain the second video as much as possible.
Optionally, in another embodiment of the present application, an implementation manner of step S203, as shown in fig. 3, includes:
s301, performing interpolation processing on the first video by adopting at least one preset interpolation mode to obtain an interpolation video.
Wherein the resolution of the interpolated video is identical to the resolution of the second video.
It should be noted that the preset interpolation method may be, but is not limited to, bilinear interpolation, bicubic interpolation, lanoces interpolation, and nearest neighbor interpolation.
Specifically, at least one preset interpolation mode is adopted to perform interpolation processing on the first video, so that at least one interpolation video with the resolution consistent with that of the second video is obtained. For example, interpolation processing is performed on the first video by using an interpolation mode of bilinear interpolation, so that the resolution of the obtained bilinear interpolation video is consistent with that of the second video; performing interpolation processing on the first video by adopting an interpolation mode of bicubic interpolation to ensure that the resolution of the bicubic interpolation video obtained by the interpolation processing is consistent with that of the second video; performing interpolation processing on the first video by adopting a Lanuss interpolation mode, so that the resolution of the obtained Lanuss interpolation video is consistent with that of the second video; and performing interpolation processing on the first video by adopting an interpolation mode of nearest neighbor interpolation, so that the resolution of the nearest neighbor interpolation video obtained by the interpolation processing is consistent with that of the second video, and the like.
S302, respectively calculating a distortion value of each interpolation video and the second video.
It should be noted that the way of calculating the distortion value of each interpolated video and the second video may be directly calculated by using, but not limited to, conventional indexes such as PSNR, SSIM, VMAF, and the like, which is not limited herein.
Specifically, the interpolation processing is performed on the first video by using at least one preset interpolation mode to obtain the distortion value of each interpolated video and the second video.
And S303, selecting an interpolation mode adopted by the interpolation video corresponding to the minimum distortion value of the interpolation video and the second video as an interpolation mode adopted by the second video.
Specifically, the interpolation mode adopted by the corresponding interpolation video, which is the minimum distortion value among the distortion values of each interpolation video and the second video obtained by the calculation in the above steps, is used as the most likely interpolation mode adopted by the second video.
And S204, interpolating the second video by adopting an interpolation mode adopted by the second video to generate the adjusted second video.
And the resolution of the adjusted second video is consistent with that of the first video.
S205, calculating distortion values of the video with the adjusted resolution and the video without the adjusted resolution in the first video and the second video.
Specifically, referring to the above steps of this embodiment, if the video subjected to resolution adjustment is the second video, the distortion value of the adjusted second video and the distortion value of the first video are calculated. The method for calculating the distortion value of the adjusted second video and the first video may be directly calculated by using, but not limited to, PSNR, SSIM, VMAF, and other conventional indexes, which is not limited herein.
And S206, obtaining the transcoding quality of the video by using the code rate of the second video and the distortion value obtained by calculation.
It should be noted that the specific implementation process of step S206 is the same as the specific implementation process of step S105, and reference may be made to this.
According to the scheme, the method for evaluating the transcoding quality is provided, and comprises the steps of firstly, obtaining a first video and a second video; the method comprises the steps that a first video is a source video, and a second video is a video obtained after transcoding is carried out on the source video; then, judging whether the resolution of the first video is consistent with the resolution of the second video; if the resolution of the first video is judged to be inconsistent with the resolution of the second video, determining an interpolation mode adopted by the second video; interpolating the second video in an interpolation mode adopted by the second video to generate an adjusted second video; calculating distortion values of videos with adjusted resolutions and videos with unadjusted resolutions in the first video and the second video; and finally, the transcoding quality of the video is obtained by using the code rate of the second video and the distortion value obtained by calculation. The method achieves the purpose of evaluating the video transcoding quality under the condition that the resolution of the video is changed before and after transcoding.
Optionally, in another embodiment of the present application, an implementation manner of the transcoding quality evaluation method, as shown in fig. 4, includes:
s401, acquiring a first video and a second video.
The first video is a source video, and the second video is a video obtained after transcoding the source video.
It should be noted that the specific implementation process of step S401 is the same as the specific implementation process of step S101, and reference may be made to this.
S402, judging whether the resolution of the first video is consistent with the resolution of the second video.
It should be noted that the specific implementation process of step S402 is the same as the specific implementation process of step S102, and reference may be made to this process.
Specifically, if it is determined that the resolution of the first video is not consistent with the resolution of the second video, step S403 is executed.
Optionally, in another embodiment of the present application, an implementation manner of the method for evaluating transcoding quality further includes:
and if the resolution of the first video is consistent with the resolution of the second video, calculating the distortion value of the second video and the first video.
And obtaining the transcoding quality of the video according to the code rate of the second video and the distortion value of the second video and the first video.
It should be noted that the specific implementation process of this embodiment is the same as the specific implementation process of the above embodiments, and reference may be made to this.
And S403, performing interpolation processing on the first video by adopting at least one preset interpolation mode to obtain an interpolation video.
It should be noted that the specific implementation process of step S403 is the same as the specific implementation process of step S301, and reference may be made to this.
S404, calculating distortion values of each interpolation video and the second video respectively.
It should be noted that the specific implementation process of step S404 is the same as the specific implementation process of step S302, and reference may be made to this process.
S405, selecting the minimum distortion value in the distortion values of the interpolation video and the second video as the calculated distortion value.
Specifically, the distortion value with the minimum distortion value in the distortion values of each interpolated video and the second video calculated in the above steps is used as the calculated distortion value.
And S406, obtaining the transcoding quality of the video by using the code rate of the second video and the distortion value obtained by calculation.
It should be noted that the specific implementation process of step S406 is the same as the specific implementation process of step S105, and reference may be made to this.
According to the scheme, the method for evaluating the transcoding quality is provided, and comprises the steps of firstly, obtaining a first video and a second video; the method comprises the steps that a first video is a source video, and a second video is a video obtained after transcoding is carried out on the source video; then, judging whether the resolution of the first video is consistent with the resolution of the second video; if the resolution of the first video is judged to be inconsistent with the resolution of the second video, performing interpolation processing on the first video by adopting at least one preset interpolation mode to obtain an interpolated video; respectively calculating the distortion value of each interpolation video and the second video; selecting the minimum distortion value in the distortion values of the interpolated video and the second video as the calculated distortion value; and obtaining the transcoding quality of the video by using the code rate of the second video and the distortion value obtained by calculation. The method achieves the purpose of evaluating the video transcoding quality under the condition that the resolution of the video is changed before and after transcoding.
Optionally, in another embodiment of the present application, an implementation manner of the transcoding quality evaluation method, as shown in fig. 5, includes:
s501, acquiring a first video and a second video.
The first video is a source video, and the second video is a video obtained after transcoding the source video.
It should be noted that the specific implementation process of step S501 is the same as the specific implementation process of step S101, and reference may be made to this.
S502, judging whether the resolution of the first video is consistent with the resolution of the second video.
It should be noted that the specific implementation process of step S502 is the same as the specific implementation process of step S102, and reference may be made to this.
Specifically, if it is determined that the resolution of the first video is not consistent with the resolution of the second video, step S503 is executed.
Optionally, in another embodiment of the present application, an implementation manner of the method for evaluating transcoding quality further includes:
and if the resolution of the first video is consistent with the resolution of the second video, calculating the distortion value of the second video and the first video.
And obtaining the transcoding quality of the video according to the code rate of the second video and the distortion value of the second video and the first video.
It should be noted that the specific implementation process of this embodiment is the same as the specific implementation process of the above embodiments, and reference may be made to this.
S503, performing interpolation processing on the second video by adopting at least one preset interpolation mode to obtain an interpolation video.
Wherein the resolution of the interpolated video is identical to the resolution of the first video.
It should be noted that the preset interpolation method may be, but is not limited to, bilinear interpolation, bicubic interpolation, lanoces interpolation, and nearest neighbor interpolation.
Specifically, at least one preset interpolation mode is adopted to perform interpolation processing on the second video, so that at least one interpolation video with the resolution consistent with that of the first video is obtained. For example, interpolation processing is performed on the second video by using an interpolation mode of bilinear interpolation, so that the resolution of the obtained bilinear interpolation video is consistent with that of the first video; performing interpolation processing on the second video by adopting an interpolation mode of bicubic interpolation to ensure that the resolution of the bicubic interpolation video obtained by the interpolation processing is consistent with that of the first video; interpolation processing is carried out on the second video in a Lanuss interpolation mode, so that the resolution of the obtained Lanuss interpolation video is consistent with that of the first video; and performing interpolation processing on the second video by adopting an interpolation mode of nearest neighbor interpolation, so that the resolution of the nearest neighbor interpolation video obtained by the interpolation processing is consistent with that of the first video, and the like.
S504, distortion values of each interpolation video and the first video are calculated respectively.
It should be noted that the way of calculating the distortion value of each interpolated video and the first video may be directly calculated by using, but not limited to, conventional indexes such as PSNR, SSIM, VMAF, and the like, and is not limited herein.
Specifically, the interpolation processing on the second video by using at least one preset interpolation mode is respectively calculated, so as to obtain the distortion value of each interpolated video and the distortion value of the first video.
And S505, selecting the minimum distortion value in the distortion values of the interpolated video and the first video as the calculated distortion value.
Specifically, the distortion value with the minimum distortion value in the distortion values of each interpolated video and the first video calculated in the above steps is used as the calculated distortion value.
S506, the transcoding quality of the video is obtained by using the code rate of the second video and the distortion value obtained through calculation.
It should be noted that the specific implementation process of step S506 is the same as the specific implementation process of step S105, and reference may be made to this.
According to the scheme, the method for evaluating the transcoding quality is provided, and comprises the steps of firstly, obtaining a first video and a second video; the method comprises the steps that a first video is a source video, and a second video is a video obtained after transcoding is carried out on the source video; then, judging whether the resolution of the first video is consistent with the resolution of the second video; if the resolution of the first video is judged to be inconsistent with the resolution of the second video, performing interpolation processing on the second video by adopting at least one preset interpolation mode to obtain an interpolated video; respectively calculating the distortion value of each interpolation video and the distortion value of the first video; selecting the minimum distortion value in the distortion values of the interpolated video and the first video as the calculated distortion value; and obtaining the transcoding quality of the video by using the code rate of the second video and the distortion value obtained by calculation. The method achieves the purpose of evaluating the video transcoding quality under the condition that the resolution of the video is changed before and after transcoding.
Another embodiment of the present application provides an apparatus for evaluating transcoding quality, as shown in fig. 6, specifically including:
an obtaining unit 601, configured to obtain a first video and a second video.
The first video is a source video, and the second video is a video obtained after transcoding the source video.
A determining unit 602, configured to determine whether the resolution of the first video and the resolution of the second video are consistent.
Optionally, in another embodiment of the present application, the apparatus for evaluating transcoding quality further includes:
a third calculating unit, configured to calculate a distortion value between the second video and the first video if the determining unit 602 determines that the resolution of the first video is consistent with the resolution of the second video.
And the second confirming unit is used for obtaining the transcoding quality of the video according to the code rate of the second video and the distortion value of the second video and the first video.
For specific working processes of the units disclosed in the above embodiments of the present application, reference may be made to the contents of the corresponding method embodiments, which are not described herein again.
An adjusting unit 603, configured to adjust the resolution of one of the first video and the second video to the resolution of the other video if the determining unit 602 determines that the resolution of the first video is not consistent with the resolution of the second video.
The first calculating unit 604 is configured to calculate distortion values of a video of the first video and the second video after resolution adjustment and a video without resolution adjustment.
The first calculating unit 604 is configured to calculate a distortion value of a video with an adjusted resolution and a video with an unadjusted resolution in the first video and the second video by using any one of the following distortion value calculating methods; the method for calculating the distortion value comprises the following steps: and peak signal-to-noise ratio, structural similarity and video quality are evaluated and fused by multiple methods.
The first determining unit 605 is configured to obtain the transcoding quality of the video by using the code rate of the second video and the calculated distortion value.
For a specific working process of the unit disclosed in the above embodiment of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 1, which is not described herein again.
According to the above scheme, the present application provides an apparatus for evaluating transcoding quality, where first, an obtaining unit 601 obtains a first video and a second video; the method comprises the steps that a first video is a source video, and a second video is a video obtained after transcoding is carried out on the source video; then, the determination unit 602 determines whether the resolution of the first video and the resolution of the second video coincide; if the determining unit 602 determines that the resolution of the first video is not consistent with the resolution of the second video, the adjusting unit 603 adjusts the resolution of one of the first video and the second video to the resolution of the other video; then, the first calculating unit 604 calculates a distortion value between a video of the first video and the second video, the video of which resolution is adjusted, and a video of which resolution is not adjusted; finally, the first determining unit 605 obtains the transcoding quality of the video by using the code rate of the second video and the calculated distortion value. The method achieves the purpose of evaluating the video transcoding quality under the condition that the resolution of the video is changed before and after transcoding.
Another embodiment of the present application provides an apparatus for evaluating transcoding quality, as shown in fig. 7, specifically including:
an obtaining unit 601, configured to obtain a first video and a second video.
The first video is a source video, and the second video is a video obtained after transcoding the source video.
A determining unit 602, configured to determine whether the resolution of the first video and the resolution of the second video are consistent.
Optionally, in another embodiment of the present application, the apparatus for evaluating transcoding quality further includes:
a third calculating unit, configured to calculate a distortion value between the second video and the first video if the determining unit 602 determines that the resolution of the first video is consistent with the resolution of the second video.
And the second confirming unit is used for obtaining the transcoding quality of the video according to the code rate of the second video and the distortion value of the second video and the first video.
For specific working processes of the units disclosed in the above embodiments of the present application, reference may be made to the contents of the corresponding method embodiments, which are not described herein again.
A determining unit 701, configured to determine an interpolation method used by the second video.
Optionally, in another embodiment of the present application, an implementation manner of the determining unit 701, as shown in fig. 8, includes:
the first interpolation unit 801 is configured to perform interpolation processing on the first video by using at least one preset interpolation method to obtain an interpolated video.
Wherein the resolution of the interpolated video is identical to the resolution of the second video.
A second calculating unit 802, configured to calculate a distortion value for each of the interpolated video and the second video, respectively.
The first selecting unit 803 is configured to select an interpolation mode used by the interpolated video corresponding to the minimum distortion value between the interpolated video and the second video as an interpolation mode used by the second video.
For a specific working process of the unit disclosed in the above embodiment of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 3, which is not described herein again.
A generating unit 702, configured to interpolate the second video in the interpolation manner adopted by the second video, and generate the adjusted second video.
And the resolution of the adjusted second video is consistent with that of the first video.
The first calculating unit 604 is configured to calculate distortion values of a video of the first video and the second video after resolution adjustment and a video without resolution adjustment.
The first determining unit 605 is configured to obtain the transcoding quality of the video by using the code rate of the second video and the calculated distortion value.
For a specific working process of the unit disclosed in the above embodiment of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 2, which is not described herein again.
According to the above scheme, the present application provides an apparatus for evaluating transcoding quality, where first, an obtaining unit 601 obtains a first video and a second video; the method comprises the steps that a first video is a source video, and a second video is a video obtained after transcoding is carried out on the source video; then, the determination unit 602 determines whether the resolution of the first video and the resolution of the second video coincide; if the resolution of the first video is determined to be inconsistent with the resolution of the second video, the determining unit 701 determines an interpolation mode adopted by the second video; the generating unit 702 interpolates the second video in an interpolation manner adopted by the second video to generate an adjusted second video; the first calculating unit 604 calculates distortion values of a video with an adjusted resolution and a video without an adjusted resolution in the first video and the second video; finally, the first determining unit 605 obtains the transcoding quality of the video by using the code rate of the second video and the calculated distortion value. The method achieves the purpose of evaluating the video transcoding quality under the condition that the resolution of the video is changed before and after transcoding.
Another embodiment of the present application provides an apparatus for evaluating transcoding quality, as shown in fig. 9, specifically including:
an obtaining unit 601, configured to obtain a first video and a second video.
The first video is a source video, and the second video is a video obtained after transcoding the source video.
A determining unit 602, configured to determine whether the resolution of the first video and the resolution of the second video are consistent.
Optionally, in another embodiment of the present application, the apparatus for evaluating transcoding quality further includes:
a third calculating unit, configured to calculate a distortion value between the second video and the first video if the determining unit 602 determines that the resolution of the first video is consistent with the resolution of the second video.
And the second confirming unit is used for obtaining the transcoding quality of the video according to the code rate of the second video and the distortion value of the second video and the first video.
For specific working processes of the units disclosed in the above embodiments of the present application, reference may be made to the contents of the corresponding method embodiments, which are not described herein again.
The second interpolation unit 901 is configured to perform interpolation processing on the first video by using at least one preset interpolation mode to obtain an interpolated video.
Wherein the resolution of the interpolated video is identical to the resolution of the second video.
Wherein: if a plurality of interpolation methods are used, the first calculating unit 604 includes:
a first calculating subunit 902, configured to calculate a distortion value for each of the interpolated video and the second video, respectively.
A second selecting unit 903, configured to select a minimum distortion value of the distortion values of the interpolated video and the second video as the calculated distortion value.
The first determining unit 605 is configured to obtain the transcoding quality of the video by using the code rate of the second video and the calculated distortion value.
For the specific working process of the unit disclosed in the above embodiment, reference may be made to the content of the corresponding method embodiment, as shown in fig. 4, which is not described herein again.
According to the above scheme, the present application provides an apparatus for evaluating transcoding quality, where first, an obtaining unit 601 obtains a first video and a second video; the method comprises the steps that a first video is a source video, and a second video is a video obtained after transcoding is carried out on the source video; then, the determination unit 602 determines whether the resolution of the first video and the resolution of the second video coincide; if the determining unit 602 determines that the resolution of the first video is not consistent with the resolution of the second video, the second interpolation unit 901 performs interpolation processing on the first video by using at least one preset interpolation mode to obtain an interpolated video; the first calculating subunit 902 calculates a distortion value of each interpolated video and the second video respectively; the second selecting unit 903 selects the minimum distortion value of the distortion values of the interpolated video and the second video as the calculated distortion value; the first determining unit 605 obtains the transcoding quality of the video by using the code rate of the second video and the calculated distortion value. The method achieves the purpose of evaluating the video transcoding quality under the condition that the resolution of the video is changed before and after transcoding.
Another embodiment of the present application provides an apparatus for evaluating transcoding quality, as shown in fig. 10, specifically including:
an obtaining unit 601, configured to obtain a first video and a second video.
The first video is a source video, and the second video is a video obtained after transcoding the source video.
A determining unit 602, configured to determine whether the resolution of the first video and the resolution of the second video are consistent.
Optionally, in another embodiment of the present application, the apparatus for evaluating transcoding quality further includes:
a third calculating unit, configured to calculate a distortion value between the second video and the first video if the determining unit 602 determines that the resolution of the first video is consistent with the resolution of the second video.
And the second confirming unit is used for obtaining the transcoding quality of the video according to the code rate of the second video and the distortion value of the second video and the first video.
For specific working processes of the units disclosed in the above embodiments of the present application, reference may be made to the contents of the corresponding method embodiments, which are not described herein again.
A third interpolation unit 1001, configured to perform interpolation processing on the second video in at least one preset interpolation manner to obtain an interpolated video.
Wherein the resolution of the interpolated video is identical to the resolution of the first video.
Wherein: if a plurality of interpolation methods are used, the first calculating unit 604 includes:
a second calculating subunit 1002, configured to calculate a distortion value of each interpolated video and the distortion value of the first video, respectively.
A third selecting unit 1003, configured to select a minimum distortion value of the distortion values of the interpolated video and the first video as the calculated distortion value.
The first determining unit 605 is configured to obtain the transcoding quality of the video by using the code rate of the second video and the calculated distortion value.
For a specific working process of the unit disclosed in the above embodiment, reference may be made to the content of the corresponding method embodiment, as shown in fig. 5, which is not described herein again.
According to the above scheme, the present application provides an apparatus for evaluating transcoding quality, where first, an obtaining unit 601 obtains a first video and a second video; the method comprises the steps that a first video is a source video, and a second video is a video obtained after transcoding is carried out on the source video; then, the determination unit 602 determines whether the resolution of the first video and the resolution of the second video coincide; if the determining unit 602 determines that the resolution of the first video is not consistent with the resolution of the second video, the third interpolation unit 1001 performs interpolation processing on the second video by using at least one preset interpolation mode to obtain an interpolated video; the second calculating subunit 1002 calculates a distortion value of each interpolated video and the first video respectively; the third selecting unit 1003 selects the minimum distortion value of the distortion values of the interpolated video and the first video as the calculated distortion value; finally, the first determining unit 605 obtains the transcoding quality of the video by using the code rate of the second video and the calculated distortion value. The method achieves the purpose of evaluating the video transcoding quality under the condition that the resolution of the video is changed before and after transcoding.
Another embodiment of the present application provides an electronic device, as shown in fig. 11, including:
one or more processors 1101.
The one or more programs, when executed by the one or more processors 1101, cause the one or more processors 1101 to implement a method as in any one of the embodiments described above.
Another embodiment of the present application provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method as described in any of the above embodiments.
In the above embodiments disclosed in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present disclosure may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part. The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a live broadcast device, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Those skilled in the art can make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (11)
1. A transcoding quality evaluation method is characterized by comprising the following steps:
acquiring a first video and a second video; the first video is a source video, and the second video is a video obtained after transcoding the source video;
judging whether the resolution of the first video is consistent with the resolution of the second video;
if the resolution of the first video is judged to be inconsistent with the resolution of the second video, adjusting the resolution of one of the first video and the second video to the resolution of the other video;
calculating distortion values of videos with adjusted resolutions and videos with unadjusted resolutions in the first video and the second video;
and obtaining the transcoding quality of the video by using the code rate of the second video and the distortion value obtained by calculation.
2. The evaluation method according to claim 1, wherein the adjusting the resolution of one of the first video and the second video to the resolution of the other video comprises:
determining an interpolation mode adopted by the second video;
interpolating the second video by adopting an interpolation mode adopted by the second video to generate an adjusted second video; wherein the resolution of the adjusted second video is consistent with the resolution of the first video.
3. The evaluation method according to claim 2, wherein the determining the interpolation method adopted by the second video comprises:
performing interpolation processing on the first video by adopting at least one preset interpolation mode to obtain an interpolated video; wherein the resolution of the interpolated video is consistent with the resolution of the second video;
respectively calculating a distortion value of each interpolated video and the second video;
and selecting an interpolation mode adopted by the interpolation video corresponding to the minimum distortion value of the interpolation video and the second video as an interpolation mode adopted by the second video.
4. The evaluation method according to claim 1, wherein the adjusting the resolution of one of the first video and the second video to the resolution of the other video comprises:
performing interpolation processing on the first video by adopting at least one preset interpolation mode to obtain an interpolated video; wherein the resolution of the interpolated video is consistent with the resolution of the second video;
wherein: if the adopted interpolation modes are multiple, the calculating the distortion value of the video with the adjusted resolution and the video without the adjusted resolution in the first video and the second video comprises:
respectively calculating a distortion value of each interpolated video and the second video;
and selecting the minimum distortion value in the distortion values of the interpolation video and the second video as the calculated distortion value.
5. The evaluation method according to claim 1, wherein the adjusting the resolution of one of the first video and the second video to the resolution of the other video comprises:
performing interpolation processing on the second video by adopting at least one preset interpolation mode to obtain an interpolated video; wherein a resolution of the interpolated video is consistent with a resolution of the first video;
wherein: if the adopted interpolation modes are multiple, the calculating the distortion value of the video with the adjusted resolution and the video without the adjusted resolution in the first video and the second video comprises:
respectively calculating a distortion value of each interpolated video and the first video;
and selecting the minimum distortion value in the distortion values of the interpolation video and the first video as the calculated distortion value.
6. The evaluation method according to claim 1, further comprising:
if the resolution of the first video is consistent with the resolution of the second video, calculating a distortion value of the second video and the first video;
and obtaining the transcoding quality of the video according to the code rate of the second video and the distortion value of the second video and the first video.
7. The evaluation method according to claim 3, 4 or 5, wherein the preset interpolation manner comprises: bilinear interpolation, bicubic interpolation, Lanuss interpolation, and nearest neighbor interpolation.
8. The method according to claim 1, wherein the calculating the distortion value between the resolution-adjusted video and the resolution-unadjusted video in the first video and the second video comprises:
calculating distortion values of a video with adjusted resolution and a video without adjusted resolution in the first video and the second video by adopting any one of the following distortion value calculation methods; the method for calculating the distortion value comprises the following steps: and peak signal-to-noise ratio, structural similarity and video quality are evaluated and fused by multiple methods.
9. An apparatus for evaluating transcoding quality, comprising:
an acquisition unit configured to acquire a first video and a second video; the first video is a source video, and the second video is a video obtained after transcoding the source video;
a judging unit configured to judge whether a resolution of the first video and a resolution of the second video are consistent;
an adjusting unit, configured to adjust a resolution of one of the first video and the second video to a resolution of the other video if the determining unit determines that the resolution of the first video is not consistent with the resolution of the second video;
a first calculating unit, configured to calculate a distortion value between a video with an adjusted resolution and a video without an adjusted resolution in the first video and the second video;
and the first confirming unit is used for obtaining the transcoding quality of the video by using the code rate of the second video and the distortion value obtained by calculation.
10. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-8.
11. A computer storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011040279.8A CN112153379B (en) | 2020-09-28 | 2020-09-28 | Transcoding quality evaluation method and device, electronic equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011040279.8A CN112153379B (en) | 2020-09-28 | 2020-09-28 | Transcoding quality evaluation method and device, electronic equipment and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112153379A true CN112153379A (en) | 2020-12-29 |
CN112153379B CN112153379B (en) | 2023-02-24 |
Family
ID=73896057
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011040279.8A Active CN112153379B (en) | 2020-09-28 | 2020-09-28 | Transcoding quality evaluation method and device, electronic equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112153379B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114760506A (en) * | 2022-04-11 | 2022-07-15 | 北京字跳网络技术有限公司 | Video transcoding evaluation method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101778275A (en) * | 2009-01-09 | 2010-07-14 | 深圳市融创天下科技发展有限公司 | Image processing method of self-adaptive time domain and spatial domain resolution ratio frame |
US20120114046A1 (en) * | 2010-11-10 | 2012-05-10 | Iouri Gordon | Transcode video verifier device and method for verifying a quality of a transcoded video file |
CN103414915A (en) * | 2013-08-22 | 2013-11-27 | 合一网络技术(北京)有限公司 | Quality evaluation method and device for uploaded videos of websites |
CN110572713A (en) * | 2019-09-24 | 2019-12-13 | 广州优视云集科技有限公司 | transcoding method and processing terminal for adaptive video bandwidth ratio |
CN111182300A (en) * | 2018-11-09 | 2020-05-19 | 华为技术有限公司 | Method, device and equipment for determining coding parameters and storage medium |
-
2020
- 2020-09-28 CN CN202011040279.8A patent/CN112153379B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101778275A (en) * | 2009-01-09 | 2010-07-14 | 深圳市融创天下科技发展有限公司 | Image processing method of self-adaptive time domain and spatial domain resolution ratio frame |
US20120114046A1 (en) * | 2010-11-10 | 2012-05-10 | Iouri Gordon | Transcode video verifier device and method for verifying a quality of a transcoded video file |
CN103414915A (en) * | 2013-08-22 | 2013-11-27 | 合一网络技术(北京)有限公司 | Quality evaluation method and device for uploaded videos of websites |
CN111182300A (en) * | 2018-11-09 | 2020-05-19 | 华为技术有限公司 | Method, device and equipment for determining coding parameters and storage medium |
CN110572713A (en) * | 2019-09-24 | 2019-12-13 | 广州优视云集科技有限公司 | transcoding method and processing terminal for adaptive video bandwidth ratio |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114760506A (en) * | 2022-04-11 | 2022-07-15 | 北京字跳网络技术有限公司 | Video transcoding evaluation method, device, equipment and storage medium |
CN114760506B (en) * | 2022-04-11 | 2024-02-09 | 北京字跳网络技术有限公司 | Video transcoding evaluation method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112153379B (en) | 2023-02-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11178404B2 (en) | Method and apparatus of video coding | |
US8189670B2 (en) | Device, method and program for generating interpolation frame | |
KR101136506B1 (en) | Image generation method, device, its program and recording medium stored with program | |
US20070047651A1 (en) | Video prediction apparatus and method for multi-format codec and video encoding/decoding apparatus and method using the video prediction apparatus and method | |
JP5502336B2 (en) | Video signal encoding apparatus and video signal encoding method | |
US8363985B2 (en) | Image generation method and apparatus, program therefor, and storage medium which stores the program | |
US11032539B2 (en) | Video coding method, computer device, and storage medium | |
JP2941582B2 (en) | Method for reducing noise in frame transmitted video signal | |
EP1473670A2 (en) | Colour edge enhancement method | |
CN112153379B (en) | Transcoding quality evaluation method and device, electronic equipment and computer storage medium | |
KR101805625B1 (en) | Method and appratus for converting image rate using image scaling | |
JP2006014336A (en) | Image processing apparatus and method and computer readable storage medium | |
US20050104970A1 (en) | Image signal processing apparatus and method, and program and recording medium used therewith | |
CN111586321A (en) | Video generation method and device, electronic equipment and computer-readable storage medium | |
US8244055B2 (en) | Image processing apparatus and method, and program | |
JPH0795591A (en) | Digital picture signal processing unit | |
CN101309376B (en) | Method and device for eliminating alternate line | |
EP2166758B1 (en) | Image signal processing apparatus and image signal processing method | |
CN112492233A (en) | Method and device for adapting resolution of transmitting end and receiving end of image transmission system | |
CN112492250A (en) | Method and device for adapting resolution of transmitting end and receiving end of image transmission system | |
JP4079842B2 (en) | Data multiplexing / extraction method for information data with respect to enlarged image data and apparatus to which these are applied | |
WO2014034170A1 (en) | Image processing apparatus and image processing method | |
JP2004159171A (en) | Image compressing method and apparatus thereof | |
JP4250807B2 (en) | Field frequency conversion device and conversion method | |
EP2667351B1 (en) | Image processing device and image processing method |
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 |