scripts

My personal collection of scripts
git clone git://src.gearsix.net/scripts
Log | Files | Refs | Atom | README | LICENSE

flac2mp3.sh (432B)


      1 #!/usr/bin/env sh
      2 # flac2mp3
      3 # description: converts .flac files ($1...$n) to .mp3 files
      4 # e.g.$ flac2mp3 ./album
      5 # DEPENDENCIES: ffmpeg
      6 
      7 if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
      8 	echo "Usage: flac2mp3 DIRECTORY"
      9 	echo ""
     10 	echo "use ffmpeg to convert a directory of .flac files to .mp3 files"
     11 	echo ""
     12 	echo "Dependencies: ffmpeg"
     13 	exit
     14 fi
     15 
     16 for file in "$1"/*.flac; do
     17 	ffmpeg -i "$file" -qscale:a 0 "${file%.flac}".mp3
     18 done