Best way to bulk/batch convert 74Gb of MP3 to OGG?

Soldato
Joined
7 Mar 2005
Posts
19,390
Location
LU7
As part of my plan to see if I can get rid of my iPod and use a phone bluetoothed to a wireless hearing aid system I have, I've been looking for decent phones with 32Gb+ (64Gb preferably) of on-board storage to go with a 64Gb microSD card on which to store my 74Gb MP3 collection.

Earlier tonight I had a thought, that if, say, the Samsung GS3 could play OGG files, I could convert my MP3s to OGG and save some space that way. Some very basic conversions indicate that OGG files are about 64% the size of their MP3 counterparts. This may not be accurate; it's just what I've found converting a few songs. Anyway an OGG version of my music library would be about 48Gb, which is a lot easier to store on a microSD card.

So can anyone recommend any good, reliable ways to convert my MP3s to OGG? I'd like to specify my main folder and for the convertor to take care of things from then on in. I don't mind trying a command line convertor if there is one. :)

I understand that if there are any licensing/copyright issues with this thread that I won't get many answers! :)
 
In Linux use this script in conjunction with vorbis-tools, lame, and id3tool. Should work in Windows with cygwin.

Code:
!/bin/bash
IFS="
"
temp_file="/tmp/wav"
for file in $(find -type f -iname '*.mp3')
do
        output_filename="$(echo $file|sed 's/mp3$/ogg/')"
        id3_artist="$(id3tool $file|grep '^Artist':|sed 's/^[^:]\+:\s*//'|sed 's/ *$//')"
        id3_album="$(id3tool $file|grep '^Album':|sed 's/^[^:]\+:\s*//'|sed 's/ *$//')"
        id3_title="$(id3tool $file|grep '^Song Title':|sed 's/^[^:]\+:\s*//'|sed 's/ *$//')"

        lame --decode "$file" "$temp_file"
        oggenc "$temp_file" -a "$id3_artist" -t "$id3_title" -l "$id3_album" -o "$output_filename"
done
 

In Linux use this script in conjunction with vorbis-tools, lame, and id3tool. Should work in Windows with cygwin.

Code:
!/bin/bash
IFS="
"
temp_file="/tmp/wav"
for file in $(find -type f -iname '*.mp3')
do
        output_filename="$(echo $file|sed 's/mp3$/ogg/')"
        id3_artist="$(id3tool $file|grep '^Artist':|sed 's/^[^:]\+:\s*//'|sed 's/ *$//')"
        id3_album="$(id3tool $file|grep '^Album':|sed 's/^[^:]\+:\s*//'|sed 's/ *$//')"
        id3_title="$(id3tool $file|grep '^Song Title':|sed 's/^[^:]\+:\s*//'|sed 's/ *$//')"

        lame --decode "$file" "$temp_file"
        oggenc "$temp_file" -a "$id3_artist" -t "$id3_title" -l "$id3_album" -o "$output_filename"
done
Thanks guys! I will look at those this weekend. Think I've got a cygwin installer somewhere on my PC. Probably not the most up-to-date one mind. :)
 
Back
Top Bottom