[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Original]
Re: [transcode-users] rc buffer underflow with ffmpeg
>> Rate control is only used when three things are set: minimum rate,
>> maximum rate, and buffer size. IIRC, mencoder never sets buffer size, so
>> the rate control code is never used in the first place (and hence you have
>> no control over the peak data rate).
>
>Ah, I see. I am a little skeptical about "minimum rate"
>however... since that should always be 0, no?
0 as opposed to "not set". I think the DVD spec actually calls for a
minimum bitrate of 1000 kbps, and if you have video that doesn't need that
many bits then you stick padding data in.
>Also, the buffer size is then buffer size for the encoder, isn't it?
No, it's the size of the VBV (video buffer verifier), which is how
much a hardware DVD player is required to buffer in memory while reading;
see the DVD spec which defines it as 1835000 bits (IIRC).
>How can a buffer underflow occur at all?
An underflow (underrun is a better term, actually) is when the bit
reservoir, i.e. the amount of bits available to encode with, isn't large
enough to hold the encoded frame. Basically, if you want 6000 kbps then
you're allowed 6,000,000 bits per second; if you've already used 5,999,000
bits and your next frame is larger than 1000 bits, then a strict hardware
player won't be able to read the frame from disc in time--its playback
buffer will become empty, hence a "buffer underrun".
>If the condition can be detected, it can be handled.
Indeed--the trick is handling it in a way that doesn't turn the image
into ugly macroblocks when you run out of bits...
>Certainly I will find out that I am very naive, I am sure.
Just like the rest of us ;)
--Andrew Church
achurch@xxxxxxxxxxx
http://achurch.org/
- [transcode-users] rc buffer underflow with ffmpeg, Chris McBride, 2005/03/02
- Re: [transcode-users] rc buffer underflow with ffmpeg, Andrew Church, 2005/03/02
- Re: [transcode-users] rc buffer underflow with ffmpeg, Phil Ehrens, 2005/03/02
- Re: [transcode-users] rc buffer underflow with ffmpeg, Andrew Church, 2005/03/02
- Re: [transcode-users] rc buffer underflow with ffmpeg, Erik Slagter, 2005/03/02
- Re: [transcode-users] rc buffer underflow with ffmpeg, Andrew Church, 2005/03/02
- Re: [transcode-users] rc buffer underflow with ffmpeg, Phil Ehrens, 2005/03/02
- Re: [transcode-users] rc buffer underflow with ffmpeg, Phil Ehrens, 2005/03/02
- Re: [transcode-users] rc buffer underflow with ffmpeg, Andrew Church, 2005/03/03
- Re: [transcode-users] rc buffer underflow with ffmpeg, Phil Ehrens, 2005/03/03
- Re: [transcode-users] rc buffer underflow with ffmpeg,
Andrew Church <=
- Re: [transcode-users] rc buffer underflow with ffmpeg, Erik Slagter, 2005/03/02
- Re: [transcode-users] rc buffer underflow with ffmpeg, Andrew Church, 2005/03/02
Re: [transcode-users] rc buffer underflow with ffmpeg, Erik Slagter, 2005/03/02