[FFmpeg-devel] Live streaming of VP8

Andy Bell allbabel at gmail.com
Sat Jun 9 16:51:23 CEST 2012


Hi All,

I am streaming a VP8 stream over network and using the following code to
encode:

_bitRate = 500 * 1000;
_codecContext->bit_rate = _bitRate; // --target-bitrate=500
_codecContext->rc_min_rate = _codecContext->rc_max_rate =
_codecContext->bit_rate; // --end-usage=cbr

_codecContext->thread_count = 4;
_codecContext->qmin = 4;
_codecContext->qmax = 56;
_codecContext->width = 800;
_codecContext->height = 600;
_codecContext->rc_buffer_aggressivity = 0.95;  // --undershoot-pct=95
_codecContext->rc_buffer_size = _bitRate * 6; // --buz-sz=6000 ms
_codecContext->rc_initial_buffer_occupancy = _bitRate * 4; //
--buf-initial-sz=4000 ms
_codecContext->profile = 3;
_codecContext->time_base.num = 1;
_codecContext->time_base.den = 25;
_codecContext->gop_size = 999999; // --kf-max-dist

This works fine but when there is a huge scene change the codec generates a
key frame which I am having trouble transmitting in realtime over the
network due to the sudden jump in bitrate.

How can I configure the codec so that it levels this huge jump by encoding
smaller units when there is a huge scene change?

Thanks in advance, Andy


More information about the ffmpeg-devel mailing list