---
title: "How to add a shake transition with Claude (tested prompt and ffmpeg command)"
description: "The frame jolts and zooms in as clip A ends, smears into a blur at the cut and settles still on clip B. Install one skill and ask Claude Code, or run the ffmpeg command we tested yourself."
url: https://www.recharm.com/effects/shake-transition
---

# How to add a shake transition with Claude

The frame jolts and zooms in as clip A ends, smears into a blur at the cut and settles still on clip B.

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 shake transition
   How far the frame jumps at the cut, in pixels: 24
   Seconds of shake on each side of the cut: 0.35
   ```

## 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 shake 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                                       |
| -------- | ------- | -------------------------------------------------- |
| `AMOUNT` | `24`    | How far the frame jumps at the cut, in pixels.     |
| `SHAKE`  | `0.35`  | Seconds of shake on each side of the cut.          |
| `BLUR`   | `0.15`  | Seconds of blur on each side of the cut.           |
| `MIX`    | `0.2`   | Seconds the two clips overlap, hidden in the blur. |

## 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 shake transition. Match B's size and frame rate to A. Overlap the clips by 0.2 seconds with a dissolve (ffmpeg xfade fade, offset = A's length minus 0.2), so the cut sits 0.1 seconds into the overlap. From 0.35 seconds before the cut to 0.35 seconds after it, shake the frame: scale it up by up to 12% and move the crop window up to 24 pixels sideways and 19 pixels up and down in quickly changing directions, both strongest at the cut and falling to nothing at the ends, so no black edges show and the frame is exactly the original size and position outside that window. Blur the whole frame heavily (ffmpeg boxblur 12, power 2) from 0.15 seconds before the cut to 0.15 seconds after it. Crossfade the audio over the same 0.2 seconds. Keep the size and 30fps, use ffmpeg and save it as output.mp4.
```

## Run it without Claude

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

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

```
#!/bin/sh
# Shake transition: the frame jolts hard and blurs for 0.7s while clip A cuts to clip B underneath it. The sound crossfades.
# Usage: sh shake-transition.sh clipA.mp4 clipB.mp4 output.mp4  (both clips need an audio track)
set -e
A="$1"; B="$2"; OUT="$3"
AMOUNT=24   # how far the frame jumps at the cut, in pixels
SHAKE=0.35  # seconds of shake on each side of the cut
BLUR=0.15   # seconds of blur on each side of the cut
MIX=0.2     # the clips overlap this long, hidden in the blur

LEN=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$A")
OFFSET=$(echo "$LEN - $MIX" | bc)
CUT=$(echo "$OFFSET + $MIX / 2" | bc -l)
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}
# strongest at the cut, dying away to nothing SHAKE seconds either side
ENV="max(0,1-abs(t-$CUT)/$SHAKE)"
# B is fitted to A and the two are joined with a short dissolve. Around the cut the frame is scaled up (12% at
# the cut) so the moving crop never shows an edge, shaken, and blurred right across the cut
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=fade:duration=$MIX:offset=$OFFSET,\
scale=w='trunc(iw*(1+0.12*$ENV)/2)*2':h='trunc(ih*(1+0.12*$ENV)/2)*2':eval=frame,\
crop=$W:$H:x='(in_w-out_w)/2+$AMOUNT*sin(t*90)*$ENV':y='(in_h-out_h)/2+$AMOUNT*0.8*cos(t*71)*$ENV',\
boxblur=12:2:enable='between(t,$CUT-$BLUR,$CUT+$BLUR)'[v];\
[0:a][1:a]acrossfade=d=$MIX[au]" \
  -map "[v]" -map "[au]" -r "$FPS" -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)
