---
title: "How to add a trailer title with Claude (tested prompt and script)"
description: "The shot dims to near dark, then \"RADIANCE\" in widely spaced white serif capitals slowly fades in across the middle and keeps drifting wider, with \"Coming this winter\" appearing beneath it. Install one skill and ask Claude Code, or run the Python script we tested yourself."
url: https://www.recharm.com/effects/trailer-title
---

# How to add a trailer title with Claude

The shot dims to near dark, then "RADIANCE" in widely spaced white serif capitals slowly fades in across the middle and keeps drifting wider, with "Coming this winter" appearing beneath it.

Made by the script on this page, from our own test clip.

## Get this effect

1. ### Switch to Code in your [Claude Desktop App](https://claude.com/download)

2. ### Install the skill (once)

   ```
   Install the Recharm video effects skill: download https://recharm-growth-staging.s3.us-east-2.amazonaws.com/website/downloads/recharm-video-effects.zip and unzip it into ~/.claude/skills
   ```

3. ### Ask for the effect

   ```
   Add a trailer title to input.mp4
   Title, tagline: RADIANCE, COMING THIS WINTER
   ```

## Several videos, several effects, one ask

Put your clips in the folder, mention them with @, and ask for everything at once. Claude runs one tested script after another on each clip, then joins them.

Add a trailer title to **@clip1.mp4**, put a sale badge on **@clip2.mp4**, give **@clip3.mp4** a VHS look, then join all three with crossfades.

## Settings you can change

Ask Claude to change any of these, or edit them at the top of the script.

| Setting          | Default                        | What it does                                                    |
| ---------------- | ------------------------------ | --------------------------------------------------------------- |
| `TITLE, TAGLINE` | `RADIANCE, COMING THIS WINTER` | The big title and the small line under it.                      |
| `DIM`            | `0.7`                          | How much the footage darkens (0-1).                             |
| `TITLE_IN`       | `1.2`                          | Second the title starts fading in.                              |
| `TITLE_FADE`     | `2.0`                          | Seconds the title's fade takes.                                 |
| `SPACING`        | `0.35, 0.45`                   | Gap between title letters, in font sizes, at the start and end. |
| `COLOR`          | `(255, 255, 255)`              | Text color.                                                     |

## Without the skill

Don’t want to install the skill? Paste this prompt into Claude Code and Claude writes the script itself.

```
Add a movie-trailer title to input.mp4 (540x960). First dim the footage: lay a black layer over the whole frame whose opacity rises from 0 to 70% between 0.3 and 1.3 seconds (smoothstep easing), then stays at 70% to the end. Then write "RADIANCE" in white (255, 255, 255) Georgia Bold, font size 49 pixels, centered horizontally with its vertical middle 451 pixels down (47% of the height). Draw it letter by letter with a gap between letters of 0.35 times the font size at 0 seconds, widening linearly to 0.45 times the font size at 6 seconds. It fades in from invisible at 1.2 seconds to full opacity at 3.2 seconds (smoothstep easing). Under it, "COMING THIS WINTER" in the same white Georgia Bold at font size 19 pixels with 11-pixel gaps between letters, centered horizontally with its vertical middle 505 pixels down, fades in from 3.2 to 4.2 seconds. Both stay to the end. Before 0.3 seconds the frame is untouched. Use Python with Pillow to draw the text (don't rely on ffmpeg's drawtext filter) and ffmpeg to put it on the video, keep the audio, the 30fps and the 6 second length, and save it as output.mp4.
```

## Run it without Claude

This is the exact script we tested. Save it as `trailer-title.py` and run:

```
python3 trailer-title.py input.mp4 output.mp4
```

```
#!/usr/bin/env python3
"""Trailer title: the footage dims, then a widely spaced serif title slowly fades in and drifts wider, like a movie trailer.

Usage: python3 trailer-title.py input.mp4 output.mp4
Needs ffmpeg and Pillow (pip install pillow).
"""
import json
import math
import subprocess
import sys
from pathlib import Path

from PIL import Image, ImageDraw, ImageFont

TITLE = "RADIANCE"           # the big title
TAGLINE = "COMING THIS WINTER"  # the small line under it
DIM_START, DIM_END = 0.3, 1.3   # seconds the footage takes to dim
DIM = 0.7                    # how much of the light the dimming takes away (0-1)
TITLE_IN = 1.2               # second the title starts fading in
TITLE_FADE = 2.0             # seconds the title's fade takes
TAGLINE_IN = 3.2             # second the tagline starts fading in
TAGLINE_FADE = 1.0           # seconds the tagline's fade takes
TITLE_SIZE = 0.09            # title font size as a share of the frame width
TAGLINE_SIZE = 0.035         # tagline font size as a share of the frame width
SPACING = 0.35, 0.45         # gap between title letters, in font sizes, at the start and end of the clip
Y = 0.47                     # title center (0-1 down the frame)
COLOR = (255, 255, 255)      # text color
FONTS = ["/System/Library/Fonts/Supplemental/Georgia Bold.ttf",    # macOS
         "/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf",  # Linux
         "C:/Windows/Fonts/georgiab.ttf"]                         # Windows
FONT_FILE = next((f for f in FONTS if Path(f).exists()), None) or sys.exit("No bold serif font found: add one to FONTS")

def ramp(t, start, length):
    """0 before start, 1 after start + length, eased in between."""
    p = min(max((t - start) / length, 0), 1)
    return p * p * (3 - 2 * p)

def spaced(draw, text, font, cy, gap, alpha):
    """Draw text centered on the frame with `gap` pixels between letters."""
    widths = [draw.textlength(ch, font=font) for ch in text]
    x = (w - sum(widths) - gap * (len(text) - 1)) / 2
    for ch, cw in zip(text, widths):
        draw.text((x, cy), ch, font=font, anchor="lm", fill=COLOR + (alpha,))
        x += cw + gap

def overlay(t):
    img = Image.new("RGBA", (w, h), (0, 0, 0, round(255 * DIM * ramp(t, DIM_START, DIM_END - DIM_START))))
    draw = ImageDraw.Draw(img)
    title_alpha = round(255 * ramp(t, TITLE_IN, TITLE_FADE))
    if title_alpha:
        gap = title_font.size * (SPACING[0] + (SPACING[1] - SPACING[0]) * t / duration)
        spaced(draw, TITLE, title_font, h * Y, gap, title_alpha)
    tagline_alpha = round(255 * ramp(t, TAGLINE_IN, TAGLINE_FADE))
    if tagline_alpha:
        spaced(draw, TAGLINE, tagline_font, h * Y + title_font.size * 1.1, tagline_font.size * 0.6, tagline_alpha)
    return img

def probe(path):
    info = json.loads(subprocess.check_output(["ffprobe", "-v", "error", "-select_streams", "v:0", "-show_entries",
                                               "stream=width,height,r_frame_rate:format=duration", "-of", "json", path]))
    s = info["streams"][0]
    num, den = s["r_frame_rate"].split("/")
    return s["width"], s["height"], s["r_frame_rate"], float(num) / float(den), float(info["format"]["duration"])

def render(src, out):
    """Draw overlay(t) on every frame of src and save to out, keeping the audio."""
    ff = subprocess.Popen(["ffmpeg", "-y", "-v", "error", "-i", src,
                           "-f", "rawvideo", "-pix_fmt", "rgba", "-s", f"{w}x{h}", "-r", rate, "-i", "-",
                           "-filter_complex", "[0:v][1:v]overlay=shortest=1,format=yuv420p[v]",
                           "-map", "[v]", "-map", "0:a?", "-c:v", "libx264", "-crf", "18", "-c:a", "copy", out],
                          stdin=subprocess.PIPE)
    for i in range(math.ceil(duration * fps)):
        ff.stdin.write(overlay(i / fps).tobytes())
    ff.stdin.close()
    if ff.wait():
        sys.exit("ffmpeg failed")

src, out = sys.argv[1:3]
w, h, rate, fps, duration = probe(src)
title_font = ImageFont.truetype(FONT_FILE, round(w * TITLE_SIZE))
tagline_font = ImageFont.truetype(FONT_FILE, round(w * TAGLINE_SIZE))
render(src, out)
```

## More text and titles

- [Animated text frame **Animated text frame**](https://www.recharm.com/effects/animated-text-frame)
- [Brush stroke text reveal **Brush stroke text reveal**](https://www.recharm.com/effects/brush-stroke-text-reveal)
- [Burning text **Burning text**](https://www.recharm.com/effects/burning-text)
- [Drop shadow text **Drop shadow text**](https://www.recharm.com/effects/drop-shadow-text)
- [Echo text **Echo text**](https://www.recharm.com/effects/echo-text)

## Find 3x _winning ads_

Recharm cuts your ad footage into tagged, searchable clips: hooks, testimonials, product shots. Find the shots that win, add the effect with Claude, and ship 3x more ad edits.

[Start 14-day free trial](https://www.recharm.com/get-started)
