[Libav-user] Converting 3gp (amr) to mp3 using ffmpeg api calls

Andrey Utkin andrey.krieger.utkin at gmail.com
Tue Mar 13 16:42:59 CET 2012

2012/3/13 Sebastian Ludwig <ludwig at lyth.de>:
> In another post I read that amr-decoder does not use the same sample format
> than mp3 does.
> AMR uses FLT and mp3 S16 or S32 und that I have to do resampling.
> So I call av_audio_resample_init() and audio_resample for each frame that
> has been decoded.

I'd recommend to resample using audio filters. It can convert between
number of channels, sample format, sample rate.
See doc/examples/filtering_audio.c
Filterchain string "aresample" should do that.

Andrey Utkin

More information about the Libav-user mailing list