-   Linux - Software (
-   -   Converting mp3 to ogg (

schatoor 07-06-2003 12:16 PM

Converting mp3 to ogg
Hi, I want to convert my mp3's to ogg. I know there is a "mp3ogg" script out there that converts it for you. The problem is, the names of my mp3's contain white spaces. The result, for example is this:


sohail@linux ~/music/Bjork]$ mp3ogg Bjork\ -\ Army\ of\ Me.mp3

mp3ogg v 1.1.2 mp3 to ogg conversion script
Remove original mp3 files after ogg conversion? [y/N]:n
ls: Bjork: No such file or directory
ls: -: No such file or directory
ls: Army: No such file or directory
ls: of: No such file or directory
ls: Me.mp3: No such file or directory

The trival suggestion ofcource would be to rename my mp3's. But I kinda have alot of 'm (Don't tell the RIAA ;) ). And most of them contain white spaces.
Also doing :

mp3ogg "Bjork - Army of Me.mp3"

doesn't work either. How can I get arond this stuped problem.

RolledOat 07-06-2003 12:32 PM

When I convert from ogg to mp3 (I know, but I bought a $40 DVD player that only plays mp3), I did the following.

In Konqueror, right clicked on an ogg, open with 'other'. In the command line entered 'oggdec' and selected the option to 'Open in terminal'' and
selected 'Remember this app for this mime type' (mostly so I can watch progress'.

Now, using Konqeuror, I can select any number and open wth 'oggdec' and Konqeuror takes care of the spaces, and passed the file into oggdec. This converts to wav (1/2 the time I burn CDs 1/2 covert to mp3)

I did the exactly similar thing with 'wav' and saved a mime type to open with 'notlame <options>'

You can now use Konqeuror to select multiple files and 'open with' in parallel. (Although I have only notlamed 200 .wav files at once). Computer took 2 1/1 hours to complete taks). It should only take a minute or two for you to add the 'mp3toogg' mimetype.


contrasutra 07-06-2003 03:20 PM

I wouldnt suggest converting between lossy file formats.

Because each format actually removes a chunk of the sound from the file, and each one removes a different chunk, so you end up with a holey song.

The best thing to do is to rip it strait from the CD, because MP3 to Ogg (or the other way around) will produce really crappy sound.

schatoor 07-06-2003 04:25 PM

Thanks for the advice contrasutra. It's just that those mp3 really take up alot of space. But then again, it really does'nt matter since I have alot of space. Thanks you guy's anny way.

What could be usefull to know though, is how do I get rid of the white space from my file names. They can be a big pain.

Half_Elf 07-06-2003 07:54 PM

is someone know a way to convert wma to ogg/mp3?

green_dragon37 07-06-2003 07:58 PM

This little bit will change all fo the whitespaces for every mp3 in a dir to underscores:

for i in *.[Mm][Pp]3; do mv "$i" `echo $i | tr ' ' '_'`; done

zmedico 07-06-2003 08:10 PM


Originally posted by Half_Elf
is someone know a way to convert wma to ogg/mp3?
If mplayer can play the file, maybe you can use the pcm audio output plugin and pipe that into an ogg/vorbis or mp3 compressor.

Half_Elf 07-06-2003 08:34 PM

eeeeh sorry?
pcm audio output? well I'll take a look at google about it I suppose.

zmedico 07-07-2003 12:58 AM

"mplayer -ao help" prints info about audio output modules.

Available audio output drivers:
pcm RAW PCM/WAVE file writer audio output
If that output plugin will write to standard output, then you can pipe it directly into a compressor program. Otherwise you can write out the whole PCM/WAVE file, or use a fifo as the output file and have the compressor program read from that (see "man mkfifo").

All times are GMT -5. The time now is 10:05 AM.