Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 23 lines (15 sloc) 663 Bytes
# Written by Nick Welch <>. Author disclaims copyright.
# TranscodeToMP3: recursively find all files in the current directory with the
# specified extension (the only argument) and convert them to mp3, using
# mplayer to decode them, changing the extension to .mp3 in the new files'
# filenames and leaving the original files intact.
threads=$(( `grep -c ^processor /proc/cpuinfo` * 2 ))
if [ "$glob" = "*.mp3" ]
echo "don't do that, it'll overwrite your files"
exit 1
echo "launching $threads threads at a time..."
find . -name "$glob" -type f -print0 | sort -z | xargs -0 -n1 -P$threads TranscodeFile