Skip to content

Instantly share code, notes, and snippets.

@bemasher
Created July 9, 2010 04:21
Show Gist options
  • Save bemasher/469042 to your computer and use it in GitHub Desktop.
Save bemasher/469042 to your computer and use it in GitHub Desktop.
import os
x264opts = ["b-adapt=2",
"rc-lookahead=50",
"ref=6",
"bframes=6",
"direct=spatial",
"b-pyramid=1",
"me=umh",
"merange=24",
"subq=9",
"analyse=all",
"no-fast-pskip=1",
"no-dct-decimate=1",
"mixed-refs=1"]
command = 'handbrakeCLI -i "%s" -L -f mp4 --encoder x264 -x %s -O --quality 18.75 -E faac %s %s --loose-anamorphic -N eng -o "F:/Temp/%s"'
queue = [("input.mkv", ':'.join(x264opts), "-5", "-9", "output.mp4")]
for item in queue:
os.system(command % item)
os.system("shutdown -s -t 120")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment