Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Runnable examples

The repository’s examples/ directory contains small programs for development and experimentation. Run the commands below from the repository root. validate checks source only. render also requires FFmpeg and FFprobe.

For a standalone project without a repository checkout, use clipasm init and follow Get ClipAsm running.

Example catalog

ExampleShowsExpected renderExtra requirementRelated page
examples/scenic-sequence.clipasmclip, image sources, a name, and a reference4.5 secondsChapter 3: Name and reference a clip
examples/learning-journey.clipasmthe completed learning path4.5 secondsLearn ClipAsm
examples/crossfade.clipasmexact crossfade overlap3.5 secondscrossfade reference
examples/gentle-motion-edit.clipasmduring and zoom_in2 secondsduring reference
examples/reusable-composition.clipasmnamed clips, references, and stack-bound flash_cut3 secondsTransition chapter
examples/imported-program.clipasmimporting a ClipAsm source program2 secondsImport how-to
examples/external-brighten.clipasmtrusted external implementation2 secondsPython 3 and a code reviewExternal-program guide
examples/root-bindings.clipasmroot Video input and required parameters2 secondsCLI bindings and --outputRoot-bindings guide

Validate or render an example

Most examples use the same two-command pattern:

clipasm validate examples/scenic-sequence.clipasm
clipasm render examples/scenic-sequence.clipasm

Git ignores generated outputs, manifests, and caches.

Root bindings

This example requires one Video input and two scalar parameters:

clipasm validate examples/root-bindings.clipasm \
  --video-input video=examples/assets/gentle-motion.mkv \
  --arg range=500ms..1500ms \
  --arg count=2

clipasm render examples/root-bindings.clipasm \
  --video-input video=examples/assets/gentle-motion.mkv \
  --arg range=500ms..1500ms \
  --arg count=2 \
  --output root-bindings.mp4

External program

examples/external-brighten.clipasm may execute Python and FFmpeg during rendering. Review the declaration and script before running it:

clipasm validate examples/external-brighten.clipasm
clipasm inspect examples/external-brighten.clipasm
clipasm render examples/external-brighten.clipasm

External programs are trusted native code. Read Review and run an external program first.