Docs
Cutting your own recording
How to cut a video you recorded yourself by deleting its words and pauses in a text file.
What does cut do?
explainroo cut edits a video that you recorded yourself, like a talk to the camera or a screen recording with your voice. You cut it by its words, in a text file. It needs no project. The speech model runs on your computer, so nothing leaves it.
How do I make the cut list?
npx --yes explainroo cut talk.mp4
The speech model listens to the video and writes talk.cut.md next to it. Each line is one sentence, and each word has its time in seconds:
[pause 1.21s @0.00] Hi,@1.21 I@1.73 am@1.80 going@1.94 to@2.10 show@2.22 you@2.46 how@2.66 it@2.88 works.@3.08
[pause 1.29s @4.14] First@5.43 you@5.60 open@5.82 the@6.10 settings.@6.26
[sound 0.82s @6.52] I'm@7.34 sorry@7.52 first@7.84 you@8.24 open@8.54 the@8.84 main@8.96 page.@9.16
A [pause] is a quiet stretch of 0.6 seconds or more. A [sound] is sound without words between two words, like “um” or a cough. The speech model leaves those out of its words, so cut shows them this way.
The speech model often ends a word a little early, before its last sound, like the “s” of “settings”. So cut listens to the sound after each word itself, and the word keeps up to 0.4 seconds of what follows it without a gap. A [sound] that still starts right after a word says so, like [sound 0.30s @6.70 may hold the end of "settings"]. Listen to it before you delete it, because it may be the end of that word.
--min-gap 0.3 also shows pauses from 0.3 seconds, and shorter, quieter sounds, like a short “uh” between two words.
For a recording in another language, add --language es. cut doesn’t write over a cut list that is already there, because it may hold your edits. --force writes it again from the recording. When you edited the list, --force first moves it to talk.cut.old.md and says so.
How do I edit the cut list?
- Delete a word to cut it out. Delete a whole line to cut the sentence.
- Delete a
[pause]to shorten it to 0.25 seconds. To keep more of it, change its seconds, like[pause 0.5s @4.14]. - Delete a
[sound]to cut it out. To keep part of it, change its seconds.[sound 0.25s @6.52]keeps the first 0.25 seconds. - To fix where a word starts, change its time. A word may move between the end of the word before it and its own end. After a pause or a sound, it may only move later.
- Leave everything else as it is. The cut only takes things out, and it keeps the order of the recording.
The speech model sometimes puts the start of a word too early, inside the word before it. When you deleted that word, a bit of it stays in the cut. Moving the kept word’s time later puts the join where the word really starts, like first@8.08 in place of first@7.84. A time outside the allowed range stops cut with the range, like "first@8.30" can move between 7.84 and 8.24. So does a word without a time.
How do I apply the cut?
npx --yes explainroo cut talk.mp4 --apply
This writes talk.cut.mp4, or the file that --out names. At each join, the sound goes to the quietest moment close to the word and fades over 30 ms, so the join doesn’t click. After a deleted word, cut looks for that moment only between the end of the deleted word and the start of the kept one, so it never reaches into the word you cut. The picture cuts at the frame closest to the join.
cut lists every join, with where it is in the cut and where the recording stops and starts again:
4.53 s in the cut: stops at 5.32 s (planned 5.43), starts at 8.08 s (planned 8.08), before first@8.08 on line 17
The sound is brought toward -14 LUFS, with its peak at -1 dBTP or lower, like a video that explainroo renders. cut says the loudness it reached.
Then the speech model listens to the cut. It names a kept word that it didn’t hear, because a join may cut into it. When you deleted a word or a [sound] right next to it, cut names that as the likely cause. It also names a word it heard that the list cut out, which may be left over from that word. Each time is given in the cut and in the recording, so you can find it in the cut list. Listen at those times.
To try a cut list first, add --dry-run. It reports the joins, the new length and the words it didn’t hear, and writes no file:
npx --yes explainroo cut talk.mp4 --apply --dry-run
How do I check the cut?
Check it like any other video, and look at its picture:
npx --yes explainroo verify talk.cut.mp4
npx --yes explainroo sheet talk.cut.mp4
npx --yes explainroo still talk.cut.mp4 4.5
verify checks the sound and finds black or frozen stretches, but it can’t tell whether the picture is the right one. sheet writes talk.cut.sheet.jpg, with a frame every few seconds and its time, so open it and look. still writes the frame at 4.5 seconds, to see a join up close. Checking any video says more about these commands on a video file.
For a video that isn’t an explainroo project, small text is only a hint. Text in your recording, like a clock or a terminal, may be fine where it is.