node-av 3.1.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -52
- package/binding.gyp +4 -0
- package/dist/api/audio-frame-buffer.d.ts +201 -0
- package/dist/api/audio-frame-buffer.js +275 -0
- package/dist/api/audio-frame-buffer.js.map +1 -0
- package/dist/api/bitstream-filter.d.ts +319 -78
- package/dist/api/bitstream-filter.js +680 -151
- package/dist/api/bitstream-filter.js.map +1 -1
- package/dist/api/constants.d.ts +44 -0
- package/dist/api/constants.js +45 -0
- package/dist/api/constants.js.map +1 -0
- package/dist/api/data/test_av1.ivf +0 -0
- package/dist/api/data/test_mjpeg.mjpeg +0 -0
- package/dist/api/data/test_vp8.ivf +0 -0
- package/dist/api/data/test_vp9.ivf +0 -0
- package/dist/api/decoder.d.ts +279 -17
- package/dist/api/decoder.js +998 -209
- package/dist/api/decoder.js.map +1 -1
- package/dist/api/{media-input.d.ts → demuxer.d.ts} +294 -44
- package/dist/api/demuxer.js +1968 -0
- package/dist/api/demuxer.js.map +1 -0
- package/dist/api/encoder.d.ts +308 -50
- package/dist/api/encoder.js +1133 -111
- package/dist/api/encoder.js.map +1 -1
- package/dist/api/filter-presets.d.ts +12 -5
- package/dist/api/filter-presets.js +21 -7
- package/dist/api/filter-presets.js.map +1 -1
- package/dist/api/filter.d.ts +406 -40
- package/dist/api/filter.js +966 -139
- package/dist/api/filter.js.map +1 -1
- package/dist/api/{fmp4.d.ts → fmp4-stream.d.ts} +141 -140
- package/dist/api/fmp4-stream.js +539 -0
- package/dist/api/fmp4-stream.js.map +1 -0
- package/dist/api/hardware.d.ts +58 -6
- package/dist/api/hardware.js +127 -11
- package/dist/api/hardware.js.map +1 -1
- package/dist/api/index.d.ts +6 -4
- package/dist/api/index.js +14 -8
- package/dist/api/index.js.map +1 -1
- package/dist/api/io-stream.d.ts +3 -3
- package/dist/api/io-stream.js +5 -4
- package/dist/api/io-stream.js.map +1 -1
- package/dist/api/{media-output.d.ts → muxer.d.ts} +274 -60
- package/dist/api/muxer.js +1934 -0
- package/dist/api/muxer.js.map +1 -0
- package/dist/api/pipeline.d.ts +77 -29
- package/dist/api/pipeline.js +435 -425
- package/dist/api/pipeline.js.map +1 -1
- package/dist/api/rtp-stream.d.ts +312 -0
- package/dist/api/rtp-stream.js +630 -0
- package/dist/api/rtp-stream.js.map +1 -0
- package/dist/api/types.d.ts +476 -55
- package/dist/api/utilities/async-queue.d.ts +91 -0
- package/dist/api/utilities/async-queue.js +162 -0
- package/dist/api/utilities/async-queue.js.map +1 -0
- package/dist/api/utilities/audio-sample.d.ts +1 -1
- package/dist/api/utilities/image.d.ts +1 -1
- package/dist/api/utilities/index.d.ts +2 -0
- package/dist/api/utilities/index.js +4 -0
- package/dist/api/utilities/index.js.map +1 -1
- package/dist/api/utilities/media-type.d.ts +1 -1
- package/dist/api/utilities/pixel-format.d.ts +1 -1
- package/dist/api/utilities/sample-format.d.ts +1 -1
- package/dist/api/utilities/scheduler.d.ts +169 -0
- package/dist/api/utilities/scheduler.js +136 -0
- package/dist/api/utilities/scheduler.js.map +1 -0
- package/dist/api/utilities/streaming.d.ts +74 -15
- package/dist/api/utilities/streaming.js +170 -12
- package/dist/api/utilities/streaming.js.map +1 -1
- package/dist/api/utilities/timestamp.d.ts +1 -1
- package/dist/api/webrtc-stream.d.ts +288 -0
- package/dist/api/webrtc-stream.js +440 -0
- package/dist/api/webrtc-stream.js.map +1 -0
- package/dist/constants/constants.d.ts +51 -1
- package/dist/constants/constants.js +47 -1
- package/dist/constants/constants.js.map +1 -1
- package/dist/constants/encoders.d.ts +2 -1
- package/dist/constants/encoders.js +4 -3
- package/dist/constants/encoders.js.map +1 -1
- package/dist/constants/hardware.d.ts +26 -0
- package/dist/constants/hardware.js +27 -0
- package/dist/constants/hardware.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/lib/binding.d.ts +19 -8
- package/dist/lib/binding.js.map +1 -1
- package/dist/lib/codec-context.d.ts +87 -0
- package/dist/lib/codec-context.js +125 -4
- package/dist/lib/codec-context.js.map +1 -1
- package/dist/lib/codec-parameters.d.ts +183 -1
- package/dist/lib/codec-parameters.js +209 -0
- package/dist/lib/codec-parameters.js.map +1 -1
- package/dist/lib/codec-parser.d.ts +23 -0
- package/dist/lib/codec-parser.js +25 -0
- package/dist/lib/codec-parser.js.map +1 -1
- package/dist/lib/codec.d.ts +26 -4
- package/dist/lib/codec.js +35 -0
- package/dist/lib/codec.js.map +1 -1
- package/dist/lib/dictionary.js +1 -0
- package/dist/lib/dictionary.js.map +1 -1
- package/dist/lib/error.js +1 -1
- package/dist/lib/error.js.map +1 -1
- package/dist/lib/filter-context.d.ts +52 -11
- package/dist/lib/filter-context.js +56 -12
- package/dist/lib/filter-context.js.map +1 -1
- package/dist/lib/filter-graph.d.ts +9 -0
- package/dist/lib/filter-graph.js +13 -0
- package/dist/lib/filter-graph.js.map +1 -1
- package/dist/lib/filter.d.ts +21 -0
- package/dist/lib/filter.js +28 -0
- package/dist/lib/filter.js.map +1 -1
- package/dist/lib/format-context.d.ts +48 -14
- package/dist/lib/format-context.js +76 -7
- package/dist/lib/format-context.js.map +1 -1
- package/dist/lib/frame.d.ts +168 -0
- package/dist/lib/frame.js +212 -0
- package/dist/lib/frame.js.map +1 -1
- package/dist/lib/hardware-device-context.d.ts +3 -2
- package/dist/lib/hardware-device-context.js.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/input-format.d.ts +21 -0
- package/dist/lib/input-format.js +42 -2
- package/dist/lib/input-format.js.map +1 -1
- package/dist/lib/native-types.d.ts +48 -26
- package/dist/lib/option.d.ts +25 -13
- package/dist/lib/option.js +28 -0
- package/dist/lib/option.js.map +1 -1
- package/dist/lib/output-format.d.ts +22 -1
- package/dist/lib/output-format.js +28 -0
- package/dist/lib/output-format.js.map +1 -1
- package/dist/lib/packet.d.ts +35 -0
- package/dist/lib/packet.js +52 -2
- package/dist/lib/packet.js.map +1 -1
- package/dist/lib/stream.d.ts +126 -0
- package/dist/lib/stream.js +188 -5
- package/dist/lib/stream.js.map +1 -1
- package/dist/lib/sync-queue.d.ts +179 -0
- package/dist/lib/sync-queue.js +197 -0
- package/dist/lib/sync-queue.js.map +1 -0
- package/dist/lib/types.d.ts +27 -1
- package/dist/lib/utilities.d.ts +281 -53
- package/dist/lib/utilities.js +298 -55
- package/dist/lib/utilities.js.map +1 -1
- package/install/check.js +18 -7
- package/package.json +20 -19
- package/dist/api/fmp4.js +0 -710
- package/dist/api/fmp4.js.map +0 -1
- package/dist/api/media-input.js +0 -1075
- package/dist/api/media-input.js.map +0 -1
- package/dist/api/media-output.js +0 -1040
- package/dist/api/media-output.js.map +0 -1
- package/dist/api/webrtc.d.ts +0 -664
- package/dist/api/webrtc.js +0 -1132
- package/dist/api/webrtc.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bitstream-filter.js","sourceRoot":"","sources":["../../src/api/bitstream-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAI/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,OAAO,kBAAkB;IACrB,GAAG,CAAyB;IAC5B,MAAM,CAAkB;IACxB,MAAM,CAAS;IACf,QAAQ,GAAG,KAAK,CAAC;IAEzB;;;;;;;;OAQG;IACH,YAAoB,MAAuB,EAAE,GAA2B,EAAE,MAAc;QACtF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,MAA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,EAAE,CAAC;YACvB,MAAM,IAAI,CAAC,aAAa,CAAC;QAC3B,CAAC;QAED,yCAAyC;QACzC,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,MAAM,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC;QAC3C,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input/Output buffer size for I/O operations.
|
|
3
|
+
*/
|
|
4
|
+
export declare const IO_BUFFER_SIZE = 32768;
|
|
5
|
+
/**
|
|
6
|
+
* Frame buffer size
|
|
7
|
+
*/
|
|
8
|
+
export declare const FRAME_THREAD_QUEUE_SIZE = 2;
|
|
9
|
+
/**
|
|
10
|
+
* Packet buffer size
|
|
11
|
+
*/
|
|
12
|
+
export declare const PACKET_THREAD_QUEUE_SIZE = 8;
|
|
13
|
+
/**
|
|
14
|
+
* Maximum input queue size before packets are dropped.
|
|
15
|
+
*/
|
|
16
|
+
export declare const MAX_INPUT_QUEUE_SIZE = 100;
|
|
17
|
+
/**
|
|
18
|
+
* Maximum packet size for reading from streams.
|
|
19
|
+
*/
|
|
20
|
+
export declare const MAX_PACKET_SIZE = 1200;
|
|
21
|
+
/**
|
|
22
|
+
* Threshold in seconds for delta between DTS and expected DTS
|
|
23
|
+
* to consider a timestamp discontinuity.
|
|
24
|
+
*/
|
|
25
|
+
export declare const DELTA_THRESHOLD = 10;
|
|
26
|
+
/**
|
|
27
|
+
* DTS error threshold in seconds to trigger a reset of
|
|
28
|
+
* timestamp calculations (seconds).
|
|
29
|
+
*/
|
|
30
|
+
export declare const DTS_ERROR_THRESHOLD = 108000;
|
|
31
|
+
/**
|
|
32
|
+
* Maximum size of the muxing queue before data is dropped.
|
|
33
|
+
*/
|
|
34
|
+
export declare const MAX_MUXING_QUEUE_SIZE = 128;
|
|
35
|
+
/**
|
|
36
|
+
* Data threshold in bytes for the muxing queue to trigger
|
|
37
|
+
* a warning or action.
|
|
38
|
+
*/
|
|
39
|
+
export declare const MUXING_QUEUE_DATA_THRESHOLD: number;
|
|
40
|
+
/**
|
|
41
|
+
* Duration in seconds for which to buffer data in the sync queue
|
|
42
|
+
* for packet interleaving across multiple streams.
|
|
43
|
+
*/
|
|
44
|
+
export declare const SYNC_BUFFER_DURATION = 10;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input/Output buffer size for I/O operations.
|
|
3
|
+
*/
|
|
4
|
+
export const IO_BUFFER_SIZE = 32768;
|
|
5
|
+
/**
|
|
6
|
+
* Frame buffer size
|
|
7
|
+
*/
|
|
8
|
+
export const FRAME_THREAD_QUEUE_SIZE = 2;
|
|
9
|
+
/**
|
|
10
|
+
* Packet buffer size
|
|
11
|
+
*/
|
|
12
|
+
export const PACKET_THREAD_QUEUE_SIZE = 8;
|
|
13
|
+
/**
|
|
14
|
+
* Maximum input queue size before packets are dropped.
|
|
15
|
+
*/
|
|
16
|
+
export const MAX_INPUT_QUEUE_SIZE = 100;
|
|
17
|
+
/**
|
|
18
|
+
* Maximum packet size for reading from streams.
|
|
19
|
+
*/
|
|
20
|
+
export const MAX_PACKET_SIZE = 1200;
|
|
21
|
+
/**
|
|
22
|
+
* Threshold in seconds for delta between DTS and expected DTS
|
|
23
|
+
* to consider a timestamp discontinuity.
|
|
24
|
+
*/
|
|
25
|
+
export const DELTA_THRESHOLD = 10;
|
|
26
|
+
/**
|
|
27
|
+
* DTS error threshold in seconds to trigger a reset of
|
|
28
|
+
* timestamp calculations (seconds).
|
|
29
|
+
*/
|
|
30
|
+
export const DTS_ERROR_THRESHOLD = 108000;
|
|
31
|
+
/**
|
|
32
|
+
* Maximum size of the muxing queue before data is dropped.
|
|
33
|
+
*/
|
|
34
|
+
export const MAX_MUXING_QUEUE_SIZE = 128;
|
|
35
|
+
/**
|
|
36
|
+
* Data threshold in bytes for the muxing queue to trigger
|
|
37
|
+
* a warning or action.
|
|
38
|
+
*/
|
|
39
|
+
export const MUXING_QUEUE_DATA_THRESHOLD = 50 * 1024 * 1024;
|
|
40
|
+
/**
|
|
41
|
+
* Duration in seconds for which to buffer data in the sync queue
|
|
42
|
+
* for packet interleaving across multiple streams.
|
|
43
|
+
*/
|
|
44
|
+
export const SYNC_BUFFER_DURATION = 10;
|
|
45
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/api/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/api/decoder.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { CodecContext } from '../lib/codec-context.js';
|
|
2
|
+
import { Codec } from '../lib/codec.js';
|
|
3
|
+
import { Frame } from '../lib/frame.js';
|
|
4
|
+
import { Scheduler } from './utilities/scheduler.js';
|
|
5
|
+
import type { AVCodecID, FFDecoderCodec } from '../constants/index.js';
|
|
6
|
+
import type { Packet } from '../lib/packet.js';
|
|
7
|
+
import type { Stream } from '../lib/stream.js';
|
|
8
|
+
import type { Encoder } from './encoder.js';
|
|
9
|
+
import type { FilterAPI } from './filter.js';
|
|
3
10
|
import type { DecoderOptions } from './types.js';
|
|
4
11
|
/**
|
|
5
12
|
* High-level decoder for audio and video streams.
|
|
@@ -11,10 +18,10 @@ import type { DecoderOptions } from './types.js';
|
|
|
11
18
|
*
|
|
12
19
|
* @example
|
|
13
20
|
* ```typescript
|
|
14
|
-
* import {
|
|
21
|
+
* import { Demuxer, Decoder } from 'node-av/api';
|
|
15
22
|
*
|
|
16
23
|
* // Open media and create decoder
|
|
17
|
-
* await using input = await
|
|
24
|
+
* await using input = await Demuxer.open('video.mp4');
|
|
18
25
|
* using decoder = await Decoder.create(input.video());
|
|
19
26
|
*
|
|
20
27
|
* // Decode frames
|
|
@@ -40,7 +47,7 @@ import type { DecoderOptions } from './types.js';
|
|
|
40
47
|
* ```
|
|
41
48
|
*
|
|
42
49
|
* @see {@link Encoder} For encoding frames to packets
|
|
43
|
-
* @see {@link
|
|
50
|
+
* @see {@link Demuxer} For reading media files
|
|
44
51
|
* @see {@link HardwareContext} For GPU acceleration
|
|
45
52
|
*/
|
|
46
53
|
export declare class Decoder implements Disposable {
|
|
@@ -51,6 +58,16 @@ export declare class Decoder implements Disposable {
|
|
|
51
58
|
private initialized;
|
|
52
59
|
private isClosed;
|
|
53
60
|
private options;
|
|
61
|
+
private lastFramePts;
|
|
62
|
+
private lastFrameDurationEst;
|
|
63
|
+
private lastFrameTb;
|
|
64
|
+
private lastFrameSampleRate;
|
|
65
|
+
private lastFilterInRescaleDelta;
|
|
66
|
+
private inputQueue;
|
|
67
|
+
private outputQueue;
|
|
68
|
+
private workerPromise;
|
|
69
|
+
private nextComponent;
|
|
70
|
+
private pipeToPromise;
|
|
54
71
|
/**
|
|
55
72
|
* @param codecContext - Configured codec context
|
|
56
73
|
*
|
|
@@ -84,9 +101,9 @@ export declare class Decoder implements Disposable {
|
|
|
84
101
|
*
|
|
85
102
|
* @example
|
|
86
103
|
* ```typescript
|
|
87
|
-
* import {
|
|
104
|
+
* import { Demuxer, Decoder } from 'node-av/api';
|
|
88
105
|
*
|
|
89
|
-
* await using input = await
|
|
106
|
+
* await using input = await Demuxer.open('video.mp4');
|
|
90
107
|
* using decoder = await Decoder.create(input.video());
|
|
91
108
|
* ```
|
|
92
109
|
*
|
|
@@ -111,10 +128,20 @@ export declare class Decoder implements Disposable {
|
|
|
111
128
|
* });
|
|
112
129
|
* ```
|
|
113
130
|
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```typescript
|
|
133
|
+
* using decoder = await Decoder.create(stream, FF_DECODER_H264_AMF, {
|
|
134
|
+
* hardware: hw,
|
|
135
|
+
* threads: 2,
|
|
136
|
+
* });
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
114
139
|
* @see {@link HardwareContext} For GPU acceleration setup
|
|
115
140
|
* @see {@link DecoderOptions} For configuration options
|
|
141
|
+
* @see {@link createSync} For synchronous version
|
|
116
142
|
*/
|
|
117
143
|
static create(stream: Stream, options?: DecoderOptions): Promise<Decoder>;
|
|
144
|
+
static create(stream: Stream, decoderCodec?: FFDecoderCodec | AVCodecID | Codec, options?: DecoderOptions): Promise<Decoder>;
|
|
118
145
|
/**
|
|
119
146
|
* Create a decoder for a media stream synchronously.
|
|
120
147
|
* Synchronous version of create.
|
|
@@ -135,15 +162,15 @@ export declare class Decoder implements Disposable {
|
|
|
135
162
|
*
|
|
136
163
|
* @example
|
|
137
164
|
* ```typescript
|
|
138
|
-
* import {
|
|
165
|
+
* import { Demuxer, Decoder } from 'node-av/api';
|
|
139
166
|
*
|
|
140
|
-
* await using input = await
|
|
141
|
-
* using decoder =
|
|
167
|
+
* await using input = await Demuxer.open('video.mp4');
|
|
168
|
+
* using decoder = Decoder.createSync(input.video());
|
|
142
169
|
* ```
|
|
143
170
|
*
|
|
144
171
|
* @example
|
|
145
172
|
* ```typescript
|
|
146
|
-
* using decoder =
|
|
173
|
+
* using decoder = Decoder.createSync(stream, {
|
|
147
174
|
* threads: 4,
|
|
148
175
|
* options: {
|
|
149
176
|
* 'refcounted_frames': '1',
|
|
@@ -155,15 +182,25 @@ export declare class Decoder implements Disposable {
|
|
|
155
182
|
* @example
|
|
156
183
|
* ```typescript
|
|
157
184
|
* const hw = HardwareContext.auto();
|
|
158
|
-
* using decoder =
|
|
185
|
+
* using decoder = Decoder.createSync(stream, {
|
|
159
186
|
* hardware: hw,
|
|
160
187
|
* threads: 0 // Auto-detect thread count
|
|
161
188
|
* });
|
|
162
189
|
* ```
|
|
163
190
|
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```typescript
|
|
193
|
+
* using decoder = Decoder.createSync(stream, FF_DECODER_H264_NVDEC, {
|
|
194
|
+
* hardware: hw
|
|
195
|
+
* });
|
|
196
|
+
* ```
|
|
197
|
+
*
|
|
198
|
+
* @see {@link HardwareContext} For GPU acceleration setup
|
|
199
|
+
* @see {@link DecoderOptions} For configuration options
|
|
164
200
|
* @see {@link create} For async version
|
|
165
201
|
*/
|
|
166
202
|
static createSync(stream: Stream, options?: DecoderOptions): Decoder;
|
|
203
|
+
static createSync(stream: Stream, decoderCodec?: FFDecoderCodec | AVCodecID | Codec, options?: DecoderOptions): Decoder;
|
|
167
204
|
/**
|
|
168
205
|
* Check if decoder is open.
|
|
169
206
|
*
|
|
@@ -228,6 +265,10 @@ export declare class Decoder implements Disposable {
|
|
|
228
265
|
* Handles internal buffering - may return null if more packets needed.
|
|
229
266
|
* Automatically manages decoder state and error recovery.
|
|
230
267
|
*
|
|
268
|
+
* **Note**: This method receives only ONE frame per call.
|
|
269
|
+
* A single packet can produce multiple frames (e.g., packed B-frames, codec buffering).
|
|
270
|
+
* To receive all frames from a packet, use {@link decodeAll} or {@link frames} instead.
|
|
271
|
+
*
|
|
231
272
|
* Direct mapping to avcodec_send_packet() and avcodec_receive_frame().
|
|
232
273
|
*
|
|
233
274
|
* @param packet - Compressed packet to decode
|
|
@@ -259,8 +300,10 @@ export declare class Decoder implements Disposable {
|
|
|
259
300
|
* }
|
|
260
301
|
* ```
|
|
261
302
|
*
|
|
303
|
+
* @see {@link decodeAll} For multiple frame decoding
|
|
262
304
|
* @see {@link frames} For automatic packet iteration
|
|
263
305
|
* @see {@link flush} For end-of-stream handling
|
|
306
|
+
* @see {@link decodeSync} For synchronous version
|
|
264
307
|
*/
|
|
265
308
|
decode(packet: Packet): Promise<Frame | null>;
|
|
266
309
|
/**
|
|
@@ -271,6 +314,10 @@ export declare class Decoder implements Disposable {
|
|
|
271
314
|
* Handles decoder buffering and error conditions.
|
|
272
315
|
* May return null if decoder needs more data.
|
|
273
316
|
*
|
|
317
|
+
* **Note**: This method receives only ONE frame per call.
|
|
318
|
+
* A single packet can produce multiple frames (e.g., packed B-frames, codec buffering).
|
|
319
|
+
* To receive all frames from a packet, use {@link decodeAllSync} or {@link framesSync} instead.
|
|
320
|
+
*
|
|
274
321
|
* @param packet - Compressed packet to decode
|
|
275
322
|
*
|
|
276
323
|
* @returns Decoded frame or null if more data needed or decoder is closed
|
|
@@ -285,9 +332,86 @@ export declare class Decoder implements Disposable {
|
|
|
285
332
|
* }
|
|
286
333
|
* ```
|
|
287
334
|
*
|
|
335
|
+
* @see {@link decodeAllSync} For multiple frame decoding
|
|
336
|
+
* @see {@link framesSync} For automatic packet iteration
|
|
337
|
+
* @see {@link flushSync} For end-of-stream handling
|
|
288
338
|
* @see {@link decode} For async version
|
|
289
339
|
*/
|
|
290
340
|
decodeSync(packet: Packet): Frame | null;
|
|
341
|
+
/**
|
|
342
|
+
* Decode a packet to frames.
|
|
343
|
+
*
|
|
344
|
+
* Sends a packet to the decoder and receives all available decoded frames.
|
|
345
|
+
* Returns array of frames - may be empty if decoder needs more data.
|
|
346
|
+
* One packet can produce zero, one, or multiple frames depending on codec.
|
|
347
|
+
* Automatically manages decoder state and error recovery.
|
|
348
|
+
*
|
|
349
|
+
* Direct mapping to avcodec_send_packet() and avcodec_receive_frame().
|
|
350
|
+
*
|
|
351
|
+
* @param packet - Compressed packet to decode
|
|
352
|
+
*
|
|
353
|
+
* @returns Array of decoded frames (empty if more data needed or decoder is closed)
|
|
354
|
+
*
|
|
355
|
+
* @throws {FFmpegError} If decoding fails
|
|
356
|
+
*
|
|
357
|
+
* @example
|
|
358
|
+
* ```typescript
|
|
359
|
+
* const frames = await decoder.decodeAll(packet);
|
|
360
|
+
* for (const frame of frames) {
|
|
361
|
+
* console.log(`Decoded frame with PTS: ${frame.pts}`);
|
|
362
|
+
* frame.free();
|
|
363
|
+
* }
|
|
364
|
+
* ```
|
|
365
|
+
*
|
|
366
|
+
* @example
|
|
367
|
+
* ```typescript
|
|
368
|
+
* for await (const packet of input.packets()) {
|
|
369
|
+
* if (packet.streamIndex === decoder.getStream().index) {
|
|
370
|
+
* const frames = await decoder.decodeAll(packet);
|
|
371
|
+
* for (const frame of frames) {
|
|
372
|
+
* await processFrame(frame);
|
|
373
|
+
* frame.free();
|
|
374
|
+
* }
|
|
375
|
+
* }
|
|
376
|
+
* packet.free();
|
|
377
|
+
* }
|
|
378
|
+
* ```
|
|
379
|
+
*
|
|
380
|
+
* @see {@link decode} For single packet decoding
|
|
381
|
+
* @see {@link frames} For automatic packet iteration
|
|
382
|
+
* @see {@link flush} For end-of-stream handling
|
|
383
|
+
* @see {@link decodeAllSync} For synchronous version
|
|
384
|
+
*/
|
|
385
|
+
decodeAll(packet: Packet): Promise<Frame[]>;
|
|
386
|
+
/**
|
|
387
|
+
* Decode a packet to frames synchronously.
|
|
388
|
+
* Synchronous version of decodeAll.
|
|
389
|
+
*
|
|
390
|
+
* Sends packet to decoder and receives all available decoded frames.
|
|
391
|
+
* Returns array of frames - may be empty if decoder needs more data.
|
|
392
|
+
* One packet can produce zero, one, or multiple frames depending on codec.
|
|
393
|
+
*
|
|
394
|
+
* @param packet - Compressed packet to decode
|
|
395
|
+
*
|
|
396
|
+
* @returns Array of decoded frames (empty if more data needed or decoder is closed)
|
|
397
|
+
*
|
|
398
|
+
* @throws {FFmpegError} If decoding fails
|
|
399
|
+
*
|
|
400
|
+
* @example
|
|
401
|
+
* ```typescript
|
|
402
|
+
* const frames = decoder.decodeAllSync(packet);
|
|
403
|
+
* for (const frame of frames) {
|
|
404
|
+
* console.log(`Decoded: ${frame.width}x${frame.height}`);
|
|
405
|
+
* frame.free();
|
|
406
|
+
* }
|
|
407
|
+
* ```
|
|
408
|
+
*
|
|
409
|
+
* @see {@link decodeSync} For single packet decoding
|
|
410
|
+
* @see {@link framesSync} For automatic packet iteration
|
|
411
|
+
* @see {@link flushSync} For end-of-stream handling
|
|
412
|
+
* @see {@link decodeAll} For async version
|
|
413
|
+
*/
|
|
414
|
+
decodeAllSync(packet: Packet): Frame[];
|
|
291
415
|
/**
|
|
292
416
|
* Decode packet stream to frame stream.
|
|
293
417
|
*
|
|
@@ -306,7 +430,7 @@ export declare class Decoder implements Disposable {
|
|
|
306
430
|
*
|
|
307
431
|
* @example
|
|
308
432
|
* ```typescript
|
|
309
|
-
* await using input = await
|
|
433
|
+
* await using input = await Demuxer.open('video.mp4');
|
|
310
434
|
* using decoder = await Decoder.create(input.video());
|
|
311
435
|
*
|
|
312
436
|
* for await (const frame of decoder.frames(input.packets())) {
|
|
@@ -340,9 +464,10 @@ export declare class Decoder implements Disposable {
|
|
|
340
464
|
* ```
|
|
341
465
|
*
|
|
342
466
|
* @see {@link decode} For single packet decoding
|
|
343
|
-
* @see {@link
|
|
467
|
+
* @see {@link Demuxer.packets} For packet source
|
|
468
|
+
* @see {@link framesSync} For sync version
|
|
344
469
|
*/
|
|
345
|
-
frames(packets: AsyncIterable<Packet>): AsyncGenerator<Frame>;
|
|
470
|
+
frames(packets: AsyncIterable<Packet | null>): AsyncGenerator<Frame | null>;
|
|
346
471
|
/**
|
|
347
472
|
* Decode packet stream to frame stream synchronously.
|
|
348
473
|
* Synchronous version of frames.
|
|
@@ -367,9 +492,11 @@ export declare class Decoder implements Disposable {
|
|
|
367
492
|
* }
|
|
368
493
|
* ```
|
|
369
494
|
*
|
|
495
|
+
* @see {@link decodeSync} For single packet decoding
|
|
496
|
+
* @see {@link Demuxer.packetsSync} For packet source
|
|
370
497
|
* @see {@link frames} For async version
|
|
371
498
|
*/
|
|
372
|
-
framesSync(packets: Iterable<Packet>): Generator<Frame>;
|
|
499
|
+
framesSync(packets: Iterable<Packet | null>): Generator<Frame | null>;
|
|
373
500
|
/**
|
|
374
501
|
* Flush decoder and signal end-of-stream.
|
|
375
502
|
*
|
|
@@ -396,6 +523,7 @@ export declare class Decoder implements Disposable {
|
|
|
396
523
|
*
|
|
397
524
|
* @see {@link flushFrames} For convenient async iteration
|
|
398
525
|
* @see {@link receive} For getting buffered frames
|
|
526
|
+
* @see {@link flushSync} For synchronous version
|
|
399
527
|
*/
|
|
400
528
|
flush(): Promise<void>;
|
|
401
529
|
/**
|
|
@@ -418,6 +546,8 @@ export declare class Decoder implements Disposable {
|
|
|
418
546
|
* }
|
|
419
547
|
* ```
|
|
420
548
|
*
|
|
549
|
+
* @see {@link flushFramesSync} For convenient sync iteration
|
|
550
|
+
* @see {@link receiveSync} For getting buffered frames
|
|
421
551
|
* @see {@link flush} For async version
|
|
422
552
|
*/
|
|
423
553
|
flushSync(): void;
|
|
@@ -440,8 +570,9 @@ export declare class Decoder implements Disposable {
|
|
|
440
570
|
* }
|
|
441
571
|
* ```
|
|
442
572
|
*
|
|
573
|
+
* @see {@link decode} For sending packets and receiving frames
|
|
443
574
|
* @see {@link flush} For signaling end-of-stream
|
|
444
|
-
* @see {@link
|
|
575
|
+
* @see {@link flushFramesSync} For synchronous version
|
|
445
576
|
*/
|
|
446
577
|
flushFrames(): AsyncGenerator<Frame>;
|
|
447
578
|
/**
|
|
@@ -464,6 +595,8 @@ export declare class Decoder implements Disposable {
|
|
|
464
595
|
* }
|
|
465
596
|
* ```
|
|
466
597
|
*
|
|
598
|
+
* @see {@link decodeSync} For sending packets and receiving frames
|
|
599
|
+
* @see {@link flushSync} For signaling end-of-stream
|
|
467
600
|
* @see {@link flushFrames} For async version
|
|
468
601
|
*/
|
|
469
602
|
flushFramesSync(): Generator<Frame>;
|
|
@@ -502,6 +635,7 @@ export declare class Decoder implements Disposable {
|
|
|
502
635
|
*
|
|
503
636
|
* @see {@link decode} For sending packets and receiving frames
|
|
504
637
|
* @see {@link flush} For signaling end-of-stream
|
|
638
|
+
* @see {@link receiveSync} For synchronous version
|
|
505
639
|
*/
|
|
506
640
|
receive(): Promise<Frame | null>;
|
|
507
641
|
/**
|
|
@@ -538,9 +672,25 @@ export declare class Decoder implements Disposable {
|
|
|
538
672
|
* }
|
|
539
673
|
* ```
|
|
540
674
|
*
|
|
675
|
+
* @see {@link decodeSync} For sending packets and receiving frames
|
|
676
|
+
* @see {@link flushSync} For signaling end-of-stream
|
|
541
677
|
* @see {@link receive} For async version
|
|
542
678
|
*/
|
|
543
679
|
receiveSync(): Frame | null;
|
|
680
|
+
/**
|
|
681
|
+
* Pipe decoded frames to a filter component or encoder.
|
|
682
|
+
*
|
|
683
|
+
* @param target - Filter to receive frames or encoder to encode frames
|
|
684
|
+
*
|
|
685
|
+
* @returns Scheduler for continued chaining
|
|
686
|
+
*
|
|
687
|
+
* @example
|
|
688
|
+
* ```typescript
|
|
689
|
+
* decoder.pipeTo(filter).pipeTo(encoder)
|
|
690
|
+
* ```
|
|
691
|
+
*/
|
|
692
|
+
pipeTo(target: FilterAPI): Scheduler<Packet>;
|
|
693
|
+
pipeTo(target: Encoder): Scheduler<Packet>;
|
|
544
694
|
/**
|
|
545
695
|
* Close decoder and free resources.
|
|
546
696
|
*
|
|
@@ -601,6 +751,118 @@ export declare class Decoder implements Disposable {
|
|
|
601
751
|
* @see {@link CodecContext} For context details
|
|
602
752
|
*/
|
|
603
753
|
getCodecContext(): CodecContext | null;
|
|
754
|
+
/**
|
|
755
|
+
* Worker loop for push-based processing.
|
|
756
|
+
*
|
|
757
|
+
* @internal
|
|
758
|
+
*/
|
|
759
|
+
private runWorker;
|
|
760
|
+
/**
|
|
761
|
+
* Send packet to input queue.
|
|
762
|
+
*
|
|
763
|
+
* @param packet - Packet to send
|
|
764
|
+
*
|
|
765
|
+
* @internal
|
|
766
|
+
*/
|
|
767
|
+
private sendToQueue;
|
|
768
|
+
/**
|
|
769
|
+
* Receive frame from output queue.
|
|
770
|
+
*
|
|
771
|
+
* @returns Frame from output queue or null if closed
|
|
772
|
+
*
|
|
773
|
+
* @internal
|
|
774
|
+
*/
|
|
775
|
+
private receiveFromQueue;
|
|
776
|
+
/**
|
|
777
|
+
* Flush the entire filter pipeline.
|
|
778
|
+
*
|
|
779
|
+
* Propagates flush through worker, output queue, and next component.
|
|
780
|
+
*
|
|
781
|
+
* @internal
|
|
782
|
+
*/
|
|
783
|
+
private flushPipeline;
|
|
784
|
+
/**
|
|
785
|
+
* Estimate video frame duration.
|
|
786
|
+
*
|
|
787
|
+
* Implements FFmpeg CLI's video_duration_estimate() logic.
|
|
788
|
+
* Uses multiple heuristics to determine frame duration when not explicitly available:
|
|
789
|
+
* 1. Frame duration from container (if reliable)
|
|
790
|
+
* 2. Duration from codec framerate
|
|
791
|
+
* 3. PTS difference between frames
|
|
792
|
+
* 4. Stream framerate
|
|
793
|
+
* 5. Last frame's estimated duration
|
|
794
|
+
*
|
|
795
|
+
* @param frame - Frame to estimate duration for
|
|
796
|
+
*
|
|
797
|
+
* @returns Estimated duration in frame's timebase units
|
|
798
|
+
*
|
|
799
|
+
* @internal
|
|
800
|
+
*/
|
|
801
|
+
private estimateVideoDuration;
|
|
802
|
+
/**
|
|
803
|
+
* Process video frame after decoding.
|
|
804
|
+
*
|
|
805
|
+
* Implements FFmpeg CLI's video_frame_process() logic.
|
|
806
|
+
* Handles:
|
|
807
|
+
* - Hardware frame transfer to software format
|
|
808
|
+
* - PTS assignment from best_effort_timestamp
|
|
809
|
+
* - PTS extrapolation when missing
|
|
810
|
+
* - Duration estimation
|
|
811
|
+
* - Frame tracking for next frame
|
|
812
|
+
*
|
|
813
|
+
* @param frame - Decoded frame to process
|
|
814
|
+
*
|
|
815
|
+
* @internal
|
|
816
|
+
*/
|
|
817
|
+
private processVideoFrame;
|
|
818
|
+
/**
|
|
819
|
+
* Audio samplerate update - handles sample rate changes.
|
|
820
|
+
*
|
|
821
|
+
* Based on FFmpeg's audio_samplerate_update().
|
|
822
|
+
*
|
|
823
|
+
* On sample rate change, chooses a new internal timebase that can represent
|
|
824
|
+
* timestamps from all sample rates seen so far. Uses GCD to find minimal
|
|
825
|
+
* common timebase, with fallback to LCM of common sample rates (28224000).
|
|
826
|
+
*
|
|
827
|
+
* Handles:
|
|
828
|
+
* - Sample rate change detection
|
|
829
|
+
* - Timebase calculation via GCD
|
|
830
|
+
* - Overflow detection and fallback
|
|
831
|
+
* - Frame timebase optimization
|
|
832
|
+
* - Rescaling existing timestamps
|
|
833
|
+
*
|
|
834
|
+
* @param frame - Audio frame to process
|
|
835
|
+
*
|
|
836
|
+
* @returns Timebase to use for this frame
|
|
837
|
+
*
|
|
838
|
+
* @internal
|
|
839
|
+
*/
|
|
840
|
+
private audioSamplerateUpdate;
|
|
841
|
+
/**
|
|
842
|
+
* Audio timestamp processing - handles audio frame timestamps.
|
|
843
|
+
*
|
|
844
|
+
* Based on FFmpeg's audio_ts_process().
|
|
845
|
+
*
|
|
846
|
+
* Processes audio frame timestamps with:
|
|
847
|
+
* - Sample rate change handling via audioSamplerateUpdate()
|
|
848
|
+
* - PTS extrapolation when missing (pts_pred)
|
|
849
|
+
* - Gap detection (resets av_rescale_delta state)
|
|
850
|
+
* - Smooth timestamp conversion via av_rescale_delta
|
|
851
|
+
* - Duration calculation from nb_samples
|
|
852
|
+
* - Conversion to filtering timebase {1, sample_rate}
|
|
853
|
+
*
|
|
854
|
+
* Handles:
|
|
855
|
+
* - Dynamic sample rate changes
|
|
856
|
+
* - Missing timestamps (AV_NOPTS_VALUE)
|
|
857
|
+
* - Timestamp gaps/discontinuities
|
|
858
|
+
* - Sample-accurate timestamp generation
|
|
859
|
+
* - Frame duration calculation
|
|
860
|
+
*
|
|
861
|
+
* @param frame - Decoded audio frame to process
|
|
862
|
+
*
|
|
863
|
+
* @internal
|
|
864
|
+
*/
|
|
865
|
+
private processAudioFrame;
|
|
604
866
|
/**
|
|
605
867
|
* Dispose of decoder.
|
|
606
868
|
*
|