Before you start
The steps use the scaffold thatdecktalk init writes. The scaffold has two clip sections, 5 and 7. They are the
BEFORE and AFTER clips of the edit, and the scaffold ships no file for either. Both set optional = true, so each
plays a titled slate until its file is in place.
The scaffold’s decktalk.toml also has a section 0 in comments, which opens the video on a clip.
Put a clip in a clip section
These steps put a test clip in section 5 of a new scaffold namedclip-lesson.
Create a scaffold
Go into the project
Find the clip section in decktalk.toml
clipnames your video file, relative to the project.wordsnames a words file for the captions. Caption the speech in a clip explains it.slate_secondssets how long the slate plays while the file is missing.optional = truelets--strictplay the slate. Build with —strict explains it.
Build the video
[cut ] line. Neither clip file exists yet, so sections 5 and 7 play titled slates.Put the clip file in place
media/edit-before.mov. If you have no video, make a 4 s test clip. This command needs
ffmpeg on your PATH.- A clip that is not 1920 by 1080 is scaled to fit and padded with black.
- A clip with no audio track plays silent, and
assembleprints a warning.
Cut the clip into the video
assemble.edit-before.mov (own audio). The test clip has no words file, so its sound has no
captions. Then run decktalk verify to check the video.Build with —strict
--strict on build or assemble turns a missing clip into an error. A clip section with optional = true
still plays its slate.
Before the test clip was in place, decktalk assemble --strict exited 0 and printed this warning for each clip
section.
optional = true fails under --strict when its file is missing. The command exits 1.
optional line. --strict then catches the file if it goes missing
later.
Add a clip section of your own
A section’s number sets its place in the video. To add a clip between two page sections, give it the next number and renumber every section after it.-
In
decktalk.toml, add 1 to thenumberof every section after the new clip, from the last one up. -
Add the clip section’s table in its place.
decktalk.toml
-
In
script.md, renumber the same headings, and add a heading for the clip.The voice speaks nothing in a clip section, so the body can be a stage direction.script.md -
In
cues.json, rename each later section key, from the last one up. The cue ids stay the same. They start with a scene number, and the scenes of the page do not change. -
Run
decktalk build.
narrate finds the take by its hash and copies it to the new file name.
How the narration splits
build/audio/narration.mp3 holds the spoken sections back to back, with no gap for a clip. assemble splits the
narration at each clip between page sections.
The narration pauses for each clip, and resumes with the next page section.
- Each part of the narration starts where its first page section starts in the video.
- A slate splits the narration the same way a clip does.
- No caption covers a clip section, unless the section sets
words. Caption the speech in a clip explains it. - A clip section gets its own chapter, unless the section before it has the same title.
clip-lesson with the test clip, section 6 starts at 196.70 s in timeline.json and at 200.72 s in
the final mp4. The 4 s clip of section 5 sits between them, with 0.02 s of frame rounding.
Build artifacts explains the two time bases.
decktalk assemble,
then decktalk verify.
The clip’s sound
The clip’s own audio joins the mix at its section start.- The audio is trimmed to the clip’s picture.
- The audio fades in and out over 20 ms, so a cut never clicks.
- The narration is silent while the clip plays.
- The underscore ducks under the whole clip. Sound explains ducking.
verify checks the start of a clip section, but a clip section has no cut row. The click search of the a/v check
never reaches into a clip’s audio.
Caption the speech in a clip
The captions come from the narration’s word times, so a clip’s own speech has no captions by default. Setwords on the clip section to caption it.
-
Write a words file for the clip. It is a JSON list with one object per word, in seconds after the clip starts.
Give each word its own punctuation and case. The captions break at the sentence ends it marks.media/interview.words.json
-
Name the file in the clip section.
decktalk.toml
-
Run
decktalk assemble.
- A word that starts after the clip’s picture ends has no caption.
- A slate or a clip with no audio track has no captions.
- If the words file is missing,
assembleprints a warning and the clip has no captions.
NN-slug.words.json file from build/audio has this format. decktalk clip writes the words file of a clip that
it cuts from a build. Cut a clip from a build shows how.
Cut a clip from a build
decktalk clip cuts a span of a built page section into a clip and its words file. Use it to play part of the video
again in a clip section, such as the Open’s count inside a later scene.
These steps use a scaffold after decktalk build --silent. After a voiced build, the clip carries the real voice.
Find the span
Cut the clip
- The picture comes from
build/out/01-section.mp4.--fromand--toround to whole frames. - The sound is section 1’s mp3 over the same span.
--hold 0.5adds 0.48 s of the last frame in silence. media/count.words.jsonlists the 10 words from “Watch” to “three.”, in seconds after the clip starts.- A span that cuts a word in two leaves that word out of the words file, and
clipprints a warning.
Play the clip in a clip section
decktalk assemble, and check that the section reads count.mp4 (own audio).--gainchanges the clip’s level in dB, so a clip cut from another build can match the voice around it.- The clip keeps the section’s full picture. Fill the edit’s two clips places a clip inside a player by hand.
decktalk cliplists every option.
Keep one chapter across several sections
Each section starts a chapter. Consecutive sections with the sametitle share one chapter instead. The
scaffold’s sections 4 to 8 all have title = "The edit", so the video shows one chapter that spans the three
pages and both clips.
Fill the edit’s two clips
The scaffold’s edit steps out of the lesson and plays the Open twice inside a video player. Section 5 plays the Open as first built. Section 7 plays it again with a fourth count. The scaffold ships no clip files, because a clip carries a real voice. Each clip is the last frame of the page before it, with the Open playing in the player’s video area. That area is 1152 by 648 at 384, 72. The pages around the clips show stills indeck/edit/. The scaffold’s stills come from the
demo video and match a fresh scaffold. Cut new ones after you change the Open or the end of the lesson.
These steps need ffmpeg and python3 on your PATH. Run them in the project after a voiced build. The commands
use bash variables.
Build the AFTER copy
Find each clip's times, and write its words file
clip_words.py. It picks the span from “Watch” to the last count word, prints its start and
end in seconds, and writes the words inside it, shifted to the clip’s start.Cut the stills
-update 1 keeps the last frame of the span.Record the edit's pages again
Cut the clips
Play the clips
optional = true from sections 5 and 7 in decktalk.toml. Set slate_seconds to each clip’s length, so
a missing file keeps the timing. Then cut and check the video.(own audio).deck/index.html. They are the count
times in ED_BEFORE_TIMES and ED_AFTER_TIMES, the build log in ED_LOG, and the verify totals in ED_VERIFY.
They hold the demo video’s values. Set them from your builds, then record the edit’s pages again.
Choose where the clip plays
A clip section can sit anywhere in the order of sections.cues.jsonnames the cues of a section by its section number, such as"8"for the edit’s last page.- A section’s
scenenames the scene in the page. Section 8 of the scaffold plays scene 7, so its cue ids start with7.1. - If you add or remove a clip section, renumber the sections in
decktalk.toml,script.md, andcues.json. The pages stay the same. hold_secondson a page section pauses the narration too, the same way a clip does.
Open the video on a clip
These steps turn on section 0 of a scaffold, such asmy-lesson from the quickstart. Section 0
needs no renumbering.
Uncomment section 0 in decktalk.toml
# from the five lines of section 0.Dip the cut out of the clip to black
[transition] table, change dips = [] to dips = [[0, 1]].dips lists each cut that dips to black, as a [from, to] pair of section numbers. The scaffold sets
dips = [], so every cut is straight. If you delete the key, every cut dips.Add a heading to script.md
## 0. On camera above section 1. A clip section needs no heading, but the heading keeps the script in
the order of the video.Put the clip file in place
media/open.mp4.If the file is not ready, skip this step. A missing clip plays a titled slate for slate_seconds, with the
section title and the path where the file belongs.Build the video
optional key, so its warning ends with (drop your clip at that path). --strict fails
on this section until the file exists.Next
- Look up every section key: decktalk.toml
- Rebuild after you replace a clip: Rebuild one section
- Understand the mix: Sound