Skip to content

Instantly share code, notes, and snippets.

@willread
Created July 25, 2016 06:55
Show Gist options
  • Save willread/db99ad9c8332442a78a458a6faaf68d1 to your computer and use it in GitHub Desktop.
Save willread/db99ad9c8332442a78a458a6faaf68d1 to your computer and use it in GitHub Desktop.
Recursively convert the bitrate of all mp3 files in the specified folder
#!/bin/sh
files="$(find -L $1 -name '*.mp3' -type f)"
echo "$files" | while read file; do
lame --mp3input -b 64 "$file" "$file.converted"
rm "$file"
mv "$file.converted" "$file"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment