VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. 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
    Quote Quote  
  2. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    Thread moved to the video conversion forum where you can get more help.
    I think,therefore i am a hamster.
    Quote Quote  
  3. You can find the calculation ffmpeg uses in tiny_psnr.c

    http://forum.doom9.org/showthread.php?t=150955
    Quote Quote  
  4. 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
    Quote Quote  
  5. Sorry, not sure

    You can ask at doom9 or doom10 forums, there are some programmers there very familiar with ffmpeg

    You can have more control if you use other tools, e.g. avisynth, msu vqmt

    When the numbers are "not even close" that suggests a frame discrepancy (like numbering or sync issue)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!