Though it is still in it's very early stages, it supports already a handful of useful effects that can be selected via the presets-selection.
It is also programmable. It opens up a small IDE-window, as part of the "Video-Processor-Plugin"-UI, in which you can put Eel-code(no Lua or Python!), that processes the video.
Unlike with other scripts, the scripts for the video processor plugin do not support the standard-reaper-API-commands, but have an own set of variables and functions. The list of functions can be reached by clicking into the IDE-window of the "video processor plugin" and hitting the F1-key.
Some general notes on the video-processor-plugin:
It has a very limited set of programmable UI-elements, means, only a knob (refer the param-variable for more details) at the time.
The plugin has also sometimes the behaviour of "added effects". That means: If you have several tracks whith video items and you put a video processor plugin on every track as track-FX, they do not only influence the video-items in this track. In fact, they also influence the video-items on the other tracks as well. If you have 10 tracks and every track has a video-effect as track-FX that turns the brightness down by 10%, the resulting image will be a black one. All effects added up each other (10 times -10% brightness).
This effect can be circumvented by putting the video-processor-plugin as item-FX, NOT as track-FX.
Example code, with a knob for turning the video on and off:
// A small demo-script that turns video on&off //@amp;param1:VideoOnOff 'Video Off(0) On(1)' 1 0 1 0.5 1 frame=input_track(0); // variable frame set with the videoframe from the first // videoitem in the project at a given position gfx_fillrect(0,0,project_w,project_h); // deletes last frame, by putting a black rectangle on top of it // to prevent from having the last frame(s) be shown indefinately //Now, put the picture to the framebuffer -> outputting the video gfx_blit(frame, // the current video-frame 1, // don't preserve aspect-ratio 0,0, // put upper right corner of the video at position 0,0 project_w*VideoOnOff,project_h*VideoOnOff // size of the video width, height, // multiplied by the VideoOnOff-Parameter // 1=video squeezed to 100% height & width // 0=video squeezed to 0% height & width );
project time in seconds
current tempo in BPM
current time signature numerator
current time signature denominator
current project position in QN
item time in seconds (if in item)
project FPS (30.0, 29.97, etc)
project preferred video width
project preferred video height
set nonzero if project_w/project_h reflect actual project setting (otherwise could be media-defined)
current rendering colorspace, e.g. 'RGBA', 'YV12', or 'YUY2'. you can override this with extreme caution.
if in FX form, wet/dry mix of effect.
parameters, you can name these by adding lines //@param [:varname] 'name' [defval minval maxval centval step].
current drawing color (red 0..1)
current drawing color (green 0..1)
current drawing color (blue 0..1)
current drawing alpha (0..1)
0=normal, 1= additive, 3=mul (works different in YUV vs RGB)
add 0x100 for blit() to enable filtering (if possible)
add 0x10000 to use source alpha (only valid when using RGBA colorspace)
add 0x40000 to use extra clamping (for out of range alpha/gradient values)
add 0x80000 to treat gfx_r/gfx_g/gfx_b as YUV values (in non-RGB colorspace)
destination image handle, or -1 for main framebuffer
returns number of inputs available (total), range [0..n)
returns the number of available inputs on discrete tracks
returns input for bottommost item or FX on discrete-track x (0 is first track with video item above current, etc)
returns the number of tracks above the current track that could possibly contain video items.
returns input for bottommost item or FX on track relative to current track. Returns -1000 if track does not contain any video items at the current time, or -10000 if no further tracks contain video.
returns the next input after x which is on a different item or track
returns the next input after x which is on a different track
returns 1.0 if current FX is on master chain, 2.0 if on monitoring FX chain
returns 1 if input is available, sets w/h to dimensions. If srctime specified, it will be set with the source-local time of the underlying media. if input is a video processor in effect form, automated parameters can be queried via wet/parm1/etc.
returns an image index for drawing (can create up to 32 images). contents of image undefined unless clear set.
sets an image size (handle can be -1 for main framebuffer). contents of image undefined after resize, unless clear set. clear=-1 will only clear if resize occurred.
(cheaply) retains a read-only copy of an image in handle. This copy should be released using gfx_img_free() when finished. Up to 32 images can be held.
gets a unique identifier for an image, valid for while the image is retained. can be used (along with gfx_img_hold) to detect when frames change in a low frame rate video
frees an earlier allocated image index.
gets dimensions of image, returns 1 if valid (resize if inexplicably invalidated)
updates r/g/b/a/mode always, dest only if specified
copies input to framebuffer. preserve_aspect=-1 for no fill in pad areas
fills a rectangle
processes a rectangle with 768-entry channel table [256 items of 0..1 per channel]
tab is wdiv*hdiv*2 table of src points. if wantalpha=1, tab is wdiv*hdiv*3 table of src points including alpha.
chroma-key blits, using the source color as key. kv1-kv4 meaning depends on colorspace:
YV12/YUY2: kv1 is U target (-0.5 default), kv2 is V target (-0.5 default), kv3 is closeness-factor (0.4 default), kv4 is the gain (2.0 default)
RGBA: kv1 is green-factor (1.0 default), kv2 is blue-factor (-1.0 default), kv3 is offset (-1.0 default), kv4 enables spill removal (1.0 default)
chroma-key blits, using destination color as key. ignores gfx_a and gfx_mode.
sets a font, flags can be 'B' for bold, 'I' for italics, 'BI' for bold italics, etc
measures the size of #string, returns width
utility, converts r,g,b to YUV, does not clamp [0..1]
utility, converts YUV to r,g,b, not clamping [0..1]