ExportSpec

class ExportSpec(val heightPx: Int? = null, val bitrate: Bitrate? = null, val quality: VideoQuality? = null, val videoCodec: VideoCodec = VideoCodec.Auto, val audioCodec: AudioCodec = AudioCodec.Auto, val frameRate: Int? = null, val hdr: HdrMode = HdrMode.Auto, val strict: Boolean = false)(source)

What the output should look like.

Separate from EditComposition so one edit can be exported several ways. A 1080p upload and a 480p preview share a composition and differ only here.

Constructors

Link copied to clipboard
constructor(heightPx: Int? = null, bitrate: Bitrate? = null, quality: VideoQuality? = null, videoCodec: VideoCodec = VideoCodec.Auto, audioCodec: AudioCodec = AudioCodec.Auto, frameRate: Int? = null, hdr: HdrMode = HdrMode.Auto, strict: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The codec to encode audio with.

Link copied to clipboard

The video bitrate to aim for, or null to let filmstrip pick one from quality.

Link copied to clipboard

Output frame rate, or null to keep the source's. A rate of zero or less is refused.

Link copied to clipboard

What to do about high dynamic range.

Link copied to clipboard

The most the output can be tall, in pixels. Width follows from the composition's aspect. A height below the composition's own scales it down, and one at or above it keeps the composition's height, so a frame is never scaled up. Use the Scale effect for an exact size. A composition framed by a still takes this height as it is. Null keeps the composition's own height. A height of zero or less is refused.

Link copied to clipboard

The quality tier filmstrip picks a bitrate from, or null for VideoQuality.High on a transcode. Setting both this and bitrate is refused. Either one also blocks a stream copy.

Link copied to clipboard

Fail rather than accept a fallback. False by default: fall back, and report every adjustment. Set it when a byte budget or a codec requirement is non-negotiable. A tone map on a curve that departs from the one the other backends run counts as a fallback too, so a strict tone mapped export on such an engine is refused, even with HdrMode.ToneMapToSdr asked for. Only what the plan can see is refused. Some adjustments only show once the export runs, such as media3 picking an encoder that writes another color space. Those reach ExportStatus.Success.adjustments after a plan that said Verdict.Capable, and strict cannot refuse them.

Link copied to clipboard

The codec to encode video with.