Parallélisation
This commit is contained in:
parent
755e04fc60
commit
2f4be3d915
1 changed files with 3 additions and 4 deletions
|
@ -39,12 +39,11 @@ for file in **/*".${format_in}"; do
|
||||||
while [ "$(jobs -p | wc -l)" -ge 10 ]; do
|
while [ "$(jobs -p | wc -l)" -ge 10 ]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
echo "$(basename "$file")"
|
||||||
output_file="${output}/$(dirname "$file")/$(basename "${file}" ".${format_in}").${format_out}"
|
output_file="${output}/$(dirname "$file")/$(basename "${file}" ".${format_in}").${format_out}"
|
||||||
mkdir -p "$(dirname "${output_file}")"
|
mkdir -p "$(dirname "${output_file}")"
|
||||||
ffmpeg -i "$file" $options "${output_file}" &
|
ffmpeg -loglevel quiet -i "$file" $options "$output_file" &
|
||||||
done
|
done
|
||||||
|
|
||||||
while [ "$(jobs -p)" ]; do
|
wait
|
||||||
fg
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue