Reputation: 31
I use ffmpeg to calcute PSNR value.
OS: Ubuntu-18.04
Commond:
ffmpeg -i ../dataset/1080p-1k_rename/ggg_30_.jpg -i ../dataset/decode_dir_1k/ggg_30_.jpg -lavfi psnr="stats_file=./jpg_name.log" -f null -
Result:
ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
...
...
Output #0, null, to 'pipe:':
Metadata:
encoder : Lavf58.45.100
Stream #0:0: Video: wrapped_avframe, yuvj420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
Metadata:
encoder : Lavc58.91.100 wrapped_avframe
frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=1.74x
video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[Parsed_psnr_0 @ 0x7461800] PSNR y:46.226028 u:inf v:inf average:47.986940 min:47.986940 max:47.986940
u:inf v:inf Why U and V are inf?
Upvotes: 0
Views: 559
Reputation: 92998
It means the filter didn't detect any measurable degradation in the U and V components.
The formula used is PSNR = 10*log10(MAX^2/MSE)
where MSE is the mean squared error. When identical or very close to it, the MSE will be 0.
Upvotes: 1