[MPlayer-advusers] lavc 2-pass ratecontrol bug
Zoltan Hidvegi
mplayer at hzoli.2y.net
Tue Mar 1 18:31:46 CET 2005
The problem is that lavc mpeg-4 uses quantization level 31 for more than
10% of the video. I'm not sure if it has anything to do with it, but the
source mpeg has some very dark portions (it's the 16th episode of the ABC
show Lost). I was also using dd to cut the commercials before encoding,
so there are some damaged mpeg2 frames near the cutpoints. Here are the
commands I've used for encoding:
First pass:
mencoder -vfm ffmpeg <hdtv-1080i-mpeg-ts-file> -tsprog 1 -vop hqdn3d=4:3:3,scale=1024:576,harddup,softskip,filmdint=crop=1908:1078:4:0 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:psnr:mbd=2:v4mv:aspect=16/9:vmax_b_frames=1:trell:cbp:cmp=2:precmp=2:subcmp=2:vb_qoffset=0.5:vpass=1:vdpart:vpsize=1000:vqcomp=0.75:lmin=4:lmax=4 -force-avi-aspect 16/9 -sws 1 -fps 29.97 -ofps 23.976
Second pass:
mencoder -vfm ffmpeg <hdtv-1080i-mpeg-ts-file> -tsprog 1 -vop hqdn3d=4:3:3,scale=1024:576,harddup,softskip,filmdint=crop=1908:1078:4:0 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:psnr:mbd=2:v4mv:aspect=16/9:vmax_b_frames=1:trell:cbp:cmp=2:precmp=2:subcmp=2:vb_qoffset=0.5:vpass=3:vqcomp=0.75:vbitrate=1000:vdpart:vpsize=1000 -force-avi-aspect 16/9 -sws 1 -fps 29.97 -ofps 23.976
The 2 passes take more than 4.5 hours, so it's not easy to experiment
with changes. I've posted about a similar bug before, see
http://mplayerhq.hu/pipermail/mplayer-advusers/2005-February/001093.html
but I got no reply. This problem happens very often in 3-pass mode, but
this is the first time I see this in 2-pass mode.
I've uploaded badquant.tar.bz2 to mplayerhq incoming which contains the
passlog files from both passes (pass1.log, pass2.log), the psnr file
(pass2.psnr) and the output of mencoder in the second pass (pass2.out).
All this was done with the Feb 28 CVS of mplayer and libavcodec.
Thanks,
Zoli
More information about the MPlayer-advusers
mailing list