Skip to content

Instantly share code, notes, and snippets.

@bepcyc
Created January 30, 2017 00:18
Show Gist options
  • Save bepcyc/d5d102e58b27d01fd0694be9b3493905 to your computer and use it in GitHub Desktop.
Save bepcyc/d5d102e58b27d01fd0694be9b3493905 to your computer and use it in GitHub Desktop.
2-pass x264 convert with rotation 90 clockwise
# found here: https://wiki.archlinux.org/index.php/MEncoder#Two-pass_x264_.28very_high-quality.29
# sudo apt install mencoder
INPUT_VIDEO="input.avi"
OUTPUT_VIDEO="output.avi"
rm -rf divx2pas.log*
mencoder ${INPUT_VIDEO} -oac copy -vf rotate=1 -ovc x264 -x264encopts pass=1:preset=veryslow:fast_pskip=0:tune=film:frameref=15:bitrate=3000:threads=auto -o /dev/null && \
mencoder ${INPUT_VIDEO} -oac copy -vf rotate=1 -ovc x264 -x264encopts pass=2:preset=veryslow:fast_pskip=0:tune=film:frameref=15:bitrate=3000:threads=auto -o ${OUTPUT_VIDEO}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment