---
title: "How to add an offset outline text with Claude (tested prompt and script)"
description: "Solid yellow \"GLOW\" fades in near the top while a thin pink outline of the same letters slides out from it and settles a little down and to the right. Install one skill and ask Claude Code, or run the Python script we tested yourself."
url: https://www.recharm.com/effects/offset-outline-text
---

# How to add an offset outline text with Claude

Solid yellow "GLOW" fades in near the top while a thin pink outline of the same letters slides out from it and settles a little down and to the right.

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 an offset outline text to input.mp4
   Word: GLOW
   ```

## 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 an offset outline text 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                                                                |
| --------------- | ---------------- | --------------------------------------------------------------------------- |
| `WORD`          | `GLOW`           | The word on screen.                                                         |
| `FILL`          | `(255, 214, 0)`  | Color of the solid letters.                                                 |
| `OUTLINE`       | `(255, 40, 140)` | Color of the outline copy.                                                  |
| `OUTLINE_WIDTH` | `4`              | Outline thickness in pixels.                                                |
| `OFFSET`        | `(16, 16)`       | Where the outline settles, in pixels right and down from the solid letters. |
| `START`         | `0.5`            | Second the word fades in.                                                   |
| `SLIDE`         | `0.6`            | Seconds the outline takes to slide out to its offset.                       |

## Without the skill

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

```
Add offset outline text to input.mp4: the word "GLOW" in Arial Black (or another heavy bold font) at 130 px, centered horizontally and 11% down the frame, as solid yellow (255, 214, 0) letters. On top of it, draw a pink (255, 40, 140) outline copy of the same word, 4 px thick and hollow inside, that starts lined up with the solid letters and slides 16 px right and 16 px down over 0.6 seconds with an ease-out, then stays there. Both fade in from 0.5 seconds over 0.3 seconds and stay to the end; nothing shows before 0.5 seconds. Use Python with Pillow to draw the text and ffmpeg to put it on the video (don't rely on ffmpeg's drawtext filter), keep the audio, and save it as output.mp4.
```

## Run it without Claude

This is the exact script we tested. Save it as `offset-outline-text.py` and run:

```
python3 offset-outline-text.py input.mp4 output.mp4
```

```
#!/usr/bin/env python3
"""Offset outline text: a solid yellow word fades in, and a thin pink outline copy of it slides off down and to the right.

Usage: python3 offset-outline-text.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, ImageChops, ImageDraw, ImageFont

WORD = "GLOW"
Y = 0.11                      # word center, as a share of the frame height down
SIZE = 0.24                   # font size as a share of the frame width
FILL = (255, 214, 0)          # color of the solid letters
OUTLINE = (255, 40, 140)      # color of the outline copy
OUTLINE_WIDTH = 4             # outline thickness in pixels
OFFSET = (16, 16)             # where the outline copy settles, in pixels right and down from the solid letters
START, FADE = 0.5, 0.3        # second the word fades in, and how long the fade takes
SLIDE = 0.6                   # seconds the outline copy takes to slide out to its offset, starting at START
FONTS = ["/System/Library/Fonts/Supplemental/Arial Black.ttf",    # macOS
         "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf",  # Linux
         "C:/Windows/Fonts/ariblk.ttf"]                           # Windows
FONT_FILE = next((f for f in FONTS if Path(f).exists()), None) or sys.exit("No bold font found: add one to FONTS")

def letter_masks():
    """Two masks of the word, centered: the solid letters, and a ring just outside their edges."""
    font = ImageFont.truetype(FONT_FILE, round(w * SIZE))
    pos = (w / 2, h * Y)
    solid, outer = Image.new("L", (w, h)), Image.new("L", (w, h))
    ImageDraw.Draw(solid).text(pos, WORD, font=font, anchor="mm", fill=255)
    ImageDraw.Draw(outer).text(pos, WORD, font=font, anchor="mm", fill=255, stroke_width=OUTLINE_WIDTH, stroke_fill=255)
    return solid, ImageChops.subtract(outer, solid)

def overlay(t):
    img = Image.new("RGBA", (w, h))
    fade = min(max((t - START) / FADE, 0), 1)
    if fade == 0:
        return img
    p = ease_out((t - START) / SLIDE)
    shifted = ring.transform(ring.size, Image.AFFINE, (1, 0, -OFFSET[0] * p, 0, 1, -OFFSET[1] * p), Image.BILINEAR)
    img.paste(FILL + (255,), mask=solid.point(lambda v: round(v * fade)))
    img.paste(OUTLINE + (255,), mask=shifted.point(lambda v: round(v * fade)))
    return img

def ease_out(p):
    p = min(max(p, 0), 1)
    return 1 - (1 - p) ** 3

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)
solid, ring = letter_masks()
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)
