---
title: "How to add a checkerboard transition with Claude (tested prompt and ffmpeg command)"
description: "A 6-across grid of 90-pixel squares flips from clip A to clip B like a chess board: the light squares switch row by row from the top, then the dark squares follow, over 1.2 seconds. Install one skill and ask Claude Code, or run the ffmpeg command we tested yourself."
url: https://www.recharm.com/effects/checkerboard-transition
---

# How to add a checkerboard transition with Claude

A 6-across grid of 90-pixel squares flips from clip A to clip B like a chess board: the light squares switch row by row from the top, then the dark squares follow, over 1.2 seconds.

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 checkerboard transition
   Length of the transition in seconds: 1.2
   Squares across the frame; the square size is the width divided by this: 6
   ```

## 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 checkerboard 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.2`   | Length of the transition in seconds.                                    |
| `N`     | `6`     | Squares across the frame; the square size is the width divided by this. |

## 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 (both 540x960, 30fps) with a 1.2 second checkerboard transition starting 1.2 seconds before A ends. Divide the frame into a grid of 90x90 pixel squares, 6 across and 11 rows down from the top-left corner (the bottom row is cut off), colored like a chess board: a square in column c and row r (both from 0) is light when c+r is even and dark when it's odd. In the first 0.6 seconds the light squares cut to clip B row by row from top to bottom, each row 0.6/11 seconds after the one above; in the next 0.6 seconds the dark squares do the same, top row first. Squares cut hard, no fades. One way: ffmpeg xfade with transition=custom and an expr that shows B where 1-P is greater than ((c+r) mod 2 * 11 + r) / 22. Crossfade the audio over the same 1.2 seconds. Match B's size and frame rate to A. Use ffmpeg, keep the audio and save it as output.mp4 (H.264, yuv420p).
```

## Run it without Claude

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

```
sh checkerboard-transition.sh clipA.mp4 clipB.mp4 output.mp4
```

```
#!/bin/sh
# Checkerboard transition: half the squares of a checker grid flip to clip B row by row from the top, then the other half, over 1.2s. The sound crossfades underneath.
# Usage: sh checkerboard-transition.sh clipA.mp4 clipB.mp4 output.mp4  (both clips need an audio track)
set -e
A="$1"; B="$2"; OUT="$3"
D=1.2   # transition length in seconds
N=6     # squares across the frame (540 px wide gives 90 px squares)

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}
# Each pixel finds its square: column c = floor(X*N/W), row r = floor(Y*N/W), and R rows in all.
# xfade's P runs from 1 to 0, so 1-P is how far through the transition we are. The "light" squares
# (c+r even) switch to B row by row in the first half, the "dark" squares (c+r odd) in the second.
CHECKER="if(gt(1-P,(mod(floor(X*$N/W)+floor(Y*$N/W),2)*ceil(H*$N/W)+floor(Y*$N/W))/(2*ceil(H*$N/W))),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='$CHECKER':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)
