Skip to content

pipeline tool: chain several edits in one call with no intermediate files #125

Closed

Description

@TMHSDigital

What and who

pipeline { input, steps: [{ op: "trim", ... }, { op: "crop", ... }, { op: "callout", ... }, { op: "export_preset", ... }], output } runs a sequence of edits as one ffmpeg invocation where possible. For agents producing a finished clip, which today means 4–6 tool calls, 4–6 re-encodes, and intermediate files to clean up.

Why

Each re-encode costs quality and time, and every tool call costs agent round-trips. A declarative recipe also makes edits reproducible: the same JSON can be saved and re-run on a new recording ("our standard PR demo"). mcp-video adds planning and structured pipelines on top of FFmpeg (https://mcpservers.org/es/servers/kyanitelabs/mcp-video). ROADMAP Phase 6 lists pipeline.

Approach

  • Refactor builders in utils/ to expose filter fragments ({ vf, af, inputArgs }) next to their full-command form. Many already compose filters internally.
  • Compose fragments into one filter_complex; steps that can't be fused (concat with other files, two-pass loudnorm) split the pipeline into stages with temp files that are cleaned up.
  • dryRun: true returns the planned ffmpeg command(s).
  • Works with the progress reporting in Long edits: fixed timeouts, partial output files left behind, and no progress reporting #81.

Done when

A trim -> crop -> scale -> export recipe runs as one ffmpeg process and matches the output of running the tools one by one. dryRun shows the plan, and recipes are documented with examples.

Activity

  1. added
    feature
    effort: large
    impact: medium
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort: largefeatureimpact: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions