transcode-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Original]

Re: [transcode-users] rc buffer underflow with ffmpeg


To: transcode Users Mailing List <transcode-users@xxxxxxxxx>
Subject: Re: [transcode-users] rc buffer underflow with ffmpeg
From: Erik Slagter <erik@xxxxxxxxxxxxx>
Date: Wed, 02 Mar 2005 12:01:16 +0100
Delivered-to: itdp@localhost
In-reply-to: <4225478e.47606@msgid.achurch.org>
References: <4225478e.47606@msgid.achurch.org>

On Wed, 2005-03-02 at 13:49 +0000, Andrew Church wrote:
> >Ah, after reading this, I wonder... perhaps the reason I
> >get tons of buffer underflows when I do 2-pass encoding
> >is because the ntsc_dvd profile uses -w 5000, and whereas
> >that does not ever produce an average bitrate anywhere
> >near that with single pass, maybe it really does with 2-pass,
> >and mucks things up?
> 
>      Actually, the reason is that the current ffmpeg 2-pass rate control
> code is completely broken. :P  IIRC, it completely ignores the max bitrate
> when deciding how many bits to use during the second pass.  There's a patch
> by MeanX somewhere in the FFmpeg list archives that does a better job at
> keeping under the max bitrate in 2-pass mode, but I've found it easier to
> just lower the max bitrate, which seems to affect the first pass enough to
> keep scene peaks under 9800 kbps (my ffmpeg.cfg has vrc_maxrate=7500).

Yep, completely forgotten about that. That's what you get when you
never use 2-pass encoding.

Another simple solution is not to use 2-pass encoding. If you're not
trying to save every single bit, just use 1-pass encoding with a 
slightly higher bitrate or lower "q" setting.


[Prev in Thread] Current Thread [Next in Thread]