<!--
CLAUDE.md for an FFmpeg editing folder
From the AgentCut prompt library: https://agentcut.dev/prompts/claude-md-ffmpeg/
Written by AgentCut. Free to copy, edit and use in your own projects.
Sources and credit: n0an/ffmpeg-skill (MIT) (https://github.com/n0an/ffmpeg-skill): Idea of giving the agent vetted recipes instead of recalled commands; Claude Code docs, How Claude remembers your project (https://code.claude.com/docs/en/memory): What belongs in CLAUDE.md
Save as: CLAUDE.md
-->

# Project: FFmpeg editing folder

I edit videos here with FFmpeg through you. Treat my footage like a client's footage.

## Folders
- `raw/` original files. READ ONLY. Never write, move, rename or delete anything in here.
- `work/` temporary files. You can create and delete files here.
- `out/` finished exports only.
- `logs/` one text file per job with the exact commands you ran.

## Rules
- Run `ffprobe` on every input before you build a command. Report resolution, fps, codec, duration and audio channels.
- Keep the source fps and resolution unless I ask for something else.
- Prefer stream copy (`-c copy`) for simple trims on keyframes. Re-encode when cuts must be frame accurate and say so.
- Default delivery encode: H.264, `-crf 18`, `-preset slow`, `-pix_fmt yuv420p`, AAC 320k, `-movflags +faststart`.
- Never overwrite a file. If the output exists, add `_v2`, `_v3`.
- Show me the full command before any job that takes more than a minute, then run it after I say go.
- Write every command you ran into `logs/<job>.txt` so I can rerun it.

## Checks after every export
- `ffprobe` the output: duration, fps and resolution match what we planned.
- Audio is present and not silent (`volumedetect` mean volume above -50 dB).
- Tell me 3 timestamps worth checking by eye, for example the first cut, the busiest caption and the last second.
