ffmpeg in Universal Modder: Automatic Showcase Video Cutting

After your AI agent builds and verifies a mod, the last step is producing a shareable showcase video. Universal Modder does this with ffmpeg and a generated edit decision list (EDL) — no manual timeline editing, no video editor open.

Why ffmpeg Is a Hard Dependency

Universal Modder lists ffmpeg as a required install (alongside Python 3.10+ and uv). It's used for:

  • Capturing game-only audio during in-game testing.
  • Concatenating GPU-safe screenshots and short clips into a sequence.
  • Adding titles, captions and beat-cut transitions.
  • Exporting a compressed, shareable showcase MP4.

Without ffmpeg installed, the mod itself still builds and tests fine — but you'll miss the automatically cut video.

How the EDL Pipeline Works

  1. During in-game testing, the agent captures short clips at key moments (weapon firing, explosion, new unit moving, etc.).
  2. It writes an EDL (a plain-text edit decision list) describing each clip's in/out point, duration, and any title overlay.
  3. It optionally generates a backing music track via fal.ai (or uses a local ComfyUI music model).
  4. It invokes ffmpeg with a filter complex that assembles clips, adds beat-aligned cuts, overlays titles, and muxes the music track.

Example ffmpeg Invocation (Simplified)

ffmpeg -y \
  -i clip_01.mp4 -i clip_02.mp4 -i clip_03.mp4 \
  -i music.wav \
  -filter_complex "
    [0:v][1:v][2:v]concat=n=3:v=1:a=0[vcat];
    [vcat]drawtext=text='Fal Arsenal — Terraria':
      x=(w-tw)/2:y=h-80:fontsize=36:fontcolor=white:box=1:boxcolor=black@0.6[vout]
  " \
  -map "[vout]" -map "3:a" \
  -c:v libx264 -crf 23 -preset medium \
  -c:a aac -b:a 128k \
  showcase.mp4

In practice the agent writes this ffmpeg command automatically based on the EDL — you don't have to.

What You Get Out

  • A 15–60 second showcase MP4, sized for YouTube / X / Douyin.
  • Titles naming the mod and the game.
  • Background music generated by fal (or local ComfyUI).
  • Beat-cut transitions so it doesn't look like a raw screen recording.

Installing ffmpeg

Windows

Download the full build from ffmpeg.org, extract it, and add bin/ to your PATH. Verify:

ffmpeg -version

macOS

brew install ffmpeg

Linux

sudo apt install ffmpeg
Don't skip this The showcase video is how you prove the mod works when you share it (on GitHub, Reddit, Discord, or modding communities). Universal Modder cuts it automatically — just make sure ffmpeg is installed.
AdSense / 728x90

Related

Tutorial

First Mod Walkthrough

Where video cutting fits in the loop.

fal.ai

fal.ai Music & Audio

How the backing track is generated.

Agents

Which AI Agent?

Claude vs Codex vs Gemini.

GitHub

Repo & CLI

All um commands.