---
name: ai-video-editing-workflow
description: Use when editing real video footage: AI-assisted pipeline from raw clips through FFmpeg, Remotion, ElevenLabs and fal.ai to Descript or CapCut.
---
# AI-Assisted Video Editing Workflow
## What this does
Edits existing footage fast — not generation from prompts. AI compresses, structures and augments real video: transcribe and plan, cut with FFmpeg, compose overlays with Remotion, generate only the missing assets, then polish by hand.
## When to use
- Cutting or structuring footage, or turning long recordings into short-form
- Building vlogs, tutorials or demo videos from raw capture
- Adding overlays, subtitles, music or voiceover to existing video
- Reframing for YouTube, TikTok or Instagram
## How to run it
The pipeline, in order — each layer has a specific job, don't skip layers:
```
Screen Studio / raw footage → Claude / Codex → FFmpeg → Remotion → ElevenLabs / fal.ai → Descript or CapCut
```
1. Capture: polished screen recordings (Screen Studio), raw camera footage, or desktop capture with real-time context.
2. Organize with Claude Code or Codex: transcribe and label, plan structure, find dead sections, generate an edit decision list, scaffold FFmpeg and Remotion code. Example prompt:
"Here's the transcript of a 4-hour recording. Identify the 8 strongest segments for a 24-minute vlog. Give me FFmpeg cut commands for each segment."
3. Deterministic cuts with FFmpeg:
```bash
ffmpeg -i raw.mp4 -ss 00:12:30 -to 00:15:45 -c copy segment_01.mp4
```
```bash
#!/bin/bash
# cuts.txt: start,end,label
while IFS=, read -r start end label; do
ffmpeg -i raw.mp4 -ss "$start" -to "$end" -c copy "segments/${label}.mp4"
done < cuts.txt
```
```bash
for f in segments/*.mp4; do echo "file '$f'"; done > concat.txt
ffmpeg -f concat -safe 0 -i concat.txt -c copy assembled.mp4
```
```bash
ffmpeg -i raw.mp4 -vn -acodec pcm_s16le -ar 16000 audio.wav
ffmpeg -i segment.mp4 -af loudnorm=I=-16:TP=-1.5:LRA=11 -c:v copy normalized.mp4
```
4. Programmable composition with Remotion for overlays, data visualizations, motion graphics and reusable scenes:
```tsx
import { AbsoluteFill, Sequence, Video, useCurrentFrame } from "remotion";
export const VlogComposition: React.FC = () => {
return (
<AbsoluteFill>
<Sequence from={0} durationInFrames={300}>
<Video src="/segments/intro.mp4" />
</Sequence>
<Sequence from={30} durationInFrames={90}>
<AbsoluteFill style={{ justifyContent: "center", alignItems: "center" }}>
<h1 style={{ fontSize: 72, color: "white", textShadow: "2px 2px 8px rgba(0,0,0,0.8)" }}>
The AI Editing Stack
</h1>
</AbsoluteFill>
</Sequence>
</AbsoluteFill>
);
};
```
```bash
npx remotion render src/index.ts VlogComposition output.mp4
```
5. Generate only the assets that don't exist. Voiceover with ElevenLabs:
```python
resp = requests.post(
f"https://api.elevenlabs.io/v1/text-to-speech/{voice_id}",
headers={"xi-api-key": os.environ["ELEVENLABS_API_KEY"], "Content-Type": "application/json"},
json={"text": "Your narration text here", "model_id": "eleven_turbo_v2_5",
"voice_settings": {"stability": 0.5, "similarity_boost": 0.75}})
```
Use fal.ai for background music, SFX and insert shots that don't exist.
6. Final polish by hand in Descript or CapCut: pacing, cleaned captions, color grading, final audio mix, platform export. This is where taste lives.
Reframing and auto-cut:
```bash
ffmpeg -i input.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" vertical.mp4
ffmpeg -i input.mp4 -vf "crop=ih:ih,scale=1080:1080" square.mp4
ffmpeg -i input.mp4 -af silencedetect=noise=-30dB:d=2 -f null - 2>&1 | grep silence
```
Highlight extraction prompt: "Given this transcript with timestamps and these scene change points, identify the 5 most engaging 30-second clips for social media."
Principles: edit, don't generate; structure before style; FFmpeg is the backbone; make repeatable things Remotion components; generate selectively; taste is the last layer.
## Output
Hand back the cut segments, the assembled timeline, any Remotion composition and its render command, generated voiceover/music assets, and per-platform exports — noting which steps still need human review.
Credit: Based on public content by affaan-m, packaged by Orbit.