Mass convert MP3 to Ogg
James Gray
james at grayonline.id.au
Fri Jul 7 04:46:36 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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?
Break out the original CD's and re-rip+encode them. You DO own the CD's
right? No? Oh well there's something you should know about
MP3/WMA/OGG. They are all "lossy" formats. In other words you will
ALWAYS loose some definition even at high sample and bit rates.
Imagine the original ripped audio (uncompresed PCM) as 100% copy of the
original (CD). Now you convert that to MP3/OGG/WMA. For the sake of
the illustration, let's assume this MP3/OGG/WMA is 80% quality of the
original[1]. Life is good.
Now you no longer have access to the original CDs and have to convert
between formats. So you end up with 80% of 80% which is 64% of the
original (CD). You end up with the worst of both worlds. This is the
nature of all lossy formats (JPEG/PNG is another case that use lossy
"compression"[2]).
Make sense?
In answer to your original question, the general process is to output
the MP3/WMA to RAW (PCM) format then re-encode from that. You can do
all that in a pipe on the command line using mpg123 and oggenc:
for FILE in *.mp3
do
mpg123 $FILE --whatever-to-get-raw-on-stdout | oggenc -foo > \
$(echo $FILE | sed s/\.mp3$//).ogg
done
Read the man pages for mpg123 and oggenc to see what switches will work
for your source audio. mplayer will help with the WMA stuff :)
HTH,
James
[1] 80% is an exaggeration for the sake of illustrating a point - the
reality is nowhere near that bad unless you're using *really* low bit
and sample rates (the kind you find on podcasts). The higher the sample
and bit rates the better, but the files will also be larger. There's no
such thing as a free lunch I'm afraid :)
[2] Again, not 100% accurate. You *can* do lossless manipulation of
JPEG's and PNG's but not lossless conversion between the two as they use
different compression algorithms.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFErecswBHpdJO7b9ERAk2mAJ4gi+uFNElD3hn8RM2/bc9YNz7ZBwCfdHpH
DR2L87By3aVdLYCcV+NEpKU=
=q+vf
-----END PGP SIGNATURE-----
More information about the kubuntu-users
mailing list