---
name: ffmpeg-motion-titles
description: Composite razor-sharp transparent RGBA PNG lower-third plates, timed callout fades, and apad-protected static brand end-cards over AI video edits using 100% portable FFmpeg overlay, drawbox, fade, and yuv420p mastering filters.
---

# FFmpeg Portable Motion Titles & End-Card Protocol

Stock macOS Homebrew and minimal Linux `ffmpeg` builds frequently omit `libfreetype` (`drawtext`) and `libass`. Never assume `drawtext` exists or ask an AI video model to bake small brand URLs into diffusion frames. Follow this 100% portable compositing contract:

## 1. Prefer Transparent RGBA PNG Plates Over `drawtext`
Render speaker lower-thirds, pricing badges, and closing end-cards as crisp RGBA `.png` files matching the video canvas (`1920x1080` or `1080x1920`) using Figma, Satori, or `sharp` SVG-to-PNG—then composite via FFmpeg's universal `overlay` filter.

## 2. Timed Lower-Third Overlay With Clean Fade-In & Fade-Out
Display `lower_third.png` cleanly from `t = 1.5s` to `t = 5.5s` with `0.3s` alpha fade transitions:
```bash
ffmpeg -y -i main_cut.mp4 -loop 1 -t 6 -i lower_third.png \
  -filter_complex "[1:v]format=rgba,fade=t=in:st=1.5:d=0.3:alpha=1,fade=t=out:st=5.2:d=0.3:alpha=1[lt];[0:v][lt]overlay=0:0:shortest=1,format=yuv420p[v]" \
  -map "[v]" -map 0:a? \
  -c:v libx264 -crf 18 -pix_fmt yuv420p -movflags +faststart \
  -c:a copy titled_cut.mp4
```

## 3. Append a Static 3.5-Second Brand End-Card Without Audio Truncation
Always pair a static image end-card with a silent stereo `anullsrc` track (matching `48000 Hz` sample rate) before `concat` so audio and video streams stay locked:
```bash
ffmpeg -y -i titled_cut.mp4 -loop 1 -t 3.5 -i endcard_1080p.png -f lavfi -t 3.5 -i anullsrc=r=48000:cl=stereo \
  -filter_complex "[0:v]fps=24,scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1[v0];[1:v]fps=24,scale=1920:1080,setsar=1,fade=t=in:st=0:d=0.25[v1];[v0][0:a][v1][2:a]concat=n=2:v=1:a=1[v][a]" \
  -map "[v]" -map "[a]" \
  -c:v libx264 -crf 18 -pix_fmt yuv420p -movflags +faststart \
  -c:a aac -b:a 192k -ar 48000 master_with_endcard.mp4
```

## 4. Mandatory Post-Export Probe
Always run `ffprobe` to verify exact final duration (`main + 3.5s`), `yuv420p`, `24/1` CFR, and stereo `48000 Hz` AAC.
