On Thu, 28 Oct 2004, Richard Ellis wrote:

> On Thu, Oct 28, 2004 at 12:26:24PM +0200, Dik Takken wrote:
> > Quote from the mpeg2enc manual, -b option:
> > 
> > "If  variable bit-rate mode has been selected (see the -q option)
> > this is the maximum bit-rate of the stream."
> > 
> > So, the "-b" value is not the average, but the upper limit when
> > "-q" is specified. So, "-b 9800 -q <anything-but-1>" should be
> > perfectly safe?
> 
> But, the way mpeg2enc prevents the encoded data from going over that
> 9800 max (for VBR encoding) is by silently increasing the effective
> -q value for you behind the scenes.  So for the peaks, to keep the

        True, BUT - it is NOT "instantaneous"!  By the time the encoder
        detects that the rate is too high and adjusts the effective -q
        the rate spike has already been passed to the output stream.  So -b
        is in some senses not a "do not exceed" but "a strong hint".

        The rate control is quite good for a single pass encoder but what's
        really needed is a "back up and retry with a new effective -q" 
        (perhaps on a GOP basis)  strategy _or_ a general 2 pass encoding
        method (which of course almost doubles the encoding time).   Back around
        the beginning of the year there was mention of that being worked on
        but that effort seems to have been suspended.

> Did you watch the output of mpeg2enc as it encoded (assuming you had
> it running so it output it's stats about each frame).  One of the

        The other thing to look at is the output of 'mplex'.  Mplex prints
        out the "Average" and "Peak" rates.  You can get those numbers fairly
        quickly by specifying "-o /dev/null" to mplex:

          mplex -f 8 -o /dev/null input.m2v

> values output is the actual -q that it used internally for that
> frame.  If that value grew large, there's your artifact source.

        Yep - and the other thing to watch for is how close the effective
        -q is to what you specified.  If what mpeg2enc prints out is 
        consistently a lot higher then you're very much rate limited and 
        may want to consider filtering (perhaps smoothing/median).

        Cheers,
        Steven Schultz



-------------------------------------------------------
This Newsletter Sponsored by: Macrovision 
For reliable Linux application installations, use the industry's leading
setup authoring tool, InstallShield X. Learn more and evaluate 
today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to