From: Oleg Broytman Date: Tue, 4 Nov 2014 14:59:52 +0000 (+0300) Subject: Pass "-threads auto" X-Git-Url: https://git.phdru.name/?p=audio-cdr-video.git;a=commitdiff_plain;h=7613b0295eb74910ca642b8ef030cb48bda61d17 Pass "-threads auto" --- 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