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

Mauricio Alvarez alvarez at ac.upc.edu
Thu May 12 19:47:13 CEST 2005


Oleynik Phil wrote:
> Mauricio Alvarez wrote:
> 
>> Hi
>>
>> - 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
>>
>> 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.
>>
>> 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
>>     ...

> 
> Perceptual quality and PSNR are connected, however it is not correct to
> assume
> low PSNR = low quality

I agree with that, but coding at a high bit rate (QP=3) and in a test
sequence that has not so much motion, a psnr of 16dB makes no sense. If
this psnr is true it would be noticeable as a low quality reproduction,
but that's not the case.

> 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.

I reapeated the experiment in a different architecture (ubuntu-linux on
a pentium-m) and the (perceptual) quality of the encoded file is the
same but the reported psnr values are really different.

So I think there is a small bug in the psnr calculation of x-vid for b
frames in the PPC architecture.

My problem is I am making a study of video codecs on a PPC machine and I
need psnr quality measures. :(

mauricio

here is the new command:

$mencoder test.avi -o test_xvid.mp4 -ovc xvid -xvidencopts
fixed_quant=3:max_bframes=2:qpel:psnr:debug=3
MEncoder dev-CVS-050511-11:35-3.3.5 (C) 2000-2005 MPlayer Team
CPU: Intel  (Family: 6, Stepping: 6)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

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:  [I420]  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 [XVID])
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.
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
ODML: vprp aspect is 16384:13107.
Pos:   3.9s    100f (98%)   5fps Trem:   0min   1mb  A-V:0.000 [2270:0]
Flushing video frames

Writing AVI index...
Fixing AVI header...
ODML: vprp aspect is 16384:13107.

Video stream: 2236.856 kbit/s  (279607 bps)  size: 1118428 bytes  4.000
secs  100 frames
The value 99.99dB is a special value and represents the upper range limit
xvid:     Min PSNR y : 39.67 dB, u : 39.18 dB, v : 41.40 dB, in frame 95
xvid: Average PSNR y : 41.15 dB, u : 40.71 dB, v : 42.48 dB, for 99 frames
xvid:     Max PSNR y : 44.16 dB, u : 43.76 dB, v : 44.50 dB, in frame 0




More information about the MEncoder-users mailing list