- A
[[section]]withclip = "media/intro.mp4"plays a video file you supply, with its own audio, as one section of the film. The voice says nothing there, because the clip carries its own sound. decktalk clipwrites a video file cut from a section of the finished film, with its own audio and its own words file, so a piece of the film can be played again or handed to somebody else.
A section that plays your own video
A clip section names its file and nothing else about the picture. It has nopage and no scene,
cues.json says nothing about it, and script.md needs no heading for it.
decktalk.toml
A clip that is not the project’s frame size is scaled to fit and padded with black, so a portrait
phone video plays in a letterbox rather than distorted. A clip with no audio track plays silent, and
assemble says so on the stream.
While the file is not there
A clip section whose file is missing plays a titled slate forslate_seconds, so a project can carry
the section before the video exists and everyone can watch the film with a hole labelled rather than
a hole. The slate carries the section number, the line Your clip goes here, and the path to drop the
file at. It is kept under build/stills/ by everything it shows, so a renamed chapter or a new colour
draws it again. It is drawn on the colour
[video] slate_color names, and [mix] slate points at an image of
your own to use in its place.
Nothing about a slate is silent about itself: decktalk status reports the missing file as an error,
FILE_MISSING, naming the section and the path, and a build writes
the film with the slate in it and then stops before verify. A section marked optional is the one
exception, because it has said the slate is allowed, so its film is measured and the build exits 0.
Putting one between two page sections
A section’s number is its place in the film, so adding a clip in the middle renumbers what follows it.- In
decktalk.toml, add 1 to thenumberof every section after the new clip, from the last one upward, then add the clip section’s own table. - In
script.md, renumber the same headings. The clip section needs no heading of its own, and a heading there is never voiced, because the voice reads every section that does not play a clip. - In
cues.json, rename each later section key, from the last one upward. The cue ids do not move, because they name slides, and the slides of the page are untouched by a renumbering of the film. - Run
decktalk build.
How a clip splits the narration
The joined narration holds the spoken sections back to back with no gap, and the film does not. A clip between two page sections pauses the narration, and the next page section resumes it on its own first frame. So the track plays in runs of consecutive page sections, and each run starts where its first section starts in the film.A nine-section film: the narration pauses for each clip and resumes with the next page section.
- A page section’s
hold_secondssplits the narration exactly as a clip does, because the hold is picture with no speech under it. - The clip’s own audio joins the mix at its section start, matched to the narration’s loudness, trimmed to its picture and faded over twenty milliseconds at each edge, so a cut into it never clicks.
- The music ducks under the whole of a clip, because a clip’s dialogue is its own. Sound is the whole mix.
- A clip section gets its own chapter marker, unless the section before it carries the same
chapter, in which case the two share one. - The narration does not depend on how long a clip runs. After you replace a clip file, run
decktalk assembleand thendecktalk verify, and nothing is voiced or recorded.
Play a film DeckTalk built
A film DeckTalk built writes its words beside itself, asbuild/final/<name>.words.json: every word
the film says, as its captions show it, with its voice and its turn. Copy the film and that file into
the project under one name, such as media/larkbill.mp4 and media/larkbill.words.json, and a clip
section that plays the film has its speech captioned on this film’s clock.
Caption the speech inside a clip
The captions are built from the narration’s word times, so a clip’s own speech is captioned from the words file beside the clip,<clip>.words.json, and by nothing when there is none. A words file
is one object with a words list, and each word carries its span in seconds after the clip starts.
media/intro.words.json
media/intro.words.json beside media/intro.mp4, and
run decktalk assemble. decktalk clip writes this file beside every clip it cuts, and every build
beside its film.
- A word that starts after the clip’s picture ends is left out.
- A slate has no captions, and neither has a clip with no audio track.
- A clip with no words file beside it plays with no captions.
- The transcript page carries the same words as one paragraph, so a reader is not left with a silent gap where the clip is.
<digest>.words.json in takes/ has this shape, and so does the file
decktalk clip writes beside every clip it cuts. A word may also carry voice and turn, which
decktalk clip and a build’s <name>.words.json write: a caption of it carries them as
data-voice and data-turn in the captioned copy, so a page sets it by its voice, and no caption
file names them.
Cut a clip out of the film
decktalk clip cuts a span of one built page or render section into its own file. The picture is a run of whole
frames of build/sections/NN.mp4 and the sound is the finished film’s over the same span, so a clip
is a piece of the film rather than a second render of it: it carries the voice, the effects and the
score, as the film mixed them.
The clock is the section’s own. Zero is where the section starts, and the lead of silence before its
first word is part of the span like anything else.
1
Find the span
decktalk words is the one command that maps script text to seconds, and it is the clock
--start and --end are written against.2
Cut it
A
clip without --end is refused as a USAGE error, which exits 2,
before anything is read.The span is rounded outward to whole frames, because a clip that began part way through a frame
would play its first frame twice. At the default twenty-five frames a second, that is a fortieth
of a second either way.Two files are written: the clip, and <name>.words.json beside it, holding every word wholly
inside the span in seconds after the clip starts. A word the span cuts in two is left out and
said aloud on the stream, so move --end into the silence beside the word to keep it.The span from 0.48s to 1.68s cuts the word 'DeckTalk.' in two, so the words file leaves it out.3
Play it in a clip section
A clip section names the clip, and its captions come from the words file the command wrote
beside it.Then run
decktalk.toml
decktalk assemble and decktalk verify.seconds is the whole clip, the span and the hold together, and hold_seconds is the hold as whole
frames.
estimated is true when the section carries placeholder narration, which is the one fact that
decides whether the word times in the file beside the clip can be trusted.
What it refuses, and why
clip reads two things the pipeline wrote, so it refuses rather than guessing when either is not
there. Each refusal names the command that makes what is missing.
Related
- Look up every section key: decktalk.toml
- Read the mix the clip’s sound joins: Sound
- Rebuild after you replace a clip: Rebuild one section
- Read the command’s own flags: CLI