X-Git-Url: https://git.phdru.name/?p=audio-cdr-video.git;a=blobdiff_plain;f=video%2Fff_encode;h=befff9db4fac7554034ae54982a5eca0d3765984;hp=cb20f956c2e9d162fe3f71ba4dc6610cd28ac4f8;hb=7613b0295eb74910ca642b8ef030cb48bda61d17;hpb=2afadf768679bd3a1592ecb34412d51a8d2c02b7 diff --git a/video/ff_encode b/video/ff_encode index cb20f95..befff9d 100755 --- a/video/ff_encode +++ b/video/ff_encode @@ -67,11 +67,11 @@ else fi if [ "$pass" -eq 1 ]; then - exec ffmpeg $input_opts -i "$input" -c:v "$vcodec" $vopts $vscale -b:v "$vbitrate" -c:a "$acodec" -b:a "$abitrate" $output_opts "$output" + exec ffmpeg -threads auto $input_opts -i "$input" -c:v "$vcodec" $vopts $vscale -b:v "$vbitrate" -c:a "$acodec" -b:a "$abitrate" $output_opts "$output" elif [ "$pass" -eq 2 ]; then - ffmpeg -pass 1 $input_opts -i "$input" -c:v "$vcodec" $vopts $vscale -b:v "$vbitrate" -an -f rawvideo -y /dev/null $output_opts && - exec ffmpeg -pass 2 $input_opts -i "$input" -c:v "$vcodec" $vopts $vscale -b:v "$vbitrate" -c:a "$acodec" -b:a "$abitrate" $output_opts "$output" + ffmpeg -pass 1 -threads auto $input_opts -i "$input" -c:v "$vcodec" $vopts $vscale -b:v "$vbitrate" -an -f rawvideo -y /dev/null $output_opts && + exec ffmpeg -pass 2 -threads auto $input_opts -i "$input" -c:v "$vcodec" $vopts $vscale -b:v "$vbitrate" -c:a "$acodec" -b:a "$abitrate" $output_opts "$output" else echo "Can only do 1 or 2 passes." >&2