forked from ahurac/dotfiles
Parallélisation des processus de conversion
This commit is contained in:
parent
3ec0c750f5
commit
6c12abc834
1 changed files with 4 additions and 1 deletions
|
@ -36,8 +36,11 @@ case "$format_out" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
for file in **/*".${format_in}"; do
|
for file in **/*".${format_in}"; do
|
||||||
|
while [ "$(jobs -p | wc -l)" -ge 10 ]; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
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 -i "$file" $options "${output_file}" &
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue