---
title: "How to add a marquee bulb text with Claude (tested prompt and script)"
description: "A theater sign reading \"NEW\" switches on bulb by bulb around each red letter, then every third bulb flashes in a chase that runs round the letters. Install one skill and ask Claude Code, or run the Python script we tested yourself."
url: https://www.recharm.com/effects/marquee-bulb-text
---

# How to add a marquee bulb text with Claude

A theater sign reading "NEW" switches on bulb by bulb around each red letter, then every third bulb flashes in a chase that runs round the letters.

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 marquee bulb text to input.mp4
   Text: NEW
   ```

## 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 marquee bulb 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`               | `NEW`           | The sign's word (keep it short so it fits).                       |
| `START`              | `0.5`           | Second the sign appears and its bulbs start switching on.         |
| `BUILD`              | `0.6`           | Seconds for every bulb to light, one after another.               |
| `STEP`               | `0.1`           | Seconds between each move of the chase.                           |
| `EVERY`              | `3`             | One bulb in this many is bright at a time.                        |
| `Y`                  | `0.12`          | Sign center, 0-1 down the frame.                                  |
| `SIZE`               | `0.30`          | Letter height as a share of the frame width.                      |
| `GAP, SPACING, BULB` | `12, 16, 5`     | Pixels from letter edge to bulbs, between bulbs, and bulb radius. |
| `FACE`               | `(200, 25, 40)` | Letter 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 theater marquee sign to input.mp4. From 0.5 seconds on, show a dark (28, 12, 18) rounded board centered across the frame and 12% of the way down, with the word "NEW" on it in red (200, 25, 40) Impact letters 30% of the frame width tall, each letter with a thin brown (120, 70, 20) rim and 36 pixels between letters. Ring each letter with light bulbs: 10-pixel circles every 16 pixels along a line 12 pixels outside the letter's edge, ordered as you trace round each letter, left letter first. From 0.5 to 1.1 seconds the bulbs switch on one after another in that order (warm white (255, 246, 210) with a yellow (255, 190, 40) glow; bulbs not yet on are dark brown (70, 45, 30)). From 1.1 seconds to the end, run a chase: every third bulb is bright with the glow and the others are dim amber (150, 95, 30), and the bright ones move one bulb along every 0.1 seconds. Nothing shows before 0.5 seconds and the rest of the frame is untouched. 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 `marquee-bulb-text.py` and run:

```
python3 marquee-bulb-text.py input.mp4 output.mp4
```

```
#!/usr/bin/env python3
"""Marquee bulb text: a theater sign switches on bulb by bulb round its red letters, then the lights chase.

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

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

TEXT = "NEW"                        # the sign's word
START = 0.5                         # second the sign appears and its bulbs start switching on
BUILD = 0.6                         # seconds for every bulb to light, one after another
STEP = 0.1                          # seconds between each move of the chase
EVERY = 3                           # one bulb in this many is bright at a time
Y = 0.12                            # sign center, 0-1 down the frame
SIZE = 0.30                         # letter height as a share of the frame width
GAP = 12                            # pixels from the letter edges out to the ring of bulbs
SPACING = 16                        # pixels between bulbs along the ring
BULB = 5                            # bulb radius in pixels
FACE = (200, 25, 40)                # letter color
RIM = (120, 70, 20)                 # thin rim round each letter, under the bulbs
BOARD = (28, 12, 18)                # sign board behind the letters
BRIGHT = (255, 246, 210)            # a bulb at full brightness
GLOW = (255, 190, 40)               # halo round the bright bulbs
DIM = (150, 95, 30)                 # a bulb between chase steps
OFF = (70, 45, 30)                  # a bulb before it switches on
FONTS = ["/System/Library/Fonts/Supplemental/Impact.ttf",          # macOS
         "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf",  # Linux
         "C:/Windows/Fonts/impact.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 sign():
    """The board and red letters, plus one mask per letter for its ring of bulbs to follow."""
    font = ImageFont.truetype(FONT_FILE, round(w * SIZE))
    track = 2 * GAP + 2 * BULB + 2
    widths = [font.getlength(c) for c in TEXT]
    x = (w - sum(widths) - track * (len(TEXT) - 1)) / 2
    img = Image.new("RGBA", (w, h))
    draw = ImageDraw.Draw(img)
    masks = []
    for c, cw in zip(TEXT, widths):
        mask = Image.new("L", (w, h))
        ImageDraw.Draw(mask).text((x + cw / 2, h * Y), c, font=font, anchor="mm", fill=255)
        masks.append(mask)
        x += cw + track
    x0, y0 = min(m.getbbox()[0] for m in masks), min(m.getbbox()[1] for m in masks)
    x1, y1 = max(m.getbbox()[2] for m in masks), max(m.getbbox()[3] for m in masks)
    pad = GAP + round(w * 0.04)
    draw.rounded_rectangle([x0 - pad, y0 - pad, x1 + pad, y1 + pad], radius=pad // 2, fill=BOARD, outline=RIM, width=3)
    for m in masks:
        draw.bitmap((0, 0), m.filter(ImageFilter.MaxFilter(5)), fill=RIM)
        draw.bitmap((0, 0), m, fill=FACE)
    return img, masks

def ring(mask):
    """Points every SPACING pixels round a letter, GAP pixels outside its edge, in the order a pen would trace them."""
    grown = mask.filter(ImageFilter.MaxFilter(2 * GAP + 1))
    edge = (np.array(grown) > 127) & ~(np.array(grown.filter(ImageFilter.MinFilter(3))) > 127)
    pts = np.argwhere(edge)[:, ::-1].astype(np.float32)
    left = np.ones(len(pts), bool)
    i, path = 0, []
    while True:
        left[i] = False
        path.append(pts[i])
        if not left.any():
            break
        i = int(np.where(left, ((pts - pts[i]) ** 2).sum(axis=1), np.inf).argmin())
    bulbs = [path[0]]
    for p in path[1:]:
        if min(np.hypot(*(p - b)) for b in bulbs[-40:]) >= SPACING:
            bulbs.append(p)
    return [(float(x), float(y)) for x, y in bulbs]

def lights(states):
    """The bulbs drawn on a clear layer: 2 = bright with a halo, 1 = dim, 0 = off."""
    img = Image.new("RGBA", (w, h))
    halo = Image.new("RGBA", (w, h))
    draw, glow = ImageDraw.Draw(img), ImageDraw.Draw(halo)
    for (x, y), s in zip(bulbs, states):
        r = BULB + 3
        if s == 2:
            glow.ellipse([x - r, y - r, x + r, y + r], fill=GLOW + (230,))
        draw.ellipse([x - BULB, y - BULB, x + BULB, y + BULB], fill=(BRIGHT, DIM, OFF)[2 - s])
    out = halo.filter(ImageFilter.GaussianBlur(4))
    out.alpha_composite(halo)
    out.alpha_composite(img)
    return out

def overlay(t):
    if t < START:
        return None
    if t < START + BUILD:
        on = len(bulbs) * (t - START) / BUILD
        return frame_with([2 if k < on else 0 for k in range(len(bulbs))])
    step = int((t - START - BUILD) / STEP) % EVERY
    if step not in chase:
        chase[step] = frame_with([2 if (k - step) % EVERY == 0 else 1 for k in range(len(bulbs))])
    return chase[step]

def frame_with(states):
    img = board.copy()
    img.alpha_composite(lights(states))
    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)
    blank = bytes(w * h * 4)
    for i in range(math.ceil(duration * fps)):
        img = overlay(i / fps)
        ff.stdin.write(blank if img is None else img.tobytes())
    ff.stdin.close()
    if ff.wait():
        sys.exit("ffmpeg failed")

src, out = sys.argv[1:3]
w, h, rate, fps, duration = probe(src)
board, letters = sign()
bulbs = [p for mask in letters for p in ring(mask)]
chase = {}
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)
