Comparing PSNR of two videos, possibly with ffmpeg?

This is how you use the psnr filter in ffmpeg to compare two separate videos:

ffmpeg -i input_video.mp4 -i reference_video.mp4 -filter_complex "psnr" -f null /dev/null

On Windows replace /dev/null with NUL.

Documentation says that input_video will be passed unchanged to output_video, and the psnr value will be shown on the command line.


.\..\ffmpeg -i [Input] -i [Output] -lavfi  psnr="stats_file=psnr.log" -f null -

I was looking at the ssim command (https://ffmpeg.org/ffmpeg-all.html#ssim) and decided to try it for the psnr command to see if I can get any useful results. It seems useful to me. The log file has an mse_avg value that I found was useful for detecting macroblocking in a video that I generated.

http://www.mathworks.com/help/vision/ref/psnr.html helped me to understand what mse and psnr means.


ffmpeg has a psnr filter:

.. psnr             VV->V      Calculate the PSNR between two video streams.

see https://trac.ffmpeg.org/wiki/FilteringGuide for details

Tags:

Ffmpeg

Video