Rewrote mp3lame.sh to use multi-processing.
This commit is contained in:
+8
-6
@@ -4,9 +4,11 @@ if [ "$#" = "0" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while [ "$#" -gt 0 ]; do
|
if [ -z "$CONCURRENCY_LEVEL" ]; then
|
||||||
echo "Processing $1 ($# more left)..."
|
CONCURRENCY_LEVEL=1
|
||||||
#lame -m j --replaygain-fast --preset extreme -q 2 --vbr-new -V 2 -o --id3v2-only "$1" "$1.mp3"
|
fi
|
||||||
lame -m j --replaygain-fast --vbr-new -V 2 -o --id3v2-only --resample 44.1 "$1" "$1.mp3"
|
|
||||||
shift
|
echo "Processing using $CONCURRENCY_LEVEL processes..."
|
||||||
done
|
find "$@" -print0 | xargs -0 -P $CONCURRENCY_LEVEL -n 1 -I {} lame -m j --replaygain-fast --vbr-new -V 2 -o --id3v2-only --resample 44.1 --quiet "{}" "{}.mp3"
|
||||||
|
|
||||||
|
echo "All done."
|
||||||
|
|||||||
Reference in New Issue
Block a user