Phar support, more plugins and presets

This commit is contained in:
2017-01-13 02:18:46 +01:00
parent 1938337bb0
commit 0ca1da06e7
13 changed files with 328 additions and 43 deletions

View File

@ -1,23 +1,5 @@
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}"
Executor Plugin for VfxApply
============================
## Scripts
@ -25,6 +7,16 @@ Each script command is named, and will be executed in order of appearance. Error
will be reported and execution will stop if the exit code is non-zero, using
the names as logical pointers.
props:
set:
<varname>: { value:<expr>, escape:<bool> }
script:
<step>:
info: <string>
exec: <commmand>
parse: <parse-expr>
### Command lines
Command line uses placeholders.
@ -40,11 +32,35 @@ Any parameters will also be available:
And you can use `set` to assign stuff to variables.
### Setting variables
Setting variables is done using the `set` prop. The core syntax is:
set:
myvarname: { value:"MyValue" }
Additionally, `escape` can be used to flag that the value need to be
escaped for the command line.
myvarname: { value:"SomeValue", escape:true }
Variables set this way can be used for the command line, and the same
expressions can be used to define vars:
set:
tempfile: { value:"{%uinput}.tmp", escape:true }
script:
first:
exec "first --temp-file {%tempfile}"
### Parsing output
To parse the output, add a `parse` key to the command block.
parse:
regex: <- expression
from: <- stream for comparison (stdout or stderr)
frame: <- index of frame number, or leave out
fps: <- index of frames per second, or leave out

24
plugins/melt/plugin.php Normal file
View File

@ -0,0 +1,24 @@
<?php
namespace VfxApply\Plugin\Melt;
use VfxApply\Plugin;
use VfxApply\Input;
use VfxApply\Output;
use VfxApply\Preset;
class MeltPlugin extends Plugin
{
public function getName()
{
return "melt";
}
public function applyPreset(Preset $preset, Input $input, Output $output)
{
}
}
return new MeltPlugin();

View File

@ -0,0 +1,24 @@
<?php
namespace VfxApply\Plugin\Transcode;
use VfxApply\Plugin;
use VfxApply\Input;
use VfxApply\Output;
use VfxApply\Preset;
class TranscodePlugin extends Plugin
{
public function getName()
{
return "transcode";
}
public function applyPreset(Preset $preset, Input $input, Output $output)
{
}
}
return new TranscodePlugin();