php-vfxapply/plugins/executor/README.md

51 lines
1.5 KiB
Markdown

preset:
name: Stabilize video clip
group: video
plugin: transcode
props:
set:
inputtrf: { value:"{%uinput}.trf", escape:true }
script:
analyze:
info: Getting stabilization vectors
exec: "transcode -J stabilize -i {%input}"
parse: { regex: '/^encoding frames [0-([0-9]+?)], ([0-9\.]+?) fps/', frame:1, eta:2 }
stabilize:
info Stabilizing video
exec: "transcode -J transform -i {%input} -o {%output}"
parse: { regex: '/^encoding frames [0-([0-9]+?)], ([0-9\.]+?) fps/', frame:1, eta:2 }
cleanup:
exec: "rm {%inputtrf}"
## Scripts
Each script command is named, and will be executed in order of appearance. Errors
will be reported and execution will stop if the exit code is non-zero, using
the names as logical pointers.
### Command lines
Command line uses placeholders.
{%input} The input filename, escaped for the command line
{%uinput} Unescaped input filename
{%output} The output filename, escaped for command line
{%uoutput} Unescaped outptu filename
Any parameters will also be available:
{%paramname}
And you can use `set` to assign stuff to variables.
### Parsing output
To parse the output, add a `parse` key to the command block.
parse:
regex: <- expression
frame: <- index of frame number, or leave out
fps: <- index of frames per second, or leave out