Advertisement
rfkrocktk

Mass Convert FLAC to MP3

Dec 15th, 2011
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ ! -d "FLAC" ]; then
  4.     mkdir "FLAC"
  5. fi
  6.  
  7. find . -maxdepth 1 -type f -iname "*.flac" | while read file
  8. do
  9.     echo "Encoding $file to MP3."
  10.     flac -cd "$file" | lame -b 320 -q 0 --resample 44.1 - "${file%.flac}.mp3"
  11.     mv "$file" "FLAC/"
  12. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement