How to add a floating dust with Claude

Over a hundred pinpoint specks of warm-white dust, each with a faint gold glow, fade in and drift slowly in every direction, glinting brighter and dimmer as they float.

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 floating dust to input.mp4
    Second the dust starts to fade in: 0.5
    Number of specks: 110

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 floating dust 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
START0.5Second the dust starts to fade in.
COUNT110Number of specks.
CORE(1.0, 3.2)Core radius of the farthest and nearest specks, in pixels.
SPEED(6, 22)Drift speed of the farthest and nearest specks, in pixels per second.
CORE_COLOR, GLOW_COLOR(255, 250, 240), (255, 205, 140)Color of each speck's bright middle and of its soft halo.

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
Add floating dust to input.mp4: 110 tiny glowing specks scattered at random over the whole 540x960 frame. Each speck is a Gaussian dot with a core radius between 1.0 px (far specks) and 3.2 px (near specks) in warm white (255, 250, 240), plus a halo three times as wide at 35% strength in pale gold (255, 205, 140). Give each speck a random direction and a drift speed from 6 px/s (far) to 22 px/s (near), plus a slight 4 px/s upward float and a slow wander of about 14 px over 4 to 8 seconds; specks wrap round the frame edges. Each speck's brightness glints between 55% and 100% on its own 1.5 to 3.5 second cycle. The dust fades in from 0.5 seconds over 0.8 seconds and stays to the end; before 0.5 seconds the frame is untouched. Add the light with a screen blend so it only brightens. Use Python with numpy and ffmpeg (don't use ffmpeg's drawtext filter for anything), keep the audio, and save it as output.mp4.

Run it without Claude

This is the exact script we tested. Save it as floating-dust.py and run:

python3 floating-dust.py input.mp4 output.mp4
Show the script
#!/usr/bin/env python3
"""Floating dust: tiny warm-white specks of glowing dust fade in and drift slowly through the air, glinting as they turn.

Usage: python3 floating-dust.py input.mp4 output.mp4
Needs ffmpeg and numpy (pip install numpy).
"""
import json
import subprocess
import sys

import numpy as np

START = 0.5                   # second the dust starts to fade in
FADE = 0.8                    # seconds the fade-in takes
COUNT = 110                   # number of specks
CORE = (1.0, 3.2)             # core radius of the farthest and nearest specks, in pixels
SPEED = (6, 22)               # drift speed of the farthest and nearest specks, in pixels per second
CORE_COLOR = (255, 250, 240)  # the bright middle of each speck: warm white
GLOW_COLOR = (255, 205, 140)  # the soft halo round it: pale gold
SEED = 11                     # change for a different arrangement


def probe(path):
    info = json.loads(subprocess.check_output(["ffprobe", "-v", "error", "-select_streams", "v:0", "-show_entries",
                                               "stream=width,height,r_frame_rate", "-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)


def dust(t):
    """The light layer at time t (0-1 per channel): each speck a bright core inside a faint gold glow."""
    fade = np.clip((t - START) / FADE, 0, 1)
    if fade == 0:
        return None
    core = np.zeros((h, w), np.float32)
    glow = np.zeros((h, w), np.float32)
    for s in specks:
        # straight drift plus a slow wander, wrapping round the frame edges
        x = (s["x"] + s["vx"] * t + 14 * np.sin(2 * np.pi * t / s["sway"] + s["phase"])) % w
        y = (s["y"] + s["vy"] * t + 10 * np.cos(2 * np.pi * t / s["sway"] + s["phase"])) % h
        glint = 0.55 + 0.45 * np.sin(2 * np.pi * t / s["glint"] + s["phase"]) ** 2  # catches the light as it turns
        r = int(s["core"] * 5) + 1
        x0, y0, x1, y1 = max(int(x) - r, 0), max(int(y) - r, 0), min(int(x) + r + 1, w), min(int(y) + r + 1, h)
        yy, xx = np.mgrid[y0:y1, x0:x1].astype(np.float32)
        d2 = ((xx - x) ** 2 + (yy - y) ** 2) / s["core"] ** 2
        core[y0:y1, x0:x1] += glint * np.exp(-d2)
        glow[y0:y1, x0:x1] += glint * 0.35 * np.exp(-d2 / 9)  # a halo three times as wide as the core
    light = core[..., None] * CORE_COLOR + glow[..., None] * GLOW_COLOR
    return np.minimum(light * fade / 255, 1)


src, out = sys.argv[1:3]
w, h, rate, fps = probe(src)
rng = np.random.default_rng(SEED)
specks = []
for _ in range(COUNT):
    depth = rng.uniform() ** 1.5  # 0 = far, 1 = near; most specks are far away
    angle = rng.uniform(0, 2 * np.pi)
    speed = SPEED[0] + (SPEED[1] - SPEED[0]) * depth
    specks.append({"x": rng.uniform(0, w), "y": rng.uniform(0, h),
                   "vx": speed * np.cos(angle), "vy": speed * np.sin(angle) - 4,  # a slight upward float
                   "core": CORE[0] + (CORE[1] - CORE[0]) * depth,
                   "sway": rng.uniform(4, 8), "glint": rng.uniform(1.5, 3.5), "phase": rng.uniform(0, 2 * np.pi)})

reader = subprocess.Popen(["ffmpeg", "-v", "error", "-i", src, "-f", "rawvideo", "-pix_fmt", "rgb24", "-"],
                          stdout=subprocess.PIPE)
writer = subprocess.Popen(["ffmpeg", "-y", "-v", "error", "-f", "rawvideo", "-pix_fmt", "rgb24", "-s", f"{w}x{h}",
                           "-r", rate, "-i", "-", "-i", src, "-map", "0:v", "-map", "1:a?",
                           "-c:v", "libx264", "-crf", "16", "-pix_fmt", "yuv420p", "-c:a", "copy", "-shortest", out],
                          stdin=subprocess.PIPE)
i = 0
while raw := reader.stdout.read(w * h * 3):
    img = np.frombuffer(raw, np.uint8).reshape(h, w, 3)
    light = dust(i / fps)
    if light is not None:
        img = (255 - (255 - img.astype(np.float32)) * (1 - light)).astype(np.uint8)  # screen blend: only brightens
    writer.stdin.write(img.tobytes())
    i += 1
writer.stdin.close()
if reader.wait() or writer.wait():
    sys.exit("ffmpeg failed")

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