Re: FFmpeg Xvid CBR or VBR with maxrate ? how ?

Christoph Lampert <[email protected]> Tue, 29 Mar 2005 09:45:22 +0200 (CEST)
Newsgroups gmane.comp.video.xvid.user
Message-ID <[email protected]>
On Tue, 29 Mar 2005, Tom wrote:
> >>I'm trying since this week to make a mp4 video with ffmpeg and the xvid
> >>codec. It works well _BUT_ I'd like to limit the maximum bitrate because
> >>it's for streaming purpose. The bitrate must not exceed the allowed
> >>bandwidth (i.e: 80kb/s). So how to do CBR or VBR with a limited maximum
> >>bitrate ?
> > There is no "maximal" bitrate setting for XviD, because as CBR this isn't
> > a well defined term. What you should use is the VBV-settings which do  
> > what you really want: Setting a maximal number of bytes which have to be 
> > transfered within a certain time with a certain sized buffer. 
> 
> Ok, well, and how can we do that with ffmpeg or mencoder ?
> It seems that it's -bufsize (and -maxrate) with ffmpeg and rc_buffer 
> (and rc_averaging_period) with mencoder.

The manpage explains "-maxrate" as "set max video bitrate tolerance",
not "set max video bitrate", so it's not what you are looking for. 

And the "-rcbuf" (=rate control buffer) is not the VBV buffer. 

You might try to emulate something like CBR setting rcbuffer and 
tolerance to 0 (or close to it), but that might or might not work. 

> But both don't achieve a CBR file or a VBR file with a maxrate. It's 
> very annoying.

Possibly people at the ffmpeg or mencoder list might help you.  And if
it's not in there, yet, maybe instead of being annoyed you might just help
implementing it there?

gruel