X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=video%2Fff_encode;h=990e5c332b80d95b52bf62c33a8b2124c51bed43;hb=d96b6693179f508c7c245ab3ad2dd6db6539e2b1;hp=ccf916575fa1584401a87844ac99ced1b9e0923c;hpb=839d02614cb05f0de3820bf8ecff7e67664a2678;p=audio-cdr-video.git diff --git a/video/ff_encode b/video/ff_encode index ccf9165..990e5c3 100755 --- a/video/ff_encode +++ b/video/ff_encode @@ -32,12 +32,17 @@ fi input="$1" shift +if [ "$vcodec" = mpeg4-hq ]; then + vcodec=mpeg4 + vopts="-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2" +fi + if [ "$pass" -eq 1 ]; then - exec ffmpeg $input_opts -i "$input" -f avi -c:v "$vcodec" $vscale -b:v "$vbitrate" -g 300 -bf 2 -c:a "$acodec" -b:a "$abitrate" $output_opts output.avi + exec ffmpeg $input_opts -i "$input" -f avi -c:v "$vcodec" $vopts $vscale -b:v "$vbitrate" -g 300 -bf 2 -c:a "$acodec" -b:a "$abitrate" $output_opts output.avi elif [ "$pass" -eq 2 ]; then - ffmpeg -pass 1 $input_opts -i "$input" -f avi -c:v "$vcodec" $vscale -b:v "$vbitrate" -g 300 -bf 2 -an -f rawvideo -y /dev/null $output_opts && - exec ffmpeg -pass 2 $input_opts -i "$input" -f avi -c:v "$vcodec" $vscale -b:v "$vbitrate" -g 300 -bf 2 -c:a "$acodec" -b:a "$abitrate" $output_opts output.avi + ffmpeg -pass 1 $input_opts -i "$input" -f avi -c:v "$vcodec" $vopts $vscale -b:v "$vbitrate" -g 300 -bf 2 -an -f rawvideo -y /dev/null $output_opts && + exec ffmpeg -pass 2 $input_opts -i "$input" -f avi -c:v "$vcodec" $vopts $vscale -b:v "$vbitrate" -g 300 -bf 2 -c:a "$acodec" -b:a "$abitrate" $output_opts output.avi else echo "Can only do 1 or 2 passes." >&2