diff --git a/bin/convertofut b/bin/convertofut index 876ec12..186c1fb 100755 --- a/bin/convertofut +++ b/bin/convertofut @@ -36,8 +36,11 @@ case "$format_out" in esac 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}" mkdir -p "$(dirname "${output_file}")" - ffmpeg -i "$file" $options "${output_file}" + ffmpeg -i "$file" $options "${output_file}" & done