Lets start by checking if you have amr support enabled with ffmpeg, Type ffmpeg in you console to check if it is in your $PATH Or preferable you can run it from where it is installed e.g /usr/local/ffmpeg/bin/ffmpeg
When I run my ffmpeg without any parameters this is what I get.
FFmpeg version SVN-r9833, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: –enable-shared –enable-gpl –enable-pp –enable-liba52 –enable-libamr-nb –enable-libamr-wb –enable-libfaac –enable-libfaad –enable-libmp3lame –enable-libogg –enable-libvorbis –enable-libx264 –enable-libxvid –disable-mmx –enable-libtheora
Which means I have both versions of amr installed. For the sake of demonstration I a m going to use libamr_wb which is what I need to create true tones from mp3, Just remember you can use other formats besides amr to create ring tones.
ffmpeg -y -i myaudio.mp3 -ab 18.25k -ar 16000 -acodec libamr_wb -ac 1 mynewaudio.amr 2>&1
Be careful on which libamr you decide to use because they accept sampling rates which are very different, If you upload this to your phone it should play. The One nice thing about using amr is that you can cut down on the mp3 file size by more than 200% e.g. take a mp3 song which is 2.5mb in size and you convert that with the settings given above, you will have an amr file which is roughly at 500kb in size and it is still a full length song but just the quality is not as good as mp3. For best results try to play around with bit rate(-ab) variables.
Please note that some cellphones don’t support amr, so you will still have to try out other formats for them.
Tags: amr, ffmpeg, mp3
Recent Comments