clipasm 0.3.2

A strict, typed language for compiling and rendering Video and Audio graphs
Documentation
<!-- Generated by clipasm-reference-docs. Do not edit directly. -->

# video

Load a Video from a video file.

## Call shape

```text
video(path: File, fit?: Keyword(cover | contain | stretch)) -> Video
```

This is call-shape notation for lookup, not ClipAsm declaration syntax.

## Graph inputs

This program does not take a Video or Audio input from the stack.

## Parameters and defaults

| Name | Type | Requirement | Default or omission behavior |
| --- | --- | --- | --- |
| `path` | `File` | required | — |
| `fit` | `Keyword(cover \| contain \| stretch)` | optional | cover |

## Result and stack behavior

Outputs: `Video`.

Default stack access is **owned**. See [stack binding](../language/stack-binding.md) for ownership and visibility rules.

## Timeline and markers

Creates a new timeline when it returns Video or Audio.

## Example

```clipasm
clipasm 1

video("assets/scene.mp4", contain)
```

Expected validation result: `Video` with a source-dependent frame domain resolved during preflight.

This exact example is parsed and compiled by the reference checks; compilation does not inspect the named media files.

## Behavior

- Compilation remains media-pure; preflight probes the source and resolves its exact project-frame domain.
- The source is fitted to the project Video dimensions while preserving its resolved duration.

## See also

- [`image`]image.md
- [`extract_audio`]extract_audio.md
- [`set_audio`]set_audio.md
- [Statements and calls]../language/statements-and-calls.md
- [Stack binding]../language/stack-binding.md