
Mission 4 of 6
Edit a 12-minute video with ffmpeg and Python, without a timeline.
Every screen tutorial needs the same dozen jobs, so write each one as a command once and reuse it. The first video takes an evening to set up, and the second takes an hour.
What you'll do
Cut on your voice-only track, then replace bad lines with pickups without touching a frame of the picture.
Drive chapters, lower thirds, callouts and crop zooms from small text files, rendered from the 4K source.
Add captions, hit YouTube's loudness target and export a 1080p file that YouTube won't re-encode badly.
- A pipeline you can rerun on every video
- Chapters checked against YouTube's rules
- The raw/ take and the folder structure from record screen and voice like a studio
- FFmpeg (ffmpeg and ffprobe in the terminal) and Python 3
- auto-editor, from cut silences automatically. That mission covers install, margins and the Resolve or Premiere handoff; this one just uses it
- Playwright for Python for the HTML renders:
pip install playwrightthenplaywright install chromium
Your progress0/6
Cut the silences using the voice track
The 40-minute take becomes a 14-minute cut in one command, because the decision of what's silence is made on your voice alone, not on the keyboard and fans.
This is the first job in the pipeline: it strips the dead air out of your raw take. The key is deciding what counts as silence.
Your raw file has two audio streams: stream 0 is the mix, stream 1 is the mic. If you cut on the mix, every keystroke and system sound counts as 'not silence' and the cut is timid.
Point auto-editor at the mic stream and it cuts on what you said.
Run auto-editor from your video folder. It reads the raw take, listens to the mic stream only, and writes the cut to the edit folder.
Terminal (Windows: .\auto-editor from its folder, same arguments)cd videos/01-your-slug auto-editor raw/2026-10-19_01-slug_take1.mkv --edit audio:stream=1 --margin 0.25sec --output edit/cut.mp4
What the two options do
--margin 0.25sec keeps a quarter second either side of every spoken part, which stops words being clipped and leaves the small breath that makes a voice sound human.
For a build-along, go to 0.4sec: the typing and the result appearing need a beat. --edit audio:stream=1 is the voice-only selection; the default threshold of 4 percent works for a mic recorded at the levels from the last mission.
Check the cut
Check the duration of the cut. This prints its length in seconds.
Terminalffprobe -v error -show_entries format=duration -of default=nw=1 edit/cut.mp4Then watch the cut at 1.5x, all the way through, before doing anything else.
You're looking for two problems:
- Jump cuts where the screen snaps mid-animation. Fix by raising the margin.
- Long installs or renders that were silent but need to be seen. Fix by leaving a sentence there in the next take, or by inserting a speed ramp: in the next step's style,
setpts=0.1*PTSon that range.
Note the timestamps of the lines on your pickups list as they appear in the cut; those are the numbers the next step needs.
TipIf a build has a ten-minute install you let run silently, cut it out entirely with--cut-out 600sec,1200secadded to the command, and the silence pass does the rest. Say 'that took ten minutes' in the script.WarningThe output keeps both audio streams. The pipeline uses stream 1 (the voice) from here on, and exports only the voice at the end. Desktop audio from the build (a notification, a video playing) is gone unless you mix it back in deliberately, which is usually what you want.
If it breaksauto-editor says the stream doesn't exist + 2 more
auto-editor says the stream doesn't exist
--edit audio:stream=0; it'll cut on the mix. Fix the OBS setting before the next take.The cut is too aggressive and my words are clipped
--margin to 0.4sec. If still clipped, your mic level was low and the 4 percent threshold is catching quiet word endings: add --edit audio:stream=1,threshold=2%.Windows can't find auto-editor from the video folder
$HOME\auto-editor. Call it by full path: & $HOME\auto-editor\auto-editor.exe raw\... --edit ..., or add that folder to your PATH once.