---
title: "How to add a strikethrough word swap with Claude (tested prompt and script)"
description: "A red line slices through \"DULL\" in the headline \"YOUR SKIN, DULL\", then \"GLOWING\" pops in beside it in yellow. Install one skill and ask Claude Code, or run the Python script we tested yourself."
url: https://www.recharm.com/effects/strikethrough-word-swap
---

# How to add a strikethrough word swap with Claude

A red line slices through "DULL" in the headline "YOUR SKIN, DULL", then "GLOWING" pops in beside it in yellow.

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 strikethrough word swap to input.mp4
   Lead: YOUR SKIN,
   Old, new: DULL, GLOWING
   ```

## 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 strikethrough word swap 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                                                 |
| ----------- | --------------- | ------------------------------------------------------------ |
| `LEAD`      | `YOUR SKIN,`    | The line above, which stays as is.                           |
| `OLD, NEW`  | `DULL, GLOWING` | The word that gets struck out and the word that replaces it. |
| `STRIKE`    | `0.8`           | Second the line starts striking through the old word.        |
| `NEW_AT`    | `1.2`           | Second the new word pops in.                                 |
| `LINE`      | `(230, 30, 45)` | Strike line color.                                           |
| `NEW_COLOR` | `(255, 214, 0)` | New word 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 strikethrough word swap to input.mp4. Near the top, on a see-through black (0, 0, 0) rounded panel at 55% opacity, draw a two-line headline in bold white with a thin black outline: "YOUR SKIN," (text 5.7% of the frame width tall) centered above, and below it, with its center 15% of the way down, the word "DULL" (9.5% of the frame width tall) on the left with room left beside it for a second word, the pair centered across the frame. At 0.8 seconds a thick red (230, 30, 45) line draws left to right through the middle of "DULL" over 0.25 seconds and "DULL" dims to light gray; at 1.2 seconds "GLOWING" in yellow (255, 214, 0) with a black outline pops in beside it, growing from nothing to full size over 0.3 seconds with a slight overshoot. Everything stays to the end. Use Python with Pillow to draw the text (don't rely on ffmpeg's drawtext filter) and ffmpeg to put it on the video, keep the audio, and save it as output.mp4.
```

## Run it without Claude

This is the exact script we tested. Save it as `strikethrough-word-swap.py` and run:

```
python3 strikethrough-word-swap.py input.mp4 output.mp4
```

```
#!/usr/bin/env python3
"""Strikethrough word swap: a red line strikes through one word of a headline, then a yellow replacement pops in beside it.

Usage: python3 strikethrough-word-swap.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

LEAD = "YOUR SKIN,"          # the line above, which stays as is
OLD, NEW = "DULL", "GLOWING" # the word that gets struck out and the word that replaces it
STRIKE = 0.8                 # second the line starts striking through the old word
STRIKE_TIME = 0.25           # seconds the line takes to cross
NEW_AT = 1.2                 # second the new word pops in
POP = 0.3                    # seconds the pop takes
SIZE = 0.095                 # word height as a share of the frame width
Y = 0.15                     # where the word line's center sits (0 = top, 1 = bottom)
LINE = (230, 30, 45)         # strike line color
NEW_COLOR = (255, 214, 0)    # new word color
PANEL = (0, 0, 0, 140)       # see-through dark panel behind the headline
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 overlay(t):
    img = Image.new("RGBA", (w, h))
    draw = ImageDraw.Draw(img)
    stroke = round(w * 0.008)
    gap = w * 0.06
    old_w, new_w = draw.textlength(OLD, font=font), draw.textlength(NEW, font=font)
    left = (w - old_w - gap - new_w) / 2
    pad = w * 0.045
    draw.rounded_rectangle([left - pad, h * Y - font.size * 1.75, w - left + pad, h * Y + font.size * 0.8],
                           radius=pad, fill=PANEL)
    draw.text((w / 2, h * Y - font.size * 1.05), LEAD, font=lead_font, anchor="mm", fill="white",
              stroke_width=stroke, stroke_fill="black")
    old_fill = (255, 255, 255) if t < STRIKE else (200, 200, 200)
    x0, y0, x1, y1 = draw.textbbox((left, h * Y), OLD, font=font, anchor="lm")
    draw.text((left, h * Y), OLD, font=font, anchor="lm", fill=old_fill, stroke_width=stroke, stroke_fill="black")
    if t >= STRIKE:
        p = min(1, (t - STRIKE) / STRIKE_TIME)
        mid = (y0 + y1) / 2
        draw.line([x0 - 10, mid, x0 - 10 + (x1 - x0 + 20) * p, mid], fill=LINE, width=round(w * 0.016))
    scale = ease_out_back((t - NEW_AT) / POP) if t >= NEW_AT else 0
    if scale > 0.05:
        pop_font = ImageFont.truetype(FONT_FILE, max(8, round(font.size * scale)))
        draw.text((left + old_w + gap + new_w / 2, h * Y), NEW, font=pop_font, anchor="mm", fill=NEW_COLOR,
                  stroke_width=stroke, stroke_fill="black")
    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)
font = ImageFont.truetype(FONT_FILE, round(w * SIZE))
lead_font = ImageFont.truetype(FONT_FILE, round(w * SIZE * 0.6))
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)
