How to add a flicker cut with Claude

The picture strobes back and forth between the two shots every tenth of a second before landing on the second one.

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

    Join clipA.mp4 and clipB.mp4 with a flicker cut
    Length of the flicker in seconds: 0.8
    Frames each clip stays on screen before the picture flips to the other: 3

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 flicker cut.

Settings you can change

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

SettingDefaultWhat it does
D0.8Length of the flicker in seconds.
FLIP3Frames each clip stays on screen before the picture flips to the other.
FPS30Output frame rate.

Without the skill

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

Show the prompt
Join clipA.mp4 and clipB.mp4 with a 0.8 second flicker cut that starts 0.8 seconds before the end of A, so the output is 11.2 seconds long. Use ffmpeg at 30fps, fitting B to A's size first. Overlap A's last 0.8 seconds with B's first 0.8 seconds (24 frames) and hard-switch the picture between them in runs of 3 frames: B for frames 0-2 of the overlap, A for 3-5, B for 6-8 and so on, so the last run (frames 21-23) is A, then B carries on untouched from 0.8 seconds into it. No blending or fading: every frame is entirely one clip. Leave every frame outside the overlap untouched. Keep the sound by crossfading the audio over the same 0.8 seconds. Save it as output.mp4 (H.264, yuv420p).

Run it without Claude

This is the exact command we tested. Save it as flicker-cut.sh and run:

sh flicker-cut.sh clipA.mp4 clipB.mp4 output.mp4
Show the command
#!/bin/sh
# Flicker cut: over the last 0.8s of clip A the picture flips between A and B every 3 frames, then settles on B. The sound crossfades underneath.
# Usage: sh flicker-cut.sh clipA.mp4 clipB.mp4 output.mp4  (both clips need an audio track)
set -e
A="$1"; B="$2"; OUT="$3"
D=0.8      # length of the flicker in seconds
FLIP=3     # frames each clip stays on screen before the picture flips to the other
FPS=30     # output frame rate

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")
W=${SIZE%x*}; H=${SIZE#*x}
# B is fitted to A's size; A's last D seconds and B's first D seconds overlap, and B is laid over A
# on every other run of FLIP frames, starting with B
ffmpeg -y -i "$A" -i "$B" -filter_complex "\
[0:v]fps=$FPS,format=yuv420p,setsar=1,split[a1][a2];\
[1:v]scale=$W:$H:force_original_aspect_ratio=increase,crop=$W:$H,fps=$FPS,format=yuv420p,setsar=1,split[b1][b2];\
[a1]trim=end=$OFFSET,setpts=PTS-STARTPTS[head];\
[a2]trim=start=$OFFSET,setpts=PTS-STARTPTS[atail];\
[b1]trim=end=$D,setpts=PTS-STARTPTS[bhead];\
[b2]trim=start=$D,setpts=PTS-STARTPTS[brest];\
[atail][bhead]overlay=enable='eq(mod(floor(n/$FLIP),2),0)'[flicker];\
[head][flicker][brest]concat=n=3:v=1:a=0[v];\
[0:a][1:a]acrossfade=d=$D[au]" \
  -map "[v]" -map "[au]" -r $FPS -c:v libx264 -crf 18 -pix_fmt yuv420p -c:a aac "$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