[Ffmpeg-devel] changing frame rate and bit rate after openingcodec
Wed Aug 16 08:53:22 CEST 2006
> > Hi all,
> > a quick question on Lavc - if I need to modulate frame rate (or bit
> > of some codec after I have already opened it - is it possible without
> > closing and reopening the codec? If it is possible - is there anything
> > to it than setting the relevant structure variables?
>you can change the timestamps of the frames and you can change the
>which will do what you want, there is no such thing as a framerate there is
>just a time base and that cannot be chaged within a stream, not even with
>reopening the codec (ok you can probably change it but the file would be
mmm - I am not writing anything to any files - just calling encode_video for
each of the images (then decoding the data in another app - one encoded
image data at a time by calling decode_video) ...
my understanding is that Lavc will automatically adjust the quality of its
encoding based on the required bit_rate and time base settings... what I
want to do is to tell lavc on the fly (i.e. between two calls to
encode_video) that my bandwidth requirements have changed and expect it to
automatically recalculate its quantizer settings so that the ongoing calls
to encode_video will produce lesser size output as to conform to the new
bit_rate... am I missing something? Or are you saying that I should then
control the bit_rate manually by adjusting the quality of the codec
explicitly (i.e. turn off lavc's rate control)?
By the way - what are the units for bit_rate in the AVCodecContext struct? I
was presuming them to be bits per second, but then (even with strict
bit_tolerance values) I cannot really get to anything really low like 11
kb/s at 8 fps on 300x200 sizes or thereabouts...
Need FREE FUEL? Become a member of Qualified Opinions
More information about the ffmpeg-devel