stash icon indicating copy to clipboard operation
stash copied to clipboard

[Feature] Quality Rating of dupes in Duplicate Checker

Open d3f113 opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. When having multiple duplicates, it is hard to see, which one has the best quality, because of different encodings, reencodings, manipulations etc. Because of that, resolutions and bitrate are an indicator, but are not always telling the truth

Describe the solution you'd like PSNR and VMAF are two measurements, to give more information of the quality of a video (it measures the blurring, blockiness etc) Having both or at least VMAF rating behind each scene in the duplicate checker would be great.

Describe alternatives you've considered Doing it manually, with an external tool, a commandline tool, making a plugin

Additional context PSNR and VMAF can be calculated with FFMPEG (https://github.com/Netflix/vmaf/blob/master/resource/doc/ffmpeg.md) PSNR is an industry standard, which is there for quite a while. VMAF is a score developed by NETFLIX in 2016 and is closer to the human perception

d3f113 avatar Mar 19 '22 12:03 d3f113

SSIM, PSNR, VMAF are metrics to compare video quality. For them to work you have the original video and then you compare derived videos. For example to see which of 2 derived files has better video quality you first calculate the metric of the 1st to the original, then the 2nd to the original and then you can compare the 2 files using the metrics. If the original is missing the metrics aren't that useful. Thats my understanding at least... How would that work for the mentioned case ?

bnkai avatar Mar 19 '22 16:03 bnkai

SSIM, PSNR, and VMAF are full-reference metrics that require the original video. However, there are also some no-reference metrics that can be used to make comparisons when the original video is not available. For example, one research group has tools for measuring a set of "video quality indicators", including blockiness and blur (https://qoe.agh.edu.pl/indicators/). Some of these might be helpful. There are also tools that attempt to provide a measure of overall video quality. For example, ITU-T P.1204.3 attempts to predict subjective quality ratings on a scale from 1-5 (detailed description available at https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-P.1204.3-202001-I!!PDF-E&type=items; code available at https://github.com/Telecommunication-Telemedia-Assessment/bitstream_mode3_p1204_3). Perhaps Stash could select a few short segments of each video to compare using the per_sequence value the program produces?

Alternatively, Stash could provide a way for the user to play two videos side by side so they could make their own subjective judgments. For example, VIVICT (https://github.com/svt/vivict; see https://svt.github.io/vivict/ for a demo) lets you see the left side of one video and the right side of another video at the same time. You can move your mouse from side to side to see more of one video or the other.

I don't know how easy it would be to incorporate any of this into Stash, but I think ITU-T P.1204.3 in particular might be worth using.

SalaxIrrumator avatar Jul 26 '22 21:07 SalaxIrrumator

Alternatively, Stash could provide a way for the user to play two videos side by side so they could make their own subjective judgments. For example, VIVICT (https://github.com/svt/vivict; see https://svt.github.io/vivict/ for a demo) lets you see the left side of one video and the right side of another video at the same time. You can move your mouse from side to side to see more of one video or the other.

I don't know how easy it would be to incorporate any of this into Stash,

What a great comment, and resources. I've built a Stash tool that uses VIVICT, and it's great, and only can get better. Code: https://github.com/scruffynerf/CommunityScripts/commit/a3c539f05606d3650d5c4997cfe987690a8c1827 (Uses the phash duplicate tagger plugin, and makes a page of links to VIVICT)

scruffynerf avatar Jul 27 '22 20:07 scruffynerf