browser-clipdocs
Guides

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 platform in both scripts (generic, windows, macos or linux): it gives terminal-clip's window frame, backdrop and pointer to the browser window.
  • Use the same video.format, video.fps and video.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.captions the 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.formatplatformterminal-clip window (x, y, w, h)browser.viewportvideo.padding
widegeneric177, 69, 1566, 9421280x72669
widewindows196, 74, 1528, 9331280x73873
widemacos148, 65, 1624, 9501280x70565
widelinux193, 81, 1534, 9181280x72281
shortgeneric122, 253, 836, 1202720x99157
shortwindows124, 226, 832, 1256720x104354
shortmacos104, 217, 872, 1274720x100839
shortlinux119, 232, 842, 1244720x102054
portraitgeneric87, 104, 906, 1062720x80044
portraitwindows106, 108, 868, 1053720x82954
portraitmacos80, 98, 920, 1074720x79737
portraitlinux103, 118, 874, 1034720x80860

Render for the editor#

  • Render H.264, the default; --deterministic writes VP9, which some editors do not open.
  • Leave video.fadeIn and video.fadeOut at 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.lead and video.hold leave handles for transitions.
  • render --range a..b renders part of a clip; video.duration with video.fit: speed fits 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 static

The 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