[Ffmpeg-devel] Re: AMR bitrate
Mon Nov 13 10:57:25 CET 2006
Benjamin Larsson wrote:
> Martin skrev:
>> 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
>>> 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
>>> only serves as a proxy to an external AMR library originally from the
>> 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?
> Send the patch for review.
Attached a patch for amr bitrate mode which can now be changed "on the
fly" through avctx->bitrate.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 731 bytes
Desc: not available
More information about the ffmpeg-devel