So I generated several compressed videos using ffmpeg from a series of images (in png format) with the option -psnr on to compute psnr for each compressed video. I then double check the output psnr by decode the video into frames (in png format) and compute psnr for each frame and average them. I tried several ways of computing psnr frame by frame: Convert each image/frame to YUV, compute psnr for each layer (Y, U, V), or sample chroma layers to make it yuv420 and compute psnr, ... The results are non of them match the psnr that ffmpeg gives, either the global or average psnr (not even close).
So I don't know. Tracking ffmpeg code is too hard. Does anyone here know roughly how ffmpeg compute PSNR between the source video/images and the encoded video? I would greatly appreciate it. Thanks
+ Reply to Thread
Results 1 to 5 of 5
-
-
Thread moved to the video conversion forum where you can get more help.
I think,therefore i am a hamster. -
You can find the calculation ffmpeg uses in tiny_psnr.c
http://forum.doom9.org/showthread.php?t=150955 -
Thank you. I read that thread and the tiny_psnr code before, but that is not my question. My question is how ffmpeg processes images/frames before computing mse and psnr? Does it do it on RGB color (probably not), or convert each image/frame to YUV (420) and compute psnr for each layer (like I did, but like I said above, the results are different), or do something else???
Thanks -
Similar Threads
-
FFmpeg on Win only - FAQ can ffmpeg realize screen capture
By feelart in forum Capturing and VCRReplies: 1Last Post: 14th Feb 2012, 04:11 -
Which ffmpeg options are used behind the scenes by ffmpeg?
By roberto.aloi in forum ffmpegX general discussionReplies: 1Last Post: 26th Jul 2011, 05:09 -
Difference between ffmpeg -threads and ffmpeg-mt
By Calidore in forum Video ConversionReplies: 2Last Post: 7th Mar 2010, 22:44 -
FFMPEG QUESTION :How do I take one frame and make a jpeg with FFMPEG?
By goheadtry in forum Newbie / General discussionsReplies: 1Last Post: 18th Sep 2007, 02:55 -
How to compute the value SCR and PTS for encoding MPEG2 PS
By clebean in forum Video ConversionReplies: 0Last Post: 5th Jun 2007, 01:44