How to add a fake loading bar with Claude

The clip opens dimmed behind a spinner and a red bar that races to 99%, sticks there, then vanishes as the video plays.

Get this effect

  1. Switch to Code in your Claude Desktop App

  2. Install the skill (once)

    Show the prompt
    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 fake loading bar to input.mp4
    Label: Loading...

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 fake loading bar 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.

SettingDefaultWhat it does
LABELLoading...Text before the percentage under the bar.
STALL_AT99Percent where the bar gets stuck.
FILL0.8Seconds the bar takes to reach STALL_AT.
END2.0Second the loading screen vanishes.
COLOR(255, 40, 40)Bar fill color.
DIM200How dark the screen goes behind the bar (0-255).

Without the skill

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

Show the prompt
Open input.mp4 with a fake loading screen for the first 2 seconds: darken the whole frame with black at 78% opacity (alpha 200 of 255), and centered at 52% down draw a bar 70% of the frame width wide and 2.2% of the frame height tall, a translucent white rounded track with a red (255, 40, 40) rounded fill. The fill eases out from 0% to 99% over the first 0.8 seconds, then sticks at 99%. Under the bar, 4.5% of the frame height below its bottom edge, write "Loading... 99%" (the number following the bar) in white bold text 6% of the frame width tall, centered. Above the bar, centered 11% of the frame height higher, draw a spinner: twelve white dots on a circle with a radius of 7% of the frame width, the brightest dot going round twice a second with the ones behind it fading. At exactly 2.0 seconds remove all of it so the clip plays normally. 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 fake-loading-bar.py and run:

python3 fake-loading-bar.py input.mp4 output.mp4
Show the script
#!/usr/bin/env python3
"""Fake loading bar: the clip opens dimmed behind a spinner and a red bar that races to 99%, stalls, then gives way.

Usage: python3 fake-loading-bar.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 = "Loading..."
FILL = 0.8               # seconds the bar takes to race to STALL_AT
STALL_AT = 99            # percent where the bar gets stuck
END = 2.0                # second the loading screen vanishes and the clip plays
BAR_W, BAR_H = 0.70, 0.022   # bar size as shares of the frame width and height
Y = 0.52                 # bar center (0 = top, 1 = bottom)
COLOR = (255, 40, 40)    # bar fill color
DIM = 200                # how dark the screen goes behind it (0 = not at all, 255 = black)
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 percent(t):
    """Eases out from 0 to STALL_AT over FILL seconds, then sits there."""
    p = min(t / FILL, 1)
    return round(STALL_AT * (1 - (1 - p) ** 3))


def overlay(t):
    img = Image.new("RGBA", (w, h))
    if t >= END:
        return img
    draw = ImageDraw.Draw(img)
    draw.rectangle([0, 0, w, h], fill=(0, 0, 0, DIM))
    # spinner: twelve dots round a circle, the lit one going round twice a second
    cx, cy, r, dot = w / 2, h * Y - h * 0.11, w * 0.07, w * 0.012
    lit = int(t * 24) % 12
    for i in range(12):
        a = math.radians(i * 30 - 90)
        x, y = cx + r * math.cos(a), cy + r * math.sin(a)
        alpha = 255 - ((lit - i) % 12) * 18
        draw.ellipse([x - dot, y - dot, x + dot, y + dot], fill=(255, 255, 255, alpha))
    # bar: white track, red fill
    x0, x1 = w * (1 - BAR_W) / 2, w * (1 + BAR_W) / 2
    y0, y1 = h * Y - h * BAR_H / 2, h * Y + h * BAR_H / 2
    pct = percent(t)
    draw.rounded_rectangle([x0, y0, x1, y1], radius=(y1 - y0) / 2, fill=(255, 255, 255, 70))
    if pct:
        draw.rounded_rectangle([x0, y0, x0 + (x1 - x0) * pct / 100, y1], radius=(y1 - y0) / 2, fill=COLOR)
    draw.text((w / 2, y1 + h * 0.045), f"{LABEL} {pct}%", font=font, anchor="mm", fill="white")
    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 * 0.06))
render(src, out)

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