Here is a shorter one:

for i in `ls *.ogg | sed -e 's/.ogg//'`; do echo "Converting $i.ogg to $i.mp3"; ogg123 -d wav -f - $i.ogg | lame- $i.mp3; done

--
#Joseph
GPG KeyID: ED0E1FB7


On 04/27/08 18:04, dexters84 wrote:
There was a bug in my pervious script

#!/bin/bash

new_files=$(find /path/to/input/ -iname "*.ogg")
inc=1
for x in $new_files
      do
          filename[$inc]=$x
          char_count=$(stat $filename[$inc]|wc -c)
          name_end=$(($char_count - 6))
          out_name[$inc]=$(*stat* $filename[$inc]|cut -c 10-$name_end)
ffmpeg -i $filename -vcodec mp3 -ac 2 -ar 44100 -ab 256k /path/to/out/$out_name.mp3
          inc=$(($inc + 1))
      done


Mark Knecht pisze:
Hi,
   I've got about 200GB of OGG and FLAC files on my local machine. My
son bought an iPod and wants me to do a batch conversion to mp3. Can
anyone recommend something in portage that can do this in more or less
a single step? Directory hierarchy is basically
band/album/audio_files.

   Extra points I suppose if it can write the output to a different
machine across the network - Windows XP or Gentoo - so that I don't
have to deal with storage issues in this end.

Thanks,
Mark


--
gentoo-user@lists.gentoo.org mailing list

Reply via email to