node-av / api / DemuxerOptions
Interface: DemuxerOptions
Defined in: src/api/demuxer.ts:147
Options for Demuxer opening.
Properties
bufferSize?
optionalbufferSize:number
Defined in: src/api/demuxer.ts:156
Buffer size for reading/writing operations.
This option allows you to specify the buffer size used for I/O operations.
Default
65536copyTs?
optionalcopyTs:boolean
Defined in: src/api/demuxer.ts:222
Copy timestamps from input to output.
When enabled, timestamps are passed through without modification. This disables most timestamp discontinuity corrections except for PTS wrap-around detection in discontinuous formats.
Matches FFmpeg CLI's -copyts option.
Default
falsedtsDeltaThreshold?
optionaldtsDeltaThreshold:number
Defined in: src/api/demuxer.ts:197
DTS delta threshold in seconds.
Timestamp discontinuity detection threshold for formats with AVFMT_TS_DISCONT flag. When DTS delta exceeds this value, it's considered a discontinuity.
Matches FFmpeg CLI's -dts_delta_threshold option.
Default
10dtsErrorThreshold?
optionaldtsErrorThreshold:number
Defined in: src/api/demuxer.ts:209
DTS error threshold in seconds.
Timestamp discontinuity detection threshold for continuous formats (without AVFMT_TS_DISCONT). When DTS delta exceeds this value, it's considered a timestamp error.
Matches FFmpeg CLI's -dts_error_threshold option.
Default
108000 (30 hours)format?
optionalformat:string
Defined in: src/api/demuxer.ts:165
Force specific input format.
Use this to specify the input format explicitly instead of auto-detection. Useful for raw formats like 'rawvideo', 'rawaudio', etc.
options?
optionaloptions:Record<string,string|number|boolean|null|undefined>
Defined in: src/api/demuxer.ts:230
FFmpeg format options passed directly to the input.
Key-value pairs of FFmpeg AVFormatContext options. These are passed directly to avformat_open_input().
signal?
optionalsignal:AbortSignal
Defined in: src/api/demuxer.ts:238
AbortSignal for cancellation.
When aborted, async generators stop yielding and async methods throw AbortError. The demux thread is stopped automatically.
skipStreamInfo?
optionalskipStreamInfo:boolean
Defined in: src/api/demuxer.ts:175
Skip reading stream information on open.
If true, stream info (codecs, formats, etc.) will not be read during opening. This can speed up opening time for certain use cases where stream info is not needed.
Default
falsestartWithKeyframe?
optionalstartWithKeyframe:boolean
Defined in: src/api/demuxer.ts:185
Start reading packets from the first keyframe.
When enabled, all packets before the first keyframe will be skipped. Useful for seeking and trimming operations.
Default
false