Skip to documentation
Open Workflow Studio
On this page

Stitch Video

Workflow reference | Model media outputs

Kind: StitchVideo
Configuration object: stitchVideo

Use Stitch Video to concatenate completed MP4 clips in a specified order without re-encoding their video tracks.

Inputs

videoUrls must evaluate to an ordered JSON array of 1-16 strings. Each source is a public HTTPS MP4 URL or a workflow-media:<id> reference from the current run. Empty sources, unsupported media, and references from another run are rejected.

Clips must have compatible encoded video settings and the same audio-track layout. Combined input bytes must fit 128 MiB. Remote clips are downloaded without model/provider credentials.

Configuration

Property Default Usage
videoUrls Input expression Expression selecting the ordered source array.

Use input paths or get to select an existing array. For fixed URLs, use a JSON-array literal. Preserve array order to control the final sequence.

Outputs

Returns a JSON object with clip_count and _workflow_media for one completed MP4 artifact named stitched-video.mp4. Use _workflow_media[0].reference for another media-processing step in the same run.

The video track is copied. When audio exists, it is normalized and encoded as AAC to maintain timing. Incompatible layouts fail explicitly; tracks are not silently discarded. Output is nonempty, container-validated, and limited to 128 MiB.

Example

{
  "id": "stitch",
  "name": "Combine the completed clips",
  "kind": "StitchVideo",
  "stitchVideo": {
    "videoUrls": {
      "function": "input",
      "value": "input"
    }
  }
}

Supply an input array such as ["https://media.example.com/scene-1.mp4","https://media.example.com/scene-2.mp4"], replacing the example URLs with actual compatible clips. A loop that emits one clip reference per iteration can supply the same ordered array shape.

Operational notes

Server hosts use the configured FFmpeg implementation; PWA Preview uses its configured browser FFmpeg backend. Missing backends produce an explicit error. Downloads and stitching consume the node and workflow timeouts, so allow enough time for the full media size.

This step changes the output container and audio timing while preserving compatible encoded video. Prepare mismatched clips with a separate approved conversion tool before stitching.

An unhandled error has occurred. Reload 🗙