Showcase
All GuidesLocal AI Video Editor Guide
All 8 Chapters Unlocked
8-Chapter Field Manual~24 min readIntermediateUpdated 2026-11-24

Build Your Own Local AI Video Editor (SAM 3, MatAnyone 2 & Apple MLX)

Stop paying monthly for cloud video editors. One complete 8-chapter handbook with every runnable script embedded verbatim: bezel-locked webcam teleprompter, zero-click Meta SAM 3 chair removal, MatAnyone 2 temporal hair matting, Grade B Rembrandt studio relighting, native Apple MLX fp32 LivePortrait eye contact, Cinema FX3 frequency-separation face polish, ClearerVoice MossFormer2 48kHz audio, Metal Whisper captions, and native 4K60 16:9 + 9:16 exports locally on Apple Silicon.

Meta SAM 3MatAnyone 2Apple MLX LivePortraitCinema FX3 PolishClearerVoice 48kHzGemini 4 Neon

What You Will Build & Master

  • Set up a clean Apple Silicon environment running Meta SAM 3, headless MatAnyone 2, native Apple MLX LivePortrait fp32, MediaPipe 478-pt FaceLandmarker, ClearerVoice MossFormer2_SE_48K, and Metal whisper-cli in one script.
  • Fuse zero-click Meta SAM 3 text prompts (+person, +microphone arm, -office chair) with MatAnyone 2 soft hair alpha, 5-frame anti-flicker, fingertip hole-fill, and Rembrandt LAB face relighting.
  • Correct gaze drift locally in Apple MLX fp32 (~2.6 min per 50s take) with empirical VOR head-turn regression and feathered dual eye-socket compositing, paired with zero-flicker Cinema FX3 frequency-separation skin/under-eye/teeth polish.
  • Master voice audio with ClearerVoice MossFormer2_SE_48K dereverb + -14.0 LUFS broadcast chain, extract Metal Whisper word timestamps, and render both native 4K60 BT.709 16:9 + 9:16 cuts from one enhanced 30 fps A-roll pass.
Table of Contents (8 Chapters)All UnlockedCh. 1 Free
Self-Contained Blueprint (Zero External Repo Required): Every line of production code powering this 8-stage studio — setup.sh, the bezel-locked teleprompter.html, matte_video.py, the full native Apple MLX studio_enhance.py (eye contact + Cinema FX3 face polish + chroma denoise + MossFormer2 audio), transcribe_video.py, and the native 4K60 dual-format composer — is embedded directly inside Chapters 2–8 with one-click Copy buttons.

1. Introduction & 8-Stage Local Architecture

Every creator hits the same wall: you record a 45-second talking-head take on a webcam in an ordinary room, and suddenly you are paying monthly subscriptions for cloud video editors, fighting ugly virtual green-screen halos, erasing an office chair headrest frame-by-frame, fixing off-lens eye contact, color-correcting sickly webcam skin casts and under-eye shadows, cleaning room reverb, syncing captions, and rebuilding the entire timeline twice for widescreen (16:9) and vertical (9:16) feeds.

Instead of paying for cloud video editors or fighting brittle SaaS pipelines, I used Gemini 4 Neon inside Antigravity to build a 100% local, zero-click AI video studio running directly on Apple Silicon. You feed it one raw bedroom clip, and it outputs native 4K60 (3840x2160 widescreen + 2160x3840 vertical) masters with zero-click chair removal, soft temporal hair matting, Rembrandt studio relighting, native Apple MLX neural eye contact, zero-flicker Cinema FX3 frequency-separation face polish, 48 kHz neural speech dereverb (-14.0 LUFS), and 2x Retina active word captions — with zero cloud GPU bills and zero footage uploaded to third-party servers.

Everything is self-contained inside this handbook. We are not pointing you to an external template repo — every production script (setup.sh, the bezel-locked teleprompter.html, matte_video.py, the full Apple MLX LivePortrait Eye Contact + Cinema FX3 Face Polish studio_enhance.py engine, MossFormer2_SE_48K neural audio mastering, transcribe_video.py, and the native 4K60 dual-format composer) is included verbatim in Chapters 2 through 8 with one-click Copy buttons.

End-to-End 8-Stage Local Pipeline

Local Apple Silicon Architecture 1 Raw Clip → Dual 4K60
PyTorch MPS Apple MLX fp32 48 kHz Audio 4K60 BT.709
00 · Input Single Raw Webcam Take 1080p · 30 fps
Bezel-locked HTML teleprompter (@ Speed 24) · 100% local on Mac
Zero Cloud
Sources 2×
Live app · 8-ch guide
Track A · Studio A-Roll 1× @ 30 fps
01SAM 3 + MatAnyone 2
~95s
+person, +mic, −chair · soft hair alpha
02Obsidian + Rembrandt
~12s
Studio wall · LAB relight · 35mm grain
03MLX Eyes + FX3 Skin
~4.5m
Chroma DN · MLX fp32 VOR · pore-safe
Track B · Audio −14 LUFS
04MossFormer2 48k
~20s
Neural dereverb & noise strip
05Broadcast Mix
52.4s
Ducked bed · −14 LUFS / −1.7 TP
06Metal Whisper
~5s
Word JSON timestamps + .SRT
Track C 60 fps
Playwright 2×
3840×2160 · 2160×2036
2× UI & Plates
IDE cards · 2K thumbs
ROI-Cached: Fast overlays
Stage 08 · Dual Native 4K60 Assembly & Mechanical Gate H.264 High L5.2 · BT.709 · +faststart
07Dual 4K60 Render
~5.5m
1 loop writes 3,144f for both
16:9 · 3840×2160
YT / X
832px PiP + blurred rounded shadow
9:16 · 2160×3840
Reels
53/47 Editorial Split · IG safe box
verify-cut
7/7
PASS · 0 errors

Critical Architecture Rule: Enhance 30 fps Studio A-Roll Before 4K60 Compositing

Never run neural eye contact or face polish on the final composited 4K60 timelines. Always run them once on your clean 1920x1080 @ 30 fps studio A-roll immediately after matting and relighting — before dual-format 4K60 assembly:

  1. 4× Faster With Zero Redundant Compute: A 4K60 master has twice as many frames (60 fps) and two separate timelines (16:9 + 9:16). Running studio_enhance.py once on the single 1920x1080 @ 30 fps studio take feeds both the 832x832 corner Studio PiP (16:9 4K60, 1.17x supersampled!) and the 2160x1804 bottom split (9:16 4K60) from one single pass.
  2. Maximum Neural Detail With Zero Tracking Collisions: LivePortrait internally synthesizes a 512x512 aligned face crop and composites strictly inside the two eye sockets, so 1080p studio A-roll already saturates its full neural resolution—while keeping single-face tracking completely isolated from B-roll clips, captions, or secondary speakers on the main stage.

Why Local Apple Silicon Beats Monthly Cloud Editors

Capability Typical Cloud Video SaaS This Local Apple Silicon Pipeline
Recurring cost $24–$65 / month + export credits $0 / month after one-time local model downloads
Chair & prop removal Manual rotoscoping or ugly blur halos Zero-click text prompts (+person, +microphone arm, -office chair) via Meta SAM 3
Hair & beard edges Hard plastic cutouts or green-spill edges Soft temporal alpha via MatAnyone 2 + 5-frame motion-adaptive stabilization + fingertip hole-fill
Eye contact correction Cloud credit burn, watermarks, or uncanny 2D eye warps Native Apple MLX fp32 LivePortrait 3D eyeball + eyelid synthesis with empirical head-turn VOR & blink gating
Face & skin cleanup Waxy beauty filters or flickering GAN face swappers Zero-flicker Cinema FX3 frequency separation — under-eye soft lift, seamless de-green skin tone (face/ears/neck), 100% real pores & beard intact
Studio lighting & audio Flat cutout + basic noise gate Grade B Rembrandt LAB sculpting, atadenoise shadow cleanup, ClearerVoice MossFormer2_SE_48K dereverb + -14.0 LUFS mix
Multi-platform outputs Re-edit separate 1080p timelines for X & IG Single-pass native 4K60 (3840x2160 + 2160x3840) BT.709 masters + Metal Whisper word JSON & .srt

Hardware, Storage & Speed Benchmarks

Tested on Apple Silicon (M2 Pro / M3 Max / M4 Max / M5 Max with Unified Memory, macOS 14+):

Component Local Footprint Runtime for a 50s 1080p Take Hardware Engine
facebook/sam3 (bfloat16, --sam3-stride 15) ~3.44 GB (~/.cache/huggingface) ~35–45 s (fast keyframe SAM 3) PyTorch MPS
PeiqingYang/MatAnyone2 ~140 MB (model.safetensors) ~22–35 s (8-frame warmup + temporal pass) PyTorch MPS
ffmpeg atadenoise (temporal chroma denoise) Built-in ffmpeg ~6 s (U/V shadow chroma only) Multi-core CPU
FasterLivePortrait-MLX (fp32, 5 neural nets) ~500 MB (.npz weights) ~2.6 min (0.15 s load, ~106 ms/f on M5 Max) Native Apple MLX
MediaPipe 478-pt VOR + Cinema FX3 Face Polish ~3.6 MB (face_landmarker.task) ~1.5 min combined with MLX pass (~4.4 min total 1–4) CPU + NumPy/OpenCV
ClearerVoice (MossFormer2_SE_48K) + -14 LUFS ~222 MB (open weights) ~10 s for 50 s of 48 kHz studio voice PyTorch MPS / CPU
whisper-cpp (ggml-base.en.bin) ~142 MB (~/.cache/whisper) ~1.6 s for word-level timestamps + .srt Apple Metal
Dual Native 4K60 Compositor (x264 High L5.2) Pure Python + OpenCV + ffmpeg ~60–90 s for both 16:9 + 9:16 4K60 Multi-core CPU

Speed Multiplier Trick: Because studio_enhance.py runs in pure Apple MLX fp32 on a single 30 fps matted take (~4.4 min total for all 4 enhancement stages on M5 Max), you run it once and feed both the widescreen 16:9 4K60 and vertical 9:16 4K60 masters automatically.

What You Will Unlock in Chapters 2–8

  • Chapter 2: Complete one-command Apple Silicon setup.sh installing PyTorch MPS, Meta SAM 3, headless MatAnyone 2, Apple MLX + FasterLivePortrait-MLX, MediaPipe 478-pt FaceLandmarker, ClearerVoice MossFormer2_SE_48K, ffmpeg, and Metal whisper-cli.
  • Chapter 3: Complete self-contained bezel-locked webcam teleprompter (teleprompter.html + launcher script) calibrated right beneath your camera lens at Speed 24.
  • Chapter 4: The complete 440-line matte_video.py engine — SAM 3 text-prompt masks, MatAnyone 2 soft hair propagation, motion-adaptive anti-flicker, fingertip hole-fill, Rembrandt relighting, and anti-banding 35mm grain.
  • Chapter 5: The complete studio_enhance.py Cinema Polish & Eye Contact engine — temporal chroma denoise, Native Apple MLX fp32 LivePortrait neural eye-socket retargeting with empirical VOR head-turn calibration & blink gating, plus Cinema FX3 frequency-separation face/skin/under-eye/teeth polish (zero GAN flicker, 100% real pores & beard intact).
  • Chapter 6: ClearerVoice MossFormer2_SE_48K 48 kHz neural dereverb/denoise + -14.0 LUFS broadcast mixing chain + full transcribe_video.py Metal Whisper word-level transcriber.
  • Chapter 7: Complete native 4K60 dual-format composer (3840x2160 with blurred rounded-corner Studio PiP shadow + 2160x3840 53/47 Editorial Split inside Instagram safe zones) and 2K thumbnail spec.
  • Chapter 8: Copy-paste prompt blueprints for directing the full 8-stage studio with Gemini 4 Neon inside Antigravity + a 14-row forensic troubleshooting matrix.

Inside Chapters 2–8 (Included Free With Email Unlock)

Click any chapter to unlock

Loading your unlocked Chapters 2–8…

7 Remaining Chapters LockedFree 1-Click Inbox Unlock · 1 Email Unlocks All Guides

Unlock Chapters 2–8 + All Future Engineering Guides

We’ll email you a 1-click link to unlock all remaining chapters right here in your browser for 90 days, plus activate Ashutosh’s free AI Compass daily AI news emails (1-click unsubscribe anytime).

7 Complete ChaptersSAM 3 + MatAnyone 2 + Rembrandt EngineApple MLX Eye Contact + Cinema FX3 PolishMossFormer2 Audio & Dual 4K60 Composer
Format: you@domain.com · 1-click unlock link sent instantly
Already subscribed? Enter your subscribed email address to unlock this.Privacy Policy
Continue Reading · Companion Engineering Guide

3D Drops & AI Briefing

Don’t miss the next build

Daily AI briefings (11:00–12:00 IST), Sunday Weekly synthesis, and new WebGPU 3D drops in your inbox.

1-click unsubscribe · Privacy

! Please enter a valid email address (for example, you@domain.com).

Morning Edition Alerts

Get a 1-click alert at 11:00 IST

One quiet browser alert when Ashutosh’s daily AI briefing or Sunday synthesis goes live. No email required. Privacy