La Vita è Bella

Tuesday, January 10, 2006

Script: mp32ogg

I wrote this script to convert mp3 files into ogg files. ogg is a open source audio format that is smaller and seems better than mp3.

Another reason I wrote it is that the audio player for PalmOS, AeroPlayer, is free with ogg plug-in. But the mp3 plugin is not free.

You'll need the following softwares to use this script: mplayer, oggenc, id3v2, iconv. If you are using Debian or Ubuntu, you can apt-get them. iconv is used to conver id3 tags that in GB18030 into UTF-8, if you don't need such feature, you can ignore it, and comment line 9.

It will convert all files under current directory into ogg, and try to keep the tag info. It will try id3v2 first, then id3v1.

It first use mplayer to dump mp3 file into wav file, then use oggenc to convert wav file into ogg file.

It can be ran with a parameter, to specify the ogg quality. If omitted, it's 2.

It's based on the script by stoneboy @ newsmth forum. My work is try to keep tag info.

Enjoy it :-)

more...

00:49:50 by fishy - linux - Permanent Link

3 comments - no trackbacks yet - karma: 23 [+/-]

May the Force be with you. RAmen