[Libav-user] Programmatically setting bit_rate ?

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Nov 21 18:23:19 CET 2014

Philip Schneider <pjschneider at ...> writes:

> The sample code has "c->bit_rate = 400000”. For a 
> moderate-sized image (1280 x 720) at 30fps, the
> resulting movie shows terrible visual artifacts

What kind of source material is this?
If is is interlaced, you have to tell the encoder.
If you don't tell the encoder, you either get very 
bad quality or you need a very high bitrate.

> Given those caveats, can someone explain how I 
> can programmatically set the bit_rate?

Do you mean "how do I set the bitrate"? Since you 
answered it above, I don't understand the question.
Or do you mean "what value should I choose for 
birate"? If you ask the question, I consider it an 
indication that you actually want constant 
quantiser instead.
Using a bitrate makes mostly sense if you have a 
known upper limit.

Carl Eugen

More information about the Libav-user mailing list