CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

ffmpeg-montage-maker

Concatenate video clips from one or more directories into a single sequential montage using ffmpeg. Supports hard cut, crossfade, and fade-to-black transitions. Videos only (images skipped). Use when combining multiple video clips into a single output file.

Quality

85%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

FFmpeg Montage Maker

Concatenate video clips into a single montage with configurable transitions.

Prerequisites

  • ffmpeg and ffprobe must be installed and in PATH:
    # Windows (winget)
    winget install Gyan.FFmpeg
    
    # Windows (choco)
    choco install ffmpeg
    
    # Verify
    ffmpeg -version
    ffprobe -version

Quick Start

# Simple hard cut montage from one directory
python scripts/montage_maker.py ./clips

# Combine clips from multiple directories with crossfade
python scripts/montage_maker.py ./intro ./main ./outro -t crossfade -d 1.0

# Fade-to-black between clips, custom output path
python scripts/montage_maker.py ./clips -t fade-to-black -d 0.5 -o final_montage.mp4

# Sort by modification date, force 1920x1080
python scripts/montage_maker.py ./clips --sort modified -r 1920x1080

# Random order montage
python scripts/montage_maker.py ./clips --sort random -o shuffled.mp4

# Preview ffmpeg command without executing
python scripts/montage_maker.py ./clips -t crossfade --dry-run

# JSON output for pipeline integration
python scripts/montage_maker.py ./clips -j

Output

Human-readable:

Montage Maker
=============
Scanning 1 directory...
Found 4 video clips

Clips:
  1. intro.mp4 (5.2s, 1920x1080)
  2. scene1.mp4 (12.4s, 1920x1080)
  3. scene2.mp4 (8.7s, 1920x1080)
  4. outro.mp4 (3.1s, 1920x1080)

Transition: crossfade (1.0s)
Target resolution: 1920x1080
Output: ./montage.mp4

Building montage... done (14.3s)
Output: montage.mp4 (26.4s, 15.2 MB)

JSON:

{
  "status": "success",
  "output": "montage.mp4",
  "clip_count": 4,
  "duration": 26.4,
  "file_size": 15938470,
  "transition": "crossfade",
  "transition_duration": 1.0,
  "resolution": "1920x1080",
  "clips": [
    {"path": "clips/intro.mp4", "duration": 5.2},
    {"path": "clips/scene1.mp4", "duration": 12.4},
    {"path": "clips/scene2.mp4", "duration": 8.7},
    {"path": "clips/outro.mp4", "duration": 3.1}
  ]
}

Supported Formats

FormatExtensionsNotes
MP4.mp4, .m4vMost common, recommended output
MKV.mkvMatroska container
AVI.aviLegacy format
MOV.movApple QuickTime
WebM.webmWeb-optimized
FLV.flvFlash video
WMV.wmvWindows Media

Transition Modes

ModeFlagDescription
Hard cut-t noneDirect concatenation, no transition (default). Uses fast copy-mode when all clips share codec/resolution
Crossfade-t crossfadeSmooth blend between clips. Clips overlap by transition duration
Fade-to-black-t fade-to-blackEach clip fades out then next fades in through black. No overlap between clips

CLI Reference

python scripts/montage_maker.py DIRECTORIES... [OPTIONS]

Positional:
  directories              One or more directories containing video files

Options:
  -o, --output FILE        Output file path (default: ./montage.mp4)
  -t, --transition TYPE    none|crossfade|fade-to-black (default: none)
  -d, --duration SECS      Transition duration in seconds (default: 1.0)
  -r, --resolution WxH     Force output resolution (default: auto-detect most common)
  --sort ORDER             alphabetical|modified|random (default: alphabetical)
  -j, --json               Output result as JSON
  -q, --quiet              Suppress progress output
  --dry-run                Show ffmpeg command without executing

Behavior Notes

  • Resolution normalization: When clips have mixed resolutions, the most common resolution is used as target. All clips are scaled with aspect ratio preservation and letterboxed/pillarboxed as needed.
  • Fast concat: When all clips share the same codec, resolution, and container format, hard cut mode uses stream copy (no re-encoding) for speed.
  • Audio handling: Clips without audio get silent audio generated automatically. If no clips have audio, the output is video-only.
  • Single video: If only one video is found, it is copied or re-encoded directly without concat logic.
  • Sort order: alphabetical sorts by filename, modified sorts by file modification time, random shuffles.
  • Transition duration: Must be shorter than the shortest clip. The tool validates this before running ffmpeg.
  • Frame rate: Output is normalized to 30fps for consistency across mixed-source clips.
Repository

KennethJefferson/ccg_ccSkill_ffmpegMontageMaker

Path

SKILL.md

Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.