---
title: "How to add a digital pan and tilt with Claude (tested prompt and ffmpeg command)"
description: "The view starts in the lower-left corner of the shot and glides diagonally up and across to the upper right, as if the camera were turning on a tripod. Install one skill and ask Claude Code, or run the ffmpeg command we tested yourself."
url: https://www.recharm.com/effects/digital-pan-and-tilt
---

# How to add a digital pan and tilt with Claude

The view starts in the lower-left corner of the shot and glides diagonally up and across to the upper right, as if the camera were turning on a tripod.

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

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

   ```
   Add a digital pan and tilt to input.mp4
   How far in the crop window sits: 1.25
   Second the move begins: 0.5
   ```

## 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 digital pan and tilt 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.

| Setting  | Default | What it does                                                                     |
| -------- | ------- | -------------------------------------------------------------------------------- |
| `ZOOM`   | `1.25`  | How far in the crop window sits. 1.25 shows 80% of the frame's width and height. |
| `START`  | `0.5`   | Second the move begins.                                                          |
| `LENGTH` | `3.5`   | Seconds it takes to glide from the bottom-left corner to the top-right.          |

## Without the skill

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

```
In input.mp4 (540x960), add a digital pan and tilt with a moving crop: take a 432x768 window (1.25x zoom), scale it back up to 540x960, and move it. Hold it in the bottom-left corner (left edge and bottom edge of the window on the frame's left and bottom edges) until 0.5 seconds, then glide it diagonally to the top-right corner (right and top edges on the frame's edges) by 4.0 seconds, easing in and out with smoothstep (progress p from 0 to 1, position p*p*(3-2*p)), and hold it there to the end. Keep the length, 30fps and the audio. Use ffmpeg and save it as output.mp4.
```

## Run it without Claude

This is the exact command we tested. Save it as `digital-pan-and-tilt.sh` and run:

```
sh digital-pan-and-tilt.sh input.mp4 output.mp4
```

```
#!/bin/sh
# Digital pan and tilt: a crop window 1.25x into the frame glides from the bottom-left corner to the top-right.
# Usage: sh digital-pan-and-tilt.sh input.mp4 output.mp4
set -e
IN="$1"; OUT="$2"
ZOOM=1.25    # how far in the crop window sits (1.25 = 80% of the frame wide and tall)
START=0.5    # second the move begins
LENGTH=3.5   # seconds it takes to glide from corner to corner

SIZE=$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "$IN")
P="clip((t-$START)/$LENGTH,0,1)"   # progress 0..1
S="($P*$P*(3-2*$P))"               # eased so it starts and stops gently
ffmpeg -y -i "$IN" -vf "\
crop=w=iw/$ZOOM:h=ih/$ZOOM:x='(iw-ow)*$S':y='(ih-oh)*(1-$S)',\
scale=$SIZE:flags=lanczos,setsar=1,fps=30,format=yuv420p" \
  -c:v libx264 -crf 18 -c:a copy "$OUT"
```

## More motion and camera

- [2.5D parallax photo **2.5D parallax photo**](https://www.recharm.com/effects/2-5d-parallax-photo)
- [Back-and-forth loop **Back-and-forth loop**](https://www.recharm.com/effects/back-and-forth-loop)
- [Background blur **Background blur**](https://www.recharm.com/effects/background-blur)
- [Bullet time **Bullet time**](https://www.recharm.com/effects/bullet-time)
- [Cinemagraph **Cinemagraph**](https://www.recharm.com/effects/cinemagraph)

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