Skip to content

Edit Videos with Claude Code

Category Content Creation
Status โœ… Completed
Repo nextwork-edit-videos-with-claude-code
Original NextWork guide nextwork.ai

Learning project

Practice work following a NextWork guide, separate from my production projects.

๐Ÿ“š NextWork learning project. This is a practice project I built while working through NextWork's Edit Videos with Claude Code guide. It is part of my Learning portfolio and is fully separate from my production projects.

Category: Learning โ€บ Content Creation
Status: โœ… Completed

Overview

A style you can measure is a style you can reuse. The profile turns five references into numbers and each number into an editing rule; my taste rules sit on top as a small JSON file the edit script must read, and a comparison report says which rules actually changed the result and which did not (two of five changed nothing visible in this clip, and the report says so).

Summary

Claude Code built the whole edit pipeline and ran it on a real NASA interview clip. It measured a style profile from five reference interviews (pace, pauses, loudness, cut rate, frame rate), edited the raw 150-second clip into a 1080x1920 vertical short with dead air and the interviewer's question removed, word-timed captions and loudness set to the profile's -24.3 LUFS target, then applied a taste rule file of my own judgement and rendered a second version with a measured comparison. The secret mission worked: a GitHub Actions workflow in a private repo rendered the short in the cloud and I downloaded it.

The checks behind this are in docs/verification.txt.

Skills & tools

Claude Code (headless), ffmpeg/ffprobe, Python, Loudness (EBU R128), Word-timed captions, GitHub Actions

What I built

  • tools/profile.py: measures the five reference videos and writes profile/creator-profile.json and profile/PROFILE.md (what each number means for the edit, and the outliers).
  • tools/edit.py: cuts on word boundaries, shortens pauses, burns in captions, crops to vertical and normalises loudness; writes render.mp4, edl.json and report.md per edit. tools/compare.py writes edits/compare.md.
  • taste/rules.json: my five taste rules (open on the answer, a floor on sentence pauses, at most four caption words, a coloured key word, end on a full stop). edits/meir-short-v1 is the edit before the rules; edits/meir-short is after.
  • .github/workflows/render.yml, CLOUD-RENDER.md, docs/cloud-render-run.txt and edits/meir-short/cloud-render.mp4: the free cloud render and the file it produced.
  • raw/, refs/, words/, CREDITS.md: NASA public-domain footage, its speech-to-text word timings, and the credits. prompts/ and docs/session-log.md hold my prompts and a readable log of each session.

How to run

python3 tools/profile.py
python3 tools/edit.py meir-short   # writes edits/meir-short/render.mp4
# cloud: gh workflow run render && gh run watch && gh run download --name render

Verification

I ran the verification command on 2026-12-03. The full output is in docs/verification.txt.

rm -rf /tmp/evv && mkdir /tmp/evv && cp -r raw words taste profile tools /tmp/evv/ && (cd /tmp/evv && python3 tools/edit.py meir-short >/dev/null && ffprobe -v error -show_entries format=duration:stream=width,height -of csv=p=0 edits/meir-short/render.mp4 | tr '\n' ' ' | grep -q '1080,1920' && python3 -c "import subprocess;d=float(subprocess.run(['ffprobe','-v','error','-show_entries','format=duration','-of','csv=p=0','edits/meir-short/render.mp4'],capture_output=True,text=True).stdout);assert abs(d-34.8)<0.3,d") && echo EDIT OK

Notes

Claude Code's first render had captions too fast to read and it fixed that itself. Two of my five taste rules changed nothing visible in this clip because the profile already satisfied them; the report says so. The picture is soft because a 540p source is cropped to vertical and upscaled. The cloud render matches the local one in size, length and loudness but not byte for byte.


Original project: https://nextwork.ai/projects/500af6ec-a904-4057-9002-1b1351d973de ยท Part of my NextWork Learning portfolio (hub).

Verification output

From docs/verification.txt:

$ rm -rf /tmp/evv && mkdir /tmp/evv && cp -r raw words taste profile tools /tmp/evv/ && (cd /tmp/evv && python3 tools/edit.py meir-short >/dev/null && ffprobe -v error -show_entries format=duration:stream=width,height -of csv=p=0 edits/meir-short/render.mp4 | tr '\n' ' ' | grep -q '1080,1920' && python3 -c "import subprocess;d=float(subprocess.run(['ffprobe','-v','error','-show_entries','format=duration','-of','csv=p=0','edits/meir-short/render.mp4'],capture_output=True,text=True).stdout);assert abs(d-34.8)<0.3,d") && echo EDIT OK

EDIT OK

[exit code 0]