[x264-devel] VBV variations for HTTP streaming

Jason Garrett-Glaser darkshikari at gmail.com
Tue Jun 22 09:50:32 CEST 2010


On Tue, Jun 22, 2010 at 12:02 AM, Alex Jurkiewicz
<alex at bluebottle.net.au> wrote:
> Hi,
>
> When creating files suitable for internet streaming (eg, Youtube) I
> typically configure VBV like this:
> --vbv-maxrate 100 --vbv-bufsize 100
> Where maxrate is set to the minimum network speed supported, and bufsize was
> set so that playback would begin within a second or so (start delay =
> vbv-init * maxrate/buffer)
>
> But this is an alternate configuration:
> --vbv-maxrate 100 --vbv-bufsize 500 --vbv-init 0.2
>
> I can't think of any reason why this second form would be worse. If I was
> encoding for a hardware decoder with a fixed buffer it would be problematic,
> but for a software decoder it should be fine.
>
> Am I missing something, or would it be better to encode all my files with an
> enormous buffer and recalculated init?

x264 is designed to attempt to fill the buffer when it's nearly empty,
potentially at the expense of quality.  Setting a large buffer and
then initializing it to nearly-empty will often give negative results
(especially with really extreme buffer sizes).

"Youtube" streaming isn't streaming at all, but rather progressive
download.  Most such sites don't use VBV at all.

Furthermore, your solution fails if the user attempts to seek -- it
will require the user to buffer the full 5 seconds.

Dark Shikari


More information about the x264-devel mailing list