Announcement

Collapse
No announcement yet.

How does multipass encoding improve results?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How does multipass encoding improve results?

    I can understand how 2-pass encoding improves encoding efficiency. I assume the first pass creates a log that "rates" the difficulty of each frame or GOP to be encoded. Regardless of the final bitrate, this would be the best way to allocate available bitrate for the video.

    What I don't understand is how more than two passes can improve results further, unless someone actually looks at the results and tags areas that need increased bitrate.

    Someone want to educate me here?

    - Mark
    - Mark

    Core 2 Duo E6400 o/c 3.2GHz - Asus P5B Deluxe - 2048MB Corsair Twinx 6400C4 - ATI AIW X1900 - Seagate 7200.10 SATA 320GB primary - Western Digital SE16 SATA 320GB secondary - Samsung SATA Lightscribe DVD/CDRW- Midiland 4100 Speakers - Presonus Firepod - Dell FP2001 20" LCD - Windows XP Home

  • #2
    I don't know the exact details, but I think the idea is you can in a third pass compare the decoded frames with the original frames and find some "error measure". When this exceds a threshold you can re-encode these regions with a higher bit rate, perhaps also re-encoding regions with abnormally low error measure at a lower bit rate to try and make the average bit rate come out right.

    Repeat until the error measure is approximately constant across all frames or some maximum pass count is hit.

    The devil is in the details, but the idea isn't too hard to understand.
    The meta-trick is coming up with the error measure that matches what people think is "better" upon viewing the decoded frames vs the original.

    I've been told that for big budget DVDs a skilled "compressionist" is making the "error measure" decisions deciding what to re-encode.

    Watched the Bourne Identity DVD last Saturday and they missed a really bad arifact in the brass tacks on the couch as the camera panned. Only lasted a couple of seconds, otherwise I though a very good movie and impressive encoding.

    --wally.

    Comment


    • #3
      Wally,

      Thanks, good explanation. Yes, I would think that the "trick" would be making a digital error assessment equivalent to the "human eyes" assessment.

      I'm constantly amazed at how good most commercial DVD's look.

      I think the best I've seen is the sci-fi series "Farscape." I'm have a few of the DVD's and they are consistantly amazing in color reproduction and clarity.

      - Mark
      - Mark

      Core 2 Duo E6400 o/c 3.2GHz - Asus P5B Deluxe - 2048MB Corsair Twinx 6400C4 - ATI AIW X1900 - Seagate 7200.10 SATA 320GB primary - Western Digital SE16 SATA 320GB secondary - Samsung SATA Lightscribe DVD/CDRW- Midiland 4100 Speakers - Presonus Firepod - Dell FP2001 20" LCD - Windows XP Home

      Comment


      • #4
        VBR (variable bit rate) does exactly what it says: the bitrate varies over time.

        In practcical terms during periods of high motion the number of bits/frame is increased. When the motion slows or stops the number of bits/frame is decreased. This gives the best video quality for the least average number of bits.

        2-pass is used to to more effectively estimate what frames should be allocated how many bits. In practice this means that the encoder processes the whole video clip twice.

        Pass #1 is where the encoder examines every frame and stores a table of of its complexity. More complex frames will be allocated more bits while less complex ones are allocated fewer bits. The actual values used will be determined by the Minimum, Maximum and Average settings you use.

        Pass #2 does the actual encoding.

        There are also multi-pass encoders where you can set up >1 analytical passes and professional encoders where you can manually tweak the table GOP by GOP before the final encoding.

        Dr. Mordrid
        Last edited by Dr Mordrid; 11 February 2003, 19:22.
        Dr. Mordrid
        ----------------------------
        An elephant is a mouse built to government specifications.

        I carry a gun because I can't throw a rock 1,250 fps

        Comment


        • #5
          I myself get better SVCD results using constant quality (CQ) than with 2-pass VBR. When I use 2-pass, the bitrate varies only slightly. When I use CQ, it varies enormously and allocates much more bitrate on complex and fast moving scenes and much less on still scenes.

          I am very satisfied with the following settings (tmpeg):
          CQ, max bitrate 2500, min bitrate 800, P frame degradation 0%, B frame degradation 20%.

          Of course the final file size is hard to predict, but if I encode from a DVD (letterbox) the average size per CD is 60+ minutes. Full-frame video yields about 50 minutes.

          I simply encode the whole movie into a separate audio and video stream, and multiplex it using BBMpeg. Bbmpeg has the huge advantage that it can split the MPG stream after a certain file size. 790 mb fit nicely on an 80 min CDR.
          Resistance is futile - Microborg will assimilate you.

          Comment


          • #6
            I have also found CQ to be a good option. The only times it has failed me has been when there has been a lot of ocean waves in the video. In those cases 2-pass seems to work better.

            Thanks for the advice.

            - Mark
            - Mark

            Core 2 Duo E6400 o/c 3.2GHz - Asus P5B Deluxe - 2048MB Corsair Twinx 6400C4 - ATI AIW X1900 - Seagate 7200.10 SATA 320GB primary - Western Digital SE16 SATA 320GB secondary - Samsung SATA Lightscribe DVD/CDRW- Midiland 4100 Speakers - Presonus Firepod - Dell FP2001 20" LCD - Windows XP Home

            Comment


            • #7
              High motion is where 2-pass and other advanced techniques usually show their benefit the most.

              Dr. Mordrid
              Dr. Mordrid
              ----------------------------
              An elephant is a mouse built to government specifications.

              I carry a gun because I can't throw a rock 1,250 fps

              Comment

              Working...
              X