render
Turn Lua video scripts into MP4 files or PNG sequences with audio mixes, scene chapters, batch rows, and selectable codecs.
Instructions
The video to a file (.mp4 with the audio mix and a chapter per scene, or a directory of PNGs).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"script": "<script>"
},
"name": "render"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qp | No | quantizer, 1 best .. 51, the same scale for every codec (default: 23; with --draft 32) | |
| now | No | the wall clock at the video's first frame (Lua: f.now, seconds since 1970): an RFC 3339 time with its zone (2026-11-02T14:05:00Z, 2026-11-02T15:05:00+01:00) or seconds since 1970; preview --live runs on the system clock instead (default: 0, 1970-01-01T00:00:00Z) | |
| set | No | script arguments (Lua: arg.K, a string) that also set props.K (a number when it looks like one); they win over a batch row, which wins over the props file | |
| rows | No | the batch rows to render, 1-based and inclusive: 2, 1..3, 2.., ..2 | |
| batch | No | a .json array or .csv of rows: one video per row, the row as props; a failing row is reported, the others still render | |
| codec | No | the video codec: h264 and h265 through the system's encoders, av1 through oicut's own, on every machine (default: h264) | |
| draft | No | half size, fastest encoding | |
| media | No | fonts, images and sounds (default: media/ beside the script) | |
| props | No | a JSON object the script reads as the table props (props.title, ...) | |
| range | No | frames a..b (end exclusive), a.., ..b, all, or a scene name; times like 3.2s, 1:05.5, 50%, Intro@1.5s, a cue: drop, drop@0.5s (default: all) | |
| scale | No | output resolution factor, e.g. 0.5 for half resolution (rounded to an even size) | |
| native | No | oicut's native encoder instead of the system's (VideoToolbox, Vulkan Video, Media Foundation, libavcodec); only in a build with -define:OICUT_PATENTED=true, refused otherwise | |
| output | No | the .mp4, or a directory for PNGs; with a batch, a name template with {field} from the row and {index}, the row number (default: out.mp4; with a batch, out/{index}.mp4) | |
| script | Yes | the video script (.lua) | |
| slices | No | H.264 slices oicut's native encoder codes in parallel; the file depends on it (more: faster, slightly larger), never on the machine; the system's encoders ignore it; only in a build with the native encoder, refused otherwise (default: 4) | |
| software | No | draw on the CPU instead of the GPU |