node-av 6.2.0-beta.32 → 6.2.0-beta.34

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.
@@ -0,0 +1,584 @@
1
+ var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
2
+ if (value !== null && value !== void 0) {
3
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
4
+ var dispose, inner;
5
+ if (async) {
6
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
7
+ dispose = value[Symbol.asyncDispose];
8
+ }
9
+ if (dispose === void 0) {
10
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
11
+ dispose = value[Symbol.dispose];
12
+ if (async) inner = dispose;
13
+ }
14
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
15
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
16
+ env.stack.push({ value: value, dispose: dispose, async: async });
17
+ }
18
+ else if (async) {
19
+ env.stack.push({ async: true });
20
+ }
21
+ return value;
22
+ };
23
+ var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
24
+ return function (env) {
25
+ function fail(e) {
26
+ env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
27
+ env.hasError = true;
28
+ }
29
+ var r, s = 0;
30
+ function next() {
31
+ while (r = env.stack.pop()) {
32
+ try {
33
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
34
+ if (r.dispose) {
35
+ var result = r.dispose.call(r.value);
36
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
37
+ }
38
+ else s |= 1;
39
+ }
40
+ catch (e) {
41
+ fail(e);
42
+ }
43
+ }
44
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
45
+ if (env.hasError) throw env.error;
46
+ }
47
+ return next();
48
+ };
49
+ })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
50
+ var e = new Error(message);
51
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
52
+ });
53
+ import { AVCOL_RANGE_MPEG, AV_CODEC_CAP_EXPERIMENTAL, AV_CODEC_CAP_HARDWARE, AV_HWDEVICE_TYPE_CUDA, AV_HWDEVICE_TYPE_D3D11VA, AV_HWDEVICE_TYPE_DRM, AV_HWDEVICE_TYPE_DXVA2, AV_HWDEVICE_TYPE_OPENCL, AV_HWDEVICE_TYPE_VAAPI, AV_HWDEVICE_TYPE_VDPAU, AV_HWDEVICE_TYPE_VIDEOTOOLBOX, AV_LOG_WARNING, AV_PIX_FMT_NV12, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P, } from '../../constants/constants.js';
54
+ import { Codec } from '../../lib/codec.js';
55
+ import { Filter } from '../../lib/filter.js';
56
+ import { Frame } from '../../lib/frame.js';
57
+ import { Log } from '../../lib/log.js';
58
+ import { Rational } from '../../lib/rational.js';
59
+ import { avGetPixFmtName, avIsHardwarePixelFormat } from '../../lib/utilities.js';
60
+ import { Decoder } from '../decoder.js';
61
+ import { Encoder } from '../encoder.js';
62
+ import { FilterPreset } from '../filter-presets.js';
63
+ import { FilterAPI } from '../filter.js';
64
+ import { pickSupportedPixelFormat } from './codec-format.js';
65
+ import { resolveScaleSize } from './scale-size.js';
66
+ /**
67
+ * Devices whose upload and scaler are proven together; elsewhere software frames are scaled on the CPU.
68
+ *
69
+ * @internal
70
+ */
71
+ const UPLOAD_SCALE_DEVICES = [AV_HWDEVICE_TYPE_VAAPI, AV_HWDEVICE_TYPE_CUDA, AV_HWDEVICE_TYPE_VIDEOTOOLBOX];
72
+ /**
73
+ * Devices without encoders of their own, they borrow one from a GPU vendor.
74
+ *
75
+ * @internal
76
+ */
77
+ const BORROWING_DEVICES = [
78
+ AV_HWDEVICE_TYPE_D3D11VA,
79
+ AV_HWDEVICE_TYPE_DXVA2,
80
+ AV_HWDEVICE_TYPE_OPENCL,
81
+ AV_HWDEVICE_TYPE_VDPAU,
82
+ AV_HWDEVICE_TYPE_DRM,
83
+ ];
84
+ /**
85
+ * The vendor encoders such a device borrows, in the order {@link HardwareContext.getEncoderCodec} looks for them.
86
+ *
87
+ * @internal
88
+ */
89
+ const VENDOR_ENCODERS = ['nvenc', 'qsv', 'amf'];
90
+ /**
91
+ * How long a hardware encoder that failed its test stays passed over, a busy GPU can recover.
92
+ *
93
+ * @internal
94
+ */
95
+ const FAILED_PROBE_RETRY_MS = 60_000;
96
+ /**
97
+ * Size of the test frame a hardware encoder has to encode, when the caller names none.
98
+ *
99
+ * @internal
100
+ */
101
+ const PROBE_SIZE = { width: 640, height: 360 };
102
+ /**
103
+ * Test encodes per device and encoder, failures with the time they failed.
104
+ *
105
+ * @internal
106
+ */
107
+ const encoderProbes = new Map();
108
+ /**
109
+ * No scaler and no upload for scaling, the graph of a device whose filters failed.
110
+ *
111
+ * @internal
112
+ */
113
+ const NO_DEVICE_FILTERS = { scaler: false, upload: false };
114
+ /**
115
+ * Filters per device type, the build decides which exist.
116
+ *
117
+ * @internal
118
+ */
119
+ const deviceFilterCache = new Map();
120
+ /**
121
+ * Build the filter graph that brings a decoded frame to the video encoder of a transcode.
122
+ *
123
+ * Frames stay on the device whenever the encoder takes them there, and scaling
124
+ * and format conversion run on the device whenever it has a scaler. Hardware
125
+ * encoders get 8-bit 4:2:0 in NV12: VAAPI decodes JPEG into planar or 4:2:2
126
+ * surfaces and 10-bit sources come as P010, which H.264 hardware encoders reject.
127
+ * Software encoders get yuv420p when the frames have to be converted anyway, it
128
+ * is the layout every browser and HomeKit decodes (unlike the 4:2:2 profile x264
129
+ * picks for a 4:2:2 JPEG camera). Packed sources such as yuyv422 are converted
130
+ * too, swscale cannot scale them in place.
131
+ *
132
+ * Decided per frame, not per stream: a hardware decoder falls back to software
133
+ * frames for input it cannot handle, e.g. 4:2:2 JPEG on NVDEC.
134
+ *
135
+ * @param input - The frame
136
+ *
137
+ * @param target - The encoder's needs
138
+ *
139
+ * @param filters - What the target's device has, see {@link findDeviceFilters}
140
+ *
141
+ * @returns The filter description, `null` when the frame can go to the encoder as it is
142
+ *
143
+ * @internal
144
+ */
145
+ export function videoTranscodeGraph(input, target, filters) {
146
+ const { encoder, hardware } = target;
147
+ const size = resolveScaleSize(input.width, input.height, target.width, target.height);
148
+ const parts = [];
149
+ let resize = size.width !== input.width || size.height !== input.height;
150
+ let format = input.format;
151
+ // a frame dropped first costs no later stage anything
152
+ if (target.fps !== undefined)
153
+ parts.push(`fps=${target.fps}`);
154
+ const takesDevice = !!hardware && encoderTakesDevice(encoder, hardware);
155
+ if (input.hw) {
156
+ if (input.onDevice && filters.scaler) {
157
+ // the scaler converts in the same pass, and a software encoder gets NV12 downloaded
158
+ if (resize || format !== AV_PIX_FMT_NV12)
159
+ parts.push(deviceScale(hardware, resize ? size : undefined));
160
+ if (takesDevice)
161
+ return finish(parts);
162
+ parts.push('hwdownload', 'format=nv12');
163
+ format = AV_PIX_FMT_NV12;
164
+ resize = false;
165
+ }
166
+ else if (input.onDevice && takesDevice && !resize && format === AV_PIX_FMT_NV12) {
167
+ return finish(parts);
168
+ }
169
+ else {
170
+ parts.push('hwdownload', `format=${pixFmtName(format)}`);
171
+ }
172
+ }
173
+ // software frames from here on
174
+ const softwareFormat = encoderSoftwareFormat(encoder);
175
+ if (hardware && (softwareFormat === null || (takesDevice && resize && filters.upload && filters.scaler))) {
176
+ // the encoder takes device frames only, or the device scales cheaper than the CPU
177
+ const scaleOnDevice = resize && filters.scaler;
178
+ if (resize && !scaleOnDevice)
179
+ parts.push(`scale=${size.width}:${size.height}`);
180
+ parts.push('format=nv12', FilterPreset.chain(hardware).hwupload().build());
181
+ if (scaleOnDevice)
182
+ parts.push(deviceScale(hardware, size));
183
+ return finish(parts);
184
+ }
185
+ if (resize)
186
+ parts.push(`scale=${size.width}:${size.height}`);
187
+ if (resize || !takesAsIs(encoder, format))
188
+ parts.push(`format=${pixFmtName(softwareFormat ?? AV_PIX_FMT_NV12)}`);
189
+ return finish(parts);
190
+ }
191
+ /**
192
+ * Describe a decoded frame for {@link videoTranscodeGraph}.
193
+ *
194
+ * @param frame - The frame
195
+ *
196
+ * @param hardware - The transcode's device, if any
197
+ *
198
+ * @returns Where the frame lives, its format and size
199
+ *
200
+ * @internal
201
+ */
202
+ export function describeVideoFrame(frame, hardware) {
203
+ const hw = frame.isHwFrame();
204
+ return {
205
+ hw,
206
+ onDevice: hw && !!hardware && frame.format === hardware.devicePixelFormat,
207
+ format: hw ? (frame.hwFramesCtx?.swFormat ?? AV_PIX_FMT_NV12) : frame.format,
208
+ width: frame.width,
209
+ height: frame.height,
210
+ };
211
+ }
212
+ /**
213
+ * Create the filter between the video decoder (or frame source) and the encoder of a transcode.
214
+ *
215
+ * The graph is built by {@link videoTranscodeGraph} from the first frame and
216
+ * again whenever the frames change, e.g. when the decoder falls back to software.
217
+ * A graph whose device filters fail to configure is replaced by one that
218
+ * converts in software.
219
+ *
220
+ * @param target - The encoder's needs
221
+ *
222
+ * @param filters - The device's filters, found by default
223
+ *
224
+ * @returns The filter
225
+ *
226
+ * @internal
227
+ */
228
+ export function createVideoTranscodeFilter(target, filters = findDeviceFilters(target.hardware)) {
229
+ return FilterAPI.create((frame, failure) => {
230
+ const input = describeVideoFrame(frame, target.hardware);
231
+ if (!failure) {
232
+ return videoTranscodeGraph(input, target, filters);
233
+ }
234
+ Log.log(AV_LOG_WARNING, `Video filters on ${target.hardware?.deviceTypeName ?? 'the CPU'} failed (${failure.message}), converting in software\n`);
235
+ return videoTranscodeGraph(input, target, NO_DEVICE_FILTERS);
236
+ }, { hardware: target.hardware });
237
+ }
238
+ /**
239
+ * Open the video decoder of a transcode, on the device unless it fails to open there.
240
+ *
241
+ * A device decoder that opens but then produces nothing moves to software on
242
+ * its own ({@link DecoderOptions.hardwareFallback}).
243
+ *
244
+ * @param stream - The video stream
245
+ *
246
+ * @param hardware - The device to decode on, if any
247
+ *
248
+ * @param options - Decoder options besides the device
249
+ *
250
+ * @returns The decoder
251
+ *
252
+ * @throws {FFmpegError} If no software decoder opens either
253
+ *
254
+ * @internal
255
+ */
256
+ export async function openTranscodeDecoder(stream, hardware, options) {
257
+ if (hardware) {
258
+ try {
259
+ return await Decoder.create(stream, { ...options, hardware, hardwareFallback: true });
260
+ }
261
+ catch (error) {
262
+ Log.log(AV_LOG_WARNING, `Video decoder failed to open on ${hardware.deviceTypeName}, decoding in software: ${error.message}\n`);
263
+ }
264
+ }
265
+ return await Decoder.create(stream, options);
266
+ }
267
+ /**
268
+ * Find the software encoder for a codec.
269
+ *
270
+ * FFmpeg picks the first encoder registered for a codec. The Linux arm64
271
+ * builds register the Rockchip MPP encoders ahead of libx264 and libx265, and
272
+ * those fail to open on every other arm64 machine, e.g. a Raspberry Pi.
273
+ *
274
+ * @param codecId - The codec to encode
275
+ *
276
+ * @returns The first encoder for the codec that is no hardware encoder, FFmpeg's pick when there is none
277
+ *
278
+ * @internal
279
+ */
280
+ export function findSoftwareEncoder(codecId) {
281
+ let opaque = null;
282
+ let result;
283
+ while ((result = Codec.iterateCodecs(opaque))) {
284
+ const { codec } = result;
285
+ if (codec.isEncoder() && codec.id === codecId && !codec.hasCapabilities(AV_CODEC_CAP_HARDWARE) && !codec.hasCapabilities(AV_CODEC_CAP_EXPERIMENTAL)) {
286
+ return codec;
287
+ }
288
+ opaque = result.opaque;
289
+ }
290
+ return Codec.findEncoder(codecId);
291
+ }
292
+ /**
293
+ * Find the device's encoder for a codec, if it works on this machine.
294
+ *
295
+ * @param hardware - The device, if any
296
+ *
297
+ * @param codec - The codec to encode
298
+ *
299
+ * @param options - Encoder options the encoder will get, some drivers need them to open (e.g. `low_power`)
300
+ *
301
+ * @param size - The size it will encode, hardware encoders have a maximum that differs per GPU
302
+ *
303
+ * @param size.width - Width
304
+ *
305
+ * @param size.height - Height
306
+ *
307
+ * @returns The hardware encoder, or null to encode in software
308
+ *
309
+ * @internal
310
+ */
311
+ export async function findUsableHardwareEncoder(hardware, codec, options, size) {
312
+ const encoder = hardware?.getEncoderCodec(codec);
313
+ if (!encoder || !hardware) {
314
+ return null;
315
+ }
316
+ for (const candidate of encoderCandidates(encoder, hardware)) {
317
+ if (await canEncodeOnDevice(candidate, hardware, options, size)) {
318
+ return candidate;
319
+ }
320
+ }
321
+ return null;
322
+ }
323
+ /**
324
+ * The encoders to try for a device, the one it names first.
325
+ *
326
+ * A device without encoders of its own names the first vendor encoder the
327
+ * build has, NVENC on every Windows build. On an AMD or Intel GPU that one
328
+ * cannot work but the vendor's own can.
329
+ *
330
+ * @param encoder - The encoder the device names
331
+ *
332
+ * @param hardware - The device
333
+ *
334
+ * @returns The encoders in the order to try them
335
+ *
336
+ * @internal
337
+ */
338
+ function encoderCandidates(encoder, hardware) {
339
+ const name = encoder.name;
340
+ if (!name || !BORROWING_DEVICES.includes(hardware.deviceType)) {
341
+ return [encoder];
342
+ }
343
+ const base = name.slice(0, name.lastIndexOf('_'));
344
+ const others = VENDOR_ENCODERS.map((vendor) => Codec.findEncoderByName(`${base}_${vendor}`)).filter((candidate) => !!candidate?.isHardwareAcceleratedEncoder() && candidate.name !== name);
345
+ return [encoder, ...others];
346
+ }
347
+ /**
348
+ * Check whether a hardware encoder works on this machine, by encoding a test frame once.
349
+ *
350
+ * Finding an encoder says nothing about the driver: NVENC refuses to open
351
+ * when the driver is older than the API it was built against, many GPUs have
352
+ * no encoder at all. A failed encoder is passed over for a minute, then tried
353
+ * again. Concurrent callers share one test.
354
+ *
355
+ * @param encoder - The hardware encoder
356
+ *
357
+ * @param hardware - The device it encodes on
358
+ *
359
+ * @param options - Encoder options the encoder will get
360
+ *
361
+ * @param size - Size of the test frame
362
+ *
363
+ * @param size.width - Width
364
+ *
365
+ * @param size.height - Height
366
+ *
367
+ * @returns Whether it encoded the frame
368
+ *
369
+ * @internal
370
+ */
371
+ export async function canEncodeOnDevice(encoder, hardware, options, size = PROBE_SIZE) {
372
+ const settings = JSON.stringify(options ?? {}, (_key, value) => (typeof value === 'bigint' ? String(value) : value));
373
+ const key = `${hardware.deviceTypeName}:${encoder.name}:${size.width}x${size.height}:${settings}`;
374
+ const known = encoderProbes.get(key);
375
+ if (known && (known.failedAt === undefined || Date.now() - known.failedAt < FAILED_PROBE_RETRY_MS)) {
376
+ return known.usable;
377
+ }
378
+ const probe = { usable: probeEncoder(encoder, hardware, options, size) };
379
+ encoderProbes.set(key, probe);
380
+ const usable = await probe.usable;
381
+ if (!usable) {
382
+ probe.failedAt = Date.now();
383
+ Log.log(AV_LOG_WARNING, `Hardware encoder ${encoder.name} failed to encode a ${size.width}x${size.height} test frame on ${hardware.deviceTypeName}, encoding video in software\n`);
384
+ }
385
+ return usable;
386
+ }
387
+ /**
388
+ * Encode one frame with a hardware encoder.
389
+ *
390
+ * @param codec - The hardware encoder
391
+ *
392
+ * @param hardware - The device it encodes on
393
+ *
394
+ * @param options - Encoder options
395
+ *
396
+ * @param size - Size of the test frame
397
+ *
398
+ * @param size.width - Width
399
+ *
400
+ * @param size.height - Height
401
+ *
402
+ * @returns Whether a packet came out
403
+ *
404
+ * @internal
405
+ */
406
+ async function probeEncoder(codec, hardware, options, size) {
407
+ try {
408
+ const env_1 = { stack: [], error: void 0, hasError: false };
409
+ try {
410
+ const frame = __addDisposableResource(env_1, Frame.fromVideoBuffer(Buffer.alloc((size.width * size.height * 3) / 2), {
411
+ width: size.width,
412
+ height: size.height,
413
+ format: AV_PIX_FMT_NV12,
414
+ timeBase: { num: 1, den: 25 },
415
+ pts: 0n,
416
+ }), false);
417
+ // an unset range makes some encoders warn
418
+ frame.colorRange = AVCOL_RANGE_MPEG;
419
+ const upload = __addDisposableResource(env_1, encoderSoftwareFormat(codec) === null ? FilterAPI.create(FilterPreset.chain(hardware).hwupload().build(), { hardware }) : undefined, false);
420
+ const encoder = __addDisposableResource(env_1, await Encoder.create(codec, {
421
+ maxBFrames: 0,
422
+ options,
423
+ configure: (context) => {
424
+ context.framerate = new Rational(25, 1);
425
+ },
426
+ }), false);
427
+ const inputs = upload ? await upload.processAll(frame) : [frame];
428
+ let packets = 0;
429
+ try {
430
+ for (const input of inputs) {
431
+ for (const packet of await encoder.encodeAll(input)) {
432
+ packets++;
433
+ packet.free();
434
+ }
435
+ }
436
+ }
437
+ finally {
438
+ if (upload)
439
+ inputs.forEach((input) => input.free());
440
+ }
441
+ for await (const _packet_1 of encoder.flushPackets()) {
442
+ const env_2 = { stack: [], error: void 0, hasError: false };
443
+ try {
444
+ const _packet = __addDisposableResource(env_2, _packet_1, false);
445
+ packets++;
446
+ }
447
+ catch (e_1) {
448
+ env_2.error = e_1;
449
+ env_2.hasError = true;
450
+ }
451
+ finally {
452
+ __disposeResources(env_2);
453
+ }
454
+ }
455
+ return packets > 0;
456
+ }
457
+ catch (e_2) {
458
+ env_1.error = e_2;
459
+ env_1.hasError = true;
460
+ }
461
+ finally {
462
+ __disposeResources(env_1);
463
+ }
464
+ }
465
+ catch {
466
+ return false;
467
+ }
468
+ }
469
+ /**
470
+ * Whether an encoder takes the frames of a device as they are.
471
+ *
472
+ * @param encoder - The encoder
473
+ *
474
+ * @param hardware - The device
475
+ *
476
+ * @returns True for a hardware encoder that lists the device's pixel format
477
+ *
478
+ * @internal
479
+ */
480
+ function encoderTakesDevice(encoder, hardware) {
481
+ return encoder.isHardwareAcceleratedEncoder() && (encoder.pixelFormats?.includes(hardware.devicePixelFormat) ?? false);
482
+ }
483
+ /**
484
+ * The software format to convert frames to for an encoder.
485
+ *
486
+ * @param encoder - The encoder
487
+ *
488
+ * @returns NV12 for hardware encoders and yuv420p for software ones when listed,
489
+ * otherwise the closest listed software format; `null` if it takes device frames only
490
+ *
491
+ * @internal
492
+ */
493
+ function encoderSoftwareFormat(encoder) {
494
+ const formats = encoder.pixelFormats;
495
+ if (!formats || formats.length === 0)
496
+ return AV_PIX_FMT_YUV420P;
497
+ const preferred = encoder.isHardwareAcceleratedEncoder() ? [AV_PIX_FMT_NV12, AV_PIX_FMT_YUV420P] : [AV_PIX_FMT_YUV420P, AV_PIX_FMT_NV12];
498
+ const listed = preferred.find((format) => formats.includes(format));
499
+ if (listed !== undefined)
500
+ return listed;
501
+ const software = formats.filter((format) => !avIsHardwarePixelFormat(format));
502
+ return software.length > 0 ? pickSupportedPixelFormat(AV_PIX_FMT_YUV420P, software) : null;
503
+ }
504
+ /**
505
+ * Whether an encoder takes a software frame without conversion.
506
+ *
507
+ * @param encoder - The encoder
508
+ *
509
+ * @param format - The frame's pixel format
510
+ *
511
+ * @returns True for 8-bit 4:2:0 the encoder lists
512
+ *
513
+ * @internal
514
+ */
515
+ function takesAsIs(encoder, format) {
516
+ const is420 = format === AV_PIX_FMT_YUV420P || format === AV_PIX_FMT_YUVJ420P || format === AV_PIX_FMT_NV12;
517
+ return is420 && (encoder.pixelFormats?.includes(format) ?? true);
518
+ }
519
+ /**
520
+ * The device scaler converting to NV12, scaling too when given a size.
521
+ *
522
+ * @param hardware - The device
523
+ *
524
+ * @param size - Output size, if it changes
525
+ *
526
+ * @param size.width - Output width
527
+ *
528
+ * @param size.height - Output height
529
+ *
530
+ * @returns The filter
531
+ *
532
+ * @internal
533
+ */
534
+ function deviceScale(hardware, size) {
535
+ const chain = FilterPreset.chain(hardware);
536
+ return (size ? chain.scale(size.width, size.height, { format: 'nv12' }) : chain.scaleFormat(AV_PIX_FMT_NV12)).build();
537
+ }
538
+ /**
539
+ * Find out which transcode filters a device has in this FFmpeg build.
540
+ *
541
+ * @param hardware - The device, if any
542
+ *
543
+ * @returns Its filters, none without a device
544
+ *
545
+ * @internal
546
+ */
547
+ export function findDeviceFilters(hardware) {
548
+ if (!hardware)
549
+ return NO_DEVICE_FILTERS;
550
+ let filters = deviceFilterCache.get(hardware.deviceType);
551
+ if (!filters) {
552
+ const exists = (description) => Filter.getByName(description.split('=')[0]) !== null;
553
+ const scaler = FilterPreset.chain(hardware).supports('scale') && exists(FilterPreset.chain(hardware).scaleFormat(AV_PIX_FMT_NV12).build());
554
+ const upload = UPLOAD_SCALE_DEVICES.includes(hardware.deviceType) && exists(FilterPreset.chain(hardware).hwupload().build());
555
+ filters = { scaler, upload };
556
+ deviceFilterCache.set(hardware.deviceType, filters);
557
+ }
558
+ return filters;
559
+ }
560
+ /**
561
+ * Join the filters of a graph.
562
+ *
563
+ * @param parts - The filters
564
+ *
565
+ * @returns The description, `null` for none
566
+ *
567
+ * @internal
568
+ */
569
+ function finish(parts) {
570
+ return parts.length > 0 ? parts.join(',') : 'null';
571
+ }
572
+ /**
573
+ * Name of a pixel format for a filter description.
574
+ *
575
+ * @param format - The pixel format
576
+ *
577
+ * @returns Its name
578
+ *
579
+ * @internal
580
+ */
581
+ function pixFmtName(format) {
582
+ return avGetPixFmtName(format) ?? 'nv12';
583
+ }
584
+ //# sourceMappingURL=video-transcode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-transcode.js","sourceRoot":"","sources":["../../../src/api/utilities/video-transcode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,6BAA6B,EAC7B,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,C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AAC,CAAC,CAAC,KAAK,IAAI,CAAC;QACtG,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3I,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QAC7H,OAAO,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAC7B,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,MAAM,CAAC,KAAe;IAC7B,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACrD,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,UAAU,CAAC,MAAqB;IACvC,OAAO,eAAe,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC;AAC3C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-av",
3
- "version": "6.2.0-beta.32",
3
+ "version": "6.2.0-beta.34",
4
4
  "description": "FFmpeg bindings for Node.js",
5
5
  "author": "seydx (https://github.com/seydx/node-av)",
6
6
  "type": "module",
@@ -94,12 +94,12 @@
94
94
  "unzipper": "^0.12.5"
95
95
  },
96
96
  "optionalDependencies": {
97
- "@seydx/node-av-darwin-arm64": "6.2.0-beta.32",
98
- "@seydx/node-av-darwin-x64": "6.2.0-beta.32",
99
- "@seydx/node-av-linux-arm64": "6.2.0-beta.32",
100
- "@seydx/node-av-linux-x64": "6.2.0-beta.32",
101
- "@seydx/node-av-win32-arm64-msvc": "6.2.0-beta.32",
102
- "@seydx/node-av-win32-x64-msvc": "6.2.0-beta.32"
97
+ "@seydx/node-av-darwin-arm64": "6.2.0-beta.34",
98
+ "@seydx/node-av-darwin-x64": "6.2.0-beta.34",
99
+ "@seydx/node-av-linux-arm64": "6.2.0-beta.34",
100
+ "@seydx/node-av-linux-x64": "6.2.0-beta.34",
101
+ "@seydx/node-av-win32-arm64-msvc": "6.2.0-beta.34",
102
+ "@seydx/node-av-win32-x64-msvc": "6.2.0-beta.34"
103
103
  },
104
104
  "peerDependencies": {
105
105
  "werift": "^0.24.3 || ^0.25.0"
@@ -116,12 +116,12 @@
116
116
  "@types/semver": "^7.8.0",
117
117
  "@types/unzipper": "^0.10.11",
118
118
  "@types/ws": "^8.18.2",
119
- "@typescript-eslint/parser": "^8.71.2",
119
+ "@typescript-eslint/parser": "^8.72.0",
120
120
  "concurrently": "^10.0.6",
121
121
  "cpy-cli": "^7.0.0",
122
122
  "cross-env": "^10.1.0",
123
123
  "eslint": "9.39.2",
124
- "eslint-plugin-jsdoc": "^65.3.11",
124
+ "eslint-plugin-jsdoc": "^65.4.2",
125
125
  "globals": "^17.13.0",
126
126
  "node-addon-api": "^8.9.2",
127
127
  "node-gyp": "^13.1.0",
@@ -130,13 +130,13 @@
130
130
  "sharp": "^0.35.5",
131
131
  "tsx": "^4.23.15",
132
132
  "typedoc": "^0.28.20",
133
- "typedoc-plugin-markdown": "^4.14.0",
133
+ "typedoc-plugin-markdown": "^4.14.1",
134
134
  "typedoc-vitepress-theme": "^1.1.4",
135
135
  "typescript": "5.9.3",
136
- "typescript-eslint": "^8.71.2",
137
- "updates": "^19.2.1",
136
+ "typescript-eslint": "^8.72.0",
137
+ "updates": "^19.3.0",
138
138
  "vitepress": "^2.0.0-alpha.20",
139
- "werift": "^0.25.1",
139
+ "werift": "^0.25.2",
140
140
  "ws": "^8.22.0"
141
141
  },
142
142
  "bugs": {