2008-02-23

Creating ringtones for the Blackberry 8700 under Linux

So I decided to put a few of my favorite game soundtrack tunes into my Crackberry. My first attempt was naïve: knowing that the thing supports mp3 files, I just uploaded a couple files to an web server and downloaded one with the handheld. It played okay, but went “Unable to save file” when I tried to save.

I search around and found something about “AMR files”, so I installed libamr and libamrwb and fiddled with ffmpeg until I could massage some files into the format. It’s a voice codec so it sounded like crap, but what the hell, as long as it works, right? Only it didn’t. Blackberry didn’t even recognized the .amr as music.

Back to mp3 files. My guess was that the “informative” error message when saving had to do with space; and indeed Google seems to think there’s a limit of 300KB (or 300KiB?) for sound files. I recoded the beginning of a few tunes to a low bitrate extract with a command like this:

ffmpeg -fs 300000 -ab 32 -i <fullfile>.mp3 <ringtone.mp3> # or -ab 48, etc.

Then I edited the ringtone with audacity to create a fading effect at the end (anyone knows whether it’s possible to do it directly through ffmpeg?). You have to be careful ’cause audacity doesn’t preserve the bitrate when exporting, and you need to set it low manually. The resulting extracts downloaded, played and saved in the BB, though they’re too short and still sound bad. Yipee.

1 comment

  1. O ffmpeg não faz isso, mas você pode usar o sox.

    Abraço

    Comment by Lúcio Corrêa — 2008-02-23 17:47:56

Leave a comment