---
title: "How to add a call-to-action button with Claude (tested prompt and script)"
description: "A pink \"Shop now\" button pops up low in the frame for the last few seconds and swells gently in and out, sending out a white ring each beat, as if waiting to be tapped. Install one skill and ask Claude Code, or run the Python script we tested yourself."
url: https://www.recharm.com/effects/call-to-action-button
---

# How to add a call-to-action button with Claude

A pink "Shop now" button pops up low in the frame for the last few seconds and swells gently in and out, sending out a white ring each beat, as if waiting to be tapped.

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 call-to-action button to input.mp4
   Label: SHOP NOW
   ```

## 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 call-to-action button 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                                              |
| -------- | ---------------- | --------------------------------------------------------- |
| `LABEL`  | `SHOP NOW`       | The button text.                                          |
| `START`  | `3.5`            | Second the button pops in.                                |
| `PERIOD` | `0.8`            | Seconds per pulse.                                        |
| `PULSE`  | `0.10`           | How much bigger the button gets at the top of each pulse. |
| `COLOR`  | `(255, 45, 110)` | Button 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 call-to-action button to input.mp4: a pink (255, 45, 110) pill-shaped button 64% of the frame width and 9% of its height, centered across and 82% of the way down, with "SHOP NOW" in white bold text and a white chevron after it, on a soft dark shadow. It pops in at 3.5 seconds, growing from nothing to full size over 0.3 seconds with a slight overshoot, then pulses until the end: it smoothly swells to 110% and back every 0.8 seconds, and at the top of each pulse a 4-pixel white outline of the button spreads outward and fades over 0.8 seconds. Nothing shows before 3.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 `call-to-action-button.py` and run:

```
python3 call-to-action-button.py input.mp4 output.mp4
```

```
#!/usr/bin/env python3
"""Call-to-action button: a pink "SHOP NOW" button pops up near the end and keeps pulsing, as if waiting to be tapped.

Usage: python3 call-to-action-button.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

LABEL = "SHOP NOW"       # button text
START = 3.5              # second the button pops in
POP = 0.3                # seconds the pop takes
PERIOD = 0.8             # seconds per pulse once it has landed
PULSE = 0.10             # how much bigger the button gets at the top of each pulse
WIDTH, HEIGHT = 0.64, 0.09  # button size as a share of the frame width and height
Y = 0.82                 # button center, 0-1 down the frame (centered across)
COLOR = (255, 45, 110)   # button 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 button():
    """The button at full size: a pill with the label and a chevron, on a soft shadow."""
    bw, bh, pad = round(w * WIDTH), round(h * HEIGHT), round(h * HEIGHT * 0.3)
    img = Image.new("RGBA", (bw + 2 * pad, bh + 2 * pad))
    draw = ImageDraw.Draw(img)
    draw.rounded_rectangle([pad, pad + bh * 0.08, pad + bw, pad + bh * 1.08], bh / 2, fill=(0, 0, 0, 90))
    draw.rounded_rectangle([pad, pad, pad + bw, pad + bh], bh / 2, fill=COLOR)
    font = ImageFont.truetype(FONT_FILE, round(bh * 0.38))
    text_w = draw.textlength(LABEL, font=font)
    arrow = bh * 0.16
    left = pad + (bw - text_w - arrow * 2.2) / 2
    draw.text((left, pad + bh / 2), LABEL, font=font, anchor="lm", fill="white")
    ax, ay = left + text_w + arrow * 1.4, pad + bh / 2
    draw.line([(ax, ay - arrow), (ax + arrow * 0.8, ay), (ax, ay + arrow)], fill="white", width=max(3, bh // 14), joint="curve")
    return img

def scale_at(t):
    """0 before START, a springy pop to 1, then a steady pulse between 1 and 1 + PULSE."""
    if t < START:
        return 0
    if t < START + POP:
        return ease_out_back((t - START) / POP)
    return 1 + PULSE * (0.5 - 0.5 * math.cos(2 * math.pi * (t - START - POP) / PERIOD))

def ring_at(t):
    """A white ring that spreads out from the button and fades at the top of each pulse: (growth, opacity)."""
    since = t - START - POP - PERIOD / 2
    if since < 0:
        return None
    p = (since % PERIOD) / PERIOD
    return 1 + PULSE + 0.25 * p, round(200 * (1 - p))

def overlay(t):
    img = Image.new("RGBA", (w, h))
    s = scale_at(t)
    if s < 0.02:
        return img
    cx, cy = w / 2, h * Y
    ring = ring_at(t)
    if ring:
        grow, alpha = ring
        rw, rh = w * WIDTH * grow / 2, h * HEIGHT * (1 + (grow - 1) * 2.5) / 2
        ImageDraw.Draw(img).rounded_rectangle([cx - rw, cy - rh, cx + rw, cy + rh], rh, outline=(255, 255, 255, alpha), width=4)
    b = full.resize((max(1, round(full.width * s)), max(1, round(full.height * s))), Image.LANCZOS)
    img.alpha_composite(b, (round(cx - b.width / 2), round(cy - 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 = button()
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)
