Type
MpegTsOutputFormatOptions
MPEG-TS-specific output options.
ts
type MpegTsOutputFormatOptions = {
timestampOffset?: number;
onPacket?: (data: Uint8Array, position: number) => unknown;
};Used by
Properties
timestampOffset
ts
timestampOffset?: number;An offset in seconds that is added to all timestamps written to the file. It keeps timestamps that would otherwise be negative (caused by audio priming samples or B-frames) positive in the final file, since negative timestamps trip up some players. A recommended value is 10 seconds.
Defaults to 0. When writing HLS, prefer HlsOutputFormatOptions.mediaTimestampBase instead.
Events
onPacket
ts
onPacket?: (data: Uint8Array, position: number) => unknown;Will be called for each 188-byte Transport Stream packet that is written.