Rewrote mp3lame.sh to use multi-processing.
This commit is contained in:
parent
4aeb18b7d8
commit
8c7e1f3e27
14
mp3lame.sh
14
mp3lame.sh
@ -4,9 +4,11 @@ if [ "$#" = "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
echo "Processing $1 ($# more left)..."
|
||||
#lame -m j --replaygain-fast --preset extreme -q 2 --vbr-new -V 2 -o --id3v2-only "$1" "$1.mp3"
|
||||
lame -m j --replaygain-fast --vbr-new -V 2 -o --id3v2-only --resample 44.1 "$1" "$1.mp3"
|
||||
shift
|
||||
done
|
||||
if [ -z "$CONCURRENCY_LEVEL" ]; then
|
||||
CONCURRENCY_LEVEL=1
|
||||
fi
|
||||
|
||||
echo "Processing using $CONCURRENCY_LEVEL processes..."
|
||||
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."
|
||||
|
Loading…
x
Reference in New Issue
Block a user