exportProject
Generated TypeScript API reference for the public mcut SDK.
mcut SDK / media/src / exportProject
Function: exportProject()
function exportProject(project, options?): Promise<ExportResult>;Defined in: packages/media/src/export.ts:42
Render a project to a video file, fully client-side and deterministically.
The audio mix renders first on the main thread (OfflineAudioContext and
the time-stretch worklet don't exist in workers), then the frame
decode→composite→encode→mux pipeline runs in a dedicated worker so the
editor stays responsive; environments without workers (Node/Bun, spawn
failure) fall back to running the same pipeline in-context.
Parameters
project
assets
Record<string, {
durationMs?: number;
hash?: string;
height?: number;
id: `a-${string}`;
kind: "video" | "audio" | "image";
mimeType?: string;
name?: string;
nativePreview?: boolean;
src: string;
width?: number;
}> = ...
fps
number = ...
height
number = ...
id
string = ...
layouts
object[] = ...
Multicam layout templates this project references. See layouts.ts.
markers
object[] = ...
Timeline markers, sorted by timeMs (the commands keep them sorted).
name
string = ...
presets
object[] = ...
Named inspector value bundles (style presets). See presets.ts.
tracks
object[] = ...
Render order: index 0 is painted first (bottom); last is topmost.
version
1 = ...
Project format version (see migrations.ts). parseProject migrates
older documents before validating; the default covers in-memory creation.
width
number = ...
options?
ExportProjectOptions = {}
Returns
Promise<ExportResult>