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
| Example | Shows | Expected render | Extra requirement | Related page |
|---|---|---|---|---|
examples/scenic-sequence.clipasm | clip, image sources, a name, and a reference | 4.5 seconds | — | Chapter 3: Name and reference a clip |
examples/learning-journey.clipasm | the completed learning path | 4.5 seconds | — | Learn ClipAsm |
examples/crossfade.clipasm | exact crossfade overlap | 3.5 seconds | — | crossfade reference |
examples/gentle-motion-edit.clipasm | during and zoom_in | 2 seconds | — | during reference |
examples/reusable-composition.clipasm | named clips, references, and stack-bound flash_cut | 3 seconds | — | Transition chapter |
examples/imported-program.clipasm | importing a ClipAsm source program | 2 seconds | — | Import how-to |
examples/external-brighten.clipasm | trusted external implementation | 2 seconds | Python 3 and a code review | External-program guide |
examples/root-bindings.clipasm | root Video input and required parameters | 2 seconds | CLI bindings and --output | Root-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.