Replay Pins & Events
Pins
addtoplaylist, <playlist>, <pos>, <clip>
Adds <clip> to <playlist> at <pos>.
channel, <channel>, <input>
Selects <input> for <channel>. E.g. apiwrite replay 1, channel, 1, 1 will assign input 1 to channel 1 (typically PGM).
Returns input for <channel>.
channels, <count>
Set the <count> number of output channels (currently limited to 2), value parameter is text string with number of channels. The default setting is 1. Change this pin before writing to other pins.
Returns the number of output channels when read.
clip <channel>
Returns the name of the clip currently loaded, or empty string if none.
clipmeta, <index>
For clip <index> returns the timecodes of its in & out points.
clips [first, last]
Returns a comma-separated list of available clips. Optionally the clip range can be limited from <first> to <last> (1-based).
deleteclip, <name>
Deletes video clip. Value parameter holds text string with clip <name>.
deleteplaylist, <playlist>
Clears contents of <playlist>.
deleteplaylistclip, <playlist>, <clip>
Removes <clip> from <playlist>.
exportclip <channel>
Saves recording/clip in <channel> from set in to out point as compressed video file. All videos will be stored in the export folder. The file will be automatically named using the following template: VidBlasterX_yymmddhhmmss.mp4.
fixeddelay <s>
Set fixed delay in seconds (0 is disabled).
guardband <time>
A guardband is the additional <time> of media saved, both before and after the intended clip. Value parameter holds text string with guardband in seconds.
in <channel>
Marks current timecode for <channel> as IN point if the value parameter is true, or erases the IN point if value is false.
Reads IN timecode for <channel>.
inputs
Returns number of inputs/cameras.
live <channel>
Enables/disables live mode for <channel>. Value parameter is "true" or "false".
Returns live mode status ("true" or "false") for <channel>.
loadclip <channel>, <index>
Loads video clip <index> into <channel> play buffer.
loadplaylist, <channel>, <index>
Loads playlist <index> into <channel> play buffer.
mode <text>
Read/write mode. Value parameter is <text> string. For internal use only.
off
Disables the module and stops internal recorder. Value parameter is ignored.
on
Enables the module and starts internal recorder. Value parameter is ignored.
osd <text>
Output OSD <text>. Value parameter is text string.
out <channel>
Marks current timecode for <channel> as out point if the value parameter is true, or erases the out point if value is false.
Read out timecode for <channel>.
playlistclips, <playlist>
Returns a comma-separated list of clips in <playlist>.
recording
Returns true if recording.
recordpath
Returns the full path to the record file.
reset
Resets all settings except the number of channels.
saveclip <channel>, <index>
Saves recording in <channel> from in to out point as video clip with <index> (0..9999).
speed <channel>, <speed>
Sets <speed> of <channel> at which frames are output. Fixed frame output is set with speed 0, (delayed) real time playback with speed 100. Value parameter is text string with percentage value.
take
Executes set transition.
tally <channel>, <status>
Sets tally <status> of <channel>. Value parameter is text string "Program", "Preview" or empty.
timecode <channel>, <timecode>
Write to this pin to change the <timecode> of <channel>. Timecode is considered absolute unless it is preceded by a plus or minus sign in which case it is relative to the channel's current timecode.
Read from this pin to get the current timecode of <channel>. Returns 0 if no timecode available.
timecodeframe <channel>, <frame>
Read from this pin to get the timecode of <frame> number. The frame number is considered an absolute value unless it is preceded by a plus or minus sign in which case it is considered an offset to the channel's current frame number. In this mode, which is typically used for jogging, the offset it automatically limited to avoid wrapping (which would result in the timecode jumping from newest to oldest or vice versa). Returns 0 if no timecode available.
timecodelive
Returns current live timecode in seconds.
timecodelivehms
Returns current live timecode formatted as hh:mm:ss.
Note by default 2 channels are available: 1 (PGM) and 2 (PVW). Where applicable to address both channels at the same time use 0. Timecode is a text representation of a double, where the integral part is unix time and the optional fractional part represents the fraction of the second. Decimal separator is a period. Clip index/name is 1-based.
Events
onchannel, <module>, <channel>, <input>
Triggered when the channel assignment has changed.
onclipadded, <module>, <clip name>
Triggered when a clip is created, includes the name of the clip.
oncliploaded, <module>, <channel>, <clip name>
Triggered when a clip is loaded. Use onlive event to detect clip unload.
onclipremoved, <module>, <clip name>
Triggered when a clip is deleted, includes the name of the clip.
onexportclip, <module>, [true|false]
Triggered when clip export started or stopped.
oninputs, <module>, <inputs>
Triggered when the number of inputs/cameras changes.
onlive, <module>, <channel>, <live>
Triggered when a channel's live status changes.
onplay, <module>, <channel>, <speed>
Triggered when a channel's play status changes.
Examples
The following example sets program playback to half speed.
apiwrite slomo 1, speed 1, 50 |
The following example sets the timecode for channel 1 of all Slomo modules to January 1st, 2020 0:00 UTC.
apiwrite slomo 0, timecode 1, 1577836800 |