[go: up one dir, main page]

CN112616051B - Video quality comparison method and device, storage medium and electronic equipment - Google Patents

Video quality comparison method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112616051B
CN112616051B CN202011540152.2A CN202011540152A CN112616051B CN 112616051 B CN112616051 B CN 112616051B CN 202011540152 A CN202011540152 A CN 202011540152A CN 112616051 B CN112616051 B CN 112616051B
Authority
CN
China
Prior art keywords
video
distortion
quality
calculating
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011540152.2A
Other languages
Chinese (zh)
Other versions
CN112616051A (en
Inventor
张文杰
李果
樊鸿飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202011540152.2A priority Critical patent/CN112616051B/en
Publication of CN112616051A publication Critical patent/CN112616051A/en
Application granted granted Critical
Publication of CN112616051B publication Critical patent/CN112616051B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods 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/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a video quality comparison method and device, a storage medium and electronic equipment, and belongs to the technical field of video processing. Wherein the method comprises the following steps: acquiring a first video and a second video, wherein the first video and the second video are videos of the same source video which are coded in different modes; calculating a first distortion degree of the first video by taking the second video as a reference video, and calculating a second distortion degree of the second video by taking the first video as the reference video; video quality of the first video and the second video are compared based on the first distortion level and the second distortion level. The invention solves the technical problem that the related technology can not objectively compare the quality of the video under the condition of no original video, and can compare the quality of two homologous distorted videos under the condition of no original video by using an objective evaluation algorithm.

Description

Video quality comparison method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of video processing, and in particular, to a method and apparatus for comparing video quality, a storage medium, and an electronic device.
Background
The related art refers to a way of converting a file of an original video format into a file of another video format by a compression technique when video encoding is performed. In order to facilitate video transmission and storage, a new video file (called a distorted video) is usually produced by video encoding an original video, and the difference between the distorted video and a source video is video distortion.
The related art can be classified into subjective and objective according to an evaluation mode when evaluating the video quality of a distorted video, and objective evaluation means that the video quality is scored by a specific algorithm by means of a computer. In the related art, when objective evaluation is performed, for a plurality of homologous distorted videos (two distorted videos of the same source video are encoded in different modes), under the condition that an original video cannot be obtained, no better objective evaluation method is available at present to compare the quality of the videos, at the moment, objective indexes such as PSNR (Peak Signal to NoiseRatio ), SSIM (Structural SIMilarityIndex, structural similarity) and the like among the videos are calculated, only the difference among the videos can be calculated, and the quality of the videos cannot be objectively compared.
In view of the above problems in the related art, no effective solution has been found yet.
Disclosure of Invention
The embodiment of the invention provides a video quality comparison method and device, a storage medium and electronic equipment.
According to an aspect of an embodiment of the present application, there is provided a video quality comparing method, including: acquiring a first video and a second video, wherein the first video and the second video are videos of the same source video which are coded in different modes; calculating a first distortion degree of the first video by taking the second video as a reference video, and calculating a second distortion degree of the second video by taking the first video as the reference video; video quality of the first video and the second video are compared based on the first distortion level and the second distortion level.
Further, comparing the video quality of the first video and the second video based on the first distortion factor and the second distortion factor comprises: comparing the first distortion factor with the second distortion factor; if the first distortion factor is greater than the second distortion factor, determining that the video quality of the first video is higher than that of the second video; if the second distortion factor is greater than the first distortion factor, determining that the video quality of the second video is higher than that of the first video; and if the first distortion degree is equal to the second distortion degree, determining that the video quality of the second video is equal to the first video.
Further, calculating a first distortion factor of the first video with the second video as a reference video, and calculating a second distortion factor of the second video with the first video as a reference video, includes: the first video is used as a test video, the second video is used as a reference video, a preset video quality method is used for evaluating and fusing the VMAF model, a first VMAF score is output, the second video is used as a test video, the first video is used as a reference video, the preset VMAF model is input, and a second VMAF score is output; and converting the first VMAF score into the first distortion degree, and converting the second VMAF score into the second distortion degree.
Further, after comparing the video quality of the first video and the second video based on the first distortion level and the second distortion level, the method further comprises: acquiring a second video and a third video, wherein the second video and the third video are videos coded in different modes through the same source video; calculating a third distortion factor of the second video by taking the third video as a reference video, and calculating a fourth distortion factor of the third video by taking the second video as a reference video; comparing video quality of the second video and the third video based on the third distortion level and the fourth distortion level; the first video, the second video, and the third video are ordered based on video quality of the second video and the third video.
Further, after acquiring the first video and the second video, the method further comprises: judging whether the first video and the second video are the same video or not; and if the first video and the second video are the same video, determining that the video quality of the first video and the video quality of the second video are equal.
Further, determining whether the first video and the second video are the same video includes at least one of: calculating a first MD5 value of the first video and calculating a second MD5 value of the second video; if the first MD5 value is equal to the second MD5 value, determining that the first video and the second video are the same video, and if the first MD5 value is not equal to the second MD5 value, determining that the first video and the second video are different videos; reading file sizes of the first video and the second video respectively; if the file sizes of the first video and the second video are equal, determining that the first video and the second video are the same video, and if the file sizes of the first video and the second video are unequal, determining that the first video and the second video are not different videos.
Further, before calculating the first distortion factor of the first video with the second video as a reference video and calculating the second distortion factor of the second video with the first video as a reference video, the method further includes: the first video and the second video are decoded into an uncompressed format.
According to another aspect of the embodiments of the present application, there is also provided a video quality comparing apparatus, including: the first acquisition module is used for acquiring a first video and a second video, wherein the first video and the second video are videos of the same source video which are coded in different modes; the first calculation module is used for calculating a first distortion degree of the first video by taking the second video as a reference video, and calculating a second distortion degree of the second video by taking the first video as the reference video; and the first comparison module is used for comparing the video quality of the first video and the second video based on the first distortion degree and the second distortion degree.
Further, the first comparison module includes: a comparison unit configured to compare the first distortion factor and the second distortion factor; a determining unit, configured to determine that, if the first distortion factor is greater than the second distortion factor, the video quality of the first video is higher than the second video; if the second distortion factor is greater than the first distortion factor, determining that the video quality of the second video is higher than that of the first video; and if the first distortion degree is equal to the second distortion degree, determining that the video quality of the second video is equal to the first video.
Further, the first computing module includes: the computing unit is used for inputting a preset video quality multi-device evaluation fusion VMAF model by taking the first video as a test video and the second video as a reference video, outputting a first VMAF score, inputting the preset VMAF model by taking the second video as a test video and the first video as a reference video, and outputting a second VMAF score; and the determining unit is used for converting the first VMAF score into the first distortion degree and converting the second VMAF score into the second distortion degree.
Further, the apparatus further comprises: the second obtaining module is used for obtaining a second video and a third video after the calculating module compares the video quality of the first video and the second video based on the first distortion degree and the second distortion degree, wherein the second video and the third video are videos coded in different modes through the same source video; the second calculation module is used for calculating a third distortion degree of the second video by taking the third video as a reference video, and calculating a fourth distortion degree of the third video by taking the second video as the reference video; a second comparison module for comparing video quality of the second video and the third video based on the third distortion level and the fourth distortion level; and the ordering module is used for ordering the first video, the second video and the third video based on the video quality of the second video and the third video.
Further, the apparatus further comprises: the judging module is used for judging whether the first video and the second video are the same video or not after the first obtaining module obtains the first video and the second video; and the determining module is used for determining that the video quality of the first video is equal to that of the second video if the first video and the second video are the same video.
Further, the judging module includes at least one of: a first judging unit, configured to calculate a first MD5 value of the first video and calculate a second MD5 value of the second video; if the first MD5 value is equal to the second MD5 value, determining that the first video and the second video are the same video, and if the first MD5 value is not equal to the second MD5 value, determining that the first video and the second video are different videos; the second judging unit is used for respectively reading the file sizes of the first video and the second video; if the file sizes of the first video and the second video are equal, determining that the first video and the second video are the same video, and if the file sizes of the first video and the second video are unequal, determining that the first video and the second video are not different videos.
Further, the apparatus further comprises: and the decoding module is used for decoding the first video and the second video into an uncompressed format before the first calculating module calculates the first distortion degree of the first video by taking the second video as a reference video and calculates the second distortion degree of the second video by taking the first video as the reference video.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that performs the steps described above when running.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; and a processor for executing the steps of the method by running a program stored on the memory.
Embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of the above method.
According to the invention, the first video and the second video are obtained, the second video is used as a reference video to calculate the first distortion degree of the first video, the first video is used as the reference video to calculate the second distortion degree of the second video, finally, the video quality of the first video and the video quality of the second video are compared based on the first distortion degree and the second distortion degree, and the distortion degrees of two homologous videos are calculated in a crossing way by adopting an asymmetric reference evaluation algorithm, so that the reference video with low distortion degree has better quality. The method solves the technical problem that the quality of the video cannot be objectively compared under the condition of no original video in the related technology, and can obtain the quality of two homologous distorted videos through comparison of an objective evaluation algorithm under the condition of no original video.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a block diagram of the hardware architecture of a server according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of comparing video quality according to an embodiment of the present invention;
FIG. 3 is an overall flow chart of an embodiment of the present invention;
FIG. 4 is a flow chart of performing a pairwise video quality comparison in accordance with an embodiment of the present invention;
fig. 5 is a block diagram of a video quality comparing apparatus according to an embodiment of the present invention;
fig. 6 is a block diagram of an electronic device embodying an embodiment of the present invention.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
The method according to the first embodiment of the present application may be performed in a server, a computer, an image device, a mobile phone, a tablet, or a similar computing device. Taking the operation on a server as an example, fig. 1 is a block diagram of a hardware structure of a server according to an embodiment of the present invention. As shown in fig. 1, the server may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative, and is not intended to limit the structure of the server described above. For example, the server may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store server programs, such as software programs of application software and modules, such as a server program corresponding to a video quality comparison method in an embodiment of the present invention, and the processor 102 executes the server program stored in the memory 104 to perform various functional applications and data processing, that is, to implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located with respect to the processor 102, which may be connected to a server via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a server. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, a method for comparing video quality is provided, and fig. 2 is a flowchart of a method for comparing video quality according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, a first video and a second video are obtained, wherein the first video and the second video are videos obtained by encoding the same source video in different modes;
in this embodiment, the first video and the second video are both distorted videos obtained by encoding the same source video in different manners, and due to differences of an encoding algorithm, an encoding environment and the like, a certain difference may exist in the quality of the encoded videos.
Step S204, calculating a first distortion factor of the first video by taking the second video as a reference video, and calculating a second distortion factor of the second video by taking the first video as the reference video;
the first video and the second video are respectively used as a reference video and a test video to calculate the distortion degree in a crossing way, the smaller the distortion degree is, the closer the test video is to the reference video, the reference evaluation algorithm with asymmetry is adopted, two videos are exchanged in sequence during calculation, one video is respectively used as the reference video, the other video is used as the test video, and the two calculation results are different.
Step S206, comparing the video quality of the first video and the second video based on the first distortion degree and the second distortion degree.
Through the steps, the first video and the second video are obtained, the second video is used as a reference video to calculate the first distortion degree of the first video, the first video is used as the reference video to calculate the second distortion degree of the second video, finally, the video quality of the first video and the video quality of the second video are compared based on the first distortion degree and the second distortion degree, the distortion degrees of the two homologous videos are calculated in a crossing mode through an asymmetric reference evaluation algorithm, and the reference video quality of the time with low distortion degree is better. The method solves the technical problem that the quality of the video cannot be objectively compared under the condition of no original video in the related technology, and can obtain the quality of two homologous distorted videos through comparison of an objective evaluation algorithm under the condition of no original video.
In one implementation of the present embodiment, comparing the video quality of the first video and the second video based on the first distortion level and the second distortion level includes:
s11, comparing the first distortion degree with the second distortion degree;
in this embodiment, a first video is taken as a video a, a second video is taken as a video B, a distortion frame is calculated by reference evaluation, a first distortion degree and a second distortion degree are obtained respectively, and the magnitudes of the first distortion degree and the second distortion degree are compared.
S12, if the first distortion degree is larger than the second distortion degree, determining that the video quality of the first video is higher than that of the second video; if the second distortion degree is greater than the first distortion degree, determining that the video quality of the second video is higher than that of the first video; and if the first distortion degree is equal to the second distortion degree, determining that the video quality of the second video is equal to the first video.
In this embodiment, the distortion degree can be calculated by using VMAF (Visual/Video Multimethod AssessmentFusion, video quality multi-method evaluation fusion) as an objective evaluation algorithm with reference evaluation, and the VMAF of this embodiment is an objective evaluation index with reference video quality, and calculates the quality of the distorted video compared with the source video by using a machine learning method. In addition to VMAF, similar referenced evaluation algorithms may also be used to cross-calculate the distortion degrees of the first video and the second video. The VMAF will be described as follows:
calculating a first distortion degree of the first video by taking the second video as a reference video, and calculating a second distortion degree of the second video by taking the first video as the reference video, wherein the method comprises the following steps:
s21, evaluating the fused VMAF model by using a multi-method of inputting a preset video quality by using a first video as a test video and a second video as a reference video, outputting a first VMAF score, inputting the preset VMAF model by using the second video as the test video and the first video as the reference video, and outputting a second VMAF score;
The VMAF of this embodiment faces to source content, distortion type, and distortion degree of different features, each basic index has advantages and disadvantages, and a machine learning algorithm (SVM) is used to "fuse" the basic indexes into a final index, so that a certain weight can be assigned to each basic index, and thus, all advantages of each basic index can be retained by the final obtained index, and a more accurate final score can be obtained. VMAF uses 3 indicators: visual quality fidelity (VIF), detail Loss Measure (DLM), temporal Information (TI). Where VIF and DLM are features of the spatial domain, i.e. within a frame of pictures, and TI is a feature of the correlation between time domain, i.e. multiple frames of pictures. The process of fusion calculation of the total score between these features uses a trained SVM to predict.
The VMAF is based on a nuSvr algorithm of the SVM, and in the running process, each video feature is given different weights according to a model trained in advance. And generating a score for each frame of picture, and finally, carrying out summation by using a mean value algorithm (other summation algorithms can be used as well), so as to calculate the final score of the video. In this embodiment, when the VMAF model is used for calculation, the VMAF model may be trained locally, or the trained VMAF model may be directly used.
S22, converting the first VMAF score into a first distortion degree and converting the second VMAF score into a second distortion degree.
The smaller the distortion degree of the test video relative to the reference video, i.e. the closer to the original video, the higher the VMAF score, the more (0, 100) the value range interval of the VMAF, and the VMAF score can be converted into the distortion degree through a negative correlation algorithm (such as reciprocal), and of course, when comparing the video quality of two videos, the embodiment can also directly use the VMAF score for comparison and sorting, because the VMAF score is also an expression form of the distortion degree, if the VMAF score is directly used for comparison, the reference video quality of the higher score of the two VMAF scores is better than that of the other video.
Optionally, before calculating the first distortion factor of the first video by using the second video as the reference video and calculating the second distortion factor of the second video by using the first video as the reference video, the method further includes: the first video and the second video are decoded into uncompressed formats.
Optionally, the uncompressed format is a YUV format, and the YUV file is an input format for video encoding and is also an output format for video decoding. Besides YUV format, the video can be in RGB format, etc. according to objective evaluation algorithm of cross calculation distortion degree, if the input file format is YUV format when calculating VMAF, decoding is to YUV uncompressed format. By decoding the video signal into an uncompressed format, the influence of different compression algorithms on video distortion can be reduced, and the accuracy of the distortion degree is improved.
In one implementation manner of this embodiment, the homologous videos to be compared include other videos in addition to the first video and the second video, and the size relationship of the multiple homologous videos can be obtained through a two-to-two comparison method. After comparing the video quality of the first video and the second video based on the first distortion level and the second distortion level, further comprising: acquiring a second video and a third video, wherein the second video and the third video are videos coded in different modes through the same source video; calculating a third distortion degree of the second video by taking the third video as a reference video, and calculating a fourth distortion degree of the third video by taking the second video as the reference video; comparing video quality of the second video and the third video based on the third distortion level and the fourth distortion level; the first video, the second video, and the third video are ordered based on the video quality of the second video and the third video.
If the video quality of the first video is greater than the second video, and the video quality of the second video is greater than the third video, then the three videos may be ranked: the first video > the second video > the third video. For quality evaluation comparison of multiple videos, the problem is analogically classified as a common array ordering problem (for example, the following arrays [1,5,6,4] are ordered from big to small, the final array order is [6,5,4,1] can be obtained by comparing each number in pairs, and the quality comparison results of the multiple videos can be finally obtained by combining an ordering algorithm and comparing the videos in pairs.
In some implementations of the present embodiment, after acquiring the first video and the second video, further comprising: judging whether the first video and the second video are the same video or not; and if the first video and the second video are the same video, determining that the video quality of the first video is equal to that of the second video.
Optionally, determining whether the first video and the second video are the same video may, but is not limited to, be:
mode one: calculating a first MD5 value of the first video and calculating a second MD5 value of the second video; if the first MD5 value is equal to the second MD5 value, determining that the first video is the same as the second video, and if the first MD5 value is not equal to the second MD5 value, determining that the first video is different from the second video;
MD5 is a message digest algorithm where each different file (e.g., video file) has a unique MD5 value, and this embodiment is used to compare whether the video files are identical.
Mode two: reading file sizes of the first video and the second video respectively; if the file sizes of the first video and the second video are equal, determining that the first video and the second video are the same video, and if the file sizes of the first video and the second video are unequal, determining that the first video and the second video are not different videos.
Alternatively, the file size may be read from the introduction information of the file by reading from the attribute information of the video.
Fig. 3 is an overall flowchart of an embodiment of the present invention, a plurality of videos to be compared (e.g., a first video, a second video, a third video, etc. of the same-frequency source) are input, the video quality is compared two by two, then the video quality is ranked by a ranking algorithm, and finally the comparison result of the plurality of video quality is output.
For a plurality of distorted videos to be compared, common sorting algorithms (such as bubbling sorting) are used for sorting the distorted videos, the final ranking is output, namely the quality good-bad relationship of each video, the sorting algorithm used for comparing the quality of the plurality of videos is not limited to the bubbling sorting method, and other sorting methods such as selection sorting, rapid sorting, insertion sorting, hill sorting and the like can also achieve the same purpose. In a specific ranking process, a pairwise video quality comparison is required.
Fig. 4 is a flow chart of video quality comparison for two-by-two in the present embodiment, where the video quality comparison satisfies the transitivity (i.e. if the video a quality is better than the video B quality and the video B quality is better than the video C quality), so that a common sorting algorithm can be used to compare multiple video qualities. I.e. the step of pairwise video quality comparison comprises:
Step 1: comparing MD5 values of the two videos, if the two videos are identical, the two videos are identical files, directly omitting subsequent steps, and directly obtaining conclusion that the two videos are identical in quality; if the two video quality values are different, the following steps are continuously executed to compare the two video quality values.
In some scenarios, step 1 of comparing the video quality of two videos may be omitted, and in the following step 4, if the vmaf score is the same for 2 times, it is indicated that the video quality of two videos is the same.
Step 2: if the two videos are different, converting the two videos into YUV format for subsequent calculation of VMAF. The common video files are mp4/mkv format (or online video is streaming media file format), and the files are all file formats which are obtained by encoding the original video through video and then packaging the encoded video and are convenient to transmit and store. The input file format of VMAF is required to be YUV, i.e., uncompressed format, so the video needs to be decoded (decompressed) into YUV file first in order to perform subsequent VMAF calculation. If the VMAF is calculated using a ffmpeg tool, this step 2 can be omitted (i.e. the video file does not need to be converted into a YUV format file in advance) because the ffmpeg has a decoding function.
Step 3: the two video sequences are exchanged and the VMAF is calculated twice, respectively. Wherein the two calculation commands are respectively as follows:
(1)VMAF[yuv_formatwidthheight yuv1 yuv2 vmaf_model]
(2)VMAF[yuv_formatwidthheight yuv2 yuv1 vmaf_model]
Wherein, first time, yuv1 is used as a test video, yuv2 is used as a reference video, and second time, yuv2 is used as a test video, yuv1 is used as a reference video. Other parameters remained unchanged: yuv_format is yuv format, width and height are video width and height, vmaf_model is a model used in computation. Let the first command get VMAF score as score1 and the second command get VMAF score as score2.
Step 4: and (3) judging whether the quality of the two videos is good or not according to the two VMAF scores in the step (3). The judging method comprises the following steps: of the two VMAF scoring results, the reference video in the high score result is better than the quality of the test video.
For example, if score1 is greater than score2 in step 3, then the video quality of yuv2 is better than yuv1; conversely, if score2 is greater than score1, then the video quality of yuv1 is better than yuv2. Note that for two non-identical videos, the scores of the two VMAFs will not be identical.
By adopting the scheme of the embodiment, the quality of the distortion videos with multiple homology can be obtained by comparison under the condition of no original video.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 2
The embodiment also provides a device for comparing video quality, which is used for implementing the above embodiment and the preferred implementation, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 5 is a block diagram of a video quality comparing apparatus according to an embodiment of the present invention, as shown in fig. 5, the apparatus comprising: a first acquisition module 50, a first calculation module 52, a first comparison module 54, wherein,
a first obtaining module 50, configured to obtain a first video and a second video, where the first video and the second video are videos encoded by the same source video in different manners;
a first calculating module 52, configured to calculate a first distortion factor of the first video with the second video as a reference video, and calculate a second distortion factor of the second video with the first video as a reference video;
a first comparison module 54 is configured to compare video quality of the first video and the second video based on the first distortion level and the second distortion level.
Optionally, the first comparing module includes: a comparison unit configured to compare the first distortion factor and the second distortion factor; a determining unit, configured to determine that, if the first distortion factor is greater than the second distortion factor, the video quality of the first video is higher than the second video; if the second distortion factor is greater than the first distortion factor, determining that the video quality of the second video is higher than that of the first video; and if the first distortion degree is equal to the second distortion degree, determining that the video quality of the second video is equal to the first video.
Optionally, the first computing module includes: the computing unit is used for inputting a preset video quality multi-device evaluation fusion VMAF model by taking the first video as a test video and the second video as a reference video, outputting a first VMAF score, inputting the preset VMAF model by taking the second video as a test video and the first video as a reference video, and outputting a second VMAF score; and the determining unit is used for converting the first VMAF score into the first distortion degree and converting the second VMAF score into the second distortion degree.
Optionally, the apparatus further includes: the second obtaining module is used for obtaining a second video and a third video after the calculating module compares the video quality of the first video and the second video based on the first distortion degree and the second distortion degree, wherein the second video and the third video are videos coded in different modes through the same source video; the second calculation module is used for calculating a third distortion degree of the second video by taking the third video as a reference video, and calculating a fourth distortion degree of the third video by taking the second video as the reference video; a second comparison module for comparing video quality of the second video and the third video based on the third distortion level and the fourth distortion level; and the ordering module is used for ordering the first video, the second video and the third video based on the video quality of the second video and the third video.
Optionally, the apparatus further includes: the judging module is used for judging whether the first video and the second video are the same video or not after the first obtaining module obtains the first video and the second video; and the determining module is used for determining that the video quality of the first video is equal to that of the second video if the first video and the second video are the same video.
Optionally, the judging module includes at least one of the following: a first judging unit, configured to calculate a first MD5 value of the first video and calculate a second MD5 value of the second video; if the first MD5 value is equal to the second MD5 value, determining that the first video and the second video are the same video, and if the first MD5 value is not equal to the second MD5 value, determining that the first video and the second video are different videos; the second judging unit is used for respectively reading the file sizes of the first video and the second video; if the file sizes of the first video and the second video are equal, determining that the first video and the second video are the same video, and if the file sizes of the first video and the second video are unequal, determining that the first video and the second video are not different videos.
Optionally, the apparatus further includes: and the decoding module is used for decoding the first video and the second video into an uncompressed format before the first calculating module calculates the first distortion degree of the first video by taking the second video as a reference video and calculates the second distortion degree of the second video by taking the first video as the reference video.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 3
An embodiment of the invention also provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, acquiring a first video and a second video, wherein the first video and the second video are videos of the same source video which are coded in different modes;
S2, calculating a first distortion degree of the first video by taking the second video as a reference video, and calculating a second distortion degree of the second video by taking the first video as the reference video;
and S3, comparing the video quality of the first video and the video quality of the second video based on the first distortion degree and the second distortion degree.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic device may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S1, acquiring a first video and a second video, wherein the first video and the second video are videos of the same source video which are coded in different modes;
s2, calculating a first distortion degree of the first video by taking the second video as a reference video, and calculating a second distortion degree of the second video by taking the first video as the reference video;
and S3, comparing the video quality of the first video and the video quality of the second video based on the first distortion degree and the second distortion degree.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
Fig. 6 is a block diagram of an electronic device embodying an embodiment of the present invention. As shown in fig. 6, the device includes a processor 41 and a memory 42 for storing data, and is connected via a communication bus 44, and further includes a communication interface 43 connected to the communication bus 44, and is adapted to be connected to other components or external devices.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (9)

1. A method for comparing video quality, comprising:
acquiring a first video and a second video, wherein the first video and the second video are videos of the same source video which are coded in different modes;
calculating a first distortion degree of the first video by taking the second video as a reference video, and calculating a second distortion degree of the second video by taking the first video as the reference video;
comparing video quality of the first video and the second video based on the first distortion level and the second distortion level;
wherein before calculating the first distortion factor of the first video with the second video as a reference video and calculating the second distortion factor of the second video with the first video as a reference video, the method further comprises:
the first video and the second video are decoded into an uncompressed format.
2. The method of claim 1, wherein comparing the video quality of the first video and the second video based on the first distortion level and the second distortion level comprises:
comparing the first distortion factor with the second distortion factor;
if the first distortion factor is greater than the second distortion factor, determining that the video quality of the first video is higher than that of the second video; if the second distortion factor is greater than the first distortion factor, determining that the video quality of the second video is higher than that of the first video; and if the first distortion degree is equal to the second distortion degree, determining that the video quality of the second video is equal to the first video.
3. The method of claim 1, wherein calculating a first distortion factor for the first video with the second video as a reference video and calculating a second distortion factor for the second video with the first video as a reference video comprises:
the first video is used as a test video, the second video is used as a reference video, a preset video quality method is used for evaluating and fusing the VMAF model, a first VMAF score is output, the second video is used as a test video, the first video is used as a reference video, the preset VMAF model is input, and a second VMAF score is output;
and converting the first VMAF score into the first distortion degree, and converting the second VMAF score into the second distortion degree.
4. The method of claim 1, wherein after comparing the video quality of the first video and the second video based on the first distortion level and the second distortion level, the method further comprises:
acquiring a second video and a third video, wherein the second video and the third video are videos of the same source video which are coded in different modes;
calculating a third distortion factor of the second video by taking the third video as a reference video, and calculating a fourth distortion factor of the third video by taking the second video as a reference video;
Comparing video quality of the second video and the third video based on the third distortion level and the fourth distortion level;
the first video, the second video, and the third video are ordered based on video quality of the second video and the third video.
5. The method of claim 1, wherein after acquiring the first video and the second video, the method further comprises:
judging whether the first video and the second video are the same video or not;
and if the first video and the second video are the same video, determining that the video quality of the first video and the video quality of the second video are equal.
6. The method of claim 5, wherein determining whether the first video and the second video are the same video comprises at least one of:
calculating a first MD5 value of the first video and calculating a second MD5 value of the second video; if the first MD5 value is equal to the second MD5 value, determining that the first video and the second video are the same video, and if the first MD5 value is not equal to the second MD5 value, determining that the first video and the second video are different videos;
Reading file sizes of the first video and the second video respectively; if the file sizes of the first video and the second video are equal, determining that the first video and the second video are the same video, and if the file sizes of the first video and the second video are unequal, determining that the first video and the second video are not different videos.
7. A video quality comparison apparatus, comprising:
the first acquisition module is used for acquiring a first video and a second video, wherein the first video and the second video are videos of the same source video which are coded in different modes;
the first calculation module is used for calculating a first distortion degree of the first video by taking the second video as a reference video, and calculating a second distortion degree of the second video by taking the first video as the reference video;
a first comparison module for comparing video quality of the first video and the second video based on the first distortion factor and the second distortion factor;
and the decoding module is used for decoding the first video and the second video into an uncompressed format before the first calculating module calculates the first distortion degree of the first video by taking the second video as a reference video and calculates the second distortion degree of the second video by taking the first video as the reference video.
8. A storage medium comprising a stored program, wherein the program when run performs the method steps of any of the preceding claims 1 to 6.
9. An electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; wherein:
a memory for storing a computer program;
a processor for executing the method steps of any one of claims 1 to 6 by running a program stored on a memory.
CN202011540152.2A 2020-12-23 2020-12-23 Video quality comparison method and device, storage medium and electronic equipment Active CN112616051B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011540152.2A CN112616051B (en) 2020-12-23 2020-12-23 Video quality comparison method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011540152.2A CN112616051B (en) 2020-12-23 2020-12-23 Video quality comparison method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112616051A CN112616051A (en) 2021-04-06
CN112616051B true CN112616051B (en) 2023-05-05

Family

ID=75244540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011540152.2A Active CN112616051B (en) 2020-12-23 2020-12-23 Video quality comparison method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112616051B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107659806A (en) * 2017-08-22 2018-02-02 华为技术有限公司 The appraisal procedure and device of video quality
US10085015B1 (en) * 2017-02-14 2018-09-25 Zpeg, Inc. Method and system for measuring visual quality of a video sequence
CN110213573A (en) * 2019-06-14 2019-09-06 北京字节跳动网络技术有限公司 A kind of video quality evaluation method, device and electronic equipment
CN110738657A (en) * 2019-10-28 2020-01-31 北京字节跳动网络技术有限公司 Video quality evaluation method and device, electronic equipment and storage medium
CN111182300A (en) * 2018-11-09 2020-05-19 华为技术有限公司 Method, device and equipment for determining coding parameters and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018186991A1 (en) * 2017-04-04 2018-10-11 Board Of Regents, The University Of Texas System Assessing quality of images or videos using a two-stage quality assessment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10085015B1 (en) * 2017-02-14 2018-09-25 Zpeg, Inc. Method and system for measuring visual quality of a video sequence
CN107659806A (en) * 2017-08-22 2018-02-02 华为技术有限公司 The appraisal procedure and device of video quality
CN111182300A (en) * 2018-11-09 2020-05-19 华为技术有限公司 Method, device and equipment for determining coding parameters and storage medium
CN110213573A (en) * 2019-06-14 2019-09-06 北京字节跳动网络技术有限公司 A kind of video quality evaluation method, device and electronic equipment
CN110738657A (en) * 2019-10-28 2020-01-31 北京字节跳动网络技术有限公司 Video quality evaluation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112616051A (en) 2021-04-06

Similar Documents

Publication Publication Date Title
CN111950653A (en) Video processing method and device, storage medium and electronic equipment
CN110121098B (en) Video playing method and device, storage medium and electronic device
US20150074021A1 (en) Generating a training model based on feedback
CN112801536B (en) Image processing method and device and electronic equipment
US10346746B2 (en) Generating a training model based on feedback
WO2022218072A1 (en) Method for assessing quality of image or video on basis of approximation value, and related apparatus
CN112950579B (en) Image quality evaluation method and device and electronic equipment
CN110519607B (en) Video decoding method and device, and video encoding method and device
US10904542B2 (en) Image transcoding method and apparatus
CN114630139B (en) Quality evaluation method of live video and related equipment thereof
CN112616051B (en) Video quality comparison method and device, storage medium and electronic equipment
CN118354119B (en) Video quality prediction method, device, equipment, storage medium and program product
CN110781340A (en) Offline evaluation method, system and device for recall strategy of recommendation system and storage medium
CN112672159B (en) Video quality comparison method and device, storage medium and electronic equipment
CN111337133B (en) Infrared data generation method and device and infrared data analysis method and device
KR102600721B1 (en) VR video quality evaluation method and device
CN117221650A (en) Video image quality evaluation method, device, computer equipment and storage medium
CN113747161B (en) Information acquisition method and device, storage medium and electronic device
CN112153663B (en) Wireless network evaluation method and device
CN113724225B (en) Method and device for determining transmission quality of application program
CN113312542B (en) Processing method and device of object recommendation model and electronic equipment
CN110677692A (en) Video decoding method and device and video encoding method and device
CN113747162B (en) Video processing method and device, storage medium and electronic device
CN118537690B (en) Heterogeneous hardware-based precision verification method, equipment and storage medium
CN114630147B (en) Video processing method and device

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