pixop / video-compare

Split screen video comparison tool using FFmpeg and SDL2
GNU General Public License v2.0
889 stars 41 forks source link

Add VMAF #73

Closed tormento closed 3 days ago

tormento commented 6 days ago

Could you add VMAF too in the next release?

jonfryd commented 5 days ago

I can't promise it for the next release, as it's significantly more complicated to integrate compared to PSNR and SSIM. However, it's now on my TODO list.

As a strict rule I I don't want to add additional external dependencies to the project, so integrating VMAF will involve video-compare invoking FFmpeg's libvmaf filter (if it is available).

jonfryd commented 3 days ago

@tormento, I've added VMAF as an additional image quality metric. This will likely be released in a few weeks.

The implementation allows options to be passed to FFmpeg's libvmaf filter, such as using a different model than the default. For example:

video-compare --libvmaf-options model=version=vmaf_4k_v0.6.1 reference.mp4 distorted.mp4

It can also handle metrics for multiple models at the same time, like this:

video-compare --libvmaf-options 'model=version=vmaf_v0.6.1\\:name=hd|version=vmaf_4k_v0.6.1\\:name=4k' reference.mp4 distorted.mp4

Note that in this case the options must be quoted as shown above, and each model must be uniquely named.

Anyway, I'm happy we got VMAF into video-compare. Good suggestion, thanks.

tormento commented 3 days ago

Thank you!

Please evaluate if it is possible to have some more human friendly syntax. 😉

Ever thought about some minimal gui called by key press?

jonfryd commented 3 days ago

Please evaluate if it is possible to have some more human friendly syntax. 😉

Yeah, I get what you mean, but there's not much I can do as we're using FFmpeg's syntax and passing the value of --libvmaf-options on "as is" to the libvmaf filter.

But do note that you don't actually need to specify --libvmaf-options to get a VMAF reading. If you don't, the default VMAF model is used (i.e. vmaf_v0.6.1 for HD video).

Ever thought about some minimal gui called by key press?

Sure. I wish I had the time and motivation to do it, but I'm a command-line guy myself. Someone else needs to develop and maintain it. Feel free to take a swing at it yourself; we need more people on deck 😉

With AI-assisted development tools, it would probably be possible to create the first version of a UI in a day or two, I think.