CmafOutputFormatOptions
CMAF-specific output options.
type CmafOutputFormatOptions = Omit<IsobmffOutputFormatOptions, 'fastStart'> & {
minimumFragmentDuration?: number;
};See IsobmffOutputFormatOptions.
Used by
Properties
minimumFragmentDuration
minimumFragmentDuration?: number;Controls the minimum duration of each fragment, in seconds. New fragments will only be created when the current fragment is longer than this value. Defaults to Infinity, meaning the file will contain only one fragment.
metadataFormat
metadataFormat?: 'auto' | 'mdir' | 'mdta' | 'udta';The metadata format to use for writing metadata tags.
'auto'(default): Behaves like'mdir'for MP4 and like'udta'for QuickTime, matching FFmpeg's default behavior.'mdir': Write tags intomoov/udta/metausing the 'mdir' handler format.'mdta': Write tags intomoov/udta/metausing the 'mdta' handler format, equivalent to FFmpeg'suse_metadata_tagsflag. This allows for custom keys of arbitrary length.'udta': Write tags directly intomoov/udta.
Events
onFtyp
onFtyp?: ((data: Uint8Array<ArrayBufferLike>, position: number) => unknown);Will be called once the ftyp (File Type) box of the output file has been written.
onMoov
onMoov?: ((data: Uint8Array<ArrayBufferLike>, position: number) => unknown);Will be called once the moov (Movie) box of the output file has been written.
onMdat
onMdat?: ((data: Uint8Array<ArrayBufferLike>, position: number) => unknown);Will be called for each finalized mdat (Media Data) box of the output file. Usage of this callback is not recommended when not using fastStart: 'fragmented', as there will be one monolithic mdat box which might require large amounts of memory.
onMoof
onMoof?: ((data: Uint8Array<ArrayBufferLike>, position: number, timestamp: number) => unknown);Will be called for each finalized moof (Movie Fragment) box of the output file.