handbrake
v0.0.1
Published
HandBrakeCLI wrapper script
Downloads
47
Readme
HandBrakeCLI wrapper
How to use
See index.coffee
and example
Methods
setPath(string path)
: set handbrake pathsetOpts(object opts)
: set handbrake argumentssetFlag(string key)
: set handbrake non-value argumentssetLong(string key, string val)
: set handbrake long-type optionssetX264(object opts)
: set x264 optionsexecute
: execute HandBrakeCLI
Example
want to do...
HandBrakeCLI -f mp4 -E faac -2 -T -i hoge.mkv -o fuga.mp4
↓
{HandBrake} = require 'handbrake'
hb = new HandBrake
hb.setOpts
f: 'mp4'
E: 'faac'
2: ''
T: ''
i: 'hoge.mkv'
o: 'fuga.mp4'
hb.execute()
HandBrakeCLI -e x264 -i hoge.mkv -o fuga.mp4 -x level=32:bframe=0:cabac=0
↓
hb.setOpts
e: 'x264'
i: 'hoge.mkv'
o: 'fuga.mp4'
hb.setX264
level: 32
bframe: 0
cabac: 0
hb.execute()