ADOBE PREMIERE PRO: Tutorials Forum Articles Creative Cloud Debate

How does 2-Pass VBR calculate how to allocate it's "bit-budget"?

COW Forums : Adobe Premiere Pro

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andy ZouHow does 2-Pass VBR calculate how to allocate it's "bit-budget"?
by on Aug 13, 2015 at 12:16:57 am

I understand the fundamental of 2-pass VBR, but I want to know how it decides in what way to proportion it's bits. I understand it can allocate more bits to more complex scenes, but how much does it decide to take? What's the science behind if I set a 2-pass vbr to a min. bitrate of 0.1 and a max bitrate of 1000?

Is it a proprietary method or is there an "optimal" algorithm?


Return to posts index

David Roth WeissRe: How does 2-Pass VBR calculate how to allocate it's "bit-budget"?
by on Aug 13, 2015 at 1:04:45 am

VBR is pretty useless for most users, unless you don't care what your encode looks like, and you only care about squeezing it into a specifically sized space.

The algorithm compares the pixels that change from frame to frame vs those that remain the same, and it saves space by devoting bits to only those pixels that change. Unfortunately, unless you're really expert and are using the best software, VBR tends to produce lots of artifacts, and because it's variable, those artifacts tend to shift from frame to frame, not scene to scene, which draws more attention to them. Thus, CBR is most often the better choice for most users.

David Roth Weiss
Director/Editor/Colorist
David Weiss Productions


David is a Creative COW contributing editor and a forum host of the Apple Final Cut Pro forum.


Return to posts index

Tom BlizzardRe: How does 2-Pass VBR calculate how to allocate it's "bit-budget"?
by on Aug 14, 2015 at 2:14:59 pm

Thanks David, You have answered a longtime question that I've wondered about for years. Just didn't know who to ask.
Tom B.


Return to posts index


Tero AhlforsRe: How does 2-Pass VBR calculate how to allocate it's "bit-budget"?
by on Aug 14, 2015 at 4:03:10 pm

Read John Watkinson's The Mpeg Handbook.


Return to posts index

Ann BensRe: How does 2-Pass VBR calculate how to allocate it's "bit-budget"?
by on Aug 14, 2015 at 7:43:05 pm
Last Edited By Ann Bens on Aug 14, 2015 at 8:05:36 pm

I copied this from AME help

Bitrate Mode or Bitrate Encoding Specifies whether the codec produces a constant bitrate (CBR) or variable bitrate (VBR) in the exported file:

Constant:
Delivers a consistent data rate, with the quality potentially fluctuating from frame to frame depending on the degree of compression required.

Variable contrained:
Delivers more consistent quality, with the degree of compression, and therefore the data rate allowed to fluctuate. Allows the exported file’s data rate to vary without limit, with an option to target an average bitrate.

VBR 1 pass:
Variable bitrate, with the encoder making a single pass through the file from beginning to end. Single-pass encoding takes less time than dual-pass encoding, but doesn’t achieve the same quality in the output.

VBR 2 pass:
Variable bitrate, with the encoder making two passes through the file, from beginning to end, and then from end to beginning. The second pass prolongs the process, but it ensures greater encoding efficiency, and often a higher-quality output.

Note:
When comparing CBR and VBR files of the same content and file size, you can make the following generalizations: A CBR file may play back more reliably over a wider range of systems, because a fixed data rate is less demanding on a media player and computer processor.
However, a VBR file tends to have a higher image quality, because VBR tailors the amount of compression to the image content.

-----------------------------------------------
Adobe Certified Expert Premiere Pro CS6/CC
Adobe Community Professional


Return to posts index

David Roth WeissRe: How does 2-Pass VBR calculate how to allocate it's "bit-budget"?
by on Aug 14, 2015 at 8:56:26 pm

Very interesting Ann, as the definitions seem to be describing the exact opposite of what my experience has been with CBR and VBR.

I have vastly less experience encoding with AME than I do with other encoders, and maybe Adobe has figured out better algorithms, but in the past, VBR had the issue with the frame rate fluctuating from frame to frame, not CBR.

David Roth Weiss
Director/Editor/Colorist
David Weiss Productions


David is a Creative COW contributing editor and a forum host of the Apple Final Cut Pro forum.


Return to posts index


Ann BensRe: How does 2-Pass VBR calculate how to allocate it's "bit-budget"?
by on Aug 14, 2015 at 10:48:27 pm

I have been using VBR 2 pass ever since PP 1.0. for all kinds of formats. Has never disappointed me.

-----------------------------------------------
Adobe Certified Expert Premiere Pro CS6/CC
Adobe Community Professional


Return to posts index

Andy ZouRe: How does 2-Pass VBR calculate how to allocate it's "bit-budget"?
by on Aug 14, 2015 at 8:27:41 pm

Like I said, guys, I know what VBR is. Perhaps my question is beyond the scope of a forum and I'd need to read up on h264 encoding.

I wanted to know how it decides where to allocate its allotted bits for compression:

Judging by how low-bitrate compression often looks like blocks, I'm guessing the algorithm partitions the frame into rectangles, and smaller rectangles within those rectangles until it isolates partitions that have movement. But does an algorithm decide between preserving finer detail or does it distribute its compression "equally"?

How does a VBR encoder decide that it "needs" to tap into its peak bitrate, etc?
I know with 2-pass encoding it's:
1-pass analyzes the clip
2nd pass encodes the clip.

How does the 1st pass analyze the clip? What's the methodology there?


Return to posts index

Ivan MylesRe: How does 2-Pass VBR calculate how to allocate it's "bit-budget"?
by on Aug 15, 2015 at 5:00:51 am
Last Edited By Ivan Myles on Aug 15, 2015 at 5:47:10 am

There are several compression parameters that interact in different ways depending on the encoder settings, so it is difficult to give a straight answer. In general, the I-Frames (aka key frames) require more data, and the P- and B-Frames are smaller. In simple terms the I-Frames are broken down and spread over several cycles in the bit stream.

The degree and methods used to compress the frames are determined by the bit rate, profile, level, and other settings (depending on the codec and encoder). In multi-pass encoding the compression engine can optimize the data to a greater degree.

If you want to conduct a visual experiment, encode a short clip using a variety of encoder settings: 1-Pass, 2-Pass, different profiles, levels, and bit rates. Export maybe 8-12 versions, then import the files into Premiere Pro and stack them on top of the source sequence. Apply the difference matte effect to each one and compare how closely the compressed files resemble the source clip. (Here is an example, but it is easier to view frame by frame.)

For a direct answer to the question, "How does the first pass analyze the clip?" there is a wide variety of reference material available on H.264 encoding. It depends how much time you would like to devote to it.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 CreativeCOW.net All Rights Reserved
[TOP]