Skip to content

Instantly share code, notes, and snippets.

@torque
Created December 2, 2012 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save torque/4191543 to your computer and use it in GitHub Desktop.
Save torque/4191543 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import os,sys
import vapoursynth as vs
core = vs.Core()
plugin_dir = "/usr/local/lib/"
core.std.LoadPlugin("{}libffms2.2.dylib".format(plugin_dir))
core.std.LoadPlugin("{}libscxvid.dylib".format(plugin_dir))
# print("%s" % core.list_functions()) # list all functions
input_video = os.path.abspath(sys.argv[1])
vid = core.ffms2.Source(input_video)
vid = core.resize.Bicubic(vid, format=vs.YUV420P8)
vid = core.scxvid.Scxvid(vid,"{}.scxvid".format(input_video))
devnull = open('/dev/null', 'w')
vid.output(devnull, y4m=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment