September 23, 2008
I got my hand on some audio books in the m4b format (They are not DRM protected) and I wanted to listen to them on my mp3 player. But the m4b format is a special format for the Ipod and don’t own a Ipod (and I don’t want to own one 😉 )
As I’m a Linux user I decided to write a program which converts them to ogg (which my mp3 player supports). It should be a console program which goes recursively through a directory and its sub directories and converts all mb4 files to ogg. Of course this script does not reinvent the wheel and uses some mighty console programs for the main work. You need to have following stuff installed on your system:
- oggenc (on Ubuntu/Debian you can it install with apt-get install vorbis-tools)
- faad (apt-get install faad)
- python (should be normally already installed, apt-get install python)
Download the m4b2ogg.py script and set the execute permissions. Call
m4b2ogg.py -h to get a list of the possible parameters. I hope this script helps also other Linux users – if so drop a line please. Thx.
ps: If you’re searching for converting other media formats into yet an other media formats on linux, take a look at this site.