Skip to content
FramesField
SKILL.md Beginner Setup (1 Command) SKILL.md
Verified Dec 1, 2026

Topaz 4K Upscale & Sync Lipsync 2.0 fal.ai Batch Skill

How to install this SKILL.md

Install into .claude/skills/, .cursor/skills/, or .agents/skills/ so your coding agent can batch-upscale 720p AI clips to 4K or run automated lip-sync voice swaps via fal.ai.

Executable SKILL.md playbook teaching Claude Code, Cursor, and Codex how to trim dead settle frames, run fal.ai queue jobs for Topaz Video Upscale (Proteus 4K $0.08/s, Gaia 2 half-price animation $0.04/s) and Sync Lipsync 2.0 ($3/min Standard · $5/min Pro), and re-mux untouched 48 kHz WAV audio at -14 LUFS.

Compatible agent hosts
Claude Code Cursor Codex
Target tool: fal.ai Queue API / Topaz Video API / Sync Lipsync 2.0 / FFmpeg · License: MIT
  1. STEP 01
    Install pure SKILL.md from /raw/skills/

    Run the copy-paste install command for Claude Code, Cursor, or Codex below.

  2. STEP 02
    Export FAL_KEY in your shell environment

    Ensure FAL_KEY is set and local ffmpeg + ffprobe are available on PATH.

  3. STEP 03
    Ask your agent to upscale or lip-sync clips

    Agent estimates exact fal.ai spend first, trims settle frames, polls the queue asynchronously, and verifies 4K CFR + -14 LUFS audio.

1. Install for your tool

Pick the app you use below for the exact verified command or config—zero manual guessing.

Direct raw file (SKILL.md) ↓
Claude Code bash
Installs the pure SKILL.md payload directly into Claude Code:
mkdir -p .claude/skills/topaz-upscale-sync-lipsync
curl -fsSL https://framesfield.com/raw/skills/topaz-upscale-and-sync-lipsync-fal-skill \
  -o .claude/skills/topaz-upscale-sync-lipsync/SKILL.md

2. Inspect or download the full SKILL.md file

This is the exact raw file served at /raw/skills/topaz-upscale-and-sync-lipsync-fal-skill.

Topaz 4K Upscale & Sync Lipsync 2.0 fal.ai Batch Skill SKILL.md
---
name: topaz-upscale-sync-lipsync
description: Run fal.ai serverless queue jobs for Topaz Video Upscale (fal-ai/topaz/upscale/video at $0.01-$0.08/s, half price on Gaia 2, 2x for 60fps) and Sync Lipsync 2.0 (fal-ai/sync-lipsync/v2 at $3/min or /v2/pro at $5/min), plus FFmpeg pre-trimming, 48 kHz WAV preservation, and -14 LUFS master verification. Use when upscaling 720p AI clips to 4K or swapping dialogue on talking-head videos.
---

# Topaz 4K Upscale & Sync Lipsync 2.0 fal.ai Skill

## 1. Mandatory Pre-Flight Cost Estimate (Before Any Paid Call)
Always probe clip duration with `ffprobe` and print estimated fal.ai spend before submitting:
- **Topaz Video Upscale (`fal-ai/topaz/upscale/video`):**
  - `<=720p`: `$0.01/sec` | `720p–1080p`: `$0.02/sec` | `>1080p (4K)`: `$0.08/sec`
  - Multipliers: `target_fps: 60` = `2x` rate; `model: "Gaia 2"` (animation/CGI) = `0.5x` rate.
- **Sync Lipsync 2.0:**
  - `fal-ai/sync-lipsync/v2`: `$3.00/min` (`$0.05/sec`)
  - `fal-ai/sync-lipsync/v2/pro`: `$5.00/min` (`$0.083/sec`)
- **Order of operations rule:** If running BOTH lip-sync and 4K upscaling, ALWAYS run **Sync Lipsync 2.0 first** on the 1080p source plate, then upscale once at the end.

## 2. Topaz Video Upscale Queue Pattern
1. Trim dead opening settle frames (`-ss 0.40`) and extract original 48 kHz WAV audio first.
2. Pick `model: "Proteus"` + `grain: 0.03` for photoreal cinema, or `model: "Gaia 2"` (half price, never 60fps) for 2D/stop-motion animation.
3. Submit asynchronously to `https://queue.fal.run/fal-ai/topaz/upscale/video`:
```bash
curl -sS -X POST "https://queue.fal.run/fal-ai/topaz/upscale/video" \
  -H "Authorization: Key $FAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"video_url":"'"$VIDEO_URL"'","model":"Proteus","upscale_factor":3,"grain":0.03,"H264_output":true}'
```
4. Poll the returned `status_url` with backoff (5s → 10s, bounded max 60 polls) until `status === "COMPLETED"`, then fetch `response_url` and download `video.url`.

## 3. Sync Lipsync 2.0 Queue Pattern
1. Verify audio duration is within +/-5% of source video duration using `ffprobe`. Warn the user before submitting if delta exceeds 15% (do NOT blindly use `sync_mode: "remap"` on large mismatches).
2. Default `sync_mode: "cut_off"` (or `"silence"` when audio is slightly shorter than video):
```bash
curl -sS -X POST "https://queue.fal.run/fal-ai/sync-lipsync/v2" \
  -H "Authorization: Key $FAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"video_url":"'"$VIDEO_URL"'","audio_url":"'"$AUDIO_URL"'","sync_mode":"cut_off"}'
```

## 4. Re-Mux Master Audio & Verify Delivery Specs
Re-attach untouched 48 kHz WAV audio without re-encoding video frames (`-c:v copy`):
```bash
ffmpeg -y -i upscaled_4k.mp4 -i source_audio.wav \
  -map 0:v:0 -map 1:a:0 -c:v copy \
  -af "loudnorm=I=-14:TP=-1.0:LRA=11" -c:a aac -b:a 192k -ar 48000 \
  -shortest -movflags +faststart master_final.mp4
```
Verify `width`, `height`, `pix_fmt=yuv420p`, CFR frame rate, and `sample_rate=48000` with `ffprobe`.

3. Test it right away (sample prompt & result)

Sample prompt / input
Upscale our 4 approved 720p Runway Gen-4 clips in ./selects/ to 4K 24fps using Topaz Proteus with 0.03 grain, print total cost first, and re-mux each clip's WAV stem at -14 LUFS.
What happens when it runs
Probed 4 clips (18.4s trimmed total). Estimated Topaz 4K 24fps cost: $1.47 (18.4s x $0.08/s).
Submitted 4 async queue jobs to fal-ai/topaz/upscale/video -> all COMPLETED.
Re-muxed 48 kHz WAV at -14 LUFS. ffprobe verified: 3840x2160 | h264 | yuv420p | 24/1 fps | 48000 Hz.

What you need & known limits

Requirements

  • FAL_KEY environment variable from fal.ai
  • Local ffmpeg, ffprobe, and curl available on PATH
  • Publicly reachable URLs (or fal.ai storage uploads) for input video/audio files

Watch out for

  • Never upscale multi-cut montages with target_fps: 60—split into single shots first so optical flow does not ghost across cuts
  • Always confirm written presenter consent before calling Sync Lipsync 2.0 on real human footage

Turning fal.ai finishing jobs into repeatable one-line agent runs

Post-production finishing is where manual browser clicking breaks down: trimming 10 clips, tracking async queue IDs, checking whether a shot needs Proteus ($0.08/s) vs. half-price Gaia 2 ($0.04/s), and re-muxing untouched 48 kHz audio are tedious by hand but trivial for a coding agent armed with strict rate-card math and ffprobe gates.

Install this skill to automate both our Upscale 720p AI Video to Clean 4K & 60fps Delivery and Talking-Head Explainer & Lip-Sync Voice Swap pipelines across Topaz Video Upscale API and Sync Lipsync 2.0.

Frequently Asked Questions

Why run Sync Lipsync 2.0 before Topaz 4K upscaling instead of after?
Running Sync Lipsync 2.0 on your 1080p source plate lets Topaz 4K sharpen the finalized lower-face and teeth texture uniformly with the rest of the frame, avoiding soft mouth patches inside a crisp 4K shot.
How does the skill avoid runaway API bills?
It probes exact clip seconds with ffprobe, trims dead opening settle frames first, calculates the exact fal.ai rate (including 60fps 2× or Gaia 2 0.5× multipliers), and displays the dollar total before submitting.
Use this page in AI tools or notes
raw .md