Search Docs
Loading...
Skip to content

Interface: VideoExportOptions

Options for exporting video

Properties#

Property Type Default value Description
coverTimeOffset? number undefined Cover time in seconds from the beginning of the exported video. Omitted or null uses the page cover time when playback/coverTimeEnabled is true, else the page playback position at export start. Either is clamped to the exported frames. A scene uses its first frame. An explicit value must be finite and within [0, duration). The frame containing that time is embedded as a PNG, preserving the export aspect ratio with both dimensions at most 512 pixels.
mimeType? string undefined The MIME type of the exported video. Defaults to video/mp4.
onProgress? (numberOfRenderedFrames, numberOfEncodedFrames, totalNumberOfFrames) => void undefined Progress callback invoked during encoding with the number of rendered frames, encoded frames, and the total number of frames.
abortSignal? AbortSignal undefined Cancels the export when it aborts. The engine stops the export at once, and the promise rejects.
timeOffset? number undefined Time offset in seconds relative to the target block
duration? number undefined Duration in seconds of the final video
h264Profile? number undefined H.264 profile
h264Level? number undefined H.264 level
videoBitrate? number VideoBitrateMode
audioBitrate? number undefined Audio bitrate in bits per second
audioCodec? AudioCodec undefined The codec to encode the audio with. Defaults to AudioCodec.Auto. For 'video/mp4' it picks AAC, and Opus where the platform encodes Opus but not AAC. For 'video/webm' it picks Opus, then Vorbis. A codec that the file type cannot hold fails the export, and so does an explicit codec that the platform cannot encode.
framerate? number The scene’s scene/frameRate. The target framerate of the exported video in Hz, greater than 0 and at most 240. Without it the video uses the scene’s scene/frameRate, the frame that the preview motion blur shows; 30 when that is not a positive number.
useTargetSize? boolean undefined Deprecated Ignored. The export uses the target size when targetWidth or targetHeight is above 0.
targetWidth? number undefined Target width. Without a target height, the height follows from the block’s aspect ratio.
targetHeight? number undefined Target height. Without a target width, the width follows from the block’s aspect ratio.
allowTextOverhang? boolean undefined Allow text to extend beyond block boundaries
videoCodec? VideoCodec undefined The codec to encode the video with. Defaults to VideoCodec.Auto: H.264 for 'video/mp4', VP9 for 'video/webm'. 'video/mp4' holds H.264 and HEVC, and 'video/webm' holds VP8, VP9 and AV1. Another codec fails the export.
exportAlpha? boolean undefined Keep the transparency of the page in the video, as a second stream. Only VP8 and VP9 in 'video/webm' keep it, and any other codec fails the export. The browser has no encoder for it, so it needs a native platform. Defaults to false.
enableHEVC? boolean undefined Deprecated Use videoCodec. true selects VideoCodec.HEVC.