[MEncoder-users] bad numbers of psnr for xvid in mac

Oleynik Phil Oleynik.Phil at mail.ioffe.ru
Thu May 12 17:39:46 CEST 2005


Mauricio Alvarez wrote:

>Hi
>
>I am using mencoder for coding raw YUV files into mpeg-4 using xvid on a
>ppc970 mac os x machine
>
>- first i put the yuv files into an avi using ffmpeg
>$ffmpeg -s 720x576 -t 4 -i yuv/576p25_blue_sky.yuv -vcodec copy -r 25
>test.avi
>that's OK
>
>- second, I use mencoder to encode the video using xvid
>$mencoder test.avi -o test_xvid.mp4 -ovc xvid -xvidencopts
>fixed_quant=3:max_bframes=2:qpel:psnr:debug=3
>
>that's also OK, but when I look at the PSNR numbers something is wrong
>because it says that the luna average PSNR is 16.76. This is not true
>because I see the video and the (perceptual) quality is really high.
>
>When I look in the psr_xx.log file generated by xvid I see that b-frames
>are responsible for this (not true) low PSNR.
>
>     0,  3,  71027, 44.16, 43.76, 44.49, 44.14 I
>     1,  5,   2500, 16.42, 24.74, 21.70, 17.72 B
>     2,  5,   2108, 15.00, 23.17, 23.48, 16.46 B
>     3,  3,  19891, 42.93, 42.76, 43.99, 43.06 P
>     ...
>
>Any idea about how to get the correct psnr?
>
>Thanks
>Mauricio
>
>p.d. the complete output of mencoder
>
>$ mencoder test.avi -o test_xvid.mp4 -ovc xvid -xvidencopts
>fixed_quant=3:max_bframes=2:qpel:psnr:debug=3
>MEncoder dev-CVS-050512-13:17-3.3 (C) 2000-2005 MPlayer Team
>AltiVec found
>CPU: PowerPC
>File not found: 'frameno.avi'
>Failed to open frameno.avi
>success: format: 0  data: 0x0 - 0x3b55370
>AVI file format detected.
>AVI_NI: No audio stream found -> no sound.
>AVI: No audio stream found -> no sound.
>VIDEO:  [024I]  720x576  24bpp  25.000 fps  124416.0 kbps (15187.5 kbyte/s)
>[V] filefmt:3  fourcc:0x30323449  size:720x576  fps:25.00  ftime:=0.0400
>xvid: using library version 1.1.-125 (build xvid-1.1.0-beta2)
>Opening video filter: [expand osd=1]
>Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
>==========================================================================
>Opening video decoder: [raw] RAW Uncompressed Video
>VDec: vo config request - 720 x 576 (preferred csp: Planar I420)
>VDec: using Planar I420 as output csp (no 0)
>Movie-Aspect is undefined - no prescaling applied.
>videocodec: XviD (720x576 fourcc=44495658 [DIVX])
>xvid: par=0/0 (vga11), displayed=720x576, sampled=720x576
>xvid: Fixed Quant Rate Control -- quantizer=3/1=3.00
>Selected video codec: [rawi420] vfm:raw (RAW I420)
>==========================================================================
>Writing AVI header...
>ODML: vprp aspect is 16384:13107.
>ODML: vprp aspect is 16384:13107.
>Pos:   3.9s    100f (98%)   4fps Trem:   0min   1mb  A-V:0.000 [2271:0]
>Flushing video frames
>
>Writing AVI index...
>Fixing AVI header...
>ODML: vprp aspect is 16384:13107.
>
>Video stream: 2237.810 kbit/s  (279726 bps)  size: 1118905 bytes  4.000
>secs  100 frames
>The value 99.99dB is a special value and represents the upper range limit
>xvid:     Min PSNR y : 13.66 dB, u : 22.83 dB, v : 22.68 dB, in frame 86
>xvid: Average PSNR y : 16.76 dB, u : 24.94 dB, v : 24.72 dB, for 99 frames
>xvid:     Max PSNR y : 44.16 dB, u : 43.76 dB, v : 44.49 dB, in frame 0
>
>$ more psnr_165454.log
>     0,  3,  71027, 44.16, 43.76, 44.49, 44.14 I
>     1,  5,   2500, 16.42, 24.74, 21.70, 17.72 B
>     2,  5,   2108, 15.00, 23.17, 23.48, 16.46 B
>     3,  3,  19891, 42.93, 42.76, 43.99, 43.06 P
>     4,  5,   2615, 15.40, 23.21, 23.35, 16.82 B
>     5,  5,   1960, 14.59, 22.97, 23.21, 16.06 B
>     6,  3,  21485, 42.91, 42.67, 43.94, 43.03 P
>     7,  5,   2201, 14.75, 24.48, 21.33, 16.17 B
>     8,  5,   1812, 14.06, 22.98, 23.06, 15.56 B
>     9,  3,  21578, 42.83, 42.55, 43.75, 42.92 P
>    10,  5,   2402, 16.75, 23.33, 23.91, 18.08 B
>     ...
>
>_______________________________________________
>MEncoder-users mailing list
>MEncoder-users at mplayerhq.hu
>http://mplayerhq.hu/mailman/listinfo/mencoder-users
>
>  
>
Hello,

Perceptual quality and PSNR are connected, however it is not correct to 
assume
low PSNR = low quality
for all frames. B-frames in high motion scenes are bad, they are IMHO 
bad everywhere,
but you should trust your eyes, not numbers.
BTW, 2200kbit for 720*576 movie IMHO is a little insane. As 320kbit CBR 
MP3.
It is possible, it keeps most quality, but eats your harddrive/DVDR

Philipp




More information about the MEncoder-users mailing list