LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   audio conversion problems,,, (https://www.linuxquestions.org/questions/linux-general-1/audio-conversion-problems-332955/)

Armon 06-13-2005 12:28 AM

audio conversion problems,,,
 
I checked the wiki and I found how to convert between different audio formats. But, I couldn't find how to convert an ogg format to mp3. Please tell me what commands/scripts/programs I would use to get this done. By the way, im on ubuntu 5.04 if that makes any difference.

acid_kewpie 06-13-2005 02:43 AM

ogg2mp3 would be an obvious choice... but there will be dozens of ways to do it.

Speek 06-13-2005 10:13 AM

This requires vorbis-tools and lame.

#!/bin/sh
# Convert all ogg vorbis files in current directory to mp3 files.

for file in *.ogg ; do
oggdec "$file"
wavfile=`basename "$file" .ogg`.wav
mp3file=`basename "$file" .ogg`.mp3
lame "$wavfile" "$mp3file"
rm "$wavfile"
# Uncomment the next line if you want the ogg vorbis files to be removed
# rm "$file"
done

oneandoneis2 06-13-2005 10:23 AM

It'll result in a pretty low-quality copy tho - two lossy formats applied to one track? Not good!

Armon 06-13-2005 03:51 PM

Thanx a lot guys. It doesn't really matter thought that the quality isn't that great, I'll live. I just needed the files to work on my ipod.


All times are GMT -5. The time now is 06:24 PM.