[Ffmpeg-devel] changing encoding bitrate dynamically
Tom Harper
tharper
Wed May 31 06:07:46 CEST 2006
Hi,
Because these don't actually reset the state data in the rate control
object- you might have some luck just by adjusting the quality value
in the picture rather than trying to change the rate, though that isn't
exact it may do what you want.
Tom
At 06:47 AM 5/30/2006, Martin Prangl wrote:
>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
>_______________________________________________
>ffmpeg-devel mailing list
>ffmpeg-devel at mplayerhq.hu
>http://lists.mplayerhq.hu/cgi-bin/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list