1
0
Fork 0
forked from ahurac/dotfiles

Parallélisation

This commit is contained in:
Hippolyte Chauvin 2023-05-12 11:23:02 +02:00
parent 755e04fc60
commit 2f4be3d915

View file

@ -39,12 +39,11 @@ for file in **/*".${format_in}"; do
while [ "$(jobs -p | wc -l)" -ge 10 ]; do
sleep 1
done
echo "$(basename "$file")"
output_file="${output}/$(dirname "$file")/$(basename "${file}" ".${format_in}").${format_out}"
mkdir -p "$(dirname "${output_file}")"
ffmpeg -i "$file" $options "${output_file}" &
ffmpeg -loglevel quiet -i "$file" $options "$output_file" &
done
while [ "$(jobs -p)" ]; do
fg
done
wait