FFmpeg.wasm icon

FFmpeg.wasm

Process audio and video files using FFmpeg.wasm

Merge Videos

AI-generated

Summary

Concatenates two or more video files into a single output file. Uses FFmpeg's concat demuxer; re-encodes with libx264 and applies fade-in + yuv420p normalization if Add Fade Effect is enabled, otherwise copies streams directly for near-instant merge.

Inputs

  • videoBinaryProperties (required) — Comma-separated list of binary property names containing the videos to merge
  • mergeOutputFormat (required) — Output format for the merged video
  • addTransition — Whether to apply a fade-in effect and pixel format normalization to the merged output
  • binaryPropertyName — Name of the binary property containing the input file
  • outputBinaryPropertyName — Name of the binary property to store the output file

Output shape

Binary property named by outputBinaryPropertyName containing the merged video file

At least 2 video binary properties are required. Merge without fade uses '-c copy' for lossless, near-instant merging; with fade re-encodes via libx264 with fade=in:st=0:d=0.5 and format=yuv420p.

Examples

Example 1: Merge two intro clips with fade

videoBinaryProperties: data,video1; mergeOutputFormat: mp4; addTransition: true

Example 2: Quick concatenation without re-encoding

videoBinaryProperties: cam1,cam2; mergeOutputFormat: mkv; addTransition: false

Links

Discussion