Skip to main content

Interface: WebCodecsExportOptions

Defined in: src/export/WebCodecsExporter.ts:40

Options for configuring WebCodecs video export.

Properties​

alpha?​

optional alpha: boolean

Defined in: src/export/WebCodecsExporter.ts:70

Export with a transparent background, so the video carries an alpha channel to composite over other footage. Defaults to false.

Alpha needs the 'webm' format with the 'vp9' codec, because only that path carries an alpha side channel. When alpha is set and format/codec are not given, they default to 'webm' and 'vp9'. It also needs a Scene created with { alpha: true } (or backgroundOpacity < 1) and a browser that can encode VP9 with alpha. When any requirement is unmet, export() throws a clear error instead of producing opaque video that claims transparency.


bitrate?​

optional bitrate: number

Defined in: src/export/WebCodecsExporter.ts:48

Target bitrate in bits per second. Defaults to 5_000_000.


codec?​

optional codec: WebCodecsVideoCodec

Defined in: src/export/WebCodecsExporter.ts:46

Video codec. Defaults to 'avc' for mp4 and 'vp9' for webm.


duration?​

optional duration: number

Defined in: src/export/WebCodecsExporter.ts:54

Duration in seconds. Auto-detects from the timeline if not specified.


format?​

optional format: "webm" | "mp4"

Defined in: src/export/WebCodecsExporter.ts:44

Container format. Defaults to 'mp4'.


fps?​

optional fps: number

Defined in: src/export/WebCodecsExporter.ts:42

Frames per second. Defaults to 60.


height?​

optional height: number

Defined in: src/export/WebCodecsExporter.ts:52

Output height in pixels. Defaults to scene height.


keyFrameInterval?​

optional keyFrameInterval: number

Defined in: src/export/WebCodecsExporter.ts:56

Frames between key frames. Defaults to the frame rate (one per second).


onProgress()?​

optional onProgress: (progress) => void

Defined in: src/export/WebCodecsExporter.ts:58

Progress callback (0-1).

Parameters​

progress​

number

Returns​

void


width?​

optional width: number

Defined in: src/export/WebCodecsExporter.ts:50

Output width in pixels. Defaults to scene width.