AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion,…
Video Editing
AI-assisted editing for real footage. Not generation from prompts. Editing existing video fast.
When to Activate
User wants to edit, cut, or structure video footage
Turning long recordings into short-form content
Building vlogs, tutorials, or demo videos from raw capture
Adding overlays, subtitles, music, or voiceover to existing video
Reframing video for different platforms (YouTube, TikTok, Instagram)
User says "edit video", "cut this footage", "make a vlog", or "video workflow"
Core Thesis
AI video editing is useful when you stop asking it to create the whole video and start using it to compress, structure, and augment real footage. The value is not generation. The value is compression.
The Pipeline
Screen Studio / raw footage
→ Claude / Codex
→ FFmpeg
→ Remotion
→ ElevenLabs / fal.ai
→ Descript or CapCut
Each layer has a specific job. Do not skip layers. Do not try to make one tool do everything.
Layer 1: Capture (Screen Studio / Raw Footage)
Collect the source material:
Screen Studio: polished screen recordings for app demos, coding sessions, browser workflows
Raw camera footage: vlog footage, interviews, event recordings
Desktop capture via VideoDB: session recording with real-time context (see videodb skill)
Output: raw files ready for organization.
Layer 2: Organization (Claude / Codex)
Use Claude Code or Codex to:
Transcribe and label: generate transcript, identify topics and themes
Plan structure: decide what stays, what gets cut, what order works
Identify dead sections: find pauses, tangents, repeated takes
Generate edit decision list: timestamps for cuts, segments to keep
Scaffold FFmpeg and Remotion code: generate the commands and compositions
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."
This layer is about structure, not final creative taste.
Layer 3: Deterministic Cuts (FFmpeg)
FFmpeg handles the boring but critical work: splitting, trimming, concatenating, and preprocessing.
Extract segment by timestamp
ffmpeg -i raw.mp4 -ss 00:12:30 -to 00:15:45 -c copy segment_01.mp4
Batch cut from edit decision list
#!/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
Concatenate segments
# Create file list
for f in segments/*.mp4; do echo "file '$f'"; done > concat.txt
ffmpeg -f concat -safe 0 -i concat.txt -c copy assembled.mp4
Create proxy for faster editing
ffmpeg -i raw.mp4 -vf "scale=960:-2" -c:v libx264 -preset ultrafast -crf 28 proxy.mp4
Extract audio for transcription
ffmpeg -i raw.mp4 -vn -acodec pcm_s16le -ar 16000 audio.wav
Normalize audio levels
ffmpeg -i segment.mp4 -af loudnorm=I=-16:TP=-1.5:LRA=11 -c:v copy normalized.mp4
Layer 4: Programmable Composition (Remotion)
Remotion turns editing problems into composable code. Use it for things that traditional editors make painful:
When to use Remotion
Overlays: text, images, branding, lower thirds
Data visualizations: charts, stats, animated numbers
Motion graphics: transitions, explainer animations
Composable scenes: reusable templates across videos
Product demos: annotated screenshots, UI highlights
Basic Remotion composition
import { AbsoluteFill, Sequence, Video, useCurrentFrame } from "remotion";
export const VlogComposition: React.FC = () => {
const frame = useCurrentFrame();
return (
<AbsoluteFill>
{/* Main footage */}
<Sequence from={0} durationInFrames={300}>
<Video src="/segments/intro.mp4" />
</Sequence>
{/* Title overlay */}
<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>
{/* Next segment */}
<Sequence from={300} durationInFrames={450}>
<Video src="/segments/demo.mp4" />
</Sequence>
</AbsoluteFill>
);
};
Render output
npx remotion render src/index.ts VlogComposition output.mp4
See the Remotion docs for detailed patterns and API reference.
Layer 5: Generated Assets (ElevenLabs / fal.ai)
Generate only what you need. Do not generate the whole video.
Voiceover with ElevenLabs
import os
import requests
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}
}
)
with open("voiceover.mp3", "wb") as f:
f.write(resp.content)
Music and SFX with fal.ai
Use the fal-ai-media skill for:
Background music generation
Sound effects (ThinkSound model for video-to-audio)
Transition sounds
Generated visuals with fal.ai
Use for insert shots, thumbnails, or b-roll that doesn't exist:
generate(app_id: "fal-ai/nano-banana-pro", input_data: {
"prompt": "professional thumbnail for tech vlog, dark background, code on screen",
"image_size": "landscape_16_9"
})
VideoDB generative audio
If VideoDB is configured:
voiceover = coll.generate_voice(text="Narration here", voice="alloy")
music = coll.generate_music(prompt="lo-fi background for coding vlog", duration=120)
sfx = coll.generate_sound_effect(prompt="subtle whoosh transition")
Layer 6: Final Polish (Descript / CapCut)
The last layer is human. Use a traditional editor for:
Pacing: adjust cuts that feel too fast or slow
Captions: auto-generated, then manually cleaned
Color grading: basic correction and mood
Final audio mix: balance voice, music, and SFX levels
Export: platform-specific formats and quality settings
This is where taste lives. AI clears the repetitive work. You make the final calls.
Social Media Reframing
Different platforms need different aspect ratios:
Platform
Aspect Ratio
Resolution
YouTube
16:9
1920x1080
TikTok / Reels
9:16
1080x1920
Instagram Feed
1:1
1080x1080
X / Twitter
16:9 or 1:1
1280x720 or 720x720
Reframe with FFmpeg
# 16:9 to 9:16 (center crop)
ffmpeg -i input.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" vertical.mp4
# 16:9 to 1:1 (center crop)
ffmpeg -i input.mp4 -vf "crop=ih:ih,scale=1080:1080" square.mp4
Reframe with VideoDB
from videodb import ReframeMode
# Smart reframe (AI-guided subject tracking)
reframed = video.reframe(start=0, end=60, target="vertical", mode=ReframeMode.smart)
Scene Detection and Auto-Cut
FFmpeg scene detection
# Detect scene changes (threshold 0.3 = moderate sensitivity)
ffmpeg -i input.mp4 -vf "select='gt(scene,0.3)',showinfo" -vsync vfr -f null - 2>&1 | grep showinfo
Silence detection for auto-cut
# Find silent segments (useful for cutting dead air)
ffmpeg -i input.mp4 -af silencedetect=noise=-30dB:d=2 -f null - 2>&1 | grep silence
Highlight extraction
Use Claude to analyze transcript + scene timestamps:
"Given this transcript with timestamps and these scene change points,
identify the 5 most engaging 30-second clips for social media."
What Each Tool Does Best
Tool
Strength
Weakness
Claude / Codex
Organization, planning, code generation
Not the creative taste layer
FFmpeg
Deterministic cuts, batch processing, format conversion
No visual editing UI
Remotion
Programmable overlays, composable scenes, reusable templates
Learning curve for non-devs
Screen Studio
Polished screen recordings immediately
Only screen capture
ElevenLabs
Voice, narration, music, SFX
Not the center of the workflow
Descript / CapCut
Final pacing, captions, polish
Manual, not automatable
Key Principles
Edit, don't generate. This workflow is for cutting real footage, not creating from prompts.
Structure before style. Get the story right in Layer 2 before touching anything visual.
FFmpeg is the backbone. Boring but critical. Where long footage becomes manageable.
Remotion for repeatability. If you'll do it more than once, make it a Remotion component.
Generate selectively. Only use AI generation for assets that don't exist, not for everything.
Taste is the last layer. AI clears repetitive work. You make the final creative calls.
Related Skills
fal-ai-media — AI image, video, and audio generation
videodb — Server-side video processing, indexing, and streaming
content-engine — Platform-native content distributiondon't have the plugin yet? install it then click "run inline in claude" again.
formalized six-layer pipeline into explicit procedure steps with input-output contracts, added decision points for common ffmpeg and api issues, documented all external api dependencies with env var names and setup guidance, specified file locations and formats for each layer output, and added outcome signals for validation at each step.
this skill handles real video editing, not generation from prompts. takes raw footage (screen recordings, camera capture, desktop sessions) and compresses it into structured, polished output via a six-layer pipeline. each layer (capture, organization, deterministic cuts, programmable composition, generated assets, final polish) has a specific job. use this when you need to turn long recordings into short-form content, build vlogs or tutorials from raw material, add overlays and subtitles, or reframe video for different platforms.
source material
external connections
ANTHROPIC_API_KEY. no special scopes needed.brew install ffmpeg (macOS), apt-get install ffmpeg (Linux), or download from ffmpeg.org (Windows). no auth required.npm install remotion. requires Node.js 16+. no auth required for local rendering.ELEVENLABS_API_KEY. get from https://elevenlabs.io/app/api-keys. no special scopes.FAL_API_KEY. get from https://fal.ai. no special scopes.VIDEODB_API_KEY. requires VideoDB account setup.transcript or metadata
edit decision list (optional input from Layer 2 output)
start_time,end_time,segment_label. example:00:00:30,00:02:15,intro
00:05:00,00:08:45,demo
layer 1: capture and organization
layer 2: structure and planning (Claude/Codex)
layer 3: deterministic cuts (FFmpeg)
extract audio for transcription (if not done in layer 1):
ffmpeg -i raw.mp4 -vn -acodec pcm_s16le -ar 16000 audio.wav
output: audio.wav
detect silent sections or scene changes to identify dead air:
ffmpeg -i input.mp4 -af silencedetect=noise=-30dB:d=2 -f null - 2>&1 | grep silence
output: silence timestamps (note these for manual review or feed back to Layer 2).
batch cut segments from edit decision list. create cuts.txt with format start,end,label (one per line). run:
#!/bin/bash
mkdir -p segments
while IFS=, read -r start end label; do
ffmpeg -i raw.mp4 -ss "$start" -to "$end" -c copy "segments/${label}.mp4"
done < cuts.txt
input: raw.mp4, cuts.txt (from Layer 2) output: individual segment files in segments/ directory (e.g., segments/intro.mp4, segments/demo.mp4)
(optional) normalize audio levels on each segment to avoid jarring volume jumps:
for f in segments/*.mp4; do
ffmpeg -i "$f" -af loudnorm=I=-16:TP=-1.5:LRA=11 -c:v copy "normalized_${f##*/}"
done
input: segment files output: normalized segment files
concatenate segments in final order. create concat.txt:
file 'segments/intro.mp4'
file 'segments/demo.mp4'
file 'segments/conclusion.mp4'
then run:
ffmpeg -f concat -safe 0 -i concat.txt -c copy assembled.mp4
input: concat.txt, segment files output: assembled.mp4 (all segments joined, no re-encoding)
(optional) create proxy file for faster real-time editing in Layer 6:
ffmpeg -i assembled.mp4 -vf "scale=960:-2" -c:v libx264 -preset ultrafast -crf 28 proxy.mp4
input: assembled.mp4 output: proxy.mp4 (smaller, faster scrubbing)
layer 4: programmable composition (Remotion)
design Remotion composition if overlays, graphics, or motion are needed. write React component that imports segments and layers text, images, transitions. example scaffold:
import { AbsoluteFill, Sequence, Video } from "remotion";
export const VlogComposition = () => {
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)"}}>
Title Here
</h1>
</AbsoluteFill>
</Sequence>
</AbsoluteFill>
);
};
input: assembled.mp4 or individual segments, design specification (text, colors, timing) output: Remotion React component
render Remotion composition to video:
npx remotion render src/index.ts VlogComposition output.mp4
input: Remotion component, segment files referenced in component
output: output.mp4 (final video with overlays/graphics baked in)
note: rendering can take 30 minutes to 2+ hours depending on resolution, effects, and machine. use --concurrency 4 flag to parallelize if available.
layer 5: generated assets (ElevenLabs/fal.ai/VideoDB)
generate voiceover if narration is needed and not present in original footage:
import os
import requests
voice_id = "your_voice_id"
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}
}
)
with open("voiceover.mp3", "wb") as f:
f.write(resp.content)
input: narration text (from Layer 2 planning or manual), ELEVENLABS_API_KEY output: voiceover.mp3
(optional) generate background music or sound effects with fal.ai:
import fal
fal.api_key = os.environ["FAL_API_KEY"]
result = fal.subscribe(
"fal-ai/musgen",
input={"prompt": "upbeat lo-fi background for tech vlog", "duration": 120}
)
music_url = result["audio_url"]
input: music/SFX description, FAL_API_KEY output: audio file URL (download and save locally)
(optional, if VideoDB configured) generate voiceover, music, or sound effects via VideoDB:
from videodb import Collection
coll = Collection(api_key=os.environ["VIDEODB_API_KEY"])
voiceover = coll.generate_voice(text="Narration here", voice="alloy")
music = coll.generate_music(prompt="lo-fi background for coding vlog", duration=120)
sfx = coll.generate_sound_effect(prompt="subtle whoosh transition")
input: narration/music/SFX descriptions, VIDEODB_API_KEY output: audio assets
layer 6: final polish (Descript/CapCut)
import output.mp4 (from Layer 4) and voiceover/music (from Layer 5) into Descript or CapCut. manually adjust:
input: output.mp4, voiceover.mp3, music files output: final_edited.mp4 (color-graded, captioned, audio-balanced)
(optional) reframe for different social platforms if multi-platform distribution needed:
# 16:9 to 9:16 (vertical for TikTok/Reels)
ffmpeg -i final_edited.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" vertical.mp4
# 16:9 to 1:1 (square for Instagram Feed)
ffmpeg -i final_edited.mp4 -vf "crop=ih:ih,scale=1080:1080" square.mp4
input: final_edited.mp4 output: vertical.mp4, square.mp4, etc. (one per target platform)
export final file(s) at platform-specific quality settings. YouTube: 1080p30, bitrate 5-8 Mbps. TikTok/Reels: 1080p, bitrate 3-5 Mbps. export via Descript/CapCut UI or FFmpeg.
ffmpeg -i final_edited.mp4 -c:v libx264 -preset slow -crf 22 -c:a aac -b:a 128k output_youtube.mp4
input: final_edited.mp4 output: platform-specific video files
if user has raw footage but no transcript: use Claude to extract and transcribe audio (Layer 1 step 2). if no API budget, skip to manual review of raw material and manually mark timestamps in Layer 2.
if user has transcript but timestamps are vague: have Claude re-analyze and propose exact frame-accurate cuts. if Claude response is too broad, feed back the video duration and ask for sub-30-second segments only.
if FFmpeg cuts fail or are too slow (e.g., on files >2 GB or with variable frame rates): check codec compatibility. if original is HEVC or uses variable frame rate, re-encode to H.264 at constant frame rate first: ffmpeg -i raw.mp4 -c:v libx264 -preset ultrafast -c:a aac reencoded.mp4. trade-off: slower upfront, faster downstream cuts.
if silence detection finds no segments (output is empty): threshold is too strict. lower -30dB to -25dB or -20dB. re-run: ffmpeg -i input.mp4 -af silencedetect=noise=-25dB:d=2 -f null - 2>&1 | grep silence.
if segment audio levels are inconsistent after normalization: layer 2 planning may have missed that some segments were recorded at different mic levels. manually adjust per-segment gain in Descript/CapCut (Layer 6), not FFmpeg.
if Remotion rendering is too slow (>30 min for 10 min video): reduce resolution in component or use --concurrency flag to parallelize. if still slow, skip Remotion and add overlays manually in Descript/CapCut instead.
if ElevenLabs API quota is hit: fall back to manually recorded voiceover or use fal.ai voiceover model if available. check usage at https://elevenlabs.io/app/api-usage.
if fal.ai music generation produces output that doesn't fit the mood: re-prompt with more specific descriptors (e.g., "dark, minor key, 100 BPM" instead of "background music"). or use generic royalty-free music library as fallback.
if final output has sync issues between voiceover and video (audio drifts): confirm all audio files use same sample rate (44.1 kHz or 48 kHz). resample if needed: ffmpeg -i audio.mp3 -ar 48000 audio_resampled.wav.
if user wants multi-language versions: generate voiceover in each language via ElevenLabs, then repeat Layer 6 (audio mix + export) for each language variant.
if reframing with FFmpeg crops important content: use VideoDB smart reframe instead (Layer 3 step 17). it uses AI to track subjects and avoid cutting key elements.
layer 1: raw video file (mp4/mov/mkv) in segments/ or working directory.
layer 2: CSV file named edit_decision_list.csv with columns: start_time,end_time,segment_label. human-verified, timestamps in HH:MM:SS format.
layer 3: individual segment files in segments/ directory (e.g., segments/intro.mp4, segments/demo.mp4). concatenated output file assembled.mp4 in root. optional proxy file proxy.mp4 for real-time editing.
layer 4: Remotion React component in src/index.ts (or equivalent). rendered output video output.mp4 with overlays and graphics baked in.
layer 5: audio files voiceover.mp3, music.mp3, sfx_*.mp3 saved locally in working directory.
layer 6: final edited video final_edited.mp4 with color grading, captions, and audio mix applied. optional platform-specific variants: vertical.mp4 (9:16), square.mp4 (1:1).
file locations: all intermediate and final files stored in single working directory or organized as specified. log timestamps and tool versions for reproducibility.