[ale] flac -> ogg ?

Brian Pitts bpitts at learnlink.emory.edu
Fri Apr 21 10:34:18 EDT 2006


Robert L. Harris <Robert.L.Harris at ...> writes:
> 
> I have some songs I ripped into flac which play fine at home but I want
> to convert them to mp3 for my streaming player.  Other than using
> something like the xmms diskwriter option, anyone know a commandline
> util, preferably one I can pipe into an ogg encoder?

I use the following script to convert all the aac files in a directort to mp3. I
think that it could be modified to use the flac and metaflac programs instead of
faad, but I don't have any flac files to test with.

#!/bin/bash
for i in *.m4a
do
        base=`basename "$i" .m4a`
        info=`faad -i "$i" 2>&1`
        artist=`echo "$info" | grep artist: | sed s/artist:\ //g`
        album=`echo "$info" | grep album: | sed s/album:\ //g`
        song=`echo "$info" | grep title: | sed s/title:\ //g`
        track=`echo "$info" | grep track: | sed s/track:\ //g`
        year=`echo "$info" | grep date: | sed s/date:\ //g`
        genre=`echo "$info" | grep genre: | sed s/genre:\ //g`
        faad -w "$i"| lame -h -b 128 - "$base.mp3"
        id3v2 -a "$artist" -A "$album" -t "$song" -T "$track" -y "$year" -g
"$genre" "$base.mp3"
done




More information about the Ale mailing list