vopts="-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2"
fi
+if [ "$vcodec" = x264 ]; then
+ vcodec=libx264
+fi
+
+if [ "$vcodec" = x264-hq ]; then
+ vcodec=libx264
+ vopts="-preset slow"
+fi
+
+if [ "$vcodec" = x264-vhq ]; then
+ vcodec=libx264
+ vopts="-preset veryslow"
+fi
+
if [ "$pass" -eq 1 ]; then
exec ffmpeg $input_opts -i "$input" -c:v "$vcodec" $vopts $vscale -b:v "$vbitrate" -g 300 -bf 2 -c:a "$acodec" -b:a "$abitrate" $output_opts "$output"