---
title: "How to add a pop-in text with Claude (tested prompt and script)"
description: "A headline on a yellow box springs out of nothing, overshoots slightly and settles. Install one skill and ask Claude Code, or run the Python script we tested yourself."
url: https://www.recharm.com/effects/pop-in-text
---

# How to add a pop-in text with Claude

A headline on a yellow box springs out of nothing, overshoots slightly and settles.

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 pop-in text to input.mp4
   Text: NEW FORMULA
   ```

## 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 pop-in 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 FORMULA`   | The headline.          |
| `START` | `0.3`           | Second the pop starts. |
| `POP`   | `0.35`          | Seconds the pop takes. |
| `BOX`   | `(255, 214, 0)` | Box color.             |

## In other editors

From each editor’s own help pages, in our words. We haven’t run these ourselves.

Built in: **Pop Up text animation** · desktop

1. Add text with the Text icon and style it in the Basic option.
2. Select the text layer, open Animation and choose Pop Up.
3. Use the timeline slider to set the animation length and rate.
4. Alternative: keyframe scale 0%, then 120%, then settle at 100%.

Source: [Pop Up Text in Premiere Pro: Animate & Style Engaging Text](https://www.capcut.com/resource/pop-up-text-in-premiere-pro) (CapCut), checked October 22, 2026.

## Without the skill

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

```
Add a pop-in headline to input.mp4: "NEW FORMULA" in black on a yellow (255, 214, 0) rounded box, centered 20% of the way down, growing from nothing at 0.3 seconds to full size by 0.65 seconds with a slight overshoot, then staying. 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 `pop-in-text.py` and run:

```
python3 pop-in-text.py input.mp4 output.mp4
```

```
#!/usr/bin/env python3
"""Pop-in text: a headline on a yellow box springs out of nothing, overshoots a little and settles.

Usage: python3 pop-in-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, ImageDraw, ImageFont

TEXT = "NEW FORMULA"
START = 0.3              # second the pop starts
POP = 0.35               # seconds the pop takes
SIZE = 0.09              # text height as a share of the frame width
Y = 0.20                 # where the box's center sits (0 = top, 1 = bottom)
BOX = (255, 214, 0)      # box color
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 badge():
    """The headline on its box, drawn once at full size."""
    font = ImageFont.truetype(FONT_FILE, round(w * SIZE))
    pad = round(w * SIZE * 0.45)
    x0, y0, x1, y1 = ImageDraw.Draw(Image.new("RGBA", (1, 1))).textbbox((0, 0), TEXT, font=font)
    img = Image.new("RGBA", (x1 - x0 + 2 * pad, y1 - y0 + 2 * pad))
    draw = ImageDraw.Draw(img)
    draw.rounded_rectangle([0, 0, img.width - 1, img.height - 1], radius=pad // 2, fill=BOX)
    draw.text((pad - x0, pad - y0), TEXT, font=font, fill="black")
    return img

def overlay(t):
    img = Image.new("RGBA", (w, h))
    scale = ease_out_back((t - START) / POP) if t >= START else 0
    if scale > 0.02:
        b = full.resize((max(1, round(full.width * scale)), max(1, round(full.height * scale))), Image.LANCZOS)
        img.alpha_composite(b, (round(w / 2 - b.width / 2), round(h * Y - b.height / 2)))
    return img

def ease_out_back(p):
    """0 -> 1 with a small overshoot past 1 before settling, which reads as a 'pop'."""
    p = min(max(p, 0), 1)
    return 1 + 2.70158 * (p - 1) ** 3 + 1.70158 * (p - 1) ** 2

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)
full = badge()
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)
