[Ffmpeg-devel] Re: AMR bitrate

Martin marthi
Fri Nov 10 16:55:55 CET 2006


Hi,

gravsten at yahoo.com wrote:
>>>I have a question regarding encoding and decoding of AMR using
>>>ffmpeg. To me it seems that the bitrate mode is fixed after
>>>avcodec_open(). Is that correct (the bitrate mode cannot be changed
>>>on the fly)?
>>
>>No the bitrate can't be changed on the fly and user questions
>>to the user list.
> 
> 
> Actually, the standard let one negotiation a set of AMR bit rates beforehand,
> and the transmitter may arbitrarily change bitrate within the agreed set on an
> AMR frame boundary (20ms).
> 
> I am unsure whether ffmpeg let you change the bitrate on-the-fly (i.e. without
> close/open codec), but if not, you should be able to fix this by merely making
> the AMR codec access a bitrate value in the avctx structure directly (ffmpeg
> only serves as a proxy to an external AMR library originally from the ITU).

thanks for clarifying that!
I tested it and it worked. Would you accept a patch for that? There
shouldn't be a downside in directly accessing the avctx structure, right?

Martin




More information about the ffmpeg-devel mailing list