is 2 pass encoding really worth it?

January 26th, 2007

I'm trying to figure out how to rip dvds in near perfect quality, because I can't stand them. Dvds are such a pain in the ass, with their idiotic menus for kids, how the discs so often can't be read properly by the dvd drive, how they will play on one device but not another etc. As far as I'm concerned, the whole thing is broken.

So not really having done this before (I've tried in the past with meager results), there's a lot of angles to cover. Most docs seem to recommend 2 pass encoding, whatever the format. I've experimented with x264 and xvid, and I can't really see a difference between 1 pass and 2 pass encoding when running at 900kbps bitrate. Probably at higher compression it becomes more apparent, but I'm satisfied with that ratio.

:: random entries in this category ::

7 Responses to "is 2 pass encoding really worth it?"

  1. [...] is 2 pass encoding really worth it? Matusiak in Serie A!! [...]

  2. microchip says:

    ahhhh the never ending discussion about which encoding mode gives the best possible quality when encoding. Well, you have 1-pass, 2-pass, 3-pass (in x264) and fixed-quant modes. If you do not care that much about file size then the best mode will be in constant quality (fixed-quant). However if you do care about a file size but still want to obtain good to excellent quality, then 2-pass or 3-pass is the option for you.

    you said you cannot see the difference between a 1-pass and a 2-pass mode. You may not see it but it's there. Do a small test, for example encode only 1 chapter of a DVD in 1-pass mode and then do exactly the same but this time use 2-pass. For both tests enable the PSNR option (or for x264 also the SSIM one) and you'll definitely see the difference between 1- and 2-pass (make sure to use exactly the same options in both tests). Maybe your eyes are not so tuned to spot differences in quality that easy or maybe you have a "bad" monitor, i don't know, but a 2-pass encoding at a (very) low bitrate will definitely beat 1-pass mode. This comes from the fact that the encoder is "dumb" when used in 1-pass mode and cannot predict the complexity and motion of a future frame, which eventually leads to blocking and other weird effects, unless you give it a bitrate high enough to eliminate these issues, but then you'll be wasting bits. Not so when using 2-pass mode since the first pass will be used to store information of every frame to a log file and then when the second pass starts, the encoder will read the log file with the frame/motion/complexity information for each frame and base its decision how much bitrate to allocate for each frame.

  3. giovanni says:

    Thanks microchip! Very useful explanation.

  4. Michael says:

    Whenever i encode a DVD with the H.246 codec in 2pass, i set the maximum file size to 800 MB with aac-Audio to 128kbit in stereo. Videosize without downsize. The H.264 codec is really great and the results breathtaking, but encoding takes really, really long.

  5. YPI says:

    Great explanation microchip. I always knew pass-2 is better, but din't know why.

  6. wardy says:

    I think 2-pass mode gives always - or almost always - the best quality for your output files. In some cases, you won´t get the desired good quality due to a bad conversor. So if you want it better use a better software. And finally, don´t forget to set the appropiate adjustments.