How to turn raw footage into brand-ready video locally with AI and FFmpeg
I'm Denis Shokhirev, Enterprise AI architect based in Erlangen, Germany. At DennisCraft AI Studio, I ship AI systems for B2B clients in the DACH region—logistics, fintech, industrial automation. A client recently dropped 8+ hours of raw video on encrypted drives, under strict NDA, with a hard ban on cloud. The task: produce brand-compliant video (titles, logo, face redaction, subtitles) quickly, locally, and without data leakage. Why cloud video AI doesn’t cut it in production Most AI-powered
I'm Denis Shokhirev, Enterprise AI architect based in Erlangen, Germany. At DennisCraft AI Studio, I ship AI systems for B2B clients in the DACH region—logistics, fintech, industrial automation. A client recently dropped 8+ hours of raw video on encrypted drives, under strict NDA, with a hard ban on cloud. The task: produce brand-compliant video (titles, logo, face redaction, subtitles) quickly, locally, and without data leakage.
Why cloud video AI doesn’t cut it in production
Most AI-powered video tools—Descript, Runway, even Adobe Premiere Pro’s AI plugins—are cloud-first. For regulated B2B (GDPR, closed networks, compliance audits), that’s a deal-breaker. In this project, all video had to stay on-premises. Classic video editors aren’t scalable: 8 hours of content means days of manual editing, even for a pro.
| Tool | AI Features | Local Processing | GDPR-compliant |
|---|---|---|---|
| Adobe Premiere Pro | AI plugins | No | No |
| Descript | Transcription, subtitles | No | No |
| FFmpeg + local AI models | Fully customizable | Yes | Yes |
The stack: FFmpeg, local AI models, Claude Code for automation
My pipeline uses FFmpeg for core video processing, Python for orchestration, local AI models—Whisper (OpenAI) for transcription, YOLOv8 for face detection, Stable Diffusion for generating branded backgrounds. n8n automates the workflow, and Claude Code (Anthropic SDK) helps with on-demand scripting. Everything runs on a single workstation (NVIDIA RTX 4090), fully isolated from the internet.
Key benefits
- Full transparency: Each step is logged, debugged, and auditable.
- Data never leaves the local network—critical for compliance.
- Easy to extend: Add new models or steps without rearchitecting.
Step-by-step: Automated pipeline from raw footage to brand content
1. Automated audio transcription with Whisper
Whisper (openai/whisper, MIT License) is the only open-source speech-to-text model I’ve found production-grade for local use. Here’s a Python script that transcribes all .mp4 files in a folder to SRT subtitles:
import whisper
import os
model = whisper.load_model("base")
video_folder = "./raw_video"
for filename in os.listdir(video_folder):
if filename.endswith(".mp4"):
result = model.transcribe(os.path.join(video_folder, filename))
srt_path = os.path.splitext(filename)[0] + ".srt"
with open(srt_path, "w", encoding="utf8") as f:
f.write(result["text"])
On an RTX 4090, 1 hour of video is transcribed in about 8–12 minutes.
2. Face detection and blurring for GDPR
GDPR requires masking faces if you lack explicit consent. YOLOv8 (ultralytics/yolov8) is fast and accurate for face detection. I extract face boxes, apply Gaussian blur with OpenCV, then use FFmpeg to reconstruct the video:
import cv2
from ultralytics import YOLO
model = YOLO("yolov8n-face.pt")
cap = cv2.VideoCapture("input.mp4")
ret, frame = cap.read()
results = model(frame)
for box in results[0].boxes.xyxy:
x1, y1, x2, y2 = map(int, box)
face = frame[y1:y2, x1:x2]
face = cv2.GaussianBlur(face, (99, 99), 30)
frame[y1:y2, x1:x2] = face
cv2.imwrite("blurred_frame.jpg", frame)
Batch the process for all frames, then reassemble in FFmpeg.
3. Adding subtitles, logo, and branded overlays
FFmpeg’s “subtitles” and “overlay” filters let you add SRT subtitles (from Whisper) and logo PNGs in one command. Example:
ffmpeg -i blurred.mp4 -vf "subtitles=output.srt,overlay=10:10" -i logo.png -codec:a copy output_final.mp4
For branded backgrounds or color grading, use Stable Diffusion for image generation, then composite with FFmpeg.
4. Orchestrating the pipeline with n8n and Claude Code
n8n lets you visually build and schedule the workflow: trigger when new files arrive, run Python scripts, log results. Claude Code (via Anthropic API) generates helper scripts and checks command correctness (e.g., FFmpeg syntax, SRT validation). All logs are stored in Supabase for auditing.
Production QA: What actually works
- Subtitles: I run automated tests for line length and timing consistency.
- Blurring: I use PSNR metrics between original and blurred faces to spot issues.
- Logs: All pipeline steps are tracked in Postgres (self-hosted), so I can prove compliance if needed.
In 14 real-world agent deployments, the most frequent bugs hit at the face-blur step—missed or false detections, or frame drops. Manual review of a few sample outputs is non-negotiable.
FAQ
Can this be done without a GPU?
Yes, but transcription and face detection are 4–5x slower. On a modern CPU, 1 hour of video takes 40–50 minutes to process.
How do you prevent data leaks?
Everything runs in an isolated network; logs go to local Postgres, access is restricted via VPN.
Best face-blur model?
YOLOv8 (ultralytics/yolov8) is the fastest and most accurate I’ve used for moving faces. For static images, RetinaFace is also solid.
Is Claude Code safe for scripting?
Review always required. The 2024 Stanford CodeML paper found CWE-89 SQL injection patterns in 38% of LLM-generated Python (https://arxiv.org/abs/2310.10685).
What if the pipeline crashes on big files?
Split videos into smaller chunks, process in parallel, and monitor RAM usage (especially with HD/4K).
At which stage do you catch the most bugs in your local video automation pipeline—transcription, blurring, subtitles, or final encoding? I’m genuinely curious where others hit snags. I offer a free 30-min stack audit for DACH founders building AI in regulated markets. DM me on LinkedIn or write to @ger_dennis_ai.
Turn your process into an AI system
Fixed price. Production quality. DACH B2B focus.