Skip to content
Class

CmafOutputFormat

Creates a single Common Media Application Format (CMAF) segment. An init segment will be written to the Target specified in OutputOptions.initTarget. Supports most codecs.

Extends: IsobmffOutputFormat

Constructor

ts
constructor(
	options?: CmafOutputFormatOptions,
): CmafOutputFormat;

Creates a new CmafOutputFormat configured with the specified options.

See CmafOutputFormatOptions.

Properties

fileExtension

ts
get fileExtension(): string;

The file extension used by this output format, beginning with a dot.

mimeType

ts
get mimeType(): string;

The base MIME type of the output format.

supportsTimestampedMediaData

ts
get supportsTimestampedMediaData(): boolean;

Whether this output format's tracks store timestamped media data. When true, the timestamps of added packets will be respected, allowing things like gaps in media data or non-zero start times. When false, the format's media data implicitly starts at zero and follows an implicit sequential timing from there, using the intrinsic durations of the media data.

supportsVideoRotationMetadata

ts
get supportsVideoRotationMetadata(): boolean;

Whether this output format supports video rotation metadata.

Methods

getSupportedCodecs()

ts
getSupportedCodecs(): MediaCodec[];

Returns a list of media codecs that this output format can contain.

See MediaCodec.

getSupportedTrackCounts()

ts
getSupportedTrackCounts(): TrackCountLimits;

Returns the number of tracks that this output format supports.

See TrackCountLimits.

Released under the Mozilla Public License 2.0.