How to add a rewind hook with Claude

The video opens on a moment from near the end, then races backwards to the start through VHS static, sideways-slipping bands and white tracking lines before playing on.

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 rewind hook to input.mp4
    Second of the input the opening moment comes from: 4
    How long that moment plays before the rewind: 1.0

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 rewind hook 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 command.

SettingDefaultWhat it does
TEASE_AT4Second of the input the opening moment comes from.
TEASE1.0How long that moment plays before the rewind.
REWIND0.8Seconds the rewind back to the start takes.
SPLIT6VHS color fringing during the rewind, in pixels each way.

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
Make a rewind hook from input.mp4 (6 seconds, 30fps). The output is 6 seconds: first play input seconds 4.0 to 5.0 as normal. Then from 1.0 to 1.8 seconds, play input seconds 5.0 back to 0 in reverse (6.25x speed) as a VHS rewind: shift the red channel 6 pixels left and the blue 6 pixels right, lower the saturation to 70%, add flickering noise (strength 25), slide the picture sideways in 24-pixel-tall horizontal bands by up to 10 pixels (a different amount per band, changing every frame), and draw three solid pure white (255, 255, 255) full-width horizontal bars 12, 5 and 20 pixels tall that sweep down the frame at 2600, 1500 and 3300 pixels per second, wrapping round. From 1.8 seconds play the input from 0 normally to the end. For the sound, play the same input audio as the picture: normal for the opening moment, reversed and sped up 6.25x (pitched up) at half volume during the rewind, then normal from the start. Don't add any text. Use ffmpeg, keep the size, frame rate and audio, and save it as output.mp4.

Run it without Claude

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

sh rewind-hook.sh input.mp4 output.mp4
Show the command
#!/bin/sh
# Rewind hook: open on a moment from the end, rewind it fast with VHS tracking lines, then play from the start.
# Usage: sh rewind-hook.sh input.mp4 output.mp4
set -e
IN="$1"; OUT="$2"
TEASE_AT=4    # second of the input the opening moment comes from
TEASE=1.0     # how long that moment plays before the rewind
REWIND=0.8    # seconds the rewind back to the start takes
SPLIT=6       # VHS color fringing during the rewind, in pixels each way

LENGTH=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$IN")
RATE=$(ffprobe -v error -select_streams a:0 -show_entries stream=sample_rate -of csv=p=0 "$IN")
FPS=$(ffprobe -v error -select_streams v:0 -show_entries stream=r_frame_rate -of csv=p=0 "$IN")
BACK=$(awk "BEGIN{print $TEASE_AT + $TEASE}")              # the rewind runs from here back to 0
SPEED=$(awk "BEGIN{print $BACK / $REWIND}")                # how many times faster than real time
REST=$(awk "BEGIN{print $LENGTH - $TEASE - $REWIND}")      # what's left plays from the start

# the picture is cut into 24px bands that slide sideways, and three white tracking bars sweep down the frame
TEAR="X+10*sin(floor(Y/24)*1.7+T*40)"
BARS="lt(mod(Y-2600*T,H),12)+lt(mod(Y-1500*T-320,H),5)+lt(mod(Y-3300*T-640,H),20)"
VHS="format=gbrp,geq=r='if($BARS,255,r($TEAR,Y))':g='if($BARS,255,g($TEAR,Y))':b='if($BARS,255,b($TEAR,Y))'"

ffmpeg -y -v error -i "$IN" -filter_complex "
  [0:v]split=3[v1][v2][v3]; [0:a]asplit=3[a1][a2][a3];
  [v1]trim=$TEASE_AT:$BACK,setpts=PTS-STARTPTS[tease];
  [a1]atrim=$TEASE_AT:$BACK,asetpts=PTS-STARTPTS[tease_a];
  [v2]trim=0:$BACK,setpts=PTS-STARTPTS,reverse,setpts=PTS/$SPEED,fps=$FPS,
      rgbashift=rh=-$SPLIT:bh=$SPLIT,eq=saturation=0.7,noise=alls=25:allf=t,$VHS[rew];
  [a2]atrim=0:$BACK,asetpts=PTS-STARTPTS,areverse,asetrate=$RATE*$SPEED,aresample=$RATE,volume=0.5[rew_a];
  [v3]trim=0:$REST,setpts=PTS-STARTPTS[rest];
  [a3]atrim=0:$REST,asetpts=PTS-STARTPTS[rest_a];
  [tease][tease_a][rew][rew_a][rest][rest_a]concat=n=3:v=1:a=1[v][a]" \
  -map "[v]" -map "[a]" -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