Ffmpeg operation reference
Generated from the current declarations. Do not edit this file by hand.
Types, limits and defaults below describe resolved values. Runtime expressions must produce these types. Unknown options are rejected; defaults apply only when omitted. Constructor options must be constant after document composition.
Index#
encodeFrames, encodeSheet, encodeVideo
encodeFrames#
Encodes an explicit list of PNG images into one silent, constant-frame-rate video (video.mp4 for H.264 or video.mkv for FFV1); each list entry becomes exactly one frame lasting 1/fps seconds. A fresh FFmpeg decode is compared pixel-by-pixel with the source images. Choose it for rendered image sequences (for example ParaView, Blender or Inkscape frames); use encodeSheet for an Aseprite sprite sheet with per-frame durations.
Common mistakes and assumptions:
- Files are not sorted; list them in playback order. Repeating a path repeats that frame.
- All frames must be 8-bit RGB or RGBA, non-interlaced PNGs of identical size; palette, greyscale and 16-bit PNGs are rejected.
- H.264 needs even width and height; use FFV1 or re-render at an even size.
- Transparent areas are composited onto black, and no audio track is written.
Native binding: ffmpeg. Output kind: ["video"].
Inputs: none.
| Option | Meaning | Type / constraints | Default |
|---|---|---|---|
fps |
Constant video frame rate, an integer from 1 to 120 frames per second. Each listed file is shown for exactly 1/fps seconds, so the video lasts (number of files) / fps seconds. | {"type":"integer","minimum":1,"maximum":120} |
25 |
codec |
Choose H.264 MP4 for compact lossy YUV420 video or FFV1 Matroska for byte-exact RGB after alpha compositing. Default H.264 requires even dimensions; every frame must remain within the 16-level mean RGB error bound. | {"type":"enum","values":["h264","ffv1"]} |
"h264" |
threads |
Native encoder/decoder thread count, 1 to 16; default 1. Workflow allocation must match this setting; it does not enable MPI. | {"type":"integer","minimum":1,"maximum":16} |
1 |
files |
Absolute paths of 1 to 600 PNG images in playback order, or workflow references to image artifacts. Repeating a path repeats that frame; no filename sorting or wildcard expansion is done. | {"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"minItems":1,"maxItems":600} |
required |
encodeSheet#
Cuts frame rectangles out of one sprite-sheet PNG, using a schemaxis.aseprite.sheet/1 JSON file for their positions and millisecond durations, and encodes them in metadata order into one silent constant-frame-rate video. Each rectangle is repeated for durationMS x fps / 1000 video frames. Choose it for Aseprite animation output; use encodeFrames for separate image files.
Common mistakes and assumptions:
- Every frame duration must be a whole number of video frames: at 25 fps durations must be multiples of 40 ms, otherwise UNSUPPORTED_TIMING.
- Metadata order is playback order; tags in the metadata do not select or reorder frames.
- All rectangles must have the same size, and the sheet's pixel size must match the metadata width and height.
Native binding: ffmpeg. Output kind: ["video"].
Inputs: none.
| Option | Meaning | Type / constraints | Default |
|---|---|---|---|
fps |
Constant video frame rate in frames per second, an integer from 1 to 120; default 25. A sheet duration must be an exact multiple of one video frame period. | {"type":"integer","minimum":1,"maximum":120} |
25 |
codec |
Choose H.264 MP4 for compact lossy YUV420 video or FFV1 Matroska for byte-exact RGB after alpha compositing. Default H.264 requires even dimensions; every frame must remain within the 16-level mean RGB error bound. | {"type":"enum","values":["h264","ffv1"]} |
"h264" |
threads |
Native encoder/decoder thread count, 1 to 16; default 1. Workflow allocation must match this setting; it does not enable MPI. | {"type":"integer","minimum":1,"maximum":16} |
1 |
file |
Absolute path of the sprite-sheet PNG (8-bit RGB or RGBA, non-interlaced, at most 32 MiB). Its pixel width and height must equal the width and height recorded in the metadata file. | {"type":"string","minLength":1,"maxLength":4096} |
required |
metadata |
Absolute path of the schemaxis.aseprite.sheet/1 JSON written by the Aseprite adaptor, listing 1 to 600 frame rectangles (x, y, width, height in pixels) and durations in milliseconds. Frame order is playback order; tags do not select or reorder frames. | {"type":"string","minLength":1,"maxLength":4096} |
required |
encodeVideo#
Capture a silent existing video, select a zero-based presentation-frame range (inclusive start, exclusive end), and publish it at the chosen constant output fps. Choose this for clip preparation and retiming; use Shotcut for multi-clip editing. Every source frame is probed/decoded before selection and every output RGB channel is checked. MP4 edit lists use FFmpeg default presentation semantics.
Common mistakes and assumptions:
- Output fps changes playback speed; it never samples or interpolates frames.
- The entire source must fit the bounds even if the selected range is short.
- Only silent progressive single-stream MP4/H264 yuv420p or MKV/FFV1 bgr0; no rotation or non-square pixels.
Native binding: ffmpeg. Output kind: ["video"].
Inputs: none.
| Option | Meaning | Type / constraints | Default |
|---|---|---|---|
fps |
Output frames per second (integer 1..120), default 25. Every selected source frame becomes one output frame; lowering fps slows playback. Set source fps to preserve speed; no interpolation or frame dropping. | {"type":"integer","minimum":1,"maximum":120} |
25 |
codec |
Output codec, default h264: delivery MP4 uses lossy YUV420 and requires even dimensions; ffv1 produces Matroska and preserves decoded source RGB exactly. Earlier H264 source loss cannot be recovered. | {"type":"enum","values":["h264","ffv1"]} |
"h264" |
threads |
Native encoder/source decoder thread budget (integer 1..16), default 1. Match scheduler allocation; increasing threads does not change frame selection or timing. | {"type":"integer","minimum":1,"maximum":16} |
1 |
file |
Required absolute .mp4 or .mkv source path. The file is copied before native use; editing the external source invalidates scheduler reuse. MP4 must be H264 yuv420p, MKV FFV1 bgr0; exactly one silent progressive video stream. Entire source <=600 frames,32 MiB compressed and192 MiB RGB. | {"type":"string","minLength":1,"maxLength":4096} |
required |
startFrame |
Zero-based first decoded presentation-frame index, included in the output. Omit for 0, the first presented frame after native MP4 edit-list interpretation. Must be less than endFrame; units are frames, not seconds. | {"type":"integer","minimum":0,"maximum":599} |
0 |
endFrame |
Required zero-based exclusive end index: startFrame 1/endFrame 4 selects indices 1,2,3. Must exceed startFrame and fit the full source frame count; units are frames, not seconds. | {"type":"integer","minimum":1,"maximum":600} |
required |