How to convert mp3 to aac for the Nintendo DSi under Linux

This entry was posted by on Sunday, 11 July, 2010

Recently got a Nintendo DSi for my child and one of the first things she asked was for her music to be copied there.
Since the device does not read mp3 files, we had to get them converted to aac, despite the fact that they have to have the m4a extension.
ffmpeg does a great job for converting several file formats, so after some googling I got this one line to convert all the stuff in one folder:

for f in *.mp3; do echo $f ; ffmpeg -i "$f" -acodec aac -ab 256k "${f%mp3}m4a" 2>/dev/null ; done

And it works like a charm 🙂


6 Responses to “How to convert mp3 to aac for the Nintendo DSi under Linux”

  1. Why such a large bitrate? I bet 160k will be just fine for DSi’s audio capabilities

  2. Paulo

    So I though, but it makes a *huge* difference if I use a lower bit rate. Maybe it was just the files I used to test.
    On the other hand, the DSi is not that bad when it comes to sound, trust me. And you can connect headphones too, so a high bit rate does make sense, imho.

  3. 160kbps is a pretty regular bitrate. A lot of audio files out there have this bitrate. For me, it’s the minimum value for an audio file and 320kbps is the recommended (although I prefer flac, despite the huge space it needs)

  4. kni

    Hey… is that a bash script or another language?

  5. I converted a song with a bitrate of 190 kb/s without changing the bitrate, but it wouldn’t play on the DSi wouldn’t play. Only after settomh the bitrate to 128kb/s it would play. So my current commandline for transforming mp3’s is:

    ffmpeg -i song.mp3 -acodec aac -strict -2 -ab 128k song.m4a

  6. JH

    After a bit of searching I found that you have to add the “-skip_iods 0” flag before the output filename in order to make the DSI play the audio files.

    If you’re on linux, you can use this handy script:


    for f in “[email protected]”;
    name=`echo $f | cut -d’.’ -f1`
    echo $name
    avconv -i “$f” -acodec aac -strict -2 -skip_iods 0 “$name.m4a”

    sudo nano /usr/local/bin/
    # (Copy the script)
    sudo chmod +x /usr/local/bin/

    Then just type: filename.mp3 and it will convert it to the proper format.

Leave a Reply