Skip to main content
Glama

exr_sequence_to_video

Convert EXR image sequences to MP4 or MOV video with built-in color space conversion and bundled ffmpeg encoding, so no separate ffmpeg install is required.

Instructions

Convert an EXR image sequence to video (mp4 or mov).

Reads RGB channels from each EXR frame, applies color space conversion, and encodes
with the bundled ffmpeg binary — no external ffmpeg installation needed.

Color pipeline: decode input gamma/primaries → Rec.709 linear working space
→ exposure → tonemap → convert to output primaries → encode output gamma → uint8.
RGB is clamped to 0–1 and quantized before encoding, including for ProRes.
The selected output color space is reported in the result; color tags are not set explicitly.

Codec options:
- h264: H.264, .mp4 — widely compatible, good for dailies and review
- h265: H.265, .mp4 — better compression, requires modern player support
- prores_hq: Apple ProRes HQ, .mov — review proxy
- prores_4444: Apple ProRes 4444, .mov — review proxy with optional alpha. Alpha is encoded when auto-detection
  finds an A channel or channels names a packed RGBA or layer with .A; three explicit
  channel names (R, G, B) produce video without alpha.

Typical usage:
- ACEScg EXR → sRGB review video: input_colorspace='acescg', output_colorspace='srgb'
- Linear EXR → sRGB review video: input_colorspace='linear', output_colorspace='srgb'
- sRGB EXR → sRGB review video: input_colorspace='srgb', output_colorspace='srgb'

Use tonemap='reinhard' when the source has HDR values well above 1.0.
Frames are sorted by the last numeric run in the filename (e.g. frame.0001.exr, shot.10.beauty.exr).
The pattern must select one sequence with unique frame numbers. Missing frames are skipped;
preflight reports the duration estimate with and without the gaps.
Each frame is rendered at its displayWindow size; frames whose displayWindow differs from
the first frame are skipped. frame_errors lists at most 10 skipped frames and
frame_error_count gives the total. The output file is only replaced
after ffmpeg succeeds. Cancellation before replacement leaves the existing output in place.

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": {
      "directory": "<directory>",
      "output_path": "<output_path>"
    },
    "name": "exr_sequence_to_video"
  }
}

Input Schema

NameRequiredDescriptionDefault
crfNoCRF quality for h264/h265 (0–51, lower = better quality / larger file). null uses defaults: h264=18, h265=20. Ignored for prores codecs.
fpsNoFrames per second
codecNoVideo codec: 'h264' (mp4), 'h265' (mp4), 'prores_hq' (mov), 'prores_4444' (mov)h264
scaleNoOutput resolution scale relative to input (e.g. 0.5 = 50%, 2.0 = 200%)
patternNoFilename glob pattern, e.g. '*.exr' or 'beauty.*.exr'*.exr
tonemapNoHDR tone compression operator applied before output: 'none' (clamp only, default), 'reinhard' (soft roll-off x/(1+x))none
channelsNoChannel names for RGB output. null = auto-detect. Use 3 separate names (e.g. ['R','G','B'] or ['beauty.R','beauty.G','beauty.B']) or 1 packed name ending in RGB/RGBA (e.g. ['RGBA'] or ['beauty.RGBA']), or 1 layer name (e.g. ['beauty'] for beauty.R/G/B, plus beauty.A when present). The A of a packed or layer name is used as alpha for prores_4444.
exposureNoExposure multiplier applied before tone mapping
directoryYesDirectory containing the EXR sequence
part_indexNoPart index to read (0-based)
output_pathYesAbsolute path for the output video file (.mp4 or .mov)
input_colorspaceNoColor space of the source EXR: 'linear' (Rec.709 linear), 'acescg' (AP1 linear), 'srgb' (gamma-encoded)linear
output_colorspaceNoOutput RGB encoding for a review proxy: 'srgb' (default), 'linear' (Rec.709 linear), or 'acescg' (AP1 linear)srgb

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.1
    • changedInput schema / properties / channels / description
      Previous value: -"Channel names for RGB output. null = auto-detect. Use 3 separate names (e.g. ['R','G','B'] or ['beauty.R','beauty.G','beauty.B']) or 1 packed channel with ≥3 components (e.g. ['RGBA'])."New value: +"Channel names for RGB output. null = auto-detect. Use 3 separate names (e.g. ['R','G','B'] or ['beauty.R','beauty.G','beauty.B']) or 1 packed name ending in RGB/RGBA (e.g. ['RGBA'] or ['beauty.RGBA']), or 1 layer name (e.g. ['beauty'] for beauty.R/G/B, plus beauty.A when present). The A of a packed or layer name is used as alpha for prores_4444."
    • changedInput schema / properties / output_colorspace / description
      Previous value: -"Color space of the output video: 'srgb' (display-ready, default), 'linear' (Rec.709 linear, for editorial), 'acescg' (AP1 linear, for editorial/DI)"New value: +"Output RGB encoding for a review proxy: 'srgb' (default), 'linear' (Rec.709 linear), or 'acescg' (AP1 linear)"
  2. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full behavioral burden and does so thoroughly: the exact color pipeline stage order, RGB clamping/quantization including ProRes, that the bundled ffmpeg removes external dependencies, unique-frame-number and sequence-selection constraints, displayWindow mismatch skipping, the 10-frame cap on frame_errors, and that the output file is replaced only after ffmpeg succeeds (cancellation leaves the old file intact).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Long but deliberately structured: the purpose line first, then pipeline, then a bulleted codec list, then labeled typical-usage recipes, then edge-case behavior. Each sentence carries operative information about encoding, frame selection, or failure handling rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter, unannotated, no-output-schema tool, the description covers everything an agent needs: input/output color spaces, codec trade-offs, alpha behavior, frame-ordering and gap handling, and partial disclosure of result fields (selected output color space, frame_errors, frame_error_count, preflight duration estimate).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already defines all 13 parameters and the baseline is 3. The description adds real meaning beyond it: what the color-space parameters mean in pipeline terms, how channel-name forms interact with alpha encoding for prores_4444, and why tonemap exists — though it largely restates the schema's channel and codec details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource: 'Convert an EXR image sequence to video (mp4 or mov).' It immediately enumerates the supported output codecs, so an agent can distinguish this encoding tool from the surrounding inspection siblings (get_exr_info, check_exr_validity, etc.) without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides concrete recipes mapping source color space to review-video output ('ACEScg EXR → sRGB review video'), states when to use tonemap='reinhard' (HDR values above 1.0), and explains what each codec is good for (dailies, modern players, review proxies). No explicit when-not-to-use or named sibling alternative is given, which keeps it at 4.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.