PDA

View Full Version : CBR: Bitrate bursts


FLYARTSUM
16th May 2005, 15:14
Using XviD-1.1.0-Beta2-04042005.exe and preceeding versions.

I am encoding live sources (WinTv, PC tv, osprey, ...) using CBR mode(let's say 400 kbits). These capture card are able to display a blue screen to replace a missing video signal on their input.
The encoder produce a 8 kbits stream when encoding a blue or monochrome still picture stream.
When the actual video signal is plugged back to the input of the capture card, the encoder seems to average the bitrate by producing frames with a size up to 60 Kbytes (60000*8*25=12Mbits) until the global (since the beginning of the encoding) average bitrate match the desired 400 Kbits.

I dont understand this behavior. Is it possible to avoid the encoder to produce such small/big frames ? This is actually desastrous for our application (streaming) that has to deal with such bitrate bursts.

thanks in advance for your help.

Tommy B.
20th May 2005, 11:37
You have to note that the bitrate is given "per second".

You say:
60000x8x25 = 12MBit

which is wrong since it is only
60000x8

you do not have to multiply with 25 (frames).

So as a result you get 480kbit/s which is okay. Some sort of ABR
encoding.

FLYARTSUM
20th May 2005, 12:14
60Kb is for 1 frame, that's why we have to multiply by 25 to
have the bitrate for 1 second.
I know this seems enormous 60Kb for 1 frame but it's true and that's why we have a problem with such burst.

Tommy B.
20th May 2005, 13:47
Okay, I see now that you wrote "frame" is being 60kb, I thought you spoke about 60kb per second (which would be okay in such case).

Try to play around with the "reaction delay", "averaging period" and "smoother" options in the settings. I think this should fix the problem.

Tommy B.
20th May 2005, 14:05
Well, did some test myself and there is only one frame I get which
is pretty large. Guess what, it's the I-Frame which comes right after
the blue screen. It is 36kb, which is okay for an I-Frame.

Here is some sample clip:
http://www.twogun.de/testclip.avi

I also used the DivX DRF Analyser to look at the frame size:

http://www.twogun.de/testclip.png

The low-bitrate screen (the blue screen) is 2 seconds long. I think
in case it is longer, the folowing I-Frame will be even larger.

BTW, adjusting "reaction delay", "averaging period" and "smoother"
does not give any results.