VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Much to my surprise I read on web page

    https://trac.ffmpeg.org/wiki/Encode/H.264

    that 2-pass encoding does NOT result in a better video quality (See FAQ section there).

    The only purpose of 2-pass encoding is to match the target video file size more accurately.

    Is this really true?

    Can someone confirm this?

    As far as I remember I read in the past that 2-pass encoding increases significantly the output quality.

    Did I miss something?

    Peter
    Quote Quote  
  2. It depends on the codec. h.264 is a specification, not a particular encoder. x264 (one of the h.264 encoders included in ffmpeg) has a single pass "constant rate factor" encoding mode which delivers the same quality as x264 in 2-pass VBR mode (all other settings being equal). In CRF mode you specify the quality you want (a CRF value, lower values deliver higher quality). The encoder uses whatever bitrate is necessary to deliver that quality. You don't know what that bitrate will be (and hence you don't know the output file size) until it's done. In 2-pass VBR mode you specify the bitrate you want (and hence the size, size = bitrate * running time). But you don't know what the quality will be. When those two methods deliver the same file size the quality is essentially the same too.
    Quote Quote  
  3. From my tests, it's true. Is a big waste of time and energy that doesn't result in a better quality just a final file size with a decent quality.
    Quote Quote  
  4. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    If memory serves h.263 ie xVID and Divx does benefit quality-wise with 2-pass (or even more) encoding.
    Quote Quote  
  5. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    @pxstein, the purpose of 2-pass vbr is to give you the best encoding for a given filesize. And yes, it is possible to get that same optimal quality for that same filesize using 1-pass CRF, but the problem with that is you don't know which crf factor will give you the size you need until you finish the encoding.
    If only there were a way to preview it so it would figure out what that factor should be? You could scan the file for a segment, it would be accurate for that segment, but possibly not beyond it. So if you do a quick scan of the whole file, it'll be accurate for the duration of the whole file.
    That's basically what 2pass IS.

    Scott
    Quote Quote  
  6. Member
    Join Date
    Apr 2020
    Location
    Portugal
    Search Comp PM
    Similar questions:
    In 2Pass mode, the first pass analyzes the video to be encoded and "gives" the 2nd pass all the nedded information to match the selected settings.
    Quote Quote  
  7. The link in the post no longer works (you could probably google it), but here's a summery I wrote when I was trying to get it straight in my head. It explains how x264's rate control methods work (2pass v ABR v CRF).

    x264's rate control methods

    There can be a slight difference between 2 pass and CRF, but you'd have to be using stupidly low bitrates to see it. At sensible bitrates, the quality is effectively the same for the same bitrate using the same encoder settings.

    2 pass encoding needs to adjust the quality as encoding progresses to ensure it achieves the target bitrate/file size. CRF doesn't have that limitation.

    2 pass encoding takes longer, so if you compare them based on encoding time, you could use higher quality/slower encoder settings for CRF, take the same amount of time to encode as 2 pass using slightly faster settings, and end up with a higher quality for CRF (everything else being equal).
    Last edited by hello_hello; 22nd Apr 2020 at 16:15.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!