Reputation: 1048
I have have used the following command to resize my video:
ffmpeg -i input.mp4 -vf scale=480:270,setdar=16:9 -qp 0 output.mp4
* input.mp4
video is resized from 1920x1080
to 480:270
Now, how i can find PSNR
for different sized video?
Upvotes: 1
Views: 1182
Reputation: 11174
PSNR is by definition between two equally-sized video, so if you want to find the PSNR between your large source video and small destination video, you have to decide whether you want the PSNR at the original resolution or the target resolution. Then, resize one of the videos and calculate the PSNR between two equally sized videos accordingly. For example, if you want to resize file1 from its original resolution to the target resolution of file2, and that happens to be 352x288, you would do:
ffmpeg -i file1 -i file2 -lavfi '[0]scale=352:288[a];[a][1]psnr' -f null -
Upvotes: 4