My Way of Life

How to convert mp3 to amr (for mobile phones!)

by tdomf_d6a7c el 16 de Nov. de 2007, en Debian, GNU, Mobile, Open Source, linux

I wrote a new article about mp3 and amr for mobiles…way more easy than this one. Read it here.

The content of this post is old enough to forget it ;)

*** Only for Linux!! ***
Eva and me have been searching a way to get music for our new Sharp 770SH for a while now. It’s very difficult as the size of the mp3’s are very high for a cell phone and the AMR format was our best option.

So I started to search the way I could do such thing…and it has been hard to find. But then the amazing ffmpeg came into my life :P

At the beginning I had a broken system (fucking Ubuntu….crap in all the possible way), then I installed Debian Testing AMD64 and I realized there is no source for 64bits architectures (or that’s what I thought! I just realized it’s the same source…duh!), so installed Debian Testing for 386 and did the trick…which took me around an hour to figure it out.

First, download the source for ffmpeg: (you will need subversion)

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

then change to the just downloaded source: cd ffmpeg.

Download this patch and aply it.

bzcat amr-fixed.patch.bz2|patch -p0

This might create another folder inside ffmpeg called ffmpeg-20060612/libavcodec, inside there is other folders, just copy them to the original ffmpeg source.

Then run $ ./configure --enable-amr_nb-fixed --enable-amr_wb, $ make and # make install and that’s it! you got it done!

AVI/MPEG to 3GP
ffmpeg -i videoin.avi -s qcif -r 12 -ac 1 -ar 8000 -b 30 -ab 12 videoout.3gp

MP3 to AMR
ffmpeg -i audioin.mp3 -acodec amr_nb -ar 8000 -ac 1 -ab 32 audioout.amr


Technorati Tags: Debian, ffmpeg, amr, 3gp, video, audio

Google Buzz

Temas Aleatorios


1 Comment for this entry

  • sajmon

    “The content of this post is old enough to forget it” No!
    The last line works in ubuntu 8.04 with nothing before.
    imo its easier than clicking.
    And sure its faster.

1 Trackback or Pingback for this entry

Leave a Reply

¿Qué buscas?

¿Aún no encuentras lo que buscas? Deja un comentario en cualquier post o ponte en contacto conmigo.

Visita a mis amiguitos

Estos son algunas webs amigas y algunas favoritas...