[Ffmpeg-devel] changing encoding bit rate dynamically

Martin Prangl martin.prangl
Wed May 31 08:34:32 CEST 2006


Hi!

I have a question. I am trying to change the bit rate of a video stream during the encoding process.
So i inserted in the big for loop of the av_encode function of ffmpeg.c :



for (i=0;i<nb_ostreams;i++) {
.
.
.
if(ost->st->codec->codec_type == CODEC_TYPE_VIDEO)

{
    opts = ost->sync_opts * av_q2d(ost->st->codec->time_base);
   
    /* new code begins here */
    ost->st->codec->bit_rate = ost->st->codec->bit_rate -10;
    ost->st->codec->rc_min_rate = ost->st->codec->rc_min_rate-10;
    ost->st->codec->rc_max_rate = ost->st->codec->rc_max_rate-10; 
    /* new code ends here */
}

But these statements have no effect. Why?

Thank you, 
kind regards, 
Martin




More information about the ffmpeg-devel mailing list