[sclug] converting ogg files to mp3s

James Wyper jrwyper at yahoo.co.uk
Fri Aug 19 12:29:37 UTC 2005


--- Stuart Major <stuartmajor at phonecoop.coop> wrote:

> Hi,
> 
> Is there a quick way to convert ogg files to mp3s?


Probably, but the ogg vorbis site (www.vorbis.com) doesn't recommend
it.

ogg123 will convert .ogg files to .wav; I think the syntax is something
like 

ogg123 input.ogg -w output.wav  (or it might be -o instead of -w)

The man page will have more details.

You can then use lame to convert the .wav to .mp3

lame --alt-preset 128 output.wav output.mp3

will, for example, create an mp3 file with an average bitrate of 
128kbps which is somewhere between cassette and cd quality.

You can probably pipe the output of ogg123 into lame somehow - again
check the man pages.  The ID3 information (artist, track number, etc)
will NOT be transferred since there's nowhere in the .wav file
structure to hold this.

I expect conversion tools to automate this exist on sourceforge or
similar. 

The biggest issue you'll face is that both ogg and mp3 are "lossy"
formats, and the encoding processes throw away different parts of the
musical signal.  So the mp3 file will be of lower quality than one of
the same bitrate produced direct from the source that created the .ogg
file.  I've never tested this myself, so I don't know if the quality
difference will be perceptible.  It will depend on the bitrates you are
converting from and to.

Can I ask why you want to convert?  If it's to play the file on Windoze
machines, an ogg decoder plugin for Winamp is freely available.


James.



	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com


More information about the Sclug mailing list