Skip to content

node-av / api / DemuxerOptions

Interface: DemuxerOptions

Defined in: src/api/types.ts:124

Options for Demuxer opening.

Configures how media files are opened and packets are read. Supports format detection, buffering, and FFmpeg options.

Properties

bufferSize?

optional bufferSize: number

Defined in: src/api/types.ts:133

Buffer size for reading/writing operations.

This option allows you to specify the buffer size used for I/O operations.

Default

ts
65536

copyTs?

optional copyTs: boolean

Defined in: src/api/types.ts:199

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

ts
false

dtsDeltaThreshold?

optional dtsDeltaThreshold: number

Defined in: src/api/types.ts:174

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

ts
10

dtsErrorThreshold?

optional dtsErrorThreshold: number

Defined in: src/api/types.ts:186

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

ts
108000 (30 hours)

format?

optional format: string

Defined in: src/api/types.ts:142

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?

optional options: Record<string, string | number | boolean | null | undefined>

Defined in: src/api/types.ts:207

FFmpeg format options passed directly to the input.

Key-value pairs of FFmpeg AVFormatContext options. These are passed directly to avformat_open_input().


skipStreamInfo?

optional skipStreamInfo: boolean

Defined in: src/api/types.ts:152

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

ts
false

startWithKeyframe?

optional startWithKeyframe: boolean

Defined in: src/api/types.ts:162

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

ts
false