View Full Version : mencoder: 1/2 pass quality
juicemansam
24th February 2003, 08:52
OK, when I encode with 1 pass it looks a lot better than 2 pass. I haven't read everything there is to know about the technical details regarding image compression in video. But here is the command entered is, changing the pass number, and creating 2 files for comparison:
mencoder -lameopts cbr:br=128:mode=1 -oac mp3lame -ovc xvid -xvidencopts pass=1:bitrate=900 kareoke.vob -vop scale=352:240 -o kareoke.avi
The 1 pass video, is clearly better looking, even though it is larger. I suspect that it might be a compressed at 900kbps CBR. The video is clear and has little or no visible artifacts around moving objects.
The 2 pass video, is smaller, and I suspect that it might be compressed at 900kbps VBR. But the video is slightly more grainy, and has very visible artifacts around moving objects.
Shouldn't a multi-pass compression look close to or better than single-pass compression (at least I think that the first pass is to analyse the file and determine the best compression for the second pass). Or at what bitrate does one work better than the other.
Thanks.
Manao
24th February 2003, 10:29
What's the difference in size between the 1-pass and the 2-passes results ? What is the length of the movie ? Is it the whole movie which is better in CBR than VBR, or only certain parts ?
If there is a significant difference between the size, then yes, it is normal than the CBR ( which is in fact ABR, average bitrate with XviD ) looks better than 2-passes.
BTW, you should try to use these settings for xvid parameters :
-xvidencopt:bitrate=900:me_quality=6
It will slow down the encoding, but it will increase the quality ( in 1 and 2-passes mode ). With these settings, you increase the calculations XviD make to compute the motion estimation. You could also try : 4mv, but I don't know which xvid's setting this one is ( perhaps chroma motion :confused: )
A last question : How did you make your first pass in 2-passes mode ? I don't see in the man mplayer how it passes informations from the first to the second pass, perhaps the problem is here.
TactX
24th February 2003, 14:21
The first pass is done with a constant quantizer (2) not with CBR, and not ABR. Therefore the first pass AVI is much bigger than the second pass AVI but also looking better.
The second pass is done using the information from the logfile "divx2pass.log" in your encoding dir to match the desired bitrate (900 kbit/s in your case).
btw, I noticed that you're doing the mp3 encoding in both passes. You only need to do audio in the 2nd pass. Don't waste CPU time :D
foomonger
24th November 2005, 15:59
The only reason to use two-pass is to hit some target size. In these days of DVD burners, network players, and giant hard drives, really, it's just silly.
One-pass all the way baby!
-fm
IgorC
24th November 2005, 17:17
There is quite big difference for quality between 1 and 2 pass. 2 pass recolects information from 1st pass and gives more bitrate for "difficult to compress" frames. There is even small difference between 2 and 3 pass.
foomonger
24th November 2005, 17:41
... and gives more bitrate for "difficult to compress" frames. ...
.. by stealing it from other frames.
Apart from that 20th century practice of squishing movies into a CD (whatever they are), what reason is there to use two-pass encoding? I'm genuinely curious that there might actually be one, by the way, not just being argumentative. The way I see it, one-pass encoding makes no compromises on quality, hitting the desired quality regardless of bitrate, suits me, blank DVD's are cheap as dirt.
My goal is always "as much quality as I can pack into six and a half hours encoding time" because when I get up, I'll want the puter back.
-fm
stephanV
24th November 2005, 18:55
.. by stealing it from other frames.
Apart from that 20th century practice of squishing movies into a CD (whatever they are), what reason is there to use two-pass encoding? I'm genuinely curious that there might actually be one, by the way, not just being argumentative.
Hardware devices have vbv contraints, so you can't use contant q encodes there. A one pass with a target bitrate is never better (and probably always worse) than a two pass.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.