8 echo "$0 <input.avi> <video-bitrate> <audio-bitrate> <output.mp4> [<ffmpeg-options>]" >&2
25 #opts=(-i "$input" -c:v libx264 -preset medium -b:v "$vbr" -c:a copy -f mp4)
26 #opts=(-i "$input" -c:v libx264 -preset medium -b:v "$vbr" -c:a $acodec -b:a "$abr" -f mp4)
27 opts
+=(-i "$input" -c:v libx264
-preset medium
-b:v
"$vbr" -c:a
$acodec)
28 if [ "${abr}" != '' ]; then opts
+=(-b:a
"$abr"k
); fi
32 #FFMPEG=${FFMPEG:-ffmpeg3.2.4}
35 #FFMPEG="qemu-i386 /srv/bin/ffmpeg2.6"
37 $FFMPEG "${opts[@]}" -x264-params pass
=1 "$@" -y /dev
/null
39 $FFMPEG "${opts[@]}" -x264-params pass
=2 "$@" "$out"