---
title: "How to add a text scramble reveal with Claude (tested prompt and script)"
description: "Green symbols flicker in every letter slot of a headline, then lock one by one, left to right, into the white words \"GLOW IN 7 DAYS\". Install one skill and ask Claude Code, or run the Python script we tested yourself."
url: https://www.recharm.com/effects/text-scramble-reveal
---

# How to add a text scramble reveal with Claude

Green symbols flicker in every letter slot of a headline, then lock one by one, left to right, into the white words "GLOW IN 7 DAYS".

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 text scramble reveal to input.mp4
   Text: GLOW IN 7 DAYS
   ```

## 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 text scramble reveal 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 IN 7 DAYS` | The line the symbols resolve into.                      |
| `START`          | `0.5`            | Second the scrambled symbols appear.                    |
| `FIRST_LOCK`     | `0.4`            | Seconds of pure scramble before the first letter locks. |
| `STAGGER`        | `0.08`           | Seconds between one letter locking and the next.        |
| `FLICKER`        | `15`             | Times a second each unlocked slot changes symbol.       |
| `SCRAMBLE_COLOR` | `(60, 255, 140)` | Color of the symbols still scrambling.                  |

## Without the skill

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

```
Add a text scramble reveal to input.mp4: the line "GLOW IN 7 DAYS" in bold white with a black outline, its height 10% of the frame width, centered across and 13% down. From 0.5 seconds every letter slot (not the spaces) shows a random symbol from A-Z, 0-9 and #%&@$*?<>/+= in green (60, 255, 140), changing 15 times a second; each slot stays where its final letter sits so the line never shifts. Starting at 0.9 seconds the slots lock into their real white letters left to right, one every 0.08 seconds, so the whole line reads by about 2 seconds and then stays. Nothing shows before 0.5 seconds. 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 `text-scramble-reveal.py` and run:

```
python3 text-scramble-reveal.py input.mp4 output.mp4
```

```
#!/usr/bin/env python3
"""Text scramble reveal: random green symbols flicker in every letter slot, then lock into a white headline left to right.

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

from PIL import Image, ImageDraw, ImageFont

TEXT = "GLOW IN 7 DAYS"
START = 0.5                  # second the scrambled symbols appear
FIRST_LOCK = 0.4             # seconds of pure scramble before the first letter locks
STAGGER = 0.08               # seconds between one letter locking and the next
FLICKER = 15                 # times a second each unlocked slot changes symbol
SYMBOLS = "ABCDEFGHJKLMNPQRSTUVXYZ0123456789#%&@$*?<>/+="
SIZE = 0.10                  # text height as a share of the frame width
Y = 0.13                     # text center, as a share of the frame height
SCRAMBLE_COLOR = (60, 255, 140)  # color of the symbols still scrambling
FONTS = ["/System/Library/Fonts/Supplemental/Arial Bold.ttf",     # macOS
         "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf",  # Linux
         "C:/Windows/Fonts/arialbd.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 slot_centers():
    """Where each letter of the finished line sits, so symbols flicker in place and the line never shifts."""
    x = (w - font.getlength(TEXT)) / 2
    centers = []
    for i, ch in enumerate(TEXT):
        width = font.getlength(TEXT[:i + 1]) - font.getlength(TEXT[:i])
        centers.append(x + width / 2)
        x += width
    return centers

def overlay(t):
    img = Image.new("RGBA", (w, h))
    if t < START:
        return img
    draw = ImageDraw.Draw(img)
    tick = int(t * FLICKER)
    for i, (ch, cx) in enumerate(zip(TEXT, centers)):
        if ch == " ":
            continue
        if t >= START + FIRST_LOCK + i * STAGGER:
            glyph, color = ch, "white"
        else:
            glyph, color = random.Random(tick * 1000 + i).choice(SYMBOLS), SCRAMBLE_COLOR
        draw.text((cx, h * Y), glyph, font=font, anchor="mm", fill=color,
                  stroke_width=round(w * 0.007), stroke_fill="black")
    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)
font = ImageFont.truetype(FONT_FILE, round(w * SIZE))
centers = slot_centers()
render(src, out)
```

## More captions and text

- [AI chat reply animation **AI chat reply animation**](https://www.recharm.com/effects/ai-chat-typing)
- [Animated bar chart **Animated bar chart**](https://www.recharm.com/effects/animated-bar-chart)
- [Animated checklist **Animated checklist**](https://www.recharm.com/effects/animated-checklist)
- [Animated line graph **Animated line graph**](https://www.recharm.com/effects/animated-line-graph)
- [Animated pie chart **Animated pie chart**](https://www.recharm.com/effects/animated-pie-chart)

## 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)
