---
title: "How to add a long shadow text with Claude (tested prompt and script)"
description: "Flat yellow \"GLOW UP\" letters appear near the top and a solid red shadow stretches out of every letter diagonally down to the right, like a retro poster title. Install one skill and ask Claude Code, or run the Python script we tested yourself."
url: https://www.recharm.com/effects/long-shadow-text
---

# How to add a long shadow text with Claude

Flat yellow "GLOW UP" letters appear near the top and a solid red shadow stretches out of every letter diagonally down to the right, like a retro poster title.

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 long shadow text to input.mp4
   Text: GLOW UP
   ```

## 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 long shadow 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                                                  |
| -------- | --------------- | ------------------------------------------------------------- |
| `TEXT`   | `GLOW UP`       | The words.                                                    |
| `START`  | `0.5`           | Second the letters appear.                                    |
| `GROW`   | `0.8`           | Seconds the shadow takes to stretch to full length.           |
| `LENGTH` | `0.13`          | Shadow length along each axis, as a share of the frame width. |
| `COLOR`  | `(255, 214, 0)` | Letter color.                                                 |
| `SHADOW` | `(215, 35, 55)` | Shadow color.                                                 |

## Without the skill

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

```
Add long shadow text to input.mp4: the words "GLOW UP" in a heavy font (Arial Black) 13% of the frame width tall, flat yellow (255, 214, 0), centered 45% across and 14% down. Behind the letters draw a solid red (215, 35, 55) shadow, fully opaque with no blur, made by stamping the letter shapes 1 pixel at a time down and to the right at 45 degrees, so each letter extends into a long diagonal block. At 0.5 seconds the letters fade in over 0.15 seconds while the shadow stretches from 0 to its full length of 13% of the frame width (along each axis) over 0.8 seconds, easing out; then everything stays to the end. Use Python with Pillow to draw it 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 `long-shadow-text.py` and run:

```
python3 long-shadow-text.py input.mp4 output.mp4
```

```
#!/usr/bin/env python3
"""Long shadow text: flat yellow letters appear and a solid red shadow stretches out of them at 45 degrees.

Usage: python3 long-shadow-text.py input.mp4 output.mp4
Needs ffmpeg, Pillow and numpy (pip install pillow numpy).
"""
import json
import math
import subprocess
import sys
from functools import lru_cache
from pathlib import Path

import numpy as np
from PIL import Image, ImageDraw, ImageFont

TEXT = "GLOW UP"
START = 0.5                # second the letters appear
FADE = 0.15                # seconds the letters take to fade in
GROW = 0.8                 # seconds the shadow takes to stretch to full length
SIZE = 0.13                # letter height as a share of the frame width
X, Y = 0.45, 0.14          # text center (0-1 across and down the frame)
LENGTH = 0.13              # shadow length along each axis, as a share of the frame width
COLOR = (255, 214, 0)      # letter color
SHADOW = (215, 35, 55)     # shadow color, solid
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 letters():
    """The text as a full-frame alpha mask (0-255)."""
    mask = Image.new("L", (w, h))
    font = ImageFont.truetype(FONT_FILE, round(w * SIZE))
    ImageDraw.Draw(mask).text((w * X, h * Y), TEXT, font=font, anchor="mm", fill=255)
    return np.asarray(mask)

@lru_cache(maxsize=None)
def shadow(steps):
    """The letters stamped 1 to `steps` pixels down and to the right: a solid 45-degree shadow."""
    out = np.zeros_like(text_mask)
    for i in range(1, steps + 1):
        np.maximum(out[i:, i:], text_mask[:-i, :-i], out=out[i:, i:])
    return out

def overlay(t):
    img = np.zeros((h, w, 4), np.uint8)
    if t < START:
        return img
    fade = min((t - START) / FADE, 1)
    grow = 1 - (1 - min((t - START) / GROW, 1)) ** 3   # ease out: fast, then settling
    s = shadow(round(grow * LENGTH * w)).astype(np.float32)
    letter = text_mask.astype(np.float32)
    alpha = np.maximum(s, letter) / 255
    for c in range(3):   # letters on top of the shadow
        img[..., c] = (SHADOW[c] * (1 - letter / 255) + COLOR[c] * letter / 255).astype(np.uint8)
    img[..., 3] = (alpha * fade * 255).astype(np.uint8)
    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)
text_mask = letters()
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)
