[theora] Encoding 2-Pass VBR?
Basil Mohamed Gohar
abu_hurayrah at hidayahonline.org
Mon May 17 02:42:42 PDT 2010
On 05/17/2010 04:09 AM, Stefan Weber wrote:
> Dear all
>
> I'm currently using a simple encoding implementation based on the
> encoding example delivered with theora.
> Now i tried to change the quality of the output file. Its my
> understanding, that either a bitrate can be set for Constant Bitrate
> (CBR) encoding, or a quality (0-63) for Variable Bitrate (VBR).
>
> As you might know, the basic Encoder Example uses the so-called 2-Pass
> method for encoding. As a comment in the example code suggests, a
> "estimated bitrate" must be set for the 2-pass method to success.
>
> My code runs smoothly when I set a bitrate, but then the quality
> parameter seems useless. When I try to run the 2-pass method with
> bitrate=0 (--> VBR) and a quality between 0-63, my implementation will
> crash though.
> Is there any possibility to run the existing 2-pass method with the 0-63
> range quality parameter? Thank you for your suggestions.
>
> Kind regards,
> Stefan
>
The 2-pass method only works when a bitrate is specified. It will use
the first pass to see which portions of the video stream need more bits
and which need less, and then it will use the 2nd pass to assign those
bits throughout, in effect giving a "constant quality" for the whole
file, but averaging out at the given bitrate.
If you are seeking, instead, to ensure the entire video is encoded at a
constant quality, somewhere between 0 - 63, then simply specify that and
use single-pass encoding. Two-pass encoding is not necessary to get the
video to be a specific quality throughout. There's no advantage to be had.
More information about the theora
mailing list