mp3togo

About

Application

mp3togo is a linux tool for creating low bitrate subsets from a high quality music archive. The program was born in the fall of 2004 when my housemate came home with a portable mp3 player and expected to be able to load it with music from our house archive which was mostly comprised of ogg vorbis files.

The sets of files mp3togo creates can be played on most mp3 players, used to create audio and mp3 cds or to create compressed distributions of a set of wav files.

Operation

mp3togo accepts a list of files from the command line or a playlist file or even a running instance of XMMS. The files are converted to wavs with the appropriate command line tools. The uncompressed files are normalized so they sound good together, particularly through earphones. Then they are encoded to a space efficient low bitrate ogg or mp3 format and tagged. The completed files are copied to the destination, preserving a configurable amount of the original directory structure. The free space on the output volume is monitored and mp3togo will stop gracefully when it becomes filled or a preset size limit is reached.

mp3togo can run as a command line program. It will read options from the command line or optionaly from a config file in the invoking users home directory.

mp3togo is written in pure python and has been written with expandability in mind. The various modules can be imported and driven by other python programs. In the near future I intend to write a GUI interface for my mouse using friends.

Disadvantages

Decoding and reencoding a gigabyte of music is time consuming. On my 2.4ghz P4, mp3togo will process 100 average songs in about an hour. It takes about 3.5 hours to fill up my 1GB flash player.

Many mp3 players will use battery power when hooked up to USB. Mine does, as a result I burn 3.5 hours of battery to load my player. It also gets quite upset when the batteries die while transferring files.

One solution to this problem is to convert the files offline. Use a directory on the computers hard disk and set the --max-size option to the free space on the player. Set it to work and go to bed or something. Once it is done the files can be copied over quickly with regular unix tools.

I don't bother with this myself as I rarely erase my whole player. Instead, I'll erase albums as I get bored with them and load new albums in the space freed up. It takes fifteen or twenty minutes and it keeps my travelling collection fresh.

Advantages

If you have spent years ripping your extensive CD collection to high quality ogg vorbis files then the main advantage of mp3togo should be quite obvious. I bought an iRiver player specificaly because of their ogg vorbis support. if you are a free software advocate, you really have to put your money where your mouth is. I found though, that most of my music was encoded at a bitrate that was higher than the iRiver supported. I use the ogg output mode of mp3togo and still get to feel all warm and fuzzy inside.

Another major advantage only became clear to me after sorting out the first problem. By reencoding at a lower bitrate you can cram way more music on your player. I fit 180 songs onto my 1GB player by copying them over with cp. By using mp3togo I was able to fit 350 songs on the same player. That's 50% more music, well worth the extra time spent encoding.

It is true that the quality suffers slightly, but you are listening to this music while jogging or riding the skytrain to work. The original files still exist for cranking to eleven on your expensive super home hi-fi system. With the additional capacity, you can listen until your batteries die and not get bored.

mp3togo normalizes the tracks as it converts them. This eliminates the problem of some songs recorded at a low level and others at a high level. With my player on shuffle mode, I was always reaching into my pocket to adjust the volume. Half the time my big thumbs would hit forward instead of volume up on the tiny joystick and I'd have to apologise for cursing to the other people on the bus. With normalization the player stays in my pocket until I get home.