node-av 6.2.0 → 7.0.0-beta.1

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.
@@ -8,10 +8,13 @@ export interface CodecContextOptions {
8
8
  b?: number;
9
9
  /** set bitrate (in bits/s) */
10
10
  ab?: number;
11
- /** Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far */
11
+ /**
12
+ * Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far ratecontrol is willing to deviate from the target average bitrate value.
13
+ * This is not related to minimum/maximum bitrate. Lowering tolerance too much has an adverse effect on quality.
14
+ */
12
15
  bt?: number;
13
16
  flags?: 'unaligned' | 'mv4' | 'qpel' | 'loop' | 'qscale' | 'recon_frame' | 'copy_opaque' | 'frame_duration' | 'pass1' | 'pass2' | 'gray' | 'psnr' | 'ildct' | 'low_delay' | 'global_header' | 'bitexact' | 'aic' | 'ilme' | 'cgop' | 'output_corrupt' | (string & {});
14
- flags2?: 'fast' | 'noout' | 'ignorecrop' | 'local_header' | 'chunks' | 'showall' | 'export_mvs' | 'skip_manual' | 'ass_ro_flush_noop' | 'icc_profiles' | 'fixed_frame_size' | (string & {});
17
+ flags2?: 'fast' | 'noout' | 'ignorecrop' | 'local_header' | 'chunks' | 'showall' | 'export_mvs' | 'skip_manual' | 'ass_ro_flush_noop' | 'icc_profiles' | (string & {});
15
18
  /** Export metadata as side data */
16
19
  export_side_data?: 'mvs' | 'prft' | 'venc_params' | 'film_grain' | 'enhancements' | (string & {});
17
20
  time_base?: string | number;
@@ -24,7 +27,7 @@ export interface CodecContextOptions {
24
27
  frame_size?: number;
25
28
  frame_number?: number;
26
29
  delay?: number;
27
- /** video quantizer scale compression (VBR). Constant of ratecontrol equation. */
30
+ /** video quantizer scale compression (VBR). Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0-1.0 */
28
31
  qcomp?: number;
29
32
  /** video quantizer scale blur (VBR) */
30
33
  qblur?: number;
@@ -198,7 +201,7 @@ export interface CodecContextOptions {
198
201
  /** Percentage of damaged samples to discard a frame */
199
202
  discard_damaged_percentage?: number;
200
203
  /** Comma-separated list of side data types for which user-supplied (container) data is preferred over coded bytestream */
201
- side_data_prefer_packet?: 'replaygain' | 'displaymatrix' | 'spherical' | 'stereo3d' | 'audio_service_type' | 'mastering_display_metadata' | 'content_light_level' | 'icc_profile' | 'exif';
204
+ side_data_prefer_packet?: 'replaygain' | 'displaymatrix' | 'spherical' | 'stereo3d' | 'audio_service_type' | 'mastering_display_metadata' | 'content_light_level' | 'icc_profile' | 'exif' | (string & {});
202
205
  }
203
206
  export interface EncoderOptionsMap {
204
207
  /**
@@ -219,6 +222,172 @@ export interface EncoderOptionsMap {
219
222
  /** Forces the use of PCEs */
220
223
  aac_pce?: boolean;
221
224
  };
225
+ /**
226
+ * aac
227
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#aac_005fat
228
+ */
229
+ aac_at: {
230
+ /** ratecontrol mode */
231
+ aac_at_mode?: 'auto' | 'cbr' | 'abr' | 'cvbr' | 'vbr';
232
+ /** quality vs speed control */
233
+ aac_at_quality?: number;
234
+ };
235
+ /**
236
+ * ATSC A/52A (AC-3)
237
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#ac3
238
+ */
239
+ ac3: {
240
+ /** Center Mix Level */
241
+ center_mixlev?: number;
242
+ /** Surround Mix Level */
243
+ surround_mixlev?: number;
244
+ /** Mixing Level */
245
+ mixing_level?: number;
246
+ /** Room Type */
247
+ room_type?: 'notindicated' | 'large' | 'small';
248
+ /** Allow Changing Metadata Per-Frame */
249
+ per_frame_metadata?: boolean;
250
+ /** Copyright Bit */
251
+ copyright?: number;
252
+ /** Dialogue Level (dB) */
253
+ dialnorm?: number;
254
+ /** Dolby Surround Mode */
255
+ dsur_mode?: 'notindicated' | 'on' | 'off';
256
+ /** Original Bit Stream */
257
+ original?: number;
258
+ /** Preferred Stereo Downmix Mode */
259
+ dmix_mode?: 'notindicated' | 'ltrt' | 'loro' | 'dplii';
260
+ /** Lt/Rt Center Mix Level */
261
+ ltrt_cmixlev?: number;
262
+ /** Lt/Rt Surround Mix Level */
263
+ ltrt_surmixlev?: number;
264
+ /** Lo/Ro Center Mix Level */
265
+ loro_cmixlev?: number;
266
+ /** Lo/Ro Surround Mix Level */
267
+ loro_surmixlev?: number;
268
+ /** Dolby Surround EX Mode */
269
+ dsurex_mode?: 'notindicated' | 'on' | 'off' | 'dpliiz';
270
+ /** Dolby Headphone Mode */
271
+ dheadphone_mode?: 'notindicated' | 'on' | 'off';
272
+ /** A/D Converter Type */
273
+ ad_conv_type?: 'standard' | 'hdcd';
274
+ /** Stereo Rematrixing */
275
+ stereo_rematrixing?: boolean;
276
+ /** Channel Coupling */
277
+ channel_coupling?: 'auto';
278
+ /** Coupling Start Band */
279
+ cpl_start_band?: 'auto';
280
+ };
281
+ /**
282
+ * ATSC A/52A (AC-3)
283
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#ac3_005ffixed
284
+ */
285
+ ac3_fixed: {
286
+ /** Center Mix Level */
287
+ center_mixlev?: number;
288
+ /** Surround Mix Level */
289
+ surround_mixlev?: number;
290
+ /** Mixing Level */
291
+ mixing_level?: number;
292
+ /** Room Type */
293
+ room_type?: 'notindicated' | 'large' | 'small';
294
+ /** Allow Changing Metadata Per-Frame */
295
+ per_frame_metadata?: boolean;
296
+ /** Copyright Bit */
297
+ copyright?: number;
298
+ /** Dialogue Level (dB) */
299
+ dialnorm?: number;
300
+ /** Dolby Surround Mode */
301
+ dsur_mode?: 'notindicated' | 'on' | 'off';
302
+ /** Original Bit Stream */
303
+ original?: number;
304
+ /** Preferred Stereo Downmix Mode */
305
+ dmix_mode?: 'notindicated' | 'ltrt' | 'loro' | 'dplii';
306
+ /** Lt/Rt Center Mix Level */
307
+ ltrt_cmixlev?: number;
308
+ /** Lt/Rt Surround Mix Level */
309
+ ltrt_surmixlev?: number;
310
+ /** Lo/Ro Center Mix Level */
311
+ loro_cmixlev?: number;
312
+ /** Lo/Ro Surround Mix Level */
313
+ loro_surmixlev?: number;
314
+ /** Dolby Surround EX Mode */
315
+ dsurex_mode?: 'notindicated' | 'on' | 'off' | 'dpliiz';
316
+ /** Dolby Headphone Mode */
317
+ dheadphone_mode?: 'notindicated' | 'on' | 'off';
318
+ /** A/D Converter Type */
319
+ ad_conv_type?: 'standard' | 'hdcd';
320
+ /** Stereo Rematrixing */
321
+ stereo_rematrixing?: boolean;
322
+ /** Channel Coupling */
323
+ channel_coupling?: 'auto';
324
+ /** Coupling Start Band */
325
+ cpl_start_band?: 'auto';
326
+ };
327
+ /**
328
+ * ADPCM IMA High Voltage Software ALP
329
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#adpcm_005fima_005falp
330
+ */
331
+ adpcm_ima_alp: {
332
+ /** set the block size */
333
+ block_size?: number;
334
+ };
335
+ /**
336
+ * ADPCM IMA AMV
337
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#adpcm_005fima_005famv
338
+ */
339
+ adpcm_ima_amv: {
340
+ /** set the block size */
341
+ block_size?: number;
342
+ };
343
+ /**
344
+ * ADPCM IMA Ubisoft APM
345
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#adpcm_005fima_005fapm
346
+ */
347
+ adpcm_ima_apm: {
348
+ /** set the block size */
349
+ block_size?: number;
350
+ };
351
+ /**
352
+ * ADPCM IMA Simon & Schuster Interactive
353
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#adpcm_005fima_005fssi
354
+ */
355
+ adpcm_ima_ssi: {
356
+ /** set the block size */
357
+ block_size?: number;
358
+ };
359
+ /**
360
+ * ADPCM IMA WAV
361
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#adpcm_005fima_005fwav
362
+ */
363
+ adpcm_ima_wav: {
364
+ /** set the block size */
365
+ block_size?: number;
366
+ };
367
+ /**
368
+ * ADPCM IMA Westwood
369
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#adpcm_005fima_005fws
370
+ */
371
+ adpcm_ima_ws: {
372
+ /** set the block size */
373
+ block_size?: number;
374
+ };
375
+ /**
376
+ * ADPCM Microsoft
377
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#adpcm_005fms
378
+ */
379
+ adpcm_ms: {
380
+ /** set the block size */
381
+ block_size?: number;
382
+ };
383
+ /**
384
+ * ADPCM Yamaha
385
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#adpcm_005fyamaha
386
+ */
387
+ adpcm_yamaha: {
388
+ /** set the block size */
389
+ block_size?: number;
390
+ };
222
391
  /**
223
392
  * ALAC (Apple Lossless Audio Codec)
224
393
  * @see https://ffmpeg.org/ffmpeg-codecs.html#alac
@@ -227,6 +396,16 @@ export interface EncoderOptionsMap {
227
396
  min_prediction_order?: number;
228
397
  max_prediction_order?: number;
229
398
  };
399
+ /**
400
+ * alac
401
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#alac_005fat
402
+ */
403
+ alac_at: {
404
+ /** ratecontrol mode */
405
+ aac_at_mode?: 'auto' | 'cbr' | 'abr' | 'cvbr' | 'vbr';
406
+ /** quality vs speed control */
407
+ aac_at_quality?: number;
408
+ };
230
409
  /**
231
410
  * AMV Video
232
411
  * @see https://ffmpeg.org/ffmpeg-codecs.html#amv
@@ -247,7 +426,11 @@ export interface EncoderOptionsMap {
247
426
  rc_qmod_amp?: number;
248
427
  /** experimental quantizer modulation */
249
428
  rc_qmod_freq?: number;
250
- /** Set rate control equation. When computing the expression, besides the standard functions */
429
+ /**
430
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
431
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
432
+ * avgPITex avgPPTex avgBPTex avgTex.
433
+ */
251
434
  rc_eq?: string;
252
435
  /** initial complexity for 1-pass encoding */
253
436
  rc_init_cplx?: number;
@@ -393,7 +576,7 @@ export interface EncoderOptionsMap {
393
576
  idr_interval?: number;
394
577
  /** Maximum B-frame reference depth */
395
578
  b_depth?: number;
396
- /** Maximum processing parallelism. */
579
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
397
580
  async_depth?: number;
398
581
  /** Maximum frame size (in bytes) */
399
582
  max_frame_size?: number;
@@ -408,11 +591,57 @@ export interface EncoderOptionsMap {
408
591
  /** Constant QP (for P-frames; scaled by qfactor/qoffset for I/B) */
409
592
  qp?: number;
410
593
  /** Set profile (general_profile_idc) */
411
- profile?: number;
594
+ profile?: 'main' | 'high' | 'professional';
412
595
  /** Set tier (general_tier_flag) */
413
- tier?: number;
596
+ tier?: 'main' | 'high';
414
597
  /** Set level (general_level_idc) */
415
- level?: number;
598
+ level?: '2.0' | '2.1' | '2.2' | '2.3' | '3.0' | '3.1' | '3.2' | '3.3' | '4.0' | '4.1' | '4.2' | '4.3' | '5.0' | '5.1' | '5.2' | '5.3' | '6.0' | '6.1' | '6.2' | '6.3' | '7.0' | '7.1' | '7.2' | '7.3';
599
+ };
600
+ /**
601
+ * AV1
602
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#av1_005fmediacodec
603
+ */
604
+ av1_mediacodec: {
605
+ /** Use MediaCodec from NDK */
606
+ ndk_codec?: boolean;
607
+ /** Try NDK MediaCodec in async mode */
608
+ ndk_async?: boolean;
609
+ /** Select codec by name */
610
+ codec_name?: string;
611
+ /** Bitrate control method */
612
+ bitrate_mode?: 'cq' | 'vbr' | 'cbr' | 'cbr_fd';
613
+ /** Use PTS as DTS. It is enabled automatically if avctx max_b_frames <= 0, since most of Android devices don't output B frames by default. */
614
+ pts_as_dts?: boolean;
615
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
616
+ operating_rate?: number;
617
+ /** minimum quantization parameter for I frame */
618
+ qp_i_min?: number;
619
+ /** minimum quantization parameter for P frame */
620
+ qp_p_min?: number;
621
+ /** minimum quantization parameter for B frame */
622
+ qp_b_min?: number;
623
+ /** maximum quantization parameter for I frame */
624
+ qp_i_max?: number;
625
+ /** maximum quantization parameter for P frame */
626
+ qp_p_max?: number;
627
+ /** maximum quantization parameter for B frame */
628
+ qp_b_max?: number;
629
+ /** Specify tier and level */
630
+ level?: '2' | '2.1' | '2.2' | '2.3' | '3' | '3.1' | '3.2' | '3.3' | '4' | '4.1' | '4.2' | '4.3' | '5' | '5.1' | '5.2' | '5.3' | '6' | '6.1' | '6.2' | '6.3' | '7' | '7.1' | '7.2' | '7.3';
631
+ };
632
+ /**
633
+ * AV1
634
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#av1_005fmf
635
+ */
636
+ av1_mf: {
637
+ /** Select rate control mode */
638
+ rate_control?: 'default' | 'cbr' | 'pc_vbr' | 'u_vbr' | 'quality' | 'ld_vbr' | 'g_vbr' | 'gld_vbr';
639
+ /** Select usage scenario */
640
+ scenario?: 'default' | 'display_remoting' | 'video_conference' | 'archive' | 'live_streaming' | 'camera_record' | 'display_remoting_with_feature_map';
641
+ /** Quality */
642
+ quality?: number;
643
+ /** Force hardware encoding */
644
+ hw_encoding?: boolean;
416
645
  };
417
646
  /**
418
647
  * NVIDIA NVENC av1 encoder
@@ -422,7 +651,7 @@ export interface EncoderOptionsMap {
422
651
  /** Set the encoding preset */
423
652
  preset?: 'default' | 'slow' | 'medium' | 'fast' | 'p1' | 'p2' | 'p3' | 'p4' | 'p5' | 'p6' | 'p7';
424
653
  /** Set the encoding tuning info */
425
- tune?: 'hq' | 'uhq' | 'll' | 'ull' | 'lossless';
654
+ tune?: 'hq' | 'll' | 'ull' | 'lossless';
426
655
  /** Set the encoding level restriction */
427
656
  level?: 'auto' | '2' | '2.0' | '2.1' | '2.2' | '2.3' | '3' | '3.0' | '3.1' | '3.2' | '3.3' | '4' | '4.0' | '4.1' | '4.2' | '4.3' | '5' | '5.0' | '5.1' | '5.2' | '5.3' | '6' | '6.0' | '6.1' | '6.2' | '6.3' | '7' | '7.0' | '7.1' | '7.2' | '7.3';
428
657
  /** Set the encoding tier */
@@ -486,7 +715,7 @@ export interface EncoderOptionsMap {
486
715
  /** Enable weighted prediction */
487
716
  weighted_pred?: boolean;
488
717
  /** Use B frames as references */
489
- b_ref_mode?: 'disabled' | 'each' | 'middle' | 'hierarchical';
718
+ b_ref_mode?: 'disabled' | 'each' | 'middle';
490
719
  /** Specifies the DPB size used for encoding (0 means automatic) */
491
720
  dpb_size?: number;
492
721
  /** Low delay key frame scale; Specifies the Scene Change frame size increase allowed in case of single frame VBV and CBR */
@@ -503,12 +732,6 @@ export interface EncoderOptionsMap {
503
732
  s12m_tc?: boolean;
504
733
  /** Pad the bitstream to ensure bitrate does not drop below the target in CBR mode */
505
734
  cbr_padding?: boolean;
506
- /** Specifies the strength of the temporal filtering */
507
- tf_level?: '0' | '4';
508
- /** Specifies the lookahead level. Higher level may improve quality at the expense of performance. */
509
- lookahead_level?: 'auto' | '0' | '1' | '2' | '3';
510
- /** Specifies the split encoding mode */
511
- split_encode_mode?: 'disabled' | 'auto' | 'forced' | '2' | '3' | '4';
512
735
  };
513
736
  /**
514
737
  * AV1 (Intel Quick Sync Video acceleration)
@@ -557,9 +780,9 @@ export interface EncoderOptionsMap {
557
780
  idr_interval?: number;
558
781
  /** Maximum B-frame reference depth */
559
782
  b_depth?: number;
560
- /** Maximum processing parallelism. */
783
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
561
784
  async_depth?: number;
562
- /** Use low-power encoding mode (only available on some platforms; */
785
+ /** Use low-power encoding mode (only available on some platforms; may not support all encoding features) */
563
786
  low_power?: boolean;
564
787
  /** Maximum frame size (in bytes) */
565
788
  max_frame_size?: number;
@@ -587,20 +810,20 @@ export interface EncoderOptionsMap {
587
810
  idr_interval?: number;
588
811
  /** Maximum B-frame reference depth */
589
812
  b_depth?: number;
590
- /** Maximum processing parallelism. */
813
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
591
814
  async_depth?: number;
592
815
  /** Use an explicit constant quantizer for the whole stream */
593
816
  qp?: number;
594
817
  /** Set encode quality (trades off against speed, higher is slower) */
595
818
  quality?: number;
596
819
  /** Select rate control type */
597
- rc_mode?: number;
820
+ rc_mode?: 'auto' | 'driver' | 'cqp' | 'cbr' | 'vbr';
598
821
  /** Select tuning type */
599
- tune?: number;
822
+ tune?: 'default' | 'hq' | 'll' | 'ull' | 'lossless';
600
823
  /** Select usage type */
601
- usage?: string;
824
+ usage?: 'default' | 'transcode' | 'stream' | 'record' | 'conference' | (string & {});
602
825
  /** Select content type */
603
- content?: string;
826
+ content?: 'default' | 'camera' | 'desktop' | 'rendered' | (string & {});
604
827
  /** Set profile */
605
828
  profile?: 'main' | 'high' | 'professional';
606
829
  /** Set tier (seq_tier) */
@@ -608,7 +831,7 @@ export interface EncoderOptionsMap {
608
831
  /** Set level (level_idc) */
609
832
  level?: '20' | '21' | '22' | '23' | '30' | '31' | '32' | '33' | '40' | '41' | '42' | '43' | '50' | '51' | '52' | '53' | '60' | '61' | '62' | '63' | '70' | '71' | '72' | '73';
610
833
  /** Set units to include */
611
- units?: string;
834
+ units?: 'hdr' | (string & {});
612
835
  };
613
836
  /**
614
837
  * GoPro CineForm HD
@@ -694,6 +917,48 @@ export interface EncoderOptionsMap {
694
917
  dxv: {
695
918
  format?: 'dxt1';
696
919
  };
920
+ /**
921
+ * ATSC A/52 E-AC-3
922
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#eac3
923
+ */
924
+ eac3: {
925
+ /** Mixing Level */
926
+ mixing_level?: number;
927
+ /** Room Type */
928
+ room_type?: 'notindicated' | 'large' | 'small';
929
+ /** Allow Changing Metadata Per-Frame */
930
+ per_frame_metadata?: boolean;
931
+ /** Copyright Bit */
932
+ copyright?: number;
933
+ /** Dialogue Level (dB) */
934
+ dialnorm?: number;
935
+ /** Dolby Surround Mode */
936
+ dsur_mode?: 'notindicated' | 'on' | 'off';
937
+ /** Original Bit Stream */
938
+ original?: number;
939
+ /** Preferred Stereo Downmix Mode */
940
+ dmix_mode?: 'notindicated' | 'ltrt' | 'loro' | 'dplii';
941
+ /** Lt/Rt Center Mix Level */
942
+ ltrt_cmixlev?: number;
943
+ /** Lt/Rt Surround Mix Level */
944
+ ltrt_surmixlev?: number;
945
+ /** Lo/Ro Center Mix Level */
946
+ loro_cmixlev?: number;
947
+ /** Lo/Ro Surround Mix Level */
948
+ loro_surmixlev?: number;
949
+ /** Dolby Surround EX Mode */
950
+ dsurex_mode?: 'notindicated' | 'on' | 'off' | 'dpliiz';
951
+ /** Dolby Headphone Mode */
952
+ dheadphone_mode?: 'notindicated' | 'on' | 'off';
953
+ /** A/D Converter Type */
954
+ ad_conv_type?: 'standard' | 'hdcd';
955
+ /** Stereo Rematrixing */
956
+ stereo_rematrixing?: boolean;
957
+ /** Channel Coupling */
958
+ channel_coupling?: 'auto';
959
+ /** Coupling Start Band */
960
+ cpl_start_band?: 'auto';
961
+ };
697
962
  /**
698
963
  * OpenEXR image
699
964
  * @see https://ffmpeg.org/ffmpeg-codecs.html#exr
@@ -747,8 +1012,6 @@ export interface EncoderOptionsMap {
747
1012
  rct_search?: boolean;
748
1013
  /** Internal parallelization depth */
749
1014
  async_depth?: number;
750
- /** Remap Mode */
751
- remap_mode?: 'auto' | 'off' | 'dualrle' | 'flipdualrle';
752
1015
  };
753
1016
  /**
754
1017
  * Huffyuv FFmpeg variant
@@ -786,6 +1049,65 @@ export interface EncoderOptionsMap {
786
1049
  min_prediction_order?: number;
787
1050
  max_prediction_order?: number;
788
1051
  };
1052
+ /**
1053
+ * FLV / Sorenson Spark / Sorenson H.263 (Flash Video)
1054
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#flv
1055
+ */
1056
+ flv: {
1057
+ /** Flags common for all mpegvideo-based encoders. */
1058
+ mpv_flags?: 'skip_rd' | 'strict_gop' | 'qp_rd' | 'cbp_rd' | 'naq' | 'mv0' | (string & {});
1059
+ /** single coefficient elimination threshold for luminance (negative values also consider dc coefficient) */
1060
+ luma_elim_threshold?: number;
1061
+ /** single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) */
1062
+ chroma_elim_threshold?: number;
1063
+ quantizer_noise_shaping?: number;
1064
+ /** Simulate errors in the bitstream to test error concealment. */
1065
+ error_rate?: number;
1066
+ /** how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) */
1067
+ qsquish?: number;
1068
+ /** experimental quantizer modulation */
1069
+ rc_qmod_amp?: number;
1070
+ /** experimental quantizer modulation */
1071
+ rc_qmod_freq?: number;
1072
+ /**
1073
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
1074
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
1075
+ * avgPITex avgPPTex avgBPTex avgTex.
1076
+ */
1077
+ rc_eq?: string;
1078
+ /** initial complexity for 1-pass encoding */
1079
+ rc_init_cplx?: number;
1080
+ /** currently useless */
1081
+ rc_buf_aggressivity?: number;
1082
+ /** increase the quantizer for macroblocks close to borders */
1083
+ border_mask?: number;
1084
+ /** minimum Lagrange factor (VBR) */
1085
+ lmin?: number;
1086
+ /** maximum Lagrange factor (VBR) */
1087
+ lmax?: number;
1088
+ /** Frame skip threshold */
1089
+ skip_threshold?: number;
1090
+ /** Frame skip factor */
1091
+ skip_factor?: number;
1092
+ /** Frame skip exponent */
1093
+ skip_exp?: number;
1094
+ /** Frame skip compare function */
1095
+ skip_cmp?: 'sad' | 'sse' | 'satd' | 'dct' | 'psnr' | 'bit' | 'rd' | 'zero' | 'vsad' | 'vsse' | 'nsse' | 'dct264' | 'dctmax' | 'chroma' | 'msad';
1096
+ /** Noise reduction */
1097
+ noise_reduction?: number;
1098
+ /** RTP payload size in bytes */
1099
+ ps?: number;
1100
+ /** motion estimation algorithm */
1101
+ motion_est?: 'zero' | 'epzs' | 'xone';
1102
+ /** Motion estimation bitrate penalty compensation (1.0 = 256) */
1103
+ mepc?: number;
1104
+ /** pre motion estimation */
1105
+ mepre?: number;
1106
+ /** Penalty for intra blocks in block decision */
1107
+ intra_penalty?: number;
1108
+ /** Scene change threshold */
1109
+ sc_threshold?: number;
1110
+ };
789
1111
  /**
790
1112
  * G.726 ADPCM
791
1113
  * @see https://ffmpeg.org/ffmpeg-codecs.html#g726
@@ -814,6 +1136,65 @@ export interface EncoderOptionsMap {
814
1136
  /** write a palette to the global gif header where feasible */
815
1137
  global_palette?: boolean;
816
1138
  };
1139
+ /**
1140
+ * H.261
1141
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h261
1142
+ */
1143
+ h261: {
1144
+ /** Flags common for all mpegvideo-based encoders. */
1145
+ mpv_flags?: 'skip_rd' | 'strict_gop' | 'qp_rd' | 'cbp_rd' | 'naq' | 'mv0' | (string & {});
1146
+ /** single coefficient elimination threshold for luminance (negative values also consider dc coefficient) */
1147
+ luma_elim_threshold?: number;
1148
+ /** single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) */
1149
+ chroma_elim_threshold?: number;
1150
+ quantizer_noise_shaping?: number;
1151
+ /** Simulate errors in the bitstream to test error concealment. */
1152
+ error_rate?: number;
1153
+ /** how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) */
1154
+ qsquish?: number;
1155
+ /** experimental quantizer modulation */
1156
+ rc_qmod_amp?: number;
1157
+ /** experimental quantizer modulation */
1158
+ rc_qmod_freq?: number;
1159
+ /**
1160
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
1161
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
1162
+ * avgPITex avgPPTex avgBPTex avgTex.
1163
+ */
1164
+ rc_eq?: string;
1165
+ /** initial complexity for 1-pass encoding */
1166
+ rc_init_cplx?: number;
1167
+ /** currently useless */
1168
+ rc_buf_aggressivity?: number;
1169
+ /** increase the quantizer for macroblocks close to borders */
1170
+ border_mask?: number;
1171
+ /** minimum Lagrange factor (VBR) */
1172
+ lmin?: number;
1173
+ /** maximum Lagrange factor (VBR) */
1174
+ lmax?: number;
1175
+ /** Frame skip threshold */
1176
+ skip_threshold?: number;
1177
+ /** Frame skip factor */
1178
+ skip_factor?: number;
1179
+ /** Frame skip exponent */
1180
+ skip_exp?: number;
1181
+ /** Frame skip compare function */
1182
+ skip_cmp?: 'sad' | 'sse' | 'satd' | 'dct' | 'psnr' | 'bit' | 'rd' | 'zero' | 'vsad' | 'vsse' | 'nsse' | 'dct264' | 'dctmax' | 'chroma' | 'msad';
1183
+ /** Noise reduction */
1184
+ noise_reduction?: number;
1185
+ /** RTP payload size in bytes */
1186
+ ps?: number;
1187
+ /** motion estimation algorithm */
1188
+ motion_est?: 'zero' | 'epzs' | 'xone';
1189
+ /** Motion estimation bitrate penalty compensation (1.0 = 256) */
1190
+ mepc?: number;
1191
+ /** pre motion estimation */
1192
+ mepre?: number;
1193
+ /** Penalty for intra blocks in block decision */
1194
+ intra_penalty?: number;
1195
+ /** Scene change threshold */
1196
+ sc_threshold?: number;
1197
+ };
817
1198
  /**
818
1199
  * H.263 / H.263-1996
819
1200
  * @see https://ffmpeg.org/ffmpeg-codecs.html#h263
@@ -838,7 +1219,11 @@ export interface EncoderOptionsMap {
838
1219
  rc_qmod_amp?: number;
839
1220
  /** experimental quantizer modulation */
840
1221
  rc_qmod_freq?: number;
841
- /** Set rate control equation. When computing the expression, besides the standard functions */
1222
+ /**
1223
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
1224
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
1225
+ * avgPITex avgPPTex avgBPTex avgTex.
1226
+ */
842
1227
  rc_eq?: string;
843
1228
  /** initial complexity for 1-pass encoding */
844
1229
  rc_init_cplx?: number;
@@ -873,6 +1258,16 @@ export interface EncoderOptionsMap {
873
1258
  /** Scene change threshold */
874
1259
  sc_threshold?: number;
875
1260
  };
1261
+ /**
1262
+ * V4L2 mem2mem
1263
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h263_005fv4l2m2m
1264
+ */
1265
+ h263_v4l2m2m: {
1266
+ /** Number of buffers in the output context */
1267
+ num_output_buffers?: number;
1268
+ /** Number of buffers in the capture context */
1269
+ num_capture_buffers?: number;
1270
+ };
876
1271
  /**
877
1272
  * H.263+ / H.263-1998 / H.263 version 2
878
1273
  * @see https://ffmpeg.org/ffmpeg-codecs.html#h263p
@@ -901,7 +1296,11 @@ export interface EncoderOptionsMap {
901
1296
  rc_qmod_amp?: number;
902
1297
  /** experimental quantizer modulation */
903
1298
  rc_qmod_freq?: number;
904
- /** Set rate control equation. When computing the expression, besides the standard functions */
1299
+ /**
1300
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
1301
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
1302
+ * avgPITex avgPPTex avgBPTex avgTex.
1303
+ */
905
1304
  rc_eq?: string;
906
1305
  /** initial complexity for 1-pass encoding */
907
1306
  rc_init_cplx?: number;
@@ -950,9 +1349,9 @@ export interface EncoderOptionsMap {
950
1349
  /** enables low latency mode */
951
1350
  latency?: boolean;
952
1351
  /** Set the encoding quality preset */
953
- quality?: 'balanced' | 'speed' | 'quality' | 'high_quality';
1352
+ quality?: 'balanced' | 'speed' | 'quality';
954
1353
  /** Set the encoding quality preset */
955
- preset?: 'balanced' | 'speed' | 'quality' | 'high_quality';
1354
+ preset?: 'balanced' | 'speed' | 'quality';
956
1355
  /** Rate Control Method */
957
1356
  rc?: 'cqp' | 'cbr' | 'vbr_peak' | 'vbr_latency' | 'qvbr' | 'hqvbr' | 'hqcbr';
958
1357
  /** Sets the QVBR quality level */
@@ -1047,7 +1446,7 @@ export interface EncoderOptionsMap {
1047
1446
  idr_interval?: number;
1048
1447
  /** Maximum B-frame reference depth */
1049
1448
  b_depth?: number;
1050
- /** Maximum processing parallelism. */
1449
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
1051
1450
  async_depth?: number;
1052
1451
  /** Maximum frame size (in bytes) */
1053
1452
  max_frame_size?: number;
@@ -1062,15 +1461,59 @@ export interface EncoderOptionsMap {
1062
1461
  /** Constant QP (for P-frames; scaled by qfactor/qoffset for I/B) */
1063
1462
  qp?: number;
1064
1463
  /** Set profile (general_profile_idc) */
1065
- profile?: number;
1464
+ profile?: 'main' | 'high' | 'high10';
1066
1465
  /** Set level (general_level_idc) */
1067
- level?: number;
1466
+ level?: '1' | '1.1' | '1.2' | '1.3' | '2' | '2.1' | '2.2' | '3' | '3.1' | '3.2' | '4' | '4.1' | '4.2' | '5' | '5.1' | '5.2' | '6' | '6.1' | '6.2';
1068
1467
  /** Deblocking filter mode */
1069
1468
  deblock?: boolean;
1070
1469
  /** Entropy coder type */
1071
- coder?: number;
1072
- /** Constrained intra prediction (constrained_intra_pred_flag) */
1073
- constrained_intra_pred?: boolean;
1470
+ coder?: 'cavlc' | 'cabac';
1471
+ };
1472
+ /**
1473
+ * H.264
1474
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005fmediacodec
1475
+ */
1476
+ h264_mediacodec: {
1477
+ /** Use MediaCodec from NDK */
1478
+ ndk_codec?: boolean;
1479
+ /** Try NDK MediaCodec in async mode */
1480
+ ndk_async?: boolean;
1481
+ /** Select codec by name */
1482
+ codec_name?: string;
1483
+ /** Bitrate control method */
1484
+ bitrate_mode?: 'cq' | 'vbr' | 'cbr' | 'cbr_fd';
1485
+ /** Use PTS as DTS. It is enabled automatically if avctx max_b_frames <= 0, since most of Android devices don't output B frames by default. */
1486
+ pts_as_dts?: boolean;
1487
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
1488
+ operating_rate?: number;
1489
+ /** minimum quantization parameter for I frame */
1490
+ qp_i_min?: number;
1491
+ /** minimum quantization parameter for P frame */
1492
+ qp_p_min?: number;
1493
+ /** minimum quantization parameter for B frame */
1494
+ qp_b_min?: number;
1495
+ /** maximum quantization parameter for I frame */
1496
+ qp_i_max?: number;
1497
+ /** maximum quantization parameter for P frame */
1498
+ qp_p_max?: number;
1499
+ /** maximum quantization parameter for B frame */
1500
+ qp_b_max?: number;
1501
+ /** Specify level */
1502
+ level?: '1' | '1b' | '1.1' | '1.2' | '1.3' | '2' | '2.1' | '2.2' | '3' | '3.1' | '3.2' | '4' | '4.1' | '4.2' | '5' | '5.1' | '5.2' | '6.0' | '6.1' | '6.2';
1503
+ };
1504
+ /**
1505
+ * H264
1506
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005fmf
1507
+ */
1508
+ h264_mf: {
1509
+ /** Select rate control mode */
1510
+ rate_control?: 'default' | 'cbr' | 'pc_vbr' | 'u_vbr' | 'quality' | 'ld_vbr' | 'g_vbr' | 'gld_vbr';
1511
+ /** Select usage scenario */
1512
+ scenario?: 'default' | 'display_remoting' | 'video_conference' | 'archive' | 'live_streaming' | 'camera_record' | 'display_remoting_with_feature_map';
1513
+ /** Quality */
1514
+ quality?: number;
1515
+ /** Force hardware encoding */
1516
+ hw_encoding?: boolean;
1074
1517
  };
1075
1518
  /**
1076
1519
  * NVIDIA NVENC H.264 encoder
@@ -1082,7 +1525,7 @@ export interface EncoderOptionsMap {
1082
1525
  /** Set the encoding tuning info */
1083
1526
  tune?: 'hq' | 'll' | 'ull' | 'lossless';
1084
1527
  /** Set the encoding profile */
1085
- profile?: 'baseline' | 'main' | 'high' | 'high10' | 'high422' | 'high444p';
1528
+ profile?: 'baseline' | 'main' | 'high' | 'high444p';
1086
1529
  /** Set the encoding level restriction */
1087
1530
  level?: 'auto' | '1' | '1.0' | '1b' | '1.0b' | '1.1' | '1.2' | '1.3' | '2' | '2.0' | '2.1' | '2.2' | '3' | '3.0' | '3.1' | '3.2' | '4' | '4.0' | '4.1' | '4.2' | '5' | '5.0' | '5.1' | '5.2' | '6.0' | '6.1' | '6.2';
1088
1531
  /** Override the preset rate-control */
@@ -1153,14 +1596,10 @@ export interface EncoderOptionsMap {
1153
1596
  b_ref_mode?: 'disabled' | 'each' | 'middle';
1154
1597
  /** Use A53 Closed Captions (if available) */
1155
1598
  a53cc?: boolean;
1156
- /** Use timecode (if available) */
1157
- s12m_tc?: boolean;
1158
1599
  /** Specifies the DPB size used for encoding (0 means automatic) */
1159
1600
  dpb_size?: number;
1160
1601
  /** Set the multipass encoding */
1161
1602
  multipass?: 'disabled' | 'qres' | 'fullres';
1162
- /** Enable 10 bit encode for 8 bit input */
1163
- highbitdepth?: boolean;
1164
1603
  /** Low delay key frame scale; Specifies the Scene Change frame size increase allowed in case of single frame VBV and CBR */
1165
1604
  ldkfs?: number;
1166
1605
  /** Pass on extra SEI data (e.g. a53 cc) to be included in the bitstream */
@@ -1177,10 +1616,18 @@ export interface EncoderOptionsMap {
1177
1616
  'constrained-encoding'?: boolean;
1178
1617
  /** Pad the bitstream to ensure bitrate does not drop below the target in CBR mode */
1179
1618
  cbr_padding?: boolean;
1180
- /** Specifies the strength of the temporal filtering */
1181
- tf_level?: '0' | '4';
1182
- /** Specifies the lookahead level. Higher level may improve quality at the expense of performance. */
1183
- lookahead_level?: 'auto' | '0' | '1' | '2' | '3';
1619
+ };
1620
+ /**
1621
+ * H.264
1622
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005fohcodec
1623
+ */
1624
+ h264_ohcodec: {
1625
+ /** Select codec by name */
1626
+ codec_name?: string;
1627
+ /** Allow software encoding */
1628
+ allow_sw?: boolean;
1629
+ /** Bitrate control method */
1630
+ bitrate_mode?: 'cbr' | 'vbr' | 'cq';
1184
1631
  };
1185
1632
  /**
1186
1633
  * OpenMAX IL H.264 video encoder
@@ -1298,6 +1745,52 @@ export interface EncoderOptionsMap {
1298
1745
  /** repeat pps for every frame */
1299
1746
  repeat_pps?: boolean;
1300
1747
  };
1748
+ /**
1749
+ * Rockchip MPP (Media Process Platform)
1750
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005frkmpp
1751
+ */
1752
+ h264_rkmpp: {
1753
+ /** Set the encoding rate control mode */
1754
+ rc_mode?: 'VBR' | 'CBR' | 'CQP' | 'AVBR';
1755
+ /** Set the initial QP value */
1756
+ qp_init?: number;
1757
+ /** Set the max QP value for P and B frame */
1758
+ qp_max?: number;
1759
+ /** Set the min QP value for P and B frame */
1760
+ qp_min?: number;
1761
+ /** Set the max QP value for I frame */
1762
+ qp_max_i?: number;
1763
+ /** Set the min QP value for I frame */
1764
+ qp_min_i?: number;
1765
+ /** Use Intra Refresh instead of IDR frames */
1766
+ intra_refresh?: boolean;
1767
+ /** Set the Intra Refresh mode */
1768
+ refresh_mode?: 'row' | 'col';
1769
+ /** Set how many MB rows or columns refresh each time */
1770
+ refresh_num?: number;
1771
+ /** Set the encoding profile restriction */
1772
+ profile?: 'baseline' | 'main' | 'high';
1773
+ /** Set the encoding level restriction */
1774
+ level?: '1' | '1.1' | '1.2' | '1.3' | '2' | '2.1' | '2.2' | '3' | '3.1' | '3.2' | '4' | '4.1' | '4.2' | '5' | '5.1' | '5.2' | '6' | '6.1' | '6.2';
1775
+ /** Set the entropy coder type (from 0 to 1) (default cabac) */
1776
+ coder?: 'cavlc' | 'cabac';
1777
+ /** Set the high profile 8x8 transform */
1778
+ '8x8dct'?: boolean;
1779
+ /** Pass on user data unregistered SEI if available */
1780
+ udu_sei?: boolean;
1781
+ /** Add prefix NAL between SEI info and encoded bitstream data */
1782
+ prefix_mode?: boolean;
1783
+ };
1784
+ /**
1785
+ * V4L2 mem2mem
1786
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005fv4l2m2m
1787
+ */
1788
+ h264_v4l2m2m: {
1789
+ /** Number of buffers in the output context */
1790
+ num_output_buffers?: number;
1791
+ /** Number of buffers in the capture context */
1792
+ num_capture_buffers?: number;
1793
+ };
1301
1794
  /**
1302
1795
  * H.264/AVC (VAAPI)
1303
1796
  * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005fvaapi
@@ -1307,9 +1800,9 @@ export interface EncoderOptionsMap {
1307
1800
  idr_interval?: number;
1308
1801
  /** Maximum B-frame reference depth */
1309
1802
  b_depth?: number;
1310
- /** Maximum processing parallelism. */
1803
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
1311
1804
  async_depth?: number;
1312
- /** Use low-power encoding mode (only available on some platforms; */
1805
+ /** Use low-power encoding mode (only available on some platforms; may not support all encoding features) */
1313
1806
  low_power?: boolean;
1314
1807
  /** Maximum frame size (in bytes) */
1315
1808
  max_frame_size?: number;
@@ -1377,28 +1870,28 @@ export interface EncoderOptionsMap {
1377
1870
  idr_interval?: number;
1378
1871
  /** Maximum B-frame reference depth */
1379
1872
  b_depth?: number;
1380
- /** Maximum processing parallelism. */
1873
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
1381
1874
  async_depth?: number;
1382
1875
  /** Use an explicit constant quantizer for the whole stream */
1383
1876
  qp?: number;
1384
1877
  /** Set encode quality (trades off against speed, higher is slower) */
1385
1878
  quality?: number;
1386
1879
  /** Select rate control type */
1387
- rc_mode?: number;
1880
+ rc_mode?: 'auto' | 'driver' | 'cqp' | 'cbr' | 'vbr';
1388
1881
  /** Select tuning type */
1389
- tune?: number;
1882
+ tune?: 'default' | 'hq' | 'll' | 'ull' | 'lossless';
1390
1883
  /** Select usage type */
1391
- usage?: string;
1884
+ usage?: 'default' | 'transcode' | 'stream' | 'record' | 'conference' | (string & {});
1392
1885
  /** Select content type */
1393
- content?: string;
1886
+ content?: 'default' | 'camera' | 'desktop' | 'rendered' | (string & {});
1394
1887
  /** Set profile (profile_idc and constraint_set*_flag) */
1395
1888
  profile?: 'constrained_baseline' | 'main' | 'high' | 'high444p';
1396
1889
  /** Set level (level_idc) */
1397
1890
  level?: '1' | '1.1' | '1.2' | '1.3' | '2' | '2.1' | '2.2' | '3' | '3.1' | '3.2' | '4' | '4.1' | '4.2' | '5' | '5.1' | '5.2' | '6' | '6.1' | '6.2';
1398
1891
  /** Entropy coder type */
1399
- coder?: number;
1892
+ coder?: 'cabac' | 'vlc';
1400
1893
  /** Set units to include */
1401
- units?: string;
1894
+ units?: 'aud' | 'identifier' | 'timing' | 'recovery' | 'a53_cc' | (string & {});
1402
1895
  };
1403
1896
  /**
1404
1897
  * Vidvox Hap
@@ -1427,9 +1920,9 @@ export interface EncoderOptionsMap {
1427
1920
  /** Set the encoding level (default auto) */
1428
1921
  level?: 'auto' | '1.0' | '2.0' | '2.1' | '3.0' | '3.1' | '4.0' | '4.1' | '5.0' | '5.1' | '5.2' | '6.0' | '6.1' | '6.2';
1429
1922
  /** Set the encoding quality preset */
1430
- quality?: 'quality' | 'balanced' | 'speed' | 'high_quality';
1923
+ quality?: 'quality' | 'balanced' | 'speed';
1431
1924
  /** Set the encoding quality preset */
1432
- preset?: 'quality' | 'balanced' | 'speed' | 'high_quality';
1925
+ preset?: 'quality' | 'balanced' | 'speed';
1433
1926
  /** enables low latency mode */
1434
1927
  latency?: boolean;
1435
1928
  /** Set the rate control mode */
@@ -1518,7 +2011,7 @@ export interface EncoderOptionsMap {
1518
2011
  idr_interval?: number;
1519
2012
  /** Maximum B-frame reference depth */
1520
2013
  b_depth?: number;
1521
- /** Maximum processing parallelism. */
2014
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
1522
2015
  async_depth?: number;
1523
2016
  /** Maximum frame size (in bytes) */
1524
2017
  max_frame_size?: number;
@@ -1533,13 +2026,57 @@ export interface EncoderOptionsMap {
1533
2026
  /** Constant QP (for P-frames; scaled by qfactor/qoffset for I/B) */
1534
2027
  qp?: number;
1535
2028
  /** Set profile (general_profile_idc) */
1536
- profile?: number;
2029
+ profile?: 'main' | 'main10';
1537
2030
  /** Set tier (general_tier_flag) */
1538
- tier?: number;
2031
+ tier?: 'main' | 'high';
1539
2032
  /** Set level (general_level_idc) */
1540
- level?: number;
1541
- /** Constrained intra prediction (constrained_intra_pred_flag) */
1542
- constrained_intra_pred?: boolean;
2033
+ level?: '1' | '2' | '2.1' | '3' | '3.1' | '4' | '4.1' | '5' | '5.1' | '5.2' | '6' | '6.1' | '6.2';
2034
+ };
2035
+ /**
2036
+ * H.265
2037
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005fmediacodec
2038
+ */
2039
+ hevc_mediacodec: {
2040
+ /** Use MediaCodec from NDK */
2041
+ ndk_codec?: boolean;
2042
+ /** Try NDK MediaCodec in async mode */
2043
+ ndk_async?: boolean;
2044
+ /** Select codec by name */
2045
+ codec_name?: string;
2046
+ /** Bitrate control method */
2047
+ bitrate_mode?: 'cq' | 'vbr' | 'cbr' | 'cbr_fd';
2048
+ /** Use PTS as DTS. It is enabled automatically if avctx max_b_frames <= 0, since most of Android devices don't output B frames by default. */
2049
+ pts_as_dts?: boolean;
2050
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
2051
+ operating_rate?: number;
2052
+ /** minimum quantization parameter for I frame */
2053
+ qp_i_min?: number;
2054
+ /** minimum quantization parameter for P frame */
2055
+ qp_p_min?: number;
2056
+ /** minimum quantization parameter for B frame */
2057
+ qp_b_min?: number;
2058
+ /** maximum quantization parameter for I frame */
2059
+ qp_i_max?: number;
2060
+ /** maximum quantization parameter for P frame */
2061
+ qp_p_max?: number;
2062
+ /** maximum quantization parameter for B frame */
2063
+ qp_b_max?: number;
2064
+ /** Specify tier and level */
2065
+ level?: 'm1' | 'h1' | 'm2' | 'h2' | 'm2.1' | 'h2.1' | 'm3' | 'h3' | 'm3.1' | 'h3.1' | 'm4' | 'h4' | 'm4.1' | 'h4.1' | 'm5' | 'h5' | 'm5.1' | 'h5.1' | 'm5.2' | 'h5.2' | 'm6' | 'h6' | 'm6.1' | 'h6.1' | 'm6.2' | 'h6.2';
2066
+ };
2067
+ /**
2068
+ * HEVC
2069
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005fmf
2070
+ */
2071
+ hevc_mf: {
2072
+ /** Select rate control mode */
2073
+ rate_control?: 'default' | 'cbr' | 'pc_vbr' | 'u_vbr' | 'quality' | 'ld_vbr' | 'g_vbr' | 'gld_vbr';
2074
+ /** Select usage scenario */
2075
+ scenario?: 'default' | 'display_remoting' | 'video_conference' | 'archive' | 'live_streaming' | 'camera_record' | 'display_remoting_with_feature_map';
2076
+ /** Quality */
2077
+ quality?: number;
2078
+ /** Force hardware encoding */
2079
+ hw_encoding?: boolean;
1543
2080
  };
1544
2081
  /**
1545
2082
  * NVIDIA NVENC hevc encoder
@@ -1549,9 +2086,9 @@ export interface EncoderOptionsMap {
1549
2086
  /** Set the encoding preset */
1550
2087
  preset?: 'default' | 'slow' | 'medium' | 'fast' | 'hp' | 'hq' | 'bd' | 'll' | 'llhq' | 'llhp' | 'lossless' | 'losslesshp' | 'p1' | 'p2' | 'p3' | 'p4' | 'p5' | 'p6' | 'p7';
1551
2088
  /** Set the encoding tuning info */
1552
- tune?: 'hq' | 'uhq' | 'll' | 'ull' | 'lossless';
2089
+ tune?: 'hq' | 'll' | 'ull' | 'lossless';
1553
2090
  /** Set the encoding profile */
1554
- profile?: 'main' | 'main10' | 'rext' | 'mv';
2091
+ profile?: 'main' | 'main10' | 'rext';
1555
2092
  /** Set the encoding level restriction */
1556
2093
  level?: 'auto' | '1' | '1.0' | '2' | '2.0' | '2.1' | '3' | '3.0' | '3.1' | '4' | '4.0' | '4.1' | '5' | '5.0' | '5.1' | '5.2' | '6' | '6.0' | '6.1' | '6.2';
1557
2094
  /** Set the encoding tier */
@@ -1628,8 +2165,6 @@ export interface EncoderOptionsMap {
1628
2165
  dpb_size?: number;
1629
2166
  /** Set the multipass encoding */
1630
2167
  multipass?: 'disabled' | 'qres' | 'fullres';
1631
- /** Enable 10 bit encode for 8 bit input */
1632
- highbitdepth?: boolean;
1633
2168
  /** Low delay key frame scale; Specifies the Scene Change frame size increase allowed in case of single frame VBV and CBR */
1634
2169
  ldkfs?: number;
1635
2170
  /** Pass on extra SEI data (e.g. a53 cc) to be included in the bitstream */
@@ -1646,14 +2181,18 @@ export interface EncoderOptionsMap {
1646
2181
  'constrained-encoding'?: boolean;
1647
2182
  /** Pad the bitstream to ensure bitrate does not drop below the target in CBR mode */
1648
2183
  cbr_padding?: boolean;
1649
- /** Specifies the strength of the temporal filtering */
1650
- tf_level?: '0' | '4';
1651
- /** Specifies the lookahead level. Higher level may improve quality at the expense of performance. */
1652
- lookahead_level?: 'auto' | '0' | '1' | '2' | '3';
1653
- /** Enable use of unidirectional B-Frames. */
1654
- unidir_b?: boolean;
1655
- /** Specifies the split encoding mode */
1656
- split_encode_mode?: 'disabled' | 'auto' | 'forced' | '2' | '3' | '4';
2184
+ };
2185
+ /**
2186
+ * H.265
2187
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005fohcodec
2188
+ */
2189
+ hevc_ohcodec: {
2190
+ /** Select codec by name */
2191
+ codec_name?: string;
2192
+ /** Allow software encoding */
2193
+ allow_sw?: boolean;
2194
+ /** Bitrate control method */
2195
+ bitrate_mode?: 'cbr' | 'vbr' | 'cq';
1657
2196
  };
1658
2197
  /**
1659
2198
  * HEVC (Intel Quick Sync Video acceleration)
@@ -1753,6 +2292,48 @@ export interface EncoderOptionsMap {
1753
2292
  /** This profile allow to encode 10 bit single still picture */
1754
2293
  main10sp?: boolean;
1755
2294
  };
2295
+ /**
2296
+ * Rockchip MPP (Media Process Platform)
2297
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005frkmpp
2298
+ */
2299
+ hevc_rkmpp: {
2300
+ /** Set the encoding rate control mode */
2301
+ rc_mode?: 'VBR' | 'CBR' | 'CQP' | 'AVBR';
2302
+ /** Set the initial QP value */
2303
+ qp_init?: number;
2304
+ /** Set the max QP value for P and B frame */
2305
+ qp_max?: number;
2306
+ /** Set the min QP value for P and B frame */
2307
+ qp_min?: number;
2308
+ /** Set the max QP value for I frame */
2309
+ qp_max_i?: number;
2310
+ /** Set the min QP value for I frame */
2311
+ qp_min_i?: number;
2312
+ /** Use Intra Refresh instead of IDR frames */
2313
+ intra_refresh?: boolean;
2314
+ /** Set the Intra Refresh mode */
2315
+ refresh_mode?: 'row' | 'col';
2316
+ /** Set how many MB rows or columns refresh each time */
2317
+ refresh_num?: number;
2318
+ /** Set the encoding profile restriction */
2319
+ profile?: 'main';
2320
+ /** Set the encoding profile tier restriction */
2321
+ tier?: 'main' | 'high';
2322
+ /** Set the encoding level restriction */
2323
+ level?: '1' | '2' | '2.1' | '3' | '3.1' | '4' | '4.1' | '5' | '5.1' | '5.2' | '6' | '6.1' | '6.2';
2324
+ /** Pass on user data unregistered SEI if available */
2325
+ udu_sei?: boolean;
2326
+ };
2327
+ /**
2328
+ * V4L2 mem2mem
2329
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005fv4l2m2m
2330
+ */
2331
+ hevc_v4l2m2m: {
2332
+ /** Number of buffers in the output context */
2333
+ num_output_buffers?: number;
2334
+ /** Number of buffers in the capture context */
2335
+ num_capture_buffers?: number;
2336
+ };
1756
2337
  /**
1757
2338
  * H.265/HEVC (VAAPI)
1758
2339
  * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005fvaapi
@@ -1762,9 +2343,9 @@ export interface EncoderOptionsMap {
1762
2343
  idr_interval?: number;
1763
2344
  /** Maximum B-frame reference depth */
1764
2345
  b_depth?: number;
1765
- /** Maximum processing parallelism. */
2346
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
1766
2347
  async_depth?: number;
1767
- /** Use low-power encoding mode (only available on some platforms; */
2348
+ /** Use low-power encoding mode (only available on some platforms; may not support all encoding features) */
1768
2349
  low_power?: boolean;
1769
2350
  /** Maximum frame size (in bytes) */
1770
2351
  max_frame_size?: number;
@@ -1826,20 +2407,20 @@ export interface EncoderOptionsMap {
1826
2407
  idr_interval?: number;
1827
2408
  /** Maximum B-frame reference depth */
1828
2409
  b_depth?: number;
1829
- /** Maximum processing parallelism. */
2410
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
1830
2411
  async_depth?: number;
1831
2412
  /** Use an explicit constant quantizer for the whole stream */
1832
2413
  qp?: number;
1833
2414
  /** Set encode quality (trades off against speed, higher is slower) */
1834
2415
  quality?: number;
1835
2416
  /** Select rate control type */
1836
- rc_mode?: number;
2417
+ rc_mode?: 'auto' | 'driver' | 'cqp' | 'cbr' | 'vbr';
1837
2418
  /** Select tuning type */
1838
- tune?: number;
2419
+ tune?: 'default' | 'hq' | 'll' | 'ull' | 'lossless';
1839
2420
  /** Select usage type */
1840
- usage?: string;
2421
+ usage?: 'default' | 'transcode' | 'stream' | 'record' | 'conference' | (string & {});
1841
2422
  /** Select content type */
1842
- content?: string;
2423
+ content?: 'default' | 'camera' | 'desktop' | 'rendered' | (string & {});
1843
2424
  /** Set profile (profile_idc and constraint_set*_flag) */
1844
2425
  profile?: 'main' | 'main10' | 'rext';
1845
2426
  /** Set tier (general_tier_flag) */
@@ -1847,7 +2428,7 @@ export interface EncoderOptionsMap {
1847
2428
  /** Set level (general_level_idc) */
1848
2429
  level?: '1' | '2' | '2.1' | '3' | '3.1' | '4' | '4.1' | '5' | '5.1' | '5.2' | '6' | '6.1' | '6.2';
1849
2430
  /** Set units to include */
1850
- units?: string;
2431
+ units?: 'hdr' | 'a53_cc' | (string & {});
1851
2432
  };
1852
2433
  /**
1853
2434
  * Huffyuv / HuffYUV
@@ -1859,6 +2440,16 @@ export interface EncoderOptionsMap {
1859
2440
  /** Prediction method */
1860
2441
  pred?: 'left' | 'plane' | 'median';
1861
2442
  };
2443
+ /**
2444
+ * ilbc
2445
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#ilbc_005fat
2446
+ */
2447
+ ilbc_at: {
2448
+ /** ratecontrol mode */
2449
+ aac_at_mode?: 'auto' | 'cbr' | 'abr' | 'cvbr' | 'vbr';
2450
+ /** quality vs speed control */
2451
+ aac_at_quality?: number;
2452
+ };
1862
2453
  /**
1863
2454
  * JPEG 2000
1864
2455
  * @see https://ffmpeg.org/ffmpeg-codecs.html#jpeg2000
@@ -1896,9 +2487,9 @@ export interface EncoderOptionsMap {
1896
2487
  'libaom-av1': {
1897
2488
  /** Quality/Speed ratio modifier */
1898
2489
  'cpu-used'?: number;
1899
- /** Enable use of alternate reference */
2490
+ /** Enable use of alternate reference frames (2-pass only) */
1900
2491
  'auto-alt-ref'?: number;
1901
- /** Number of frames to look ahead at for */
2492
+ /** Number of frames to look ahead at for alternate reference frame selection */
1902
2493
  'lag-in-frames'?: number;
1903
2494
  /** altref noise reduction max frame count */
1904
2495
  'arnr-max-frames'?: number;
@@ -2066,7 +2657,7 @@ export interface EncoderOptionsMap {
2066
2657
  libjxl: {
2067
2658
  /** Encoding effort */
2068
2659
  effort?: number;
2069
- /** Maximum Butteraugli distance (quality setting, */
2660
+ /** Maximum Butteraugli distance (quality setting, lower = better, zero = lossless, default 1.0) */
2070
2661
  distance?: number;
2071
2662
  /** Force modular mode */
2072
2663
  modular?: number;
@@ -2080,7 +2671,7 @@ export interface EncoderOptionsMap {
2080
2671
  libjxl_anim: {
2081
2672
  /** Encoding effort */
2082
2673
  effort?: number;
2083
- /** Maximum Butteraugli distance (quality setting, */
2674
+ /** Maximum Butteraugli distance (quality setting, lower = better, zero = lossless, default 1.0) */
2084
2675
  distance?: number;
2085
2676
  /** Force modular mode */
2086
2677
  modular?: number;
@@ -2193,8 +2784,6 @@ export interface EncoderOptionsMap {
2193
2784
  vbr?: 'off' | 'on' | 'constrained';
2194
2785
  /** Channel Mapping Family */
2195
2786
  mapping_family?: number;
2196
- /** Enable DTX (Discontinuous transmission) */
2197
- dtx?: boolean;
2198
2787
  /** Apply intensity stereo phase inversion */
2199
2788
  apply_phase_inv?: boolean;
2200
2789
  };
@@ -2315,7 +2904,7 @@ export interface EncoderOptionsMap {
2315
2904
  * @see https://ffmpeg.org/ffmpeg-codecs.html#libvpx
2316
2905
  */
2317
2906
  libvpx: {
2318
- /** Number of frames to look ahead for */
2907
+ /** Number of frames to look ahead for alternate reference frame selection */
2319
2908
  'lag-in-frames'?: number;
2320
2909
  /** altref noise reduction max frame count */
2321
2910
  'arnr-maxframes'?: number;
@@ -2345,7 +2934,7 @@ export interface EncoderOptionsMap {
2345
2934
  'overshoot-pct'?: number;
2346
2935
  /** Temporal scaling configuration using a :-separated list of key=value parameters */
2347
2936
  'ts-parameters'?: string;
2348
- /** Enable use of alternate reference */
2937
+ /** Enable use of alternate reference frames (2-pass only) */
2349
2938
  'auto-alt-ref'?: number;
2350
2939
  /** Quality/Speed ratio modifier */
2351
2940
  'cpu-used'?: number;
@@ -2370,7 +2959,7 @@ export interface EncoderOptionsMap {
2370
2959
  * @see https://ffmpeg.org/ffmpeg-codecs.html#libvpx_002dvp9
2371
2960
  */
2372
2961
  'libvpx-vp9': {
2373
- /** Number of frames to look ahead for */
2962
+ /** Number of frames to look ahead for alternate reference frame selection */
2374
2963
  'lag-in-frames'?: number;
2375
2964
  /** altref noise reduction max frame count */
2376
2965
  'arnr-maxframes'?: number;
@@ -2400,7 +2989,7 @@ export interface EncoderOptionsMap {
2400
2989
  'overshoot-pct'?: number;
2401
2990
  /** Temporal scaling configuration using a :-separated list of key=value parameters */
2402
2991
  'ts-parameters'?: string;
2403
- /** Enable use of alternate reference */
2992
+ /** Enable use of alternate reference frames (2-pass only) */
2404
2993
  'auto-alt-ref'?: number;
2405
2994
  /** Quality/Speed ratio modifier */
2406
2995
  'cpu-used'?: number;
@@ -2446,7 +3035,7 @@ export interface EncoderOptionsMap {
2446
3035
  */
2447
3036
  libvvenc: {
2448
3037
  /** set encoding preset */
2449
- preset?: number;
3038
+ preset?: 'faster' | 'fast' | 'medium' | 'slow' | 'slower';
2450
3039
  /** set quantization */
2451
3040
  qp?: number;
2452
3041
  /** set subjective (perceptually motivated) optimization */
@@ -2462,7 +3051,39 @@ export interface EncoderOptionsMap {
2462
3051
  /** Specify level (as defined by Annex A) */
2463
3052
  level?: string;
2464
3053
  /** set vvc tier */
2465
- tier?: number;
3054
+ tier?: 'main' | 'high';
3055
+ };
3056
+ /**
3057
+ * libwebp WebP image
3058
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#libwebp
3059
+ */
3060
+ libwebp: {
3061
+ /** Use lossless mode */
3062
+ lossless?: number;
3063
+ /** Configuration preset */
3064
+ preset?: 'none' | 'default' | 'picture' | 'photo' | 'drawing' | 'icon' | 'text';
3065
+ /** Conditional replenishment threshold */
3066
+ cr_threshold?: number;
3067
+ /** Conditional replenishment block size */
3068
+ cr_size?: number;
3069
+ /** Quality */
3070
+ quality?: number;
3071
+ };
3072
+ /**
3073
+ * libwebp WebP image
3074
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#libwebp_005fanim
3075
+ */
3076
+ libwebp_anim: {
3077
+ /** Use lossless mode */
3078
+ lossless?: number;
3079
+ /** Configuration preset */
3080
+ preset?: 'none' | 'default' | 'picture' | 'photo' | 'drawing' | 'icon' | 'text';
3081
+ /** Conditional replenishment threshold */
3082
+ cr_threshold?: number;
3083
+ /** Conditional replenishment block size */
3084
+ cr_size?: number;
3085
+ /** Quality */
3086
+ quality?: number;
2466
3087
  };
2467
3088
  /**
2468
3089
  * libx262 MPEG2VIDEO
@@ -2530,7 +3151,7 @@ export interface EncoderOptionsMap {
2530
3151
  deblock?: string;
2531
3152
  /** Reduce fluctuations in QP (before curve compression) */
2532
3153
  cplxblur?: number;
2533
- /** A comma-separated list of partitions to consider. */
3154
+ /** A comma-separated list of partitions to consider. Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all */
2534
3155
  partitions?: string;
2535
3156
  /** Direct MV prediction mode */
2536
3157
  'direct-pred'?: 'none' | 'spatial' | 'temporal' | 'auto';
@@ -2538,7 +3159,7 @@ export interface EncoderOptionsMap {
2538
3159
  'slice-max-size'?: number;
2539
3160
  /** Filename for 2 pass stats */
2540
3161
  stats?: string;
2541
- /** Signal HRD information (requires vbv-bufsize; */
3162
+ /** Signal HRD information (requires vbv-bufsize; cbr not allowed in .mp4) */
2542
3163
  'nal-hrd'?: 'none' | 'vbr' | 'cbr';
2543
3164
  /** AVC-Intra class 50/100/200/300/480 */
2544
3165
  'avcintra-class'?: number;
@@ -2631,7 +3252,7 @@ export interface EncoderOptionsMap {
2631
3252
  deblock?: string;
2632
3253
  /** Reduce fluctuations in QP (before curve compression) */
2633
3254
  cplxblur?: number;
2634
- /** A comma-separated list of partitions to consider. */
3255
+ /** A comma-separated list of partitions to consider. Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all */
2635
3256
  partitions?: string;
2636
3257
  /** Direct MV prediction mode */
2637
3258
  'direct-pred'?: 'none' | 'spatial' | 'temporal' | 'auto';
@@ -2639,7 +3260,7 @@ export interface EncoderOptionsMap {
2639
3260
  'slice-max-size'?: number;
2640
3261
  /** Filename for 2 pass stats */
2641
3262
  stats?: string;
2642
- /** Signal HRD information (requires vbv-bufsize; */
3263
+ /** Signal HRD information (requires vbv-bufsize; cbr not allowed in .mp4) */
2643
3264
  'nal-hrd'?: 'none' | 'vbr' | 'cbr';
2644
3265
  /** AVC-Intra class 50/100/200/300/480 */
2645
3266
  'avcintra-class'?: number;
@@ -2732,7 +3353,7 @@ export interface EncoderOptionsMap {
2732
3353
  deblock?: string;
2733
3354
  /** Reduce fluctuations in QP (before curve compression) */
2734
3355
  cplxblur?: number;
2735
- /** A comma-separated list of partitions to consider. */
3356
+ /** A comma-separated list of partitions to consider. Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all */
2736
3357
  partitions?: string;
2737
3358
  /** Direct MV prediction mode */
2738
3359
  'direct-pred'?: 'none' | 'spatial' | 'temporal' | 'auto';
@@ -2740,7 +3361,7 @@ export interface EncoderOptionsMap {
2740
3361
  'slice-max-size'?: number;
2741
3362
  /** Filename for 2 pass stats */
2742
3363
  stats?: string;
2743
- /** Signal HRD information (requires vbv-bufsize; */
3364
+ /** Signal HRD information (requires vbv-bufsize; cbr not allowed in .mp4) */
2744
3365
  'nal-hrd'?: 'none' | 'vbr' | 'cbr';
2745
3366
  /** AVC-Intra class 50/100/200/300/480 */
2746
3367
  'avcintra-class'?: number;
@@ -2934,7 +3555,11 @@ export interface EncoderOptionsMap {
2934
3555
  rc_qmod_amp?: number;
2935
3556
  /** experimental quantizer modulation */
2936
3557
  rc_qmod_freq?: number;
2937
- /** Set rate control equation. When computing the expression, besides the standard functions */
3558
+ /**
3559
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
3560
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
3561
+ * avgPITex avgPPTex avgBPTex avgTex.
3562
+ */
2938
3563
  rc_eq?: string;
2939
3564
  /** initial complexity for 1-pass encoding */
2940
3565
  rc_init_cplx?: number;
@@ -2967,6 +3592,20 @@ export interface EncoderOptionsMap {
2967
3592
  /** Maximum processing parallelism */
2968
3593
  async_depth?: number;
2969
3594
  };
3595
+ /**
3596
+ * Rockchip MPP (Media Process Platform)
3597
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mjpeg_005frkmpp
3598
+ */
3599
+ mjpeg_rkmpp: {
3600
+ /** Set the initial QP/Q_Factor value */
3601
+ qp_init?: number;
3602
+ /** Set the max QP/Q_Factor value */
3603
+ qp_max?: number;
3604
+ /** Set the min QP/Q_Factor value */
3605
+ qp_min?: number;
3606
+ /** Specify the output chroma format for down subsampling */
3607
+ chroma_fmt?: 'auto' | '400' | '420' | '422' | '444';
3608
+ };
2970
3609
  /**
2971
3610
  * MJPEG (VAAPI)
2972
3611
  * @see https://ffmpeg.org/ffmpeg-codecs.html#mjpeg_005fvaapi
@@ -2976,9 +3615,9 @@ export interface EncoderOptionsMap {
2976
3615
  idr_interval?: number;
2977
3616
  /** Maximum B-frame reference depth */
2978
3617
  b_depth?: number;
2979
- /** Maximum processing parallelism. */
3618
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
2980
3619
  async_depth?: number;
2981
- /** Use low-power encoding mode (only available on some platforms; */
3620
+ /** Use low-power encoding mode (only available on some platforms; may not support all encoding features) */
2982
3621
  low_power?: boolean;
2983
3622
  /** Maximum frame size (in bytes) */
2984
3623
  max_frame_size?: number;
@@ -3023,6 +3662,79 @@ export interface EncoderOptionsMap {
3023
3662
  /** Frame height, usually video height */
3024
3663
  height?: number;
3025
3664
  };
3665
+ /**
3666
+ * MPEG-1 video
3667
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg1video
3668
+ */
3669
+ mpeg1video: {
3670
+ /** MPEG GOP Timecode in hh:mm:ss[:;.]ff format. Overrides timecode_frame_start. */
3671
+ gop_timecode?: string;
3672
+ /** Timecode is in drop frame format. */
3673
+ drop_frame_timecode?: boolean;
3674
+ /** Reserve space for SVCD scan offset user data. */
3675
+ scan_offset?: boolean;
3676
+ /** GOP timecode frame start number, in non-drop-frame format */
3677
+ timecode_frame_start?: number;
3678
+ /** Strategy to choose between I/P/B-frames */
3679
+ b_strategy?: number;
3680
+ /** Adjust sensitivity of b_frame_strategy 1 */
3681
+ b_sensitivity?: number;
3682
+ /** Downscale frames for dynamic B-frame decision */
3683
+ brd_scale?: number;
3684
+ /** Flags common for all mpegvideo-based encoders. */
3685
+ mpv_flags?: 'skip_rd' | 'strict_gop' | 'qp_rd' | 'cbp_rd' | 'naq' | 'mv0' | (string & {});
3686
+ /** single coefficient elimination threshold for luminance (negative values also consider dc coefficient) */
3687
+ luma_elim_threshold?: number;
3688
+ /** single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) */
3689
+ chroma_elim_threshold?: number;
3690
+ quantizer_noise_shaping?: number;
3691
+ /** Simulate errors in the bitstream to test error concealment. */
3692
+ error_rate?: number;
3693
+ /** how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) */
3694
+ qsquish?: number;
3695
+ /** experimental quantizer modulation */
3696
+ rc_qmod_amp?: number;
3697
+ /** experimental quantizer modulation */
3698
+ rc_qmod_freq?: number;
3699
+ /**
3700
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
3701
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
3702
+ * avgPITex avgPPTex avgBPTex avgTex.
3703
+ */
3704
+ rc_eq?: string;
3705
+ /** initial complexity for 1-pass encoding */
3706
+ rc_init_cplx?: number;
3707
+ /** currently useless */
3708
+ rc_buf_aggressivity?: number;
3709
+ /** increase the quantizer for macroblocks close to borders */
3710
+ border_mask?: number;
3711
+ /** minimum Lagrange factor (VBR) */
3712
+ lmin?: number;
3713
+ /** maximum Lagrange factor (VBR) */
3714
+ lmax?: number;
3715
+ /** Frame skip threshold */
3716
+ skip_threshold?: number;
3717
+ /** Frame skip factor */
3718
+ skip_factor?: number;
3719
+ /** Frame skip exponent */
3720
+ skip_exp?: number;
3721
+ /** Frame skip compare function */
3722
+ skip_cmp?: 'sad' | 'sse' | 'satd' | 'dct' | 'psnr' | 'bit' | 'rd' | 'zero' | 'vsad' | 'vsse' | 'nsse' | 'dct264' | 'dctmax' | 'chroma' | 'msad';
3723
+ /** Noise reduction */
3724
+ noise_reduction?: number;
3725
+ /** RTP payload size in bytes */
3726
+ ps?: number;
3727
+ /** motion estimation algorithm */
3728
+ motion_est?: 'zero' | 'epzs' | 'xone';
3729
+ /** Motion estimation bitrate penalty compensation (1.0 = 256) */
3730
+ mepc?: number;
3731
+ /** pre motion estimation */
3732
+ mepre?: number;
3733
+ /** Penalty for intra blocks in block decision */
3734
+ intra_penalty?: number;
3735
+ /** Scene change threshold */
3736
+ sc_threshold?: number;
3737
+ };
3026
3738
  /**
3027
3739
  * MPEG-2 video (Intel Quick Sync Video acceleration)
3028
3740
  * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg2_005fqsv
@@ -3050,9 +3762,9 @@ export interface EncoderOptionsMap {
3050
3762
  idr_interval?: number;
3051
3763
  /** Maximum B-frame reference depth */
3052
3764
  b_depth?: number;
3053
- /** Maximum processing parallelism. */
3765
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
3054
3766
  async_depth?: number;
3055
- /** Use low-power encoding mode (only available on some platforms; */
3767
+ /** Use low-power encoding mode (only available on some platforms; may not support all encoding features) */
3056
3768
  low_power?: boolean;
3057
3769
  /** Maximum frame size (in bytes) */
3058
3770
  max_frame_size?: number;
@@ -3065,6 +3777,93 @@ export interface EncoderOptionsMap {
3065
3777
  /** Set level (in profile_and_level_indication) */
3066
3778
  level?: 'low' | 'main' | 'high_1440' | 'high';
3067
3779
  };
3780
+ /**
3781
+ * MPEG-2 video
3782
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg2video
3783
+ */
3784
+ mpeg2video: {
3785
+ /** MPEG GOP Timecode in hh:mm:ss[:;.]ff format. Overrides timecode_frame_start. */
3786
+ gop_timecode?: string;
3787
+ /** Timecode is in drop frame format. */
3788
+ drop_frame_timecode?: boolean;
3789
+ /** Reserve space for SVCD scan offset user data. */
3790
+ scan_offset?: boolean;
3791
+ /** GOP timecode frame start number, in non-drop-frame format */
3792
+ timecode_frame_start?: number;
3793
+ /** Strategy to choose between I/P/B-frames */
3794
+ b_strategy?: number;
3795
+ /** Adjust sensitivity of b_frame_strategy 1 */
3796
+ b_sensitivity?: number;
3797
+ /** Downscale frames for dynamic B-frame decision */
3798
+ brd_scale?: number;
3799
+ /** Precision of the DC coefficient - 8 */
3800
+ intra_dc_precision?: number;
3801
+ /** Use MPEG-2 intra VLC table. */
3802
+ intra_vlc?: boolean;
3803
+ /** Use nonlinear quantizer. */
3804
+ non_linear_quant?: boolean;
3805
+ /** Enable alternate scantable. */
3806
+ alternate_scan?: boolean;
3807
+ /** Use A53 Closed Captions (if available) */
3808
+ a53cc?: boolean;
3809
+ /** Write sequence_display_extension blocks. */
3810
+ seq_disp_ext?: 'auto' | 'never' | 'always';
3811
+ /** Video_format in the sequence_display_extension indicating the source of the video. */
3812
+ video_format?: 'component' | 'pal' | 'ntsc' | 'secam' | 'mac' | 'unspecified';
3813
+ /** Flags common for all mpegvideo-based encoders. */
3814
+ mpv_flags?: 'skip_rd' | 'strict_gop' | 'qp_rd' | 'cbp_rd' | 'naq' | 'mv0' | (string & {});
3815
+ /** single coefficient elimination threshold for luminance (negative values also consider dc coefficient) */
3816
+ luma_elim_threshold?: number;
3817
+ /** single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) */
3818
+ chroma_elim_threshold?: number;
3819
+ quantizer_noise_shaping?: number;
3820
+ /** Simulate errors in the bitstream to test error concealment. */
3821
+ error_rate?: number;
3822
+ /** how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) */
3823
+ qsquish?: number;
3824
+ /** experimental quantizer modulation */
3825
+ rc_qmod_amp?: number;
3826
+ /** experimental quantizer modulation */
3827
+ rc_qmod_freq?: number;
3828
+ /**
3829
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
3830
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
3831
+ * avgPITex avgPPTex avgBPTex avgTex.
3832
+ */
3833
+ rc_eq?: string;
3834
+ /** initial complexity for 1-pass encoding */
3835
+ rc_init_cplx?: number;
3836
+ /** currently useless */
3837
+ rc_buf_aggressivity?: number;
3838
+ /** increase the quantizer for macroblocks close to borders */
3839
+ border_mask?: number;
3840
+ /** minimum Lagrange factor (VBR) */
3841
+ lmin?: number;
3842
+ /** maximum Lagrange factor (VBR) */
3843
+ lmax?: number;
3844
+ /** Frame skip threshold */
3845
+ skip_threshold?: number;
3846
+ /** Frame skip factor */
3847
+ skip_factor?: number;
3848
+ /** Frame skip exponent */
3849
+ skip_exp?: number;
3850
+ /** Frame skip compare function */
3851
+ skip_cmp?: 'sad' | 'sse' | 'satd' | 'dct' | 'psnr' | 'bit' | 'rd' | 'zero' | 'vsad' | 'vsse' | 'nsse' | 'dct264' | 'dctmax' | 'chroma' | 'msad';
3852
+ /** Noise reduction */
3853
+ noise_reduction?: number;
3854
+ /** RTP payload size in bytes */
3855
+ ps?: number;
3856
+ /** motion estimation algorithm */
3857
+ motion_est?: 'zero' | 'epzs' | 'xone';
3858
+ /** Motion estimation bitrate penalty compensation (1.0 = 256) */
3859
+ mepc?: number;
3860
+ /** pre motion estimation */
3861
+ mepre?: number;
3862
+ /** Penalty for intra blocks in block decision */
3863
+ intra_penalty?: number;
3864
+ /** Scene change threshold */
3865
+ sc_threshold?: number;
3866
+ };
3068
3867
  /**
3069
3868
  * MPEG-4 part 2
3070
3869
  * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg4
@@ -3097,7 +3896,11 @@ export interface EncoderOptionsMap {
3097
3896
  rc_qmod_amp?: number;
3098
3897
  /** experimental quantizer modulation */
3099
3898
  rc_qmod_freq?: number;
3100
- /** Set rate control equation. When computing the expression, besides the standard functions */
3899
+ /**
3900
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
3901
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
3902
+ * avgPITex avgPPTex avgBPTex avgTex.
3903
+ */
3101
3904
  rc_eq?: string;
3102
3905
  /** initial complexity for 1-pass encoding */
3103
3906
  rc_init_cplx?: number;
@@ -3132,6 +3935,38 @@ export interface EncoderOptionsMap {
3132
3935
  /** Scene change threshold */
3133
3936
  sc_threshold?: number;
3134
3937
  };
3938
+ /**
3939
+ * MPEG-4
3940
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg4_005fmediacodec
3941
+ */
3942
+ mpeg4_mediacodec: {
3943
+ /** Use MediaCodec from NDK */
3944
+ ndk_codec?: boolean;
3945
+ /** Try NDK MediaCodec in async mode */
3946
+ ndk_async?: boolean;
3947
+ /** Select codec by name */
3948
+ codec_name?: string;
3949
+ /** Bitrate control method */
3950
+ bitrate_mode?: 'cq' | 'vbr' | 'cbr' | 'cbr_fd';
3951
+ /** Use PTS as DTS. It is enabled automatically if avctx max_b_frames <= 0, since most of Android devices don't output B frames by default. */
3952
+ pts_as_dts?: boolean;
3953
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
3954
+ operating_rate?: number;
3955
+ /** minimum quantization parameter for I frame */
3956
+ qp_i_min?: number;
3957
+ /** minimum quantization parameter for P frame */
3958
+ qp_p_min?: number;
3959
+ /** minimum quantization parameter for B frame */
3960
+ qp_b_min?: number;
3961
+ /** maximum quantization parameter for I frame */
3962
+ qp_i_max?: number;
3963
+ /** maximum quantization parameter for P frame */
3964
+ qp_p_max?: number;
3965
+ /** maximum quantization parameter for B frame */
3966
+ qp_b_max?: number;
3967
+ /** Specify tier and level */
3968
+ level?: '0' | '0b' | '1' | '2' | '3' | '3b' | '4' | '4a' | '5' | '6';
3969
+ };
3135
3970
  /**
3136
3971
  * OpenMAX IL MPEG-4 video encoder
3137
3972
  * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg4_005fomx
@@ -3146,6 +3981,134 @@ export interface EncoderOptionsMap {
3146
3981
  /** Set the encoding profile */
3147
3982
  profile?: 'baseline' | 'main' | 'high';
3148
3983
  };
3984
+ /**
3985
+ * V4L2 mem2mem
3986
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg4_005fv4l2m2m
3987
+ */
3988
+ mpeg4_v4l2m2m: {
3989
+ /** Number of buffers in the output context */
3990
+ num_output_buffers?: number;
3991
+ /** Number of buffers in the capture context */
3992
+ num_capture_buffers?: number;
3993
+ };
3994
+ /**
3995
+ * MPEG-4 part 2 Microsoft variant version 3
3996
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#msmpeg4
3997
+ */
3998
+ msmpeg4: {
3999
+ /** Flags common for all mpegvideo-based encoders. */
4000
+ mpv_flags?: 'skip_rd' | 'strict_gop' | 'qp_rd' | 'cbp_rd' | 'naq' | 'mv0' | (string & {});
4001
+ /** single coefficient elimination threshold for luminance (negative values also consider dc coefficient) */
4002
+ luma_elim_threshold?: number;
4003
+ /** single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) */
4004
+ chroma_elim_threshold?: number;
4005
+ quantizer_noise_shaping?: number;
4006
+ /** Simulate errors in the bitstream to test error concealment. */
4007
+ error_rate?: number;
4008
+ /** how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) */
4009
+ qsquish?: number;
4010
+ /** experimental quantizer modulation */
4011
+ rc_qmod_amp?: number;
4012
+ /** experimental quantizer modulation */
4013
+ rc_qmod_freq?: number;
4014
+ /**
4015
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
4016
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
4017
+ * avgPITex avgPPTex avgBPTex avgTex.
4018
+ */
4019
+ rc_eq?: string;
4020
+ /** initial complexity for 1-pass encoding */
4021
+ rc_init_cplx?: number;
4022
+ /** currently useless */
4023
+ rc_buf_aggressivity?: number;
4024
+ /** increase the quantizer for macroblocks close to borders */
4025
+ border_mask?: number;
4026
+ /** minimum Lagrange factor (VBR) */
4027
+ lmin?: number;
4028
+ /** maximum Lagrange factor (VBR) */
4029
+ lmax?: number;
4030
+ /** Frame skip threshold */
4031
+ skip_threshold?: number;
4032
+ /** Frame skip factor */
4033
+ skip_factor?: number;
4034
+ /** Frame skip exponent */
4035
+ skip_exp?: number;
4036
+ /** Frame skip compare function */
4037
+ skip_cmp?: 'sad' | 'sse' | 'satd' | 'dct' | 'psnr' | 'bit' | 'rd' | 'zero' | 'vsad' | 'vsse' | 'nsse' | 'dct264' | 'dctmax' | 'chroma' | 'msad';
4038
+ /** Noise reduction */
4039
+ noise_reduction?: number;
4040
+ /** RTP payload size in bytes */
4041
+ ps?: number;
4042
+ /** motion estimation algorithm */
4043
+ motion_est?: 'zero' | 'epzs' | 'xone';
4044
+ /** Motion estimation bitrate penalty compensation (1.0 = 256) */
4045
+ mepc?: number;
4046
+ /** pre motion estimation */
4047
+ mepre?: number;
4048
+ /** Penalty for intra blocks in block decision */
4049
+ intra_penalty?: number;
4050
+ /** Scene change threshold */
4051
+ sc_threshold?: number;
4052
+ };
4053
+ /**
4054
+ * MPEG-4 part 2 Microsoft variant version 2
4055
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#msmpeg4v2
4056
+ */
4057
+ msmpeg4v2: {
4058
+ /** Flags common for all mpegvideo-based encoders. */
4059
+ mpv_flags?: 'skip_rd' | 'strict_gop' | 'qp_rd' | 'cbp_rd' | 'naq' | 'mv0' | (string & {});
4060
+ /** single coefficient elimination threshold for luminance (negative values also consider dc coefficient) */
4061
+ luma_elim_threshold?: number;
4062
+ /** single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) */
4063
+ chroma_elim_threshold?: number;
4064
+ quantizer_noise_shaping?: number;
4065
+ /** Simulate errors in the bitstream to test error concealment. */
4066
+ error_rate?: number;
4067
+ /** how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) */
4068
+ qsquish?: number;
4069
+ /** experimental quantizer modulation */
4070
+ rc_qmod_amp?: number;
4071
+ /** experimental quantizer modulation */
4072
+ rc_qmod_freq?: number;
4073
+ /**
4074
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
4075
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
4076
+ * avgPITex avgPPTex avgBPTex avgTex.
4077
+ */
4078
+ rc_eq?: string;
4079
+ /** initial complexity for 1-pass encoding */
4080
+ rc_init_cplx?: number;
4081
+ /** currently useless */
4082
+ rc_buf_aggressivity?: number;
4083
+ /** increase the quantizer for macroblocks close to borders */
4084
+ border_mask?: number;
4085
+ /** minimum Lagrange factor (VBR) */
4086
+ lmin?: number;
4087
+ /** maximum Lagrange factor (VBR) */
4088
+ lmax?: number;
4089
+ /** Frame skip threshold */
4090
+ skip_threshold?: number;
4091
+ /** Frame skip factor */
4092
+ skip_factor?: number;
4093
+ /** Frame skip exponent */
4094
+ skip_exp?: number;
4095
+ /** Frame skip compare function */
4096
+ skip_cmp?: 'sad' | 'sse' | 'satd' | 'dct' | 'psnr' | 'bit' | 'rd' | 'zero' | 'vsad' | 'vsse' | 'nsse' | 'dct264' | 'dctmax' | 'chroma' | 'msad';
4097
+ /** Noise reduction */
4098
+ noise_reduction?: number;
4099
+ /** RTP payload size in bytes */
4100
+ ps?: number;
4101
+ /** motion estimation algorithm */
4102
+ motion_est?: 'zero' | 'epzs' | 'xone';
4103
+ /** Motion estimation bitrate penalty compensation (1.0 = 256) */
4104
+ mepc?: number;
4105
+ /** pre motion estimation */
4106
+ mepre?: number;
4107
+ /** Penalty for intra blocks in block decision */
4108
+ intra_penalty?: number;
4109
+ /** Scene change threshold */
4110
+ sc_threshold?: number;
4111
+ };
3149
4112
  /**
3150
4113
  * Opus
3151
4114
  * @see https://ffmpeg.org/ffmpeg-codecs.html#opus
@@ -3156,6 +4119,26 @@ export interface EncoderOptionsMap {
3156
4119
  /** Apply intensity stereo phase inversion */
3157
4120
  apply_phase_inv?: boolean;
3158
4121
  };
4122
+ /**
4123
+ * pcm_alaw
4124
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#pcm_005falaw_005fat
4125
+ */
4126
+ pcm_alaw_at: {
4127
+ /** ratecontrol mode */
4128
+ aac_at_mode?: 'auto' | 'cbr' | 'abr' | 'cvbr' | 'vbr';
4129
+ /** quality vs speed control */
4130
+ aac_at_quality?: number;
4131
+ };
4132
+ /**
4133
+ * pcm_mulaw
4134
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#pcm_005fmulaw_005fat
4135
+ */
4136
+ pcm_mulaw_at: {
4137
+ /** ratecontrol mode */
4138
+ aac_at_mode?: 'auto' | 'cbr' | 'abr' | 'cvbr' | 'vbr';
4139
+ /** quality vs speed control */
4140
+ aac_at_quality?: number;
4141
+ };
3159
4142
  /**
3160
4143
  * PNG (Portable Network Graphics) image
3161
4144
  * @see https://ffmpeg.org/ffmpeg-codecs.html#png
@@ -3265,13 +4248,131 @@ export interface EncoderOptionsMap {
3265
4248
  sixteen_color_thresh?: number;
3266
4249
  };
3267
4250
  /**
3268
- * SBC (low-complexity subband codec)
3269
- * @see https://ffmpeg.org/ffmpeg-codecs.html#sbc
4251
+ * RealVideo 1.0
4252
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#rv10
3270
4253
  */
3271
- sbc: {
3272
- /** set maximum algorithmic latency */
3273
- sbc_delay?: string;
3274
- /** use mSBC mode (wideband speech mono SBC) */
4254
+ rv10: {
4255
+ /** Flags common for all mpegvideo-based encoders. */
4256
+ mpv_flags?: 'skip_rd' | 'strict_gop' | 'qp_rd' | 'cbp_rd' | 'naq' | 'mv0' | (string & {});
4257
+ /** single coefficient elimination threshold for luminance (negative values also consider dc coefficient) */
4258
+ luma_elim_threshold?: number;
4259
+ /** single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) */
4260
+ chroma_elim_threshold?: number;
4261
+ quantizer_noise_shaping?: number;
4262
+ /** Simulate errors in the bitstream to test error concealment. */
4263
+ error_rate?: number;
4264
+ /** how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) */
4265
+ qsquish?: number;
4266
+ /** experimental quantizer modulation */
4267
+ rc_qmod_amp?: number;
4268
+ /** experimental quantizer modulation */
4269
+ rc_qmod_freq?: number;
4270
+ /**
4271
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
4272
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
4273
+ * avgPITex avgPPTex avgBPTex avgTex.
4274
+ */
4275
+ rc_eq?: string;
4276
+ /** initial complexity for 1-pass encoding */
4277
+ rc_init_cplx?: number;
4278
+ /** currently useless */
4279
+ rc_buf_aggressivity?: number;
4280
+ /** increase the quantizer for macroblocks close to borders */
4281
+ border_mask?: number;
4282
+ /** minimum Lagrange factor (VBR) */
4283
+ lmin?: number;
4284
+ /** maximum Lagrange factor (VBR) */
4285
+ lmax?: number;
4286
+ /** Frame skip threshold */
4287
+ skip_threshold?: number;
4288
+ /** Frame skip factor */
4289
+ skip_factor?: number;
4290
+ /** Frame skip exponent */
4291
+ skip_exp?: number;
4292
+ /** Frame skip compare function */
4293
+ skip_cmp?: 'sad' | 'sse' | 'satd' | 'dct' | 'psnr' | 'bit' | 'rd' | 'zero' | 'vsad' | 'vsse' | 'nsse' | 'dct264' | 'dctmax' | 'chroma' | 'msad';
4294
+ /** Noise reduction */
4295
+ noise_reduction?: number;
4296
+ /** RTP payload size in bytes */
4297
+ ps?: number;
4298
+ /** motion estimation algorithm */
4299
+ motion_est?: 'zero' | 'epzs' | 'xone';
4300
+ /** Motion estimation bitrate penalty compensation (1.0 = 256) */
4301
+ mepc?: number;
4302
+ /** pre motion estimation */
4303
+ mepre?: number;
4304
+ /** Penalty for intra blocks in block decision */
4305
+ intra_penalty?: number;
4306
+ /** Scene change threshold */
4307
+ sc_threshold?: number;
4308
+ };
4309
+ /**
4310
+ * RealVideo 2.0
4311
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#rv20
4312
+ */
4313
+ rv20: {
4314
+ /** Flags common for all mpegvideo-based encoders. */
4315
+ mpv_flags?: 'skip_rd' | 'strict_gop' | 'qp_rd' | 'cbp_rd' | 'naq' | 'mv0' | (string & {});
4316
+ /** single coefficient elimination threshold for luminance (negative values also consider dc coefficient) */
4317
+ luma_elim_threshold?: number;
4318
+ /** single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) */
4319
+ chroma_elim_threshold?: number;
4320
+ quantizer_noise_shaping?: number;
4321
+ /** Simulate errors in the bitstream to test error concealment. */
4322
+ error_rate?: number;
4323
+ /** how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) */
4324
+ qsquish?: number;
4325
+ /** experimental quantizer modulation */
4326
+ rc_qmod_amp?: number;
4327
+ /** experimental quantizer modulation */
4328
+ rc_qmod_freq?: number;
4329
+ /**
4330
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
4331
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
4332
+ * avgPITex avgPPTex avgBPTex avgTex.
4333
+ */
4334
+ rc_eq?: string;
4335
+ /** initial complexity for 1-pass encoding */
4336
+ rc_init_cplx?: number;
4337
+ /** currently useless */
4338
+ rc_buf_aggressivity?: number;
4339
+ /** increase the quantizer for macroblocks close to borders */
4340
+ border_mask?: number;
4341
+ /** minimum Lagrange factor (VBR) */
4342
+ lmin?: number;
4343
+ /** maximum Lagrange factor (VBR) */
4344
+ lmax?: number;
4345
+ /** Frame skip threshold */
4346
+ skip_threshold?: number;
4347
+ /** Frame skip factor */
4348
+ skip_factor?: number;
4349
+ /** Frame skip exponent */
4350
+ skip_exp?: number;
4351
+ /** Frame skip compare function */
4352
+ skip_cmp?: 'sad' | 'sse' | 'satd' | 'dct' | 'psnr' | 'bit' | 'rd' | 'zero' | 'vsad' | 'vsse' | 'nsse' | 'dct264' | 'dctmax' | 'chroma' | 'msad';
4353
+ /** Noise reduction */
4354
+ noise_reduction?: number;
4355
+ /** RTP payload size in bytes */
4356
+ ps?: number;
4357
+ /** motion estimation algorithm */
4358
+ motion_est?: 'zero' | 'epzs' | 'xone';
4359
+ /** Motion estimation bitrate penalty compensation (1.0 = 256) */
4360
+ mepc?: number;
4361
+ /** pre motion estimation */
4362
+ mepre?: number;
4363
+ /** Penalty for intra blocks in block decision */
4364
+ intra_penalty?: number;
4365
+ /** Scene change threshold */
4366
+ sc_threshold?: number;
4367
+ };
4368
+ /**
4369
+ * SBC (low-complexity subband codec)
4370
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#sbc
4371
+ */
4372
+ sbc: {
4373
+ /** set maximum algorithmic latency */
4374
+ sbc_delay?: string;
4375
+ /** use mSBC mode (wideband speech mono SBC) */
3275
4376
  msbc?: boolean;
3276
4377
  };
3277
4378
  /**
@@ -3301,8 +4402,71 @@ export interface EncoderOptionsMap {
3301
4402
  sc_threshold?: number;
3302
4403
  /** Spatial decomposition type */
3303
4404
  pred?: 'dwt97' | 'dwt53';
3304
- /** Set rate control equation. When computing the expression, besides the standard functions */
4405
+ /**
4406
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
4407
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
4408
+ * avgPITex avgPPTex avgBPTex avgTex.
4409
+ */
4410
+ rc_eq?: string;
4411
+ };
4412
+ /**
4413
+ * NewTek SpeedHQ
4414
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#speedhq
4415
+ */
4416
+ speedhq: {
4417
+ /** Flags common for all mpegvideo-based encoders. */
4418
+ mpv_flags?: 'skip_rd' | 'strict_gop' | 'qp_rd' | 'cbp_rd' | 'naq' | 'mv0' | (string & {});
4419
+ /** single coefficient elimination threshold for luminance (negative values also consider dc coefficient) */
4420
+ luma_elim_threshold?: number;
4421
+ /** single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) */
4422
+ chroma_elim_threshold?: number;
4423
+ quantizer_noise_shaping?: number;
4424
+ /** Simulate errors in the bitstream to test error concealment. */
4425
+ error_rate?: number;
4426
+ /** how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) */
4427
+ qsquish?: number;
4428
+ /** experimental quantizer modulation */
4429
+ rc_qmod_amp?: number;
4430
+ /** experimental quantizer modulation */
4431
+ rc_qmod_freq?: number;
4432
+ /**
4433
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
4434
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
4435
+ * avgPITex avgPPTex avgBPTex avgTex.
4436
+ */
3305
4437
  rc_eq?: string;
4438
+ /** initial complexity for 1-pass encoding */
4439
+ rc_init_cplx?: number;
4440
+ /** currently useless */
4441
+ rc_buf_aggressivity?: number;
4442
+ /** increase the quantizer for macroblocks close to borders */
4443
+ border_mask?: number;
4444
+ /** minimum Lagrange factor (VBR) */
4445
+ lmin?: number;
4446
+ /** maximum Lagrange factor (VBR) */
4447
+ lmax?: number;
4448
+ /** Frame skip threshold */
4449
+ skip_threshold?: number;
4450
+ /** Frame skip factor */
4451
+ skip_factor?: number;
4452
+ /** Frame skip exponent */
4453
+ skip_exp?: number;
4454
+ /** Frame skip compare function */
4455
+ skip_cmp?: 'sad' | 'sse' | 'satd' | 'dct' | 'psnr' | 'bit' | 'rd' | 'zero' | 'vsad' | 'vsse' | 'nsse' | 'dct264' | 'dctmax' | 'chroma' | 'msad';
4456
+ /** Noise reduction */
4457
+ noise_reduction?: number;
4458
+ /** RTP payload size in bytes */
4459
+ ps?: number;
4460
+ /** motion estimation algorithm */
4461
+ motion_est?: 'zero' | 'epzs' | 'xone';
4462
+ /** Motion estimation bitrate penalty compensation (1.0 = 256) */
4463
+ mepc?: number;
4464
+ /** pre motion estimation */
4465
+ mepre?: number;
4466
+ /** Penalty for intra blocks in block decision */
4467
+ intra_penalty?: number;
4468
+ /** Scene change threshold */
4469
+ sc_threshold?: number;
3306
4470
  };
3307
4471
  /**
3308
4472
  * Sun Rasterfile image
@@ -3391,6 +4555,48 @@ export interface EncoderOptionsMap {
3391
4555
  /** Custom quantization matrix */
3392
4556
  qm?: 'default' | 'color' | 'flat';
3393
4557
  };
4558
+ /**
4559
+ * VP8
4560
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp8_005fmediacodec
4561
+ */
4562
+ vp8_mediacodec: {
4563
+ /** Use MediaCodec from NDK */
4564
+ ndk_codec?: boolean;
4565
+ /** Try NDK MediaCodec in async mode */
4566
+ ndk_async?: boolean;
4567
+ /** Select codec by name */
4568
+ codec_name?: string;
4569
+ /** Bitrate control method */
4570
+ bitrate_mode?: 'cq' | 'vbr' | 'cbr' | 'cbr_fd';
4571
+ /** Use PTS as DTS. It is enabled automatically if avctx max_b_frames <= 0, since most of Android devices don't output B frames by default. */
4572
+ pts_as_dts?: boolean;
4573
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
4574
+ operating_rate?: number;
4575
+ /** minimum quantization parameter for I frame */
4576
+ qp_i_min?: number;
4577
+ /** minimum quantization parameter for P frame */
4578
+ qp_p_min?: number;
4579
+ /** minimum quantization parameter for B frame */
4580
+ qp_b_min?: number;
4581
+ /** maximum quantization parameter for I frame */
4582
+ qp_i_max?: number;
4583
+ /** maximum quantization parameter for P frame */
4584
+ qp_p_max?: number;
4585
+ /** maximum quantization parameter for B frame */
4586
+ qp_b_max?: number;
4587
+ /** Specify tier and level */
4588
+ level?: 'V0' | 'V1' | 'V2' | 'V3';
4589
+ };
4590
+ /**
4591
+ * V4L2 mem2mem
4592
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp8_005fv4l2m2m
4593
+ */
4594
+ vp8_v4l2m2m: {
4595
+ /** Number of buffers in the output context */
4596
+ num_output_buffers?: number;
4597
+ /** Number of buffers in the capture context */
4598
+ num_capture_buffers?: number;
4599
+ };
3394
4600
  /**
3395
4601
  * VP8 (VAAPI)
3396
4602
  * @see https://ffmpeg.org/ffmpeg-codecs.html#vp8_005fvaapi
@@ -3400,9 +4606,9 @@ export interface EncoderOptionsMap {
3400
4606
  idr_interval?: number;
3401
4607
  /** Maximum B-frame reference depth */
3402
4608
  b_depth?: number;
3403
- /** Maximum processing parallelism. */
4609
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
3404
4610
  async_depth?: number;
3405
- /** Use low-power encoding mode (only available on some platforms; */
4611
+ /** Use low-power encoding mode (only available on some platforms; may not support all encoding features) */
3406
4612
  low_power?: boolean;
3407
4613
  /** Maximum frame size (in bytes) */
3408
4614
  max_frame_size?: number;
@@ -3415,6 +4621,38 @@ export interface EncoderOptionsMap {
3415
4621
  /** Loop filter sharpness */
3416
4622
  loop_filter_sharpness?: number;
3417
4623
  };
4624
+ /**
4625
+ * VP9
4626
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp9_005fmediacodec
4627
+ */
4628
+ vp9_mediacodec: {
4629
+ /** Use MediaCodec from NDK */
4630
+ ndk_codec?: boolean;
4631
+ /** Try NDK MediaCodec in async mode */
4632
+ ndk_async?: boolean;
4633
+ /** Select codec by name */
4634
+ codec_name?: string;
4635
+ /** Bitrate control method */
4636
+ bitrate_mode?: 'cq' | 'vbr' | 'cbr' | 'cbr_fd';
4637
+ /** Use PTS as DTS. It is enabled automatically if avctx max_b_frames <= 0, since most of Android devices don't output B frames by default. */
4638
+ pts_as_dts?: boolean;
4639
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
4640
+ operating_rate?: number;
4641
+ /** minimum quantization parameter for I frame */
4642
+ qp_i_min?: number;
4643
+ /** minimum quantization parameter for P frame */
4644
+ qp_p_min?: number;
4645
+ /** minimum quantization parameter for B frame */
4646
+ qp_b_min?: number;
4647
+ /** maximum quantization parameter for I frame */
4648
+ qp_i_max?: number;
4649
+ /** maximum quantization parameter for P frame */
4650
+ qp_p_max?: number;
4651
+ /** maximum quantization parameter for B frame */
4652
+ qp_b_max?: number;
4653
+ /** Specify tier and level */
4654
+ level?: '1' | '1.1' | '2' | '2.1' | '3' | '3.1' | '4' | '4.1' | '5' | '5.1' | '5.2' | '6' | '6.1' | '6.2';
4655
+ };
3418
4656
  /**
3419
4657
  * VP9 video (Intel Quick Sync Video acceleration)
3420
4658
  * @see https://ffmpeg.org/ffmpeg-codecs.html#vp9_005fqsv
@@ -3444,9 +4682,9 @@ export interface EncoderOptionsMap {
3444
4682
  idr_interval?: number;
3445
4683
  /** Maximum B-frame reference depth */
3446
4684
  b_depth?: number;
3447
- /** Maximum processing parallelism. */
4685
+ /** Maximum processing parallelism. Increase this to improve single channel performance. */
3448
4686
  async_depth?: number;
3449
- /** Use low-power encoding mode (only available on some platforms; */
4687
+ /** Use low-power encoding mode (only available on some platforms; may not support all encoding features) */
3450
4688
  low_power?: boolean;
3451
4689
  /** Maximum frame size (in bytes) */
3452
4690
  max_frame_size?: number;
@@ -3467,6 +4705,124 @@ export interface EncoderOptionsMap {
3467
4705
  joint_stereo?: boolean;
3468
4706
  optimize_mono?: boolean;
3469
4707
  };
4708
+ /**
4709
+ * Windows Media Video 7
4710
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#wmv1
4711
+ */
4712
+ wmv1: {
4713
+ /** Flags common for all mpegvideo-based encoders. */
4714
+ mpv_flags?: 'skip_rd' | 'strict_gop' | 'qp_rd' | 'cbp_rd' | 'naq' | 'mv0' | (string & {});
4715
+ /** single coefficient elimination threshold for luminance (negative values also consider dc coefficient) */
4716
+ luma_elim_threshold?: number;
4717
+ /** single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) */
4718
+ chroma_elim_threshold?: number;
4719
+ quantizer_noise_shaping?: number;
4720
+ /** Simulate errors in the bitstream to test error concealment. */
4721
+ error_rate?: number;
4722
+ /** how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) */
4723
+ qsquish?: number;
4724
+ /** experimental quantizer modulation */
4725
+ rc_qmod_amp?: number;
4726
+ /** experimental quantizer modulation */
4727
+ rc_qmod_freq?: number;
4728
+ /**
4729
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
4730
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
4731
+ * avgPITex avgPPTex avgBPTex avgTex.
4732
+ */
4733
+ rc_eq?: string;
4734
+ /** initial complexity for 1-pass encoding */
4735
+ rc_init_cplx?: number;
4736
+ /** currently useless */
4737
+ rc_buf_aggressivity?: number;
4738
+ /** increase the quantizer for macroblocks close to borders */
4739
+ border_mask?: number;
4740
+ /** minimum Lagrange factor (VBR) */
4741
+ lmin?: number;
4742
+ /** maximum Lagrange factor (VBR) */
4743
+ lmax?: number;
4744
+ /** Frame skip threshold */
4745
+ skip_threshold?: number;
4746
+ /** Frame skip factor */
4747
+ skip_factor?: number;
4748
+ /** Frame skip exponent */
4749
+ skip_exp?: number;
4750
+ /** Frame skip compare function */
4751
+ skip_cmp?: 'sad' | 'sse' | 'satd' | 'dct' | 'psnr' | 'bit' | 'rd' | 'zero' | 'vsad' | 'vsse' | 'nsse' | 'dct264' | 'dctmax' | 'chroma' | 'msad';
4752
+ /** Noise reduction */
4753
+ noise_reduction?: number;
4754
+ /** RTP payload size in bytes */
4755
+ ps?: number;
4756
+ /** motion estimation algorithm */
4757
+ motion_est?: 'zero' | 'epzs' | 'xone';
4758
+ /** Motion estimation bitrate penalty compensation (1.0 = 256) */
4759
+ mepc?: number;
4760
+ /** pre motion estimation */
4761
+ mepre?: number;
4762
+ /** Penalty for intra blocks in block decision */
4763
+ intra_penalty?: number;
4764
+ /** Scene change threshold */
4765
+ sc_threshold?: number;
4766
+ };
4767
+ /**
4768
+ * Windows Media Video 8
4769
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#wmv2
4770
+ */
4771
+ wmv2: {
4772
+ /** Flags common for all mpegvideo-based encoders. */
4773
+ mpv_flags?: 'skip_rd' | 'strict_gop' | 'qp_rd' | 'cbp_rd' | 'naq' | 'mv0' | (string & {});
4774
+ /** single coefficient elimination threshold for luminance (negative values also consider dc coefficient) */
4775
+ luma_elim_threshold?: number;
4776
+ /** single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) */
4777
+ chroma_elim_threshold?: number;
4778
+ quantizer_noise_shaping?: number;
4779
+ /** Simulate errors in the bitstream to test error concealment. */
4780
+ error_rate?: number;
4781
+ /** how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) */
4782
+ qsquish?: number;
4783
+ /** experimental quantizer modulation */
4784
+ rc_qmod_amp?: number;
4785
+ /** experimental quantizer modulation */
4786
+ rc_qmod_freq?: number;
4787
+ /**
4788
+ * Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions
4789
+ * are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex
4790
+ * avgPITex avgPPTex avgBPTex avgTex.
4791
+ */
4792
+ rc_eq?: string;
4793
+ /** initial complexity for 1-pass encoding */
4794
+ rc_init_cplx?: number;
4795
+ /** currently useless */
4796
+ rc_buf_aggressivity?: number;
4797
+ /** increase the quantizer for macroblocks close to borders */
4798
+ border_mask?: number;
4799
+ /** minimum Lagrange factor (VBR) */
4800
+ lmin?: number;
4801
+ /** maximum Lagrange factor (VBR) */
4802
+ lmax?: number;
4803
+ /** Frame skip threshold */
4804
+ skip_threshold?: number;
4805
+ /** Frame skip factor */
4806
+ skip_factor?: number;
4807
+ /** Frame skip exponent */
4808
+ skip_exp?: number;
4809
+ /** Frame skip compare function */
4810
+ skip_cmp?: 'sad' | 'sse' | 'satd' | 'dct' | 'psnr' | 'bit' | 'rd' | 'zero' | 'vsad' | 'vsse' | 'nsse' | 'dct264' | 'dctmax' | 'chroma' | 'msad';
4811
+ /** Noise reduction */
4812
+ noise_reduction?: number;
4813
+ /** RTP payload size in bytes */
4814
+ ps?: number;
4815
+ /** motion estimation algorithm */
4816
+ motion_est?: 'zero' | 'epzs' | 'xone';
4817
+ /** Motion estimation bitrate penalty compensation (1.0 = 256) */
4818
+ mepc?: number;
4819
+ /** pre motion estimation */
4820
+ mepre?: number;
4821
+ /** Penalty for intra blocks in block decision */
4822
+ intra_penalty?: number;
4823
+ /** Scene change threshold */
4824
+ sc_threshold?: number;
4825
+ };
3470
4826
  }
3471
4827
  export interface DecoderOptionsMap {
3472
4828
  /**
@@ -3478,8 +4834,6 @@ export interface DecoderOptionsMap {
3478
4834
  dual_mono_mode?: 'auto' | 'main' | 'sub' | 'both';
3479
4835
  /** Order in which the channels are to be exported */
3480
4836
  channel_order?: 'default' | 'coded';
3481
- /** Target output loudness in dBFS for xHE-AAC normalization (0 = disabled) */
3482
- target_level?: number;
3483
4837
  };
3484
4838
  /**
3485
4839
  * AAC (Advanced Audio Coding)
@@ -3490,8 +4844,18 @@ export interface DecoderOptionsMap {
3490
4844
  dual_mono_mode?: 'auto' | 'main' | 'sub' | 'both';
3491
4845
  /** Order in which the channels are to be exported */
3492
4846
  channel_order?: 'default' | 'coded';
3493
- /** Target output loudness in dBFS for xHE-AAC normalization (0 = disabled) */
3494
- target_level?: number;
4847
+ };
4848
+ /**
4849
+ * AAC
4850
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#aac_005fmediacodec
4851
+ */
4852
+ aac_mediacodec: {
4853
+ /** Delay flush until hw output buffers are returned to the decoder */
4854
+ delay_flush?: boolean;
4855
+ /** Use MediaCodec from NDK */
4856
+ ndk_codec?: boolean;
4857
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
4858
+ operating_rate?: number;
3495
4859
  };
3496
4860
  /**
3497
4861
  * ATSC A/52A (AC-3)
@@ -3534,7 +4898,7 @@ export interface DecoderOptionsMap {
3534
4898
  downmix?: string;
3535
4899
  };
3536
4900
  /**
3537
- * Dolby AC-4
4901
+ * AC-4
3538
4902
  * @see https://ffmpeg.org/ffmpeg-codecs.html#ac4
3539
4903
  */
3540
4904
  ac4: {
@@ -3557,6 +4921,30 @@ export interface DecoderOptionsMap {
3557
4921
  /** Sets the maximum order (ALS simple profile allows max 15) */
3558
4922
  max_order?: number;
3559
4923
  };
4924
+ /**
4925
+ * AMR-NB
4926
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#amrnb_005fmediacodec
4927
+ */
4928
+ amrnb_mediacodec: {
4929
+ /** Delay flush until hw output buffers are returned to the decoder */
4930
+ delay_flush?: boolean;
4931
+ /** Use MediaCodec from NDK */
4932
+ ndk_codec?: boolean;
4933
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
4934
+ operating_rate?: number;
4935
+ };
4936
+ /**
4937
+ * AMR-WB
4938
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#amrwb_005fmediacodec
4939
+ */
4940
+ amrwb_mediacodec: {
4941
+ /** Delay flush until hw output buffers are returned to the decoder */
4942
+ delay_flush?: boolean;
4943
+ /** Use MediaCodec from NDK */
4944
+ ndk_codec?: boolean;
4945
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
4946
+ operating_rate?: number;
4947
+ };
3560
4948
  /**
3561
4949
  * Monkey's Audio
3562
4950
  * @see https://ffmpeg.org/ffmpeg-codecs.html#ape
@@ -3573,6 +4961,82 @@ export interface DecoderOptionsMap {
3573
4961
  /** Select an operating point of the scalable bitstream */
3574
4962
  operating_point?: number;
3575
4963
  };
4964
+ /**
4965
+ * AMD AMF AV1 encoder
4966
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#av1_005famf
4967
+ */
4968
+ av1_amf: {
4969
+ /** Decoder mode */
4970
+ decoder_mode?: 'regular' | 'compliant' | 'low_latency';
4971
+ /** Timestamp mode */
4972
+ timestamp_mode?: 'presentation' | 'sort' | 'decode';
4973
+ /** Number of surfaces in the decode pool */
4974
+ surface_pool_size?: number;
4975
+ /** Minimum number of surfaces for reordering */
4976
+ dpb_size?: number;
4977
+ /** Low latency */
4978
+ lowlatency?: number;
4979
+ /** Smart Access Video */
4980
+ smart_access_video?: number;
4981
+ /** Skip transfer on another GPU when SAV enabled */
4982
+ skip_transfer_sav?: number;
4983
+ /** Copy Output */
4984
+ copy_output?: number;
4985
+ };
4986
+ /**
4987
+ * Nvidia CUVID
4988
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#av1_005fcuvid
4989
+ */
4990
+ av1_cuvid: {
4991
+ /** Set deinterlacing mode */
4992
+ deint?: 'weave' | 'bob' | 'adaptive';
4993
+ /** GPU to be used for decoding */
4994
+ gpu?: string;
4995
+ /** Maximum surfaces to be used for decoding */
4996
+ surfaces?: number;
4997
+ /** Drop second field when deinterlacing */
4998
+ drop_second_field?: boolean;
4999
+ /** Crop (top)x(bottom)x(left)x(right) */
5000
+ crop?: string;
5001
+ /** Resize (width)x(height) */
5002
+ resize?: string;
5003
+ };
5004
+ /**
5005
+ * AV1
5006
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#av1_005fmediacodec
5007
+ */
5008
+ av1_mediacodec: {
5009
+ /** Delay flush until hw output buffers are returned to the decoder */
5010
+ delay_flush?: boolean;
5011
+ /** Use MediaCodec from NDK */
5012
+ ndk_codec?: boolean;
5013
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
5014
+ operating_rate?: number;
5015
+ };
5016
+ /**
5017
+ * AV1 (Intel Quick Sync Video acceleration)
5018
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#av1_005fqsv
5019
+ */
5020
+ av1_qsv: {
5021
+ /** Internal parallelization depth, the higher the value the higher the latency. */
5022
+ async_depth?: number;
5023
+ /** A GPU-accelerated copy between video and system memory */
5024
+ gpu_copy?: 'default' | 'on' | 'off';
5025
+ };
5026
+ /**
5027
+ * Rockchip MPP (Media Process Platform)
5028
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#av1_005frkmpp
5029
+ */
5030
+ av1_rkmpp: {
5031
+ /** Enable IEP (Image Enhancement Processor) for de-interlacing */
5032
+ deint?: boolean;
5033
+ /** Enable AFBC (Arm Frame Buffer Compression) to save bandwidth */
5034
+ afbc?: 'off' | 'on' | 'rga';
5035
+ /** Enable fast parsing to improve decoding parallelism */
5036
+ fast_parse?: boolean;
5037
+ /** Set the buffer mode for MPP decoder */
5038
+ buf_mode?: 'half' | 'ext';
5039
+ };
3576
5040
  /**
3577
5041
  * Closed Captions (EIA-608 / CEA-708)
3578
5042
  * @see https://ffmpeg.org/ffmpeg-codecs.html#cc_005fdec
@@ -3629,7 +5093,7 @@ export interface DecoderOptionsMap {
3629
5093
  forced_subs_only?: boolean;
3630
5094
  };
3631
5095
  /**
3632
- * ATSC A/52B (AC-3, E-AC-3)
5096
+ * ATSC A/52 E-AC-3
3633
5097
  * @see https://ffmpeg.org/ffmpeg-codecs.html#eac3
3634
5098
  */
3635
5099
  eac3: {
@@ -3732,6 +5196,30 @@ export interface DecoderOptionsMap {
3732
5196
  /** color value (ARGB) that is used instead of transparent color */
3733
5197
  trans_color?: number;
3734
5198
  };
5199
+ /**
5200
+ * Rockchip MPP (Media Process Platform)
5201
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h263_005frkmpp
5202
+ */
5203
+ h263_rkmpp: {
5204
+ /** Enable IEP (Image Enhancement Processor) for de-interlacing */
5205
+ deint?: boolean;
5206
+ /** Enable AFBC (Arm Frame Buffer Compression) to save bandwidth */
5207
+ afbc?: 'off' | 'on' | 'rga';
5208
+ /** Enable fast parsing to improve decoding parallelism */
5209
+ fast_parse?: boolean;
5210
+ /** Set the buffer mode for MPP decoder */
5211
+ buf_mode?: 'half' | 'ext';
5212
+ };
5213
+ /**
5214
+ * V4L2 mem2mem
5215
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h263_005fv4l2m2m
5216
+ */
5217
+ h263_v4l2m2m: {
5218
+ /** Number of buffers in the output context */
5219
+ num_output_buffers?: number;
5220
+ /** Number of buffers in the capture context */
5221
+ num_capture_buffers?: number;
5222
+ };
3735
5223
  /**
3736
5224
  * H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
3737
5225
  * @see https://ffmpeg.org/ffmpeg-codecs.html#h264
@@ -3750,6 +5238,112 @@ export interface DecoderOptionsMap {
3750
5238
  /** Avoid using gray gap frames as references */
3751
5239
  noref_gray?: boolean;
3752
5240
  };
5241
+ /**
5242
+ * AMD AMF H.264 Encoder
5243
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005famf
5244
+ */
5245
+ h264_amf: {
5246
+ /** Decoder mode */
5247
+ decoder_mode?: 'regular' | 'compliant' | 'low_latency';
5248
+ /** Timestamp mode */
5249
+ timestamp_mode?: 'presentation' | 'sort' | 'decode';
5250
+ /** Number of surfaces in the decode pool */
5251
+ surface_pool_size?: number;
5252
+ /** Minimum number of surfaces for reordering */
5253
+ dpb_size?: number;
5254
+ /** Low latency */
5255
+ lowlatency?: number;
5256
+ /** Smart Access Video */
5257
+ smart_access_video?: number;
5258
+ /** Skip transfer on another GPU when SAV enabled */
5259
+ skip_transfer_sav?: number;
5260
+ /** Copy Output */
5261
+ copy_output?: number;
5262
+ };
5263
+ /**
5264
+ * Nvidia CUVID
5265
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005fcuvid
5266
+ */
5267
+ h264_cuvid: {
5268
+ /** Set deinterlacing mode */
5269
+ deint?: 'weave' | 'bob' | 'adaptive';
5270
+ /** GPU to be used for decoding */
5271
+ gpu?: string;
5272
+ /** Maximum surfaces to be used for decoding */
5273
+ surfaces?: number;
5274
+ /** Drop second field when deinterlacing */
5275
+ drop_second_field?: boolean;
5276
+ /** Crop (top)x(bottom)x(left)x(right) */
5277
+ crop?: string;
5278
+ /** Resize (width)x(height) */
5279
+ resize?: string;
5280
+ };
5281
+ /**
5282
+ * H.264
5283
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005fmediacodec
5284
+ */
5285
+ h264_mediacodec: {
5286
+ /** Delay flush until hw output buffers are returned to the decoder */
5287
+ delay_flush?: boolean;
5288
+ /** Use MediaCodec from NDK */
5289
+ ndk_codec?: boolean;
5290
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
5291
+ operating_rate?: number;
5292
+ };
5293
+ /**
5294
+ * h264
5295
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005fmmal
5296
+ */
5297
+ h264_mmal: {
5298
+ /** extra buffers */
5299
+ extra_buffers?: number;
5300
+ /** extra MMAL internal buffered frames */
5301
+ extra_decoder_buffers?: number;
5302
+ };
5303
+ /**
5304
+ * H.264
5305
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005fohcodec
5306
+ */
5307
+ h264_ohcodec: {
5308
+ /** Select codec by name */
5309
+ codec_name?: string;
5310
+ /** Allow software decoding */
5311
+ allow_sw?: boolean;
5312
+ };
5313
+ /**
5314
+ * H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration)
5315
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005fqsv
5316
+ */
5317
+ h264_qsv: {
5318
+ /** Internal parallelization depth, the higher the value the higher the latency. */
5319
+ async_depth?: number;
5320
+ /** A GPU-accelerated copy between video and system memory */
5321
+ gpu_copy?: 'default' | 'on' | 'off';
5322
+ };
5323
+ /**
5324
+ * Rockchip MPP (Media Process Platform)
5325
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005frkmpp
5326
+ */
5327
+ h264_rkmpp: {
5328
+ /** Enable IEP (Image Enhancement Processor) for de-interlacing */
5329
+ deint?: boolean;
5330
+ /** Enable AFBC (Arm Frame Buffer Compression) to save bandwidth */
5331
+ afbc?: 'off' | 'on' | 'rga';
5332
+ /** Enable fast parsing to improve decoding parallelism */
5333
+ fast_parse?: boolean;
5334
+ /** Set the buffer mode for MPP decoder */
5335
+ buf_mode?: 'half' | 'ext';
5336
+ };
5337
+ /**
5338
+ * V4L2 mem2mem
5339
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#h264_005fv4l2m2m
5340
+ */
5341
+ h264_v4l2m2m: {
5342
+ /** Number of buffers in the output context */
5343
+ num_output_buffers?: number;
5344
+ /** Number of buffers in the capture context */
5345
+ num_capture_buffers?: number;
5346
+ };
3753
5347
  /**
3754
5348
  * HEVC (High Efficiency Video Coding)
3755
5349
  * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc
@@ -3764,7 +5358,107 @@ export interface DecoderOptionsMap {
3764
5358
  /** Array of available view IDs is exported here */
3765
5359
  view_ids_available?: string;
3766
5360
  /** Array of view positions for view_ids_available is exported here, as AVStereo3DView */
3767
- view_pos_available?: 'unspecified' | 'left' | 'right';
5361
+ view_pos_available?: 'unspecified' | 'left' | 'right' | (string & {});
5362
+ };
5363
+ /**
5364
+ * AMD AMF HEVC encoder
5365
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005famf
5366
+ */
5367
+ hevc_amf: {
5368
+ /** Decoder mode */
5369
+ decoder_mode?: 'regular' | 'compliant' | 'low_latency';
5370
+ /** Timestamp mode */
5371
+ timestamp_mode?: 'presentation' | 'sort' | 'decode';
5372
+ /** Number of surfaces in the decode pool */
5373
+ surface_pool_size?: number;
5374
+ /** Minimum number of surfaces for reordering */
5375
+ dpb_size?: number;
5376
+ /** Low latency */
5377
+ lowlatency?: number;
5378
+ /** Smart Access Video */
5379
+ smart_access_video?: number;
5380
+ /** Skip transfer on another GPU when SAV enabled */
5381
+ skip_transfer_sav?: number;
5382
+ /** Copy Output */
5383
+ copy_output?: number;
5384
+ };
5385
+ /**
5386
+ * Nvidia CUVID
5387
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005fcuvid
5388
+ */
5389
+ hevc_cuvid: {
5390
+ /** Set deinterlacing mode */
5391
+ deint?: 'weave' | 'bob' | 'adaptive';
5392
+ /** GPU to be used for decoding */
5393
+ gpu?: string;
5394
+ /** Maximum surfaces to be used for decoding */
5395
+ surfaces?: number;
5396
+ /** Drop second field when deinterlacing */
5397
+ drop_second_field?: boolean;
5398
+ /** Crop (top)x(bottom)x(left)x(right) */
5399
+ crop?: string;
5400
+ /** Resize (width)x(height) */
5401
+ resize?: string;
5402
+ };
5403
+ /**
5404
+ * H.265
5405
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005fmediacodec
5406
+ */
5407
+ hevc_mediacodec: {
5408
+ /** Delay flush until hw output buffers are returned to the decoder */
5409
+ delay_flush?: boolean;
5410
+ /** Use MediaCodec from NDK */
5411
+ ndk_codec?: boolean;
5412
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
5413
+ operating_rate?: number;
5414
+ };
5415
+ /**
5416
+ * H.265
5417
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005fohcodec
5418
+ */
5419
+ hevc_ohcodec: {
5420
+ /** Select codec by name */
5421
+ codec_name?: string;
5422
+ /** Allow software decoding */
5423
+ allow_sw?: boolean;
5424
+ };
5425
+ /**
5426
+ * HEVC (Intel Quick Sync Video acceleration)
5427
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005fqsv
5428
+ */
5429
+ hevc_qsv: {
5430
+ /** Internal parallelization depth, the higher the value the higher the latency. */
5431
+ async_depth?: number;
5432
+ /** A user plugin to load in an internal session */
5433
+ load_plugin?: 'none' | 'hevc_sw' | 'hevc_hw';
5434
+ /** A :-separate list of hexadecimal plugin UIDs to load in an internal session */
5435
+ load_plugins?: string;
5436
+ /** A GPU-accelerated copy between video and system memory */
5437
+ gpu_copy?: 'default' | 'on' | 'off';
5438
+ };
5439
+ /**
5440
+ * Rockchip MPP (Media Process Platform)
5441
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005frkmpp
5442
+ */
5443
+ hevc_rkmpp: {
5444
+ /** Enable IEP (Image Enhancement Processor) for de-interlacing */
5445
+ deint?: boolean;
5446
+ /** Enable AFBC (Arm Frame Buffer Compression) to save bandwidth */
5447
+ afbc?: 'off' | 'on' | 'rga';
5448
+ /** Enable fast parsing to improve decoding parallelism */
5449
+ fast_parse?: boolean;
5450
+ /** Set the buffer mode for MPP decoder */
5451
+ buf_mode?: 'half' | 'ext';
5452
+ };
5453
+ /**
5454
+ * V4L2 mem2mem
5455
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#hevc_005fv4l2m2m
5456
+ */
5457
+ hevc_v4l2m2m: {
5458
+ /** Number of buffers in the output context */
5459
+ num_output_buffers?: number;
5460
+ /** Number of buffers in the capture context */
5461
+ num_capture_buffers?: number;
3768
5462
  };
3769
5463
  /**
3770
5464
  * JPEG 2000
@@ -3918,6 +5612,48 @@ export interface DecoderOptionsMap {
3918
5612
  /** Use external huffman table. */
3919
5613
  extern_huff?: boolean;
3920
5614
  };
5615
+ /**
5616
+ * Nvidia CUVID
5617
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mjpeg_005fcuvid
5618
+ */
5619
+ mjpeg_cuvid: {
5620
+ /** Set deinterlacing mode */
5621
+ deint?: 'weave' | 'bob' | 'adaptive';
5622
+ /** GPU to be used for decoding */
5623
+ gpu?: string;
5624
+ /** Maximum surfaces to be used for decoding */
5625
+ surfaces?: number;
5626
+ /** Drop second field when deinterlacing */
5627
+ drop_second_field?: boolean;
5628
+ /** Crop (top)x(bottom)x(left)x(right) */
5629
+ crop?: string;
5630
+ /** Resize (width)x(height) */
5631
+ resize?: string;
5632
+ };
5633
+ /**
5634
+ * MJPEG (Intel Quick Sync Video acceleration)
5635
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mjpeg_005fqsv
5636
+ */
5637
+ mjpeg_qsv: {
5638
+ /** Internal parallelization depth, the higher the value the higher the latency. */
5639
+ async_depth?: number;
5640
+ /** A GPU-accelerated copy between video and system memory */
5641
+ gpu_copy?: 'default' | 'on' | 'off';
5642
+ };
5643
+ /**
5644
+ * Rockchip MPP (Media Process Platform)
5645
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mjpeg_005frkmpp
5646
+ */
5647
+ mjpeg_rkmpp: {
5648
+ /** Enable IEP (Image Enhancement Processor) for de-interlacing */
5649
+ deint?: boolean;
5650
+ /** Enable AFBC (Arm Frame Buffer Compression) to save bandwidth */
5651
+ afbc?: 'off' | 'on' | 'rga';
5652
+ /** Enable fast parsing to improve decoding parallelism */
5653
+ fast_parse?: boolean;
5654
+ /** Set the buffer mode for MPP decoder */
5655
+ buf_mode?: 'half' | 'ext';
5656
+ };
3921
5657
  /**
3922
5658
  * MLP (Meridian Lossless Packing)
3923
5659
  * @see https://ffmpeg.org/ffmpeg-codecs.html#mlp
@@ -3936,6 +5672,134 @@ export interface DecoderOptionsMap {
3936
5672
  /** Frame height, usually video height */
3937
5673
  height?: number;
3938
5674
  };
5675
+ /**
5676
+ * MP3
5677
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mp3_005fmediacodec
5678
+ */
5679
+ mp3_mediacodec: {
5680
+ /** Delay flush until hw output buffers are returned to the decoder */
5681
+ delay_flush?: boolean;
5682
+ /** Use MediaCodec from NDK */
5683
+ ndk_codec?: boolean;
5684
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
5685
+ operating_rate?: number;
5686
+ };
5687
+ /**
5688
+ * Nvidia CUVID
5689
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg1_005fcuvid
5690
+ */
5691
+ mpeg1_cuvid: {
5692
+ /** Set deinterlacing mode */
5693
+ deint?: 'weave' | 'bob' | 'adaptive';
5694
+ /** GPU to be used for decoding */
5695
+ gpu?: string;
5696
+ /** Maximum surfaces to be used for decoding */
5697
+ surfaces?: number;
5698
+ /** Drop second field when deinterlacing */
5699
+ drop_second_field?: boolean;
5700
+ /** Crop (top)x(bottom)x(left)x(right) */
5701
+ crop?: string;
5702
+ /** Resize (width)x(height) */
5703
+ resize?: string;
5704
+ };
5705
+ /**
5706
+ * Rockchip MPP (Media Process Platform)
5707
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg1_005frkmpp
5708
+ */
5709
+ mpeg1_rkmpp: {
5710
+ /** Enable IEP (Image Enhancement Processor) for de-interlacing */
5711
+ deint?: boolean;
5712
+ /** Enable AFBC (Arm Frame Buffer Compression) to save bandwidth */
5713
+ afbc?: 'off' | 'on' | 'rga';
5714
+ /** Enable fast parsing to improve decoding parallelism */
5715
+ fast_parse?: boolean;
5716
+ /** Set the buffer mode for MPP decoder */
5717
+ buf_mode?: 'half' | 'ext';
5718
+ };
5719
+ /**
5720
+ * V4L2 mem2mem
5721
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg1_005fv4l2m2m
5722
+ */
5723
+ mpeg1_v4l2m2m: {
5724
+ /** Number of buffers in the output context */
5725
+ num_output_buffers?: number;
5726
+ /** Number of buffers in the capture context */
5727
+ num_capture_buffers?: number;
5728
+ };
5729
+ /**
5730
+ * Nvidia CUVID
5731
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg2_005fcuvid
5732
+ */
5733
+ mpeg2_cuvid: {
5734
+ /** Set deinterlacing mode */
5735
+ deint?: 'weave' | 'bob' | 'adaptive';
5736
+ /** GPU to be used for decoding */
5737
+ gpu?: string;
5738
+ /** Maximum surfaces to be used for decoding */
5739
+ surfaces?: number;
5740
+ /** Drop second field when deinterlacing */
5741
+ drop_second_field?: boolean;
5742
+ /** Crop (top)x(bottom)x(left)x(right) */
5743
+ crop?: string;
5744
+ /** Resize (width)x(height) */
5745
+ resize?: string;
5746
+ };
5747
+ /**
5748
+ * MPEG-2
5749
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg2_005fmediacodec
5750
+ */
5751
+ mpeg2_mediacodec: {
5752
+ /** Delay flush until hw output buffers are returned to the decoder */
5753
+ delay_flush?: boolean;
5754
+ /** Use MediaCodec from NDK */
5755
+ ndk_codec?: boolean;
5756
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
5757
+ operating_rate?: number;
5758
+ };
5759
+ /**
5760
+ * mpeg2
5761
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg2_005fmmal
5762
+ */
5763
+ mpeg2_mmal: {
5764
+ /** extra buffers */
5765
+ extra_buffers?: number;
5766
+ /** extra MMAL internal buffered frames */
5767
+ extra_decoder_buffers?: number;
5768
+ };
5769
+ /**
5770
+ * MPEG-2 video (Intel Quick Sync Video acceleration)
5771
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg2_005fqsv
5772
+ */
5773
+ mpeg2_qsv: {
5774
+ /** Internal parallelization depth, the higher the value the higher the latency. */
5775
+ async_depth?: number;
5776
+ /** A GPU-accelerated copy between video and system memory */
5777
+ gpu_copy?: 'default' | 'on' | 'off';
5778
+ };
5779
+ /**
5780
+ * Rockchip MPP (Media Process Platform)
5781
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg2_005frkmpp
5782
+ */
5783
+ mpeg2_rkmpp: {
5784
+ /** Enable IEP (Image Enhancement Processor) for de-interlacing */
5785
+ deint?: boolean;
5786
+ /** Enable AFBC (Arm Frame Buffer Compression) to save bandwidth */
5787
+ afbc?: 'off' | 'on' | 'rga';
5788
+ /** Enable fast parsing to improve decoding parallelism */
5789
+ fast_parse?: boolean;
5790
+ /** Set the buffer mode for MPP decoder */
5791
+ buf_mode?: 'half' | 'ext';
5792
+ };
5793
+ /**
5794
+ * V4L2 mem2mem
5795
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg2_005fv4l2m2m
5796
+ */
5797
+ mpeg2_v4l2m2m: {
5798
+ /** Number of buffers in the output context */
5799
+ num_output_buffers?: number;
5800
+ /** Number of buffers in the capture context */
5801
+ num_capture_buffers?: number;
5802
+ };
3939
5803
  /**
3940
5804
  * MPEG-2 video
3941
5805
  * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg2video
@@ -3954,6 +5818,70 @@ export interface DecoderOptionsMap {
3954
5818
  /** divx style packed b frames */
3955
5819
  divx_packed?: boolean;
3956
5820
  };
5821
+ /**
5822
+ * Nvidia CUVID
5823
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg4_005fcuvid
5824
+ */
5825
+ mpeg4_cuvid: {
5826
+ /** Set deinterlacing mode */
5827
+ deint?: 'weave' | 'bob' | 'adaptive';
5828
+ /** GPU to be used for decoding */
5829
+ gpu?: string;
5830
+ /** Maximum surfaces to be used for decoding */
5831
+ surfaces?: number;
5832
+ /** Drop second field when deinterlacing */
5833
+ drop_second_field?: boolean;
5834
+ /** Crop (top)x(bottom)x(left)x(right) */
5835
+ crop?: string;
5836
+ /** Resize (width)x(height) */
5837
+ resize?: string;
5838
+ };
5839
+ /**
5840
+ * MPEG-4
5841
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg4_005fmediacodec
5842
+ */
5843
+ mpeg4_mediacodec: {
5844
+ /** Delay flush until hw output buffers are returned to the decoder */
5845
+ delay_flush?: boolean;
5846
+ /** Use MediaCodec from NDK */
5847
+ ndk_codec?: boolean;
5848
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
5849
+ operating_rate?: number;
5850
+ };
5851
+ /**
5852
+ * mpeg4
5853
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg4_005fmmal
5854
+ */
5855
+ mpeg4_mmal: {
5856
+ /** extra buffers */
5857
+ extra_buffers?: number;
5858
+ /** extra MMAL internal buffered frames */
5859
+ extra_decoder_buffers?: number;
5860
+ };
5861
+ /**
5862
+ * Rockchip MPP (Media Process Platform)
5863
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg4_005frkmpp
5864
+ */
5865
+ mpeg4_rkmpp: {
5866
+ /** Enable IEP (Image Enhancement Processor) for de-interlacing */
5867
+ deint?: boolean;
5868
+ /** Enable AFBC (Arm Frame Buffer Compression) to save bandwidth */
5869
+ afbc?: 'off' | 'on' | 'rga';
5870
+ /** Enable fast parsing to improve decoding parallelism */
5871
+ fast_parse?: boolean;
5872
+ /** Set the buffer mode for MPP decoder */
5873
+ buf_mode?: 'half' | 'ext';
5874
+ };
5875
+ /**
5876
+ * V4L2 mem2mem
5877
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#mpeg4_005fv4l2m2m
5878
+ */
5879
+ mpeg4_v4l2m2m: {
5880
+ /** Number of buffers in the output context */
5881
+ num_output_buffers?: number;
5882
+ /** Number of buffers in the capture context */
5883
+ num_capture_buffers?: number;
5884
+ };
3957
5885
  /**
3958
5886
  * Opus
3959
5887
  * @see https://ffmpeg.org/ffmpeg-codecs.html#opus
@@ -4070,6 +5998,204 @@ export interface DecoderOptionsMap {
4070
5998
  /** Custom V210 stride */
4071
5999
  custom_stride?: number;
4072
6000
  };
6001
+ /**
6002
+ * Nvidia CUVID
6003
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vc1_005fcuvid
6004
+ */
6005
+ vc1_cuvid: {
6006
+ /** Set deinterlacing mode */
6007
+ deint?: 'weave' | 'bob' | 'adaptive';
6008
+ /** GPU to be used for decoding */
6009
+ gpu?: string;
6010
+ /** Maximum surfaces to be used for decoding */
6011
+ surfaces?: number;
6012
+ /** Drop second field when deinterlacing */
6013
+ drop_second_field?: boolean;
6014
+ /** Crop (top)x(bottom)x(left)x(right) */
6015
+ crop?: string;
6016
+ /** Resize (width)x(height) */
6017
+ resize?: string;
6018
+ };
6019
+ /**
6020
+ * vc1
6021
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vc1_005fmmal
6022
+ */
6023
+ vc1_mmal: {
6024
+ /** extra buffers */
6025
+ extra_buffers?: number;
6026
+ /** extra MMAL internal buffered frames */
6027
+ extra_decoder_buffers?: number;
6028
+ };
6029
+ /**
6030
+ * VC1
6031
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vc1_005fqsv
6032
+ */
6033
+ vc1_qsv: {
6034
+ /** Internal parallelization depth, the higher the value the higher the latency. */
6035
+ async_depth?: number;
6036
+ /** A GPU-accelerated copy between video and system memory */
6037
+ gpu_copy?: 'default' | 'on' | 'off';
6038
+ };
6039
+ /**
6040
+ * V4L2 mem2mem
6041
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vc1_005fv4l2m2m
6042
+ */
6043
+ vc1_v4l2m2m: {
6044
+ /** Number of buffers in the output context */
6045
+ num_output_buffers?: number;
6046
+ /** Number of buffers in the capture context */
6047
+ num_capture_buffers?: number;
6048
+ };
6049
+ /**
6050
+ * Nvidia CUVID
6051
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp8_005fcuvid
6052
+ */
6053
+ vp8_cuvid: {
6054
+ /** Set deinterlacing mode */
6055
+ deint?: 'weave' | 'bob' | 'adaptive';
6056
+ /** GPU to be used for decoding */
6057
+ gpu?: string;
6058
+ /** Maximum surfaces to be used for decoding */
6059
+ surfaces?: number;
6060
+ /** Drop second field when deinterlacing */
6061
+ drop_second_field?: boolean;
6062
+ /** Crop (top)x(bottom)x(left)x(right) */
6063
+ crop?: string;
6064
+ /** Resize (width)x(height) */
6065
+ resize?: string;
6066
+ };
6067
+ /**
6068
+ * VP8
6069
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp8_005fmediacodec
6070
+ */
6071
+ vp8_mediacodec: {
6072
+ /** Delay flush until hw output buffers are returned to the decoder */
6073
+ delay_flush?: boolean;
6074
+ /** Use MediaCodec from NDK */
6075
+ ndk_codec?: boolean;
6076
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
6077
+ operating_rate?: number;
6078
+ };
6079
+ /**
6080
+ * VP8
6081
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp8_005fqsv
6082
+ */
6083
+ vp8_qsv: {
6084
+ /** Internal parallelization depth, the higher the value the higher the latency. */
6085
+ async_depth?: number;
6086
+ /** A GPU-accelerated copy between video and system memory */
6087
+ gpu_copy?: 'default' | 'on' | 'off';
6088
+ };
6089
+ /**
6090
+ * Rockchip MPP (Media Process Platform)
6091
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp8_005frkmpp
6092
+ */
6093
+ vp8_rkmpp: {
6094
+ /** Enable IEP (Image Enhancement Processor) for de-interlacing */
6095
+ deint?: boolean;
6096
+ /** Enable AFBC (Arm Frame Buffer Compression) to save bandwidth */
6097
+ afbc?: 'off' | 'on' | 'rga';
6098
+ /** Enable fast parsing to improve decoding parallelism */
6099
+ fast_parse?: boolean;
6100
+ /** Set the buffer mode for MPP decoder */
6101
+ buf_mode?: 'half' | 'ext';
6102
+ };
6103
+ /**
6104
+ * V4L2 mem2mem
6105
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp8_005fv4l2m2m
6106
+ */
6107
+ vp8_v4l2m2m: {
6108
+ /** Number of buffers in the output context */
6109
+ num_output_buffers?: number;
6110
+ /** Number of buffers in the capture context */
6111
+ num_capture_buffers?: number;
6112
+ };
6113
+ /**
6114
+ * VP9
6115
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp9_005famf
6116
+ */
6117
+ vp9_amf: {
6118
+ /** Decoder mode */
6119
+ decoder_mode?: 'regular' | 'compliant' | 'low_latency';
6120
+ /** Timestamp mode */
6121
+ timestamp_mode?: 'presentation' | 'sort' | 'decode';
6122
+ /** Number of surfaces in the decode pool */
6123
+ surface_pool_size?: number;
6124
+ /** Minimum number of surfaces for reordering */
6125
+ dpb_size?: number;
6126
+ /** Low latency */
6127
+ lowlatency?: number;
6128
+ /** Smart Access Video */
6129
+ smart_access_video?: number;
6130
+ /** Skip transfer on another GPU when SAV enabled */
6131
+ skip_transfer_sav?: number;
6132
+ /** Copy Output */
6133
+ copy_output?: number;
6134
+ };
6135
+ /**
6136
+ * Nvidia CUVID
6137
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp9_005fcuvid
6138
+ */
6139
+ vp9_cuvid: {
6140
+ /** Set deinterlacing mode */
6141
+ deint?: 'weave' | 'bob' | 'adaptive';
6142
+ /** GPU to be used for decoding */
6143
+ gpu?: string;
6144
+ /** Maximum surfaces to be used for decoding */
6145
+ surfaces?: number;
6146
+ /** Drop second field when deinterlacing */
6147
+ drop_second_field?: boolean;
6148
+ /** Crop (top)x(bottom)x(left)x(right) */
6149
+ crop?: string;
6150
+ /** Resize (width)x(height) */
6151
+ resize?: string;
6152
+ };
6153
+ /**
6154
+ * VP9
6155
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp9_005fmediacodec
6156
+ */
6157
+ vp9_mediacodec: {
6158
+ /** Delay flush until hw output buffers are returned to the decoder */
6159
+ delay_flush?: boolean;
6160
+ /** Use MediaCodec from NDK */
6161
+ ndk_codec?: boolean;
6162
+ /** The desired operating rate that the codec will need to operate at, zero for unspecified */
6163
+ operating_rate?: number;
6164
+ };
6165
+ /**
6166
+ * VP9 video (Intel Quick Sync Video acceleration)
6167
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp9_005fqsv
6168
+ */
6169
+ vp9_qsv: {
6170
+ /** Internal parallelization depth, the higher the value the higher the latency. */
6171
+ async_depth?: number;
6172
+ /** A GPU-accelerated copy between video and system memory */
6173
+ gpu_copy?: 'default' | 'on' | 'off';
6174
+ };
6175
+ /**
6176
+ * Rockchip MPP (Media Process Platform)
6177
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp9_005frkmpp
6178
+ */
6179
+ vp9_rkmpp: {
6180
+ /** Enable IEP (Image Enhancement Processor) for de-interlacing */
6181
+ deint?: boolean;
6182
+ /** Enable AFBC (Arm Frame Buffer Compression) to save bandwidth */
6183
+ afbc?: 'off' | 'on' | 'rga';
6184
+ /** Enable fast parsing to improve decoding parallelism */
6185
+ fast_parse?: boolean;
6186
+ /** Set the buffer mode for MPP decoder */
6187
+ buf_mode?: 'half' | 'ext';
6188
+ };
6189
+ /**
6190
+ * V4L2 mem2mem
6191
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vp9_005fv4l2m2m
6192
+ */
6193
+ vp9_v4l2m2m: {
6194
+ /** Number of buffers in the output context */
6195
+ num_output_buffers?: number;
6196
+ /** Number of buffers in the capture context */
6197
+ num_capture_buffers?: number;
6198
+ };
4073
6199
  /**
4074
6200
  * VPlayer subtitle
4075
6201
  * @see https://ffmpeg.org/ffmpeg-codecs.html#vplayer
@@ -4078,4 +6204,14 @@ export interface DecoderOptionsMap {
4078
6204
  /** Set if ASS tags must be escaped */
4079
6205
  keep_ass_markup?: boolean;
4080
6206
  };
6207
+ /**
6208
+ * VVC
6209
+ * @see https://ffmpeg.org/ffmpeg-codecs.html#vvc_005fqsv
6210
+ */
6211
+ vvc_qsv: {
6212
+ /** Internal parallelization depth, the higher the value the higher the latency. */
6213
+ async_depth?: number;
6214
+ /** A GPU-accelerated copy between video and system memory */
6215
+ gpu_copy?: 'default' | 'on' | 'off';
6216
+ };
4081
6217
  }