Montage with terminal-clip
Browser clips and terminal-clip clips cut together in an ordinary video editor, because both tools draw the same window, captions and sound.
terminal-clip renders the terminal clips, browser-clip the browser clips, and a video editor assembles them with music, voice and transitions.
Make them match#
- Set the same
platformin both scripts (generic,windows,macosorlinux): it gives terminal-clip's window frame, backdrop and pointer to the browser window. - Use the same
video.format,video.fpsandvideo.background. - For a browser window the size of terminal-clip's, set the viewport and padding of the table below.
- Captions, title cards, key badges and the speed badge come from the same code with the same
defaults. Keep
video.captionsthe same in both scripts, or leave captions to the editor. - Both MP4s carry the same keyboard sound at the same level.
Same window size#
With windows of the same size and place, a cut looks like one window changing its content. For terminal-clip's default grid, these settings draw its window to within a pixel, in a browser frame with the address bar and no tabs (the default viewport, 1280×800, draws a window 1468×968):
video.format | platform | terminal-clip window (x, y, w, h) | browser.viewport | video.padding |
|---|---|---|---|---|
wide | generic | 177, 69, 1566, 942 | 1280x726 | 69 |
wide | windows | 196, 74, 1528, 933 | 1280x738 | 73 |
wide | macos | 148, 65, 1624, 950 | 1280x705 | 65 |
wide | linux | 193, 81, 1534, 918 | 1280x722 | 81 |
short | generic | 122, 253, 836, 1202 | 720x991 | 57 |
short | windows | 124, 226, 832, 1256 | 720x1043 | 54 |
short | macos | 104, 217, 872, 1274 | 720x1008 | 39 |
short | linux | 119, 232, 842, 1244 | 720x1020 | 54 |
portrait | generic | 87, 104, 906, 1062 | 720x800 | 44 |
portrait | windows | 106, 108, 868, 1053 | 720x829 | 54 |
portrait | macos | 80, 98, 920, 1074 | 720x797 | 37 |
portrait | linux | 103, 118, 874, 1034 | 720x808 | 60 |
Render for the editor#
- Render H.264, the default;
--deterministicwrites VP9, which some editors do not open. - Leave
video.fadeInandvideo.fadeOutat 0 when the editor does the transitions. - Both automatic directors open and end on the whole window, so every clip starts and ends on the
same picture;
video.leadandvideo.holdleave handles for transitions. render --range a..brenders part of a clip;video.durationwithvideo.fit: speedfits a slot.
A browser window over a terminal#
For picture in picture, export PNG frames with a transparent backdrop:
browser-clip frames browser.yaml -o frames --transparent --camera staticThe window's shadow stays as partial alpha. The folder also gets the sound as audio.wav, and the
command prints an ffmpeg line that makes a ProRes 4444 file with alpha and that sound.
The repository's docs/montage.md has the details and an example pair of scripts.
Source: docs-src/pages/guides/montage.md · browser-clip 0.1.0