node-av / api / DemuxerOptions
Interface: DemuxerOptions<F>
Defined in: src/api/demuxer.ts:149
Options for Demuxer opening.
Type Parameters
F
F extends DemuxerFormat | string & object = DemuxerFormat | string & object
Properties
bufferSize?
optionalbufferSize?:number
Defined in: src/api/demuxer.ts:158
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:226
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:201
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:213
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?:F
Defined in: src/api/demuxer.ts:169
Force specific input format.
Use this to specify the input format explicitly instead of auto-detection. Useful for raw formats like 'rawvideo', 'rawaudio', etc.
When given as a literal (e.g. 'mov'), options is strongly typed to that demuxer's known options plus the generic AVFormatContext options.
options?
optionaloptions?:DemuxerOptionsFor<F>
Defined in: src/api/demuxer.ts:237
FFmpeg format options passed directly to the input.
Key-value pairs of FFmpeg AVFormatContext / demuxer-private / protocol options, passed to avformat_open_input(). When format is a known literal, these are typed to that demuxer's options (autocomplete + value typing); arbitrary keys remain allowed so protocol options (e.g. rtsp_transport) still pass.
signal?
optionalsignal?:AbortSignal
Defined in: src/api/demuxer.ts:245
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:179
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:189
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