---
name: ffmpeg-fps-upscale
description: Convert 16 fps local open-weight clips (Wan 2.2) or mixed 30 fps renders cleanly to 24 fps using motion-compensated optical flow (minterpolate) or clean cadence conform, and upscale 720p footage cleanly to 1080p via lanczos and restrained unsharp masking.
---

# FFmpeg Frame Rate Conform & 720p-to-1080p Upscale Protocol

Use this workflow whenever conforming local 16 fps Alibaba Wan 2.2 clips or 720p-class hosted renders (Runway Gen-4 Turbo, Runway Gen-4.5) onto a 1080p 24 fps commercial master:

## 1. Choose the Right Frame-Rate Conversion Mode
- **16 fps -> 24 fps (Wan 2.2 smooth slow/medium camera moves):** Use motion-compensated optical flow (`minterpolate=mi_mode=mci`) so every 3rd frame is smoothly synthesized instead of duplicated (which causes visible 3:2 judder):
  ```bash
  ffmpeg -y -i wan22_16fps_720p.mp4 \
    -vf "minterpolate=fps=24:mi_mode=mci:mc_mode=aobmc:me_mode=bidir:vsbmc=1,scale=1920:1080:flags=lanczos,unsharp=3:3:0.35:3:3:0.0,setsar=1" \
    -c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p \
    -an -movflags +faststart \
    wan22_24fps_1080p.mp4
  ```
- **Fast erratic motion or hard scene cuts:** `minterpolate` can produce warping halos across hard cuts or spinning objects. Only run `minterpolate` on **individual single-shot clips**, NEVER across an already-edited multi-cut sequence.
- **30 fps -> 24 fps clean conform (when audio sync must stay intact):** Use standard frame drop (`fps=24`) rather than blending (`mi_mode=blend`, which creates double-exposure ghosting).

## 2. Clean 720p -> 1080p Scaling Restraint
- Always use `flags=lanczos` (`scale=1920:1080:flags=lanczos` or `1080:1920` for vertical) + `setsar=1`.
- Keep `unsharp` luma amount conservative (`0.25` to `0.40`, chroma `0.0`) so edges tighten subtly without introducing white ringing halos around dark clothing or typography.

## 3. Verify Exact Output Cadence
Confirm constant frame rate and exact target dimensions before passing to concatenation:
```bash
ffprobe -v error -show_entries stream=width,height,r_frame_rate,avg_frame_rate,pix_fmt -of default=noprint_wrappers=1 wan22_24fps_1080p.mp4
```
