Converting mp3 files to iPhone ringtones in Linux

It should go without saying that with “iPhone” and “Linux” in the same sentence you’ll need a jailbroken phone for this. Use the following commands to dump your mp3 file to WAV then convert it to m4a:

1. mplayer -vo null -vc null -ao pcm:fast:file=file.wav file.mp3
2. faac -b 128 -c 44100 -w file.wav

You’ll end up with a file.m4a file. Once you have the OpenSSH package installed and running on your iPhone you can use the scp command to copy the ringtone to the correct location:

scp file.m4a root@iphone:/Library/Ringtones/file.m4r

The root password by default is “alpine”. As you can see the file will need to be renamed to end in “.m4r” instead of “.m4a” to be used as a ringtone. You’ll now be able to see it listed with the other ringtones under Settings -> Sounds -> Ringtone.

Saturday, February 28th, 2009 Technology

6 Comments to Converting mp3 files to iPhone ringtones in Linux

  • [...] one I have instead found a nice little how to guide for those interested in the subject …..read more. [...]

  • Tic Tic says:

    Thank work great ! I try a lot of bad soft before and in two command line it’s done !

  • [...] дал вот это и это начитавшись получили вот такой скрипт: #!/bin/sh [...]

  • sdfdsf says:

    Another version,

    #!/bin/zsh
    mplayer -vo null -vc null -ao pcm:fast:file=file.wav $1
    faac -b 128 -c 44100 -w file.wav
    name=`echo $1 | sed ‘s/.mp3//g’`
    mv file.m4a $name.m4r
    rm file.wav

  • il Santi says:

    Incredible… Works like a charm!

  • zosky says:

    thanks. that’s exactly what i was looking for. here’s another version to batch convert

    #!/bin/bash
    for f in ./*mp3
    do
    mplayer -vo null -vc null -ao pcm:fast:file=file.wav $f
    faac -b 128 -c 44100 -w file.wav
    mv file.m4a “${f%%.*}.m4r”
    done
    rm file.wav

  • Leave a Reply