Mass convert MP3 to Ogg

Tez binary_y2k2 at blueyonder.co.uk
Fri Jul 7 05:13:46 UTC 2006


Scott wrote:
> Hi,
>
>    amaroK seem to crash after playing 2 to 3 Mp3 or .wma files, so I
> want to convert my collection to Ogg.  amaroK seems to be more
> dependable with ogg.  So, to do this I will need to convert all my
> music.  Does anyone know a good way to do this?
>
There may be a gui to do this, but I don't know what it is,
you could try making a script to convert with ffmpeg, eg

#!/bin/bash
IFS=$'\n'
for a in mp3 wma; do
  for b in $(find . -type f -name "*.$a";do
  cd $(dirname "$b")
  ffmpeg -i $(basename $b) -ac 127 $(basename $b .mp3).ogg
  done
done

That would find all the mp3 and wma files from the current dir
recursively and convert them to ogg with a bitrate of 127 Kbps.
So if your music files are in ~/MyMusic/ and/or in sub dirs like
~/MyMusic/Artest/Album Name/ it should work.
You can either use it as it is or use it as a starting point.

Tez






More information about the kubuntu-users mailing list