What you probably want is to convert the files a set number at a time.
One file at a time:
Code:
find /recordings/arrow82/monitor/2015/04 -type f -name '*.wav' | while read line
do
lame --quiet --preset phone "$line" "$(basename "$line" .wav).mp3"
done
You can run this a few at a time per directory.
I'll have to think of a clever way to run more than one at a time.
EDIT:
Code:
num_threads=4
find /recordings/arrow82/monitor/2015/04 -type f -name '*.wav' | while read line
do
lame --quiet --preset phone "$line" "$(basename "$line" .wav).mp3" &
running="$(ps -u $USER | awk '{ if ($4 == "lame") print }' | wc -l)"
while test "$running" = "$num_threads"
do
sleep 1
running="$(ps -u $USER | awk '{ if ($4 == "lame") print }' | wc -l)"
done
done