---
title: "How to add a halftone dots transition with Claude (tested prompt and ffmpeg command)"
description: "A grid of round dots spreads diagonally over clip A from the top-left corner, each dot a window onto clip B, and the dots swell until they merge into the full second shot one second later. Install one skill and ask Claude Code, or run the ffmpeg command we tested yourself."
url: https://www.recharm.com/effects/halftone-dots-transition
---

# How to add a halftone dots transition with Claude

A grid of round dots spreads diagonally over clip A from the top-left corner, each dot a window onto clip B, and the dots swell until they merge into the full second shot one second later.

Made by the command on this page, from our own test clips.

## 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

   ```
   Join clipA.mp4 and clipB.mp4 with a halftone dots transition
   Length of the transition in seconds: 1.0
   Distance between dot centers in pixels; bigger makes fewer, larger dots: 36
   ```

## 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.

Put a sale badge on **@clip1.mp4**, give **@clip2.mp4** a VHS look, then join them with a halftone dots transition.

## Settings you can change

Ask Claude to change any of these, or edit them at the top of the command.

| Setting | Default | What it does                                                                         |
| ------- | ------- | ------------------------------------------------------------------------------------ |
| `D`     | `1.0`   | Length of the transition in seconds.                                                 |
| `S`     | `36`    | Distance between dot centers in pixels; bigger makes fewer, larger dots.             |
| `SWEEP` | `0.6`   | How far the bottom-right dots lag the top-left ones; 0 makes every dot grow at once. |

## Without the skill

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

```
Join clipA.mp4 and clipB.mp4 with a 1 second halftone dots transition that starts 1 second before clip A ends, so the clips overlap. Lay a grid of dots over the frame, one dot centered in every 36x36 pixel cell. Inside each dot the picture is clip B, outside it is clip A, with hard edges (no fading). Each dot grows from nothing to a radius of 26 pixels (0.72 of the cell, so the dots merge and cover the whole frame). The growth sweeps diagonally from the top-left corner: with progress p running 0 to 1 over the transition and a pixel at (x, y) in a W x H frame, its dot's size is clamp(1.6*p - 0.6*(x+y)/(W+H), 0, 1) times the full radius. So the top-left corner is all clip B by 0.63 seconds in, while the bottom-right corner is still clip A until 0.38 seconds in, and the whole frame is clip B at the end. Crossfade the audio over the same 1 second. Match B's size and frame rate to A. Use ffmpeg (xfade with a custom expression works) and save it as output.mp4.
```

## Run it without Claude

This is the exact command we tested. Save it as `halftone-dots-transition.sh` and run:

```
sh halftone-dots-transition.sh clipA.mp4 clipB.mp4 output.mp4
```

```
#!/bin/sh
# Halftone dots transition: a grid of round dots swells across clip A from the top-left corner, each dot showing
# clip B, until the dots merge and B fills the frame 1 second later. The sound crossfades underneath.
# Usage: sh halftone-dots-transition.sh clipA.mp4 clipB.mp4 output.mp4  (both clips need an audio track)
set -e
A="$1"; B="$2"; OUT="$3"
D=1.0       # transition length in seconds
S=36        # distance between dot centers in pixels
SWEEP=0.6   # how far behind the top-left dots the bottom-right ones start (0 = all dots grow together)

LEN=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$A")
OFFSET=$(echo "$LEN - $D" | bc)
SIZE=$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "$A")
FPS=$(ffprobe -v error -select_streams v:0 -show_entries stream=r_frame_rate -of csv=p=0 "$A")
W=${SIZE%x*}; H=${SIZE#*x}
# xfade's P runs from 1 to 0, so 1-P is how far through the transition we are. GROW is how big this pixel's dot
# is (0 to 1): it starts later the further the dot is toward the bottom-right corner. A pixel shows B once it
# is inside its dot, a circle around the center of its S x S cell whose radius reaches 0.72*S (enough to
# cover the cell's corners, so the dots merge into a solid frame).
GROW="clip((1-P)*(1+$SWEEP)-$SWEEP*(X+Y)/(W+H),0,1)"
DX="(X-(floor(X/$S)+0.5)*$S)"; DY="(Y-(floor(Y/$S)+0.5)*$S)"
DOTS="if(lt($DX*$DX+$DY*$DY,pow($GROW*0.72*$S,2)),B,A)"
# xfade needs both clips at the same size and frame rate, so B is fitted to A first
ffmpeg -y -i "$A" -i "$B" -filter_complex "\
[0:v]fps=$FPS,format=yuv420p,setsar=1[a];\
[1:v]scale=$W:$H:force_original_aspect_ratio=increase,crop=$W:$H,fps=$FPS,format=yuv420p,setsar=1[b];\
[a][b]xfade=transition=custom:expr='$DOTS':duration=$D:offset=$OFFSET[v];\
[0:a][1:a]acrossfade=d=$D[au]" \
  -map "[v]" -map "[au]" -c:v libx264 -crf 18 -pix_fmt yuv420p -c:a aac "$OUT"
```

## More transitions

- [Barn door transition **Barn door transition**](https://www.recharm.com/effects/barn-door)
- [Blinds transition **Blinds transition**](https://www.recharm.com/effects/blinds-transition)
- [Block dissolve **Block dissolve**](https://www.recharm.com/effects/block-dissolve)
- [Blur transition **Blur transition**](https://www.recharm.com/effects/blur-transition)
- [Bounce transition **Bounce transition**](https://www.recharm.com/effects/bounce-transition)

## 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)
