@norskvideo/norsk-sdk 1.0.334 → 1.0.336

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.
@@ -17,6 +17,7 @@ import { Nullable } from 'typescript-nullable';
17
17
  import { PlainMessage } from '@bufbuild/protobuf';
18
18
  import { RtmpError_UnsupportedAudio } from '@norskvideo/norsk-api/lib/media_pb';
19
19
  import { RtmpError_UnsupportedVideo } from '@norskvideo/norsk-api/lib/media_pb';
20
+ import { Scte35SpliceInfoSection } from '@norskvideo/norsk-api/lib/media_pb';
20
21
  import { StreamKey as StreamKey_2 } from '@norskvideo/norsk-api/lib/media_pb';
21
22
  import { StreamStatisticsSampling } from '@norskvideo/norsk-api/lib/media_pb';
22
23
  import { Subscription } from '@norskvideo/norsk-api/lib/media_pb';
@@ -42,6 +43,35 @@ export declare interface AacSettings {
42
43
  profile: AacProfile;
43
44
  }
44
45
 
46
+ export declare class AncillaryNode extends AutoProcessorMediaNode<"ancillary"> {
47
+ close(): void;
48
+ sendScte35(key: StreamKey, info: Scte35SpliceInfoSection): void;
49
+ }
50
+
51
+ export declare interface AncillarySettings extends ProcessorNodeSettings<AncillaryNode> {
52
+ onScte35?: (stream: StreamKey, message: Scte35SpliceInfoSection) => void;
53
+ }
54
+
55
+ /**
56
+ * @public
57
+ * Returns the stream keys for ancillary streams in a media context
58
+ * @param streams - The media context from which to return the stream keys
59
+ * @returns The ancillary stream keys in the media context
60
+ */
61
+ export declare function ancillaryStreamKeys(streams: readonly StreamMetadata[]): StreamKey[];
62
+
63
+ /** @public */
64
+ export declare interface AncillaryStreamMetadata {
65
+ }
66
+
67
+ /**
68
+ * @public
69
+ * Filters a context to only the ancillary streams within it
70
+ * @param streams - The media context from which to return the streams
71
+ * @returns The ancillary streams in the media context
72
+ */
73
+ export declare function ancillaryStreams(streams: readonly StreamMetadata[]): StreamMetadata[];
74
+
45
75
  /**
46
76
  * @public
47
77
  * see: {@link NorskTransform.audioBuildMultichannel}
@@ -329,7 +359,7 @@ export declare interface AudioStreamMetadata {
329
359
  export declare function audioStreams(streams: readonly StreamMetadata[]): StreamMetadata[];
330
360
 
331
361
  /** @public */
332
- export declare const audioToPin: <Pins extends string>(pin: Pins) => (streams: StreamMetadata[]) => PinToKey<Pins>;
362
+ export declare function audioToPin<Pins extends string>(pin: Pins): (streams: StreamMetadata[]) => PinToKey<Pins>;
333
363
 
334
364
  /**
335
365
  * @public
@@ -389,7 +419,7 @@ export declare class AutoSinkMediaNode<Pins extends string> extends SinkMediaNod
389
419
  }
390
420
 
391
421
  /** @public */
392
- export declare const avToPin: <Pins extends string>(pin: Pins) => (streams: StreamMetadata[]) => PinToKey<Pins>;
422
+ export declare function avToPin<Pins extends string>(pin: Pins): (streams: StreamMetadata[]) => PinToKey<Pins>;
393
423
 
394
424
  /** @public */
395
425
  export declare interface AwsCredentials {
@@ -443,12 +473,15 @@ export declare interface AwsS3PushDestinationSettings {
443
473
  /**
444
474
  * @public
445
475
  * There are three possible modes:
476
+ *
446
477
  * - "abr": encode in average bitrate mode, specified in kilobits/sec (note, 1
447
478
  * kilobit is 1000 bits). You can make use of the vbv settings to control
448
479
  * the bounds on how much the actual bitrate can fluctuate within the bounds
449
480
  * of the average
481
+ *
450
482
  * - "cqp": encode in constant quantizer mode. In general, crf will give better
451
483
  * results, although cqp can be faster to encode
484
+ *
452
485
  * - "crf": encode in constant rate factor mode. This will give a constant 'quality'
453
486
  * to the encode, but with a variable bitrate
454
487
  */
@@ -669,7 +702,7 @@ export declare class CmafAudioOutputNode extends HlsNodeWithPlaylist<CmafAudioMe
669
702
  * @public
670
703
  * Updates the credentials for a specific destination within this output by id
671
704
  * see: {@link UpdateCredentials}
672
- * see: {@link CMAFDestinationSettings}
705
+ * see: {@link CmafDestinationSettings}
673
706
  */
674
707
  updateCredentials(settings: UpdateCredentials): void;
675
708
  }
@@ -703,16 +736,21 @@ export declare interface CmafAudioOutputSettings extends SinkNodeSettings<CmafAu
703
736
  */
704
737
  delayOutputMs?: number;
705
738
  /**
706
- * Optionally supply encryption details for the stream
739
+ * Settings for encrypting the audio.
707
740
  */
708
- encryption?: {
709
- encryptionKey: string;
710
- encryptionKeyId: string;
711
- };
741
+ encryption?: EncryptionSettings;
742
+ /**
743
+ * A list of destinations {@link CmafDestinationSettings} for this stream to be published to
744
+ */
745
+ destinations: CmafDestinationSettings[];
746
+ /**
747
+ * Directives to add to the m3u media playlist
748
+ */
749
+ m3uAdditions?: string;
712
750
  /**
713
- * A list of destinations {@link CMAFDestinationSettings} for this stream to be published to
751
+ * XML fragment to add to the mpd Representation element
714
752
  */
715
- destinations: CMAFDestinationSettings[];
753
+ mpdAdditions?: string;
716
754
  }
717
755
 
718
756
  /**
@@ -722,7 +760,7 @@ export declare interface CmafAudioOutputSettings extends SinkNodeSettings<CmafAu
722
760
  * - {@link AwsS3PushDestinationSettings}: Push to Amazon S3
723
761
  * - {@link LocalPullDestinationSettings}: Serve directly from the Norsk Web Server
724
762
  * */
725
- export declare type CMAFDestinationSettings = HlsPushDestinationSettings | AwsS3PushDestinationSettings | LocalPullDestinationSettings;
763
+ export declare type CmafDestinationSettings = HlsPushDestinationSettings | AwsS3PushDestinationSettings | LocalPullDestinationSettings;
726
764
 
727
765
  /**
728
766
  * @public
@@ -735,7 +773,7 @@ export declare class CmafMasterOutputNode extends CommonHlsNode<CmafMasterMessag
735
773
  * @public
736
774
  * Updates the credentials for a specific destination within this output by id
737
775
  * see: {@link UpdateCredentials}
738
- * see: {@link CMAFDestinationSettings}
776
+ * see: {@link CmafDestinationSettings}
739
777
  */
740
778
  updateCredentials(settings: UpdateCredentials): void;
741
779
  }
@@ -751,9 +789,17 @@ export declare interface CmafMasterOutputSettings extends SinkNodeSettings<CmafM
751
789
  */
752
790
  playlistName: string;
753
791
  /**
754
- * A list of destinations {@link CMAFDestinationSettings} for this stream to be published to
792
+ * A list of destinations {@link CmafDestinationSettings} for this stream to be published to
755
793
  */
756
- destinations: CMAFDestinationSettings[];
794
+ destinations: CmafDestinationSettings[];
795
+ /**
796
+ * Directives to add to the m3u master playlist
797
+ */
798
+ m3uAdditions?: string;
799
+ /**
800
+ * XML fragment to add to the (top-level) MPD element
801
+ */
802
+ mpdAdditions?: string;
757
803
  }
758
804
 
759
805
  /**
@@ -765,7 +811,7 @@ export declare class CmafVideoOutputNode extends HlsNodeWithPlaylist<CmafVideoMe
765
811
  * @public
766
812
  * Updates the credentials for a specific destination within this output by id
767
813
  * see: {@link UpdateCredentials}
768
- * see: {@link CMAFDestinationSettings}
814
+ * see: {@link CmafDestinationSettings}
769
815
  */
770
816
  updateCredentials(settings: UpdateCredentials): void;
771
817
  }
@@ -799,16 +845,21 @@ export declare interface CmafVideoOutputSettings extends SinkNodeSettings<CmafVi
799
845
  */
800
846
  delayOutputMs?: number;
801
847
  /**
802
- * Optionally supply encryption details for the stream
848
+ * Settings for encrypting the video.
803
849
  */
804
- encryption?: {
805
- encryptionKey: string;
806
- encryptionKeyId: string;
807
- };
850
+ encryption?: EncryptionSettings;
851
+ /**
852
+ * A list of destinations {@link CmafDestinationSettings} for this stream to be published to
853
+ */
854
+ destinations: CmafDestinationSettings[];
808
855
  /**
809
- * A list of destinations {@link CMAFDestinationSettings} for this stream to be published to
856
+ * Directives to add to the m3u media playlist
810
857
  */
811
- destinations: CMAFDestinationSettings[];
858
+ m3uAdditions?: string;
859
+ /**
860
+ * XML fragment to add to the mpd Representation element
861
+ */
862
+ mpdAdditions?: string;
812
863
  }
813
864
 
814
865
  /**
@@ -820,7 +871,7 @@ export declare class CmafWebVttOutputNode extends HlsNodeWithPlaylist<CmafWebVtt
820
871
  * @public
821
872
  * Updates the credentials for a specific destination within this output by id
822
873
  * see: {@link UpdateCredentials}
823
- * see: {@link CMAFDestinationSettings}
874
+ * see: {@link CmafDestinationSettings}
824
875
  */
825
876
  updateCredentials(settings: UpdateCredentials): void;
826
877
  }
@@ -849,9 +900,9 @@ export declare interface CmafWebVttOutputSettings extends SinkNodeSettings<CmafW
849
900
  */
850
901
  delayOutputMs?: number;
851
902
  /**
852
- * A list of destinations {@link CMAFDestinationSettings} for this stream to be published to
903
+ * A list of destinations {@link CmafDestinationSettings} for this stream to be published to
853
904
  */
854
- destinations: CMAFDestinationSettings[];
905
+ destinations: CmafDestinationSettings[];
855
906
  /**
856
907
  * A local directory in which to store the segments while they're available
857
908
  */
@@ -1033,6 +1084,34 @@ export declare interface DropRandom {
1033
1084
  percentage: number;
1034
1085
  }
1035
1086
 
1087
+ /** @public */
1088
+ export declare interface EncryptionSettings {
1089
+ /**
1090
+ * The 16-byte key ID used to identify the key, hexadecimal or GUID encoded.
1091
+ */
1092
+ encryptionKeyId: string;
1093
+ /**
1094
+ * The 16-byte key used to encrypt the data, hexadecimal encoded.
1095
+ */
1096
+ encryptionKey: string;
1097
+ /**
1098
+ * The PSSH box(es) to include in the MP4, base64 encoded.
1099
+ * This is typically given by the DRM provider.
1100
+ */
1101
+ encryptionPssh: string;
1102
+ /**
1103
+ * The common encryption scheme used to encrypt data, as per ISO/IEC 23001-7:2016.
1104
+ *
1105
+ * - Default: CBCS encryption scheme (AES-CBC 10% pattern encryption).
1106
+ * Full-sample encryption for audio tracks, subsample encryption for video
1107
+ * tracks.
1108
+ *
1109
+ * - CENC encryption scheme (AES-CTR). Full-sample encryption for audio tracks,
1110
+ * subsample encryption for video tracks.
1111
+ */
1112
+ encryptionScheme?: "cbcs" | "cenc";
1113
+ }
1114
+
1036
1115
  /**
1037
1116
  * @public
1038
1117
  * see: {@link NorskInput.fileImage}
@@ -1076,6 +1155,7 @@ export declare class FileMp4InputNode extends SourceMediaNode {
1076
1155
  * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds
1077
1156
  * */
1078
1157
  nudge(nudge: number): void;
1158
+ updateSettings(settings: FileMp4InputSettingsUpdate): void;
1079
1159
  close(): void;
1080
1160
  }
1081
1161
 
@@ -1093,6 +1173,13 @@ export declare interface FileMp4InputSettings extends SourceNodeSettings<FileMp4
1093
1173
  onEof?: () => void;
1094
1174
  /** Callback to be notified when the file is initially read */
1095
1175
  onInfo?: (info: FileMp4Info) => void;
1176
+ /** Whether to loop back to the start of the file after reaching the end (default false) */
1177
+ loop?: boolean;
1178
+ }
1179
+
1180
+ export declare interface FileMp4InputSettingsUpdate {
1181
+ /** Whether to loop back to the start of the file after reaching the end */
1182
+ loop?: boolean;
1096
1183
  }
1097
1184
 
1098
1185
  /**
@@ -1125,13 +1212,13 @@ export declare interface FileMp4OutputSettings extends SinkNodeSettings<FileMp4O
1125
1212
  */
1126
1213
  nonfragmentedFileName?: string;
1127
1214
  /**
1128
- * Common encryption (CENC) key and key ID to use, both 16-bytes encoded in
1129
- * hexadecimal (32 chars).
1215
+ * Settings for encrypting the audio track.
1130
1216
  */
1131
- encryption?: {
1132
- encryptionKey: string;
1133
- encryptionKeyId: string;
1134
- };
1217
+ audioEncryption?: EncryptionSettings;
1218
+ /**
1219
+ * Settings for encrypting the video track.
1220
+ */
1221
+ videoEncryption?: EncryptionSettings;
1135
1222
  }
1136
1223
 
1137
1224
  /**
@@ -1139,6 +1226,17 @@ export declare interface FileMp4OutputSettings extends SinkNodeSettings<FileMp4O
1139
1226
  * see: {@link NorskInput.fileTs}
1140
1227
  */
1141
1228
  export declare class FileTsInputNode extends TsCommonInputNode<FileTsInputMessage, FileTsInputNode> {
1229
+ updateSettings(settings: FileTsInputSettingsUpdate): void;
1230
+ }
1231
+
1232
+ declare interface FileTsInputSettings extends LocalFileInputSettings {
1233
+ /** Whether to loop back to the start of the file after reaching the end */
1234
+ loop?: boolean;
1235
+ }
1236
+
1237
+ declare interface FileTsInputSettingsUpdate {
1238
+ /** Whether to loop back to the start of the file after reaching the end */
1239
+ loop?: boolean;
1142
1240
  }
1143
1241
 
1144
1242
  /**
@@ -1252,7 +1350,7 @@ export declare class HlsTsAudioOutputNode extends CommonHlsNode<HlsTsAudioMessag
1252
1350
  * @public
1253
1351
  * Updates the credentials for a specific destination within this output by id
1254
1352
  * see: {@link UpdateCredentials}
1255
- * see: {@link CMAFDestinationSettings}
1353
+ * see: {@link CmafDestinationSettings}
1256
1354
  */
1257
1355
  updateCredentials(settings: UpdateCredentials): void;
1258
1356
  }
@@ -1281,9 +1379,17 @@ export declare interface HlsTsAudioOutputSettings extends SinkNodeSettings<HlsTs
1281
1379
  */
1282
1380
  delayOutputMs?: number;
1283
1381
  /**
1284
- * A list of destinations {@link CMAFDestinationSettings} for this stream to be published to
1382
+ * A list of destinations {@link CmafDestinationSettings} for this stream to be published to
1285
1383
  */
1286
- destinations: CMAFDestinationSettings[];
1384
+ destinations: CmafDestinationSettings[];
1385
+ /**
1386
+ * Directives to add to the m3u media playlist
1387
+ */
1388
+ m3uAdditions?: string;
1389
+ /**
1390
+ * XML fragment to add to the mpd Representation element
1391
+ */
1392
+ mpdAdditions?: string;
1287
1393
  }
1288
1394
 
1289
1395
  /**
@@ -1318,13 +1424,21 @@ export declare interface HlsTsCombinedPushOutputSettings extends SinkNodeSetting
1318
1424
  */
1319
1425
  delayOutputMs?: number;
1320
1426
  /**
1321
- * The destination {@link CMAFDestinationSettings} for this stream to be published to
1427
+ * The destination {@link CmafDestinationSettings} for this stream to be published to
1322
1428
  */
1323
- destination: CMAFDestinationSettings;
1429
+ destination: CmafDestinationSettings;
1324
1430
  /**
1325
1431
  * The name of this media playlist (.m3u8 will be added onto this field to generate a filename)
1326
1432
  */
1327
1433
  playlistName: string;
1434
+ /**
1435
+ * Directives to add to the m3u media playlists
1436
+ */
1437
+ m3uAdditions?: string;
1438
+ /**
1439
+ * XML fragment to add to the mpd Representation elements
1440
+ */
1441
+ mpdAdditions?: string;
1328
1442
  }
1329
1443
 
1330
1444
  /**
@@ -1336,7 +1450,7 @@ export declare class HlsTsVideoOutputNode extends CommonHlsNode<HlsTsVideoMessag
1336
1450
  * @public
1337
1451
  * Updates the credentials for a specific destination within this output by id
1338
1452
  * see: {@link UpdateCredentials}
1339
- * see: {@link CMAFDestinationSettings}
1453
+ * see: {@link CmafDestinationSettings}
1340
1454
  */
1341
1455
  updateCredentials(settings: UpdateCredentials): void;
1342
1456
  }
@@ -1365,11 +1479,26 @@ export declare interface HlsTsVideoOutputSettings extends SinkNodeSettings<HlsTs
1365
1479
  */
1366
1480
  delayOutputMs?: number;
1367
1481
  /**
1368
- * A list of destinations {@link CMAFDestinationSettings} for this stream to be published to
1482
+ * A list of destinations {@link CmafDestinationSettings} for this stream to be published to
1369
1483
  */
1370
- destinations: CMAFDestinationSettings[];
1484
+ destinations: CmafDestinationSettings[];
1485
+ /**
1486
+ * Directives to add to the m3u media playlist
1487
+ */
1488
+ m3uAdditions?: string;
1489
+ /**
1490
+ * XML fragment to add to the mpd Representation element
1491
+ */
1492
+ mpdAdditions?: string;
1371
1493
  }
1372
1494
 
1495
+ /** @public */
1496
+ export declare type IceServerSettings = {
1497
+ urls: string[];
1498
+ username?: string;
1499
+ credential?: string;
1500
+ };
1501
+
1373
1502
  /** @public */
1374
1503
  export declare type ImageFormat = "png" | "jpeg" | "gif" | "webp" | "pnm" | "tiff" | "tga" | "dds" | "bmp" | "ico" | "hdr" | "openexr" | "farbfeld" | "avif";
1375
1504
 
@@ -1388,6 +1517,24 @@ export declare interface Interval {
1388
1517
  d: number;
1389
1518
  }
1390
1519
 
1520
+ /**
1521
+ * @public
1522
+ * see: {@link NorskTransform.jitterBuffer}
1523
+ */
1524
+ export declare class JitterBufferNode extends AutoProcessorMediaNode<"audio" | "video" | "subtitle"> {
1525
+ close(): void;
1526
+ }
1527
+
1528
+ /**
1529
+ * @public
1530
+ * Settings for a Jitter Buffer
1531
+ * see: {@link NorskTransform.jitterBuffer}
1532
+ * */
1533
+ export declare interface JitterBufferSettings extends ProcessorNodeSettings<JitterBufferNode> {
1534
+ /** Buffer delay in milliseconds */
1535
+ delayMs: number;
1536
+ }
1537
+
1391
1538
  /**
1392
1539
  * @public
1393
1540
  * The standard settings for any node reading from a file
@@ -1428,46 +1575,6 @@ export declare type Log = {
1428
1575
  message: string;
1429
1576
  };
1430
1577
 
1431
- /** @public */
1432
- export declare type LogicalCpuId = number;
1433
-
1434
- /** @public */
1435
- export declare type MediaNodeId = string;
1436
-
1437
- /** @public */
1438
- export declare class MediaNodeState {
1439
- id: MediaNodeId | undefined;
1440
- constructor(client: MediaClient);
1441
- close(): void;
1442
- }
1443
-
1444
- /**
1445
- * @public
1446
- * Generate encryption parameters from from an encryption KeyID and Key,
1447
- * in the form KEYID:KEY, both 16byte hexadecimal
1448
- */
1449
- export declare function mkEncryption(encryption: string | undefined): {
1450
- encryptionKey: string;
1451
- encryptionKeyId: string;
1452
- } | undefined;
1453
-
1454
- /** @public */
1455
- export declare function mkSine(freq: number): Wave;
1456
-
1457
- /** @public */
1458
- export declare interface MultiStreamStatistics {
1459
- allStreams: SingleStreamStatistics[];
1460
- sampleSizeSeconds: number;
1461
- /**
1462
- * Either `"default"`, if there is only one direction, or `"input"`/`"output"`
1463
- * (for duplex nodes, where there are two directions)
1464
- */
1465
- label: string;
1466
- total: StreamStatistics;
1467
- audio: StreamStatistics;
1468
- video: StreamStatistics;
1469
- }
1470
-
1471
1578
  /**
1472
1579
  * @public
1473
1580
  * Settings for a H264 Encode using Netint Logan hardware
@@ -1475,12 +1582,12 @@ export declare interface MultiStreamStatistics {
1475
1582
  * on the Netint Logan Encoder Documentation
1476
1583
  *
1477
1584
  * These fields have deliberately been written to maintain the same semantics as the
1478
- * Netint documentation where possible.
1585
+ * Logan documentation where possible.
1479
1586
  *
1480
- * If left undefined, all will default to Netint's own defaults
1587
+ * If left undefined, all will default to Logan's own defaults
1481
1588
  * */
1482
- export declare interface NetintH264 {
1483
- type: "ni-h264";
1589
+ export declare interface LoganH264 {
1590
+ type: "logan-h264";
1484
1591
  /** This (for convenience) takes the xcoder string that Logan's
1485
1592
  * Ffmpeg integration accepts, this is to aid developers in getting up and running
1486
1593
  * quickly and will override any values set manually in the rest of this interface.
@@ -1501,15 +1608,15 @@ export declare interface NetintH264 {
1501
1608
  rcEnable?: boolean;
1502
1609
  intraQp?: number;
1503
1610
  rcInitDelay?: number;
1504
- profile?: NetintH264Profile;
1505
- level?: NetintH264Level;
1611
+ profile?: LoganH264Profile;
1612
+ level?: LoganH264Level;
1506
1613
  }
1507
1614
 
1508
1615
  /** @public */
1509
- export declare type NetintH264Level = 1 | 2 | 2.1 | 3 | 3.1 | 4 | 4.1 | 5 | 5.1 | 5.2 | 6 | 6.1 | 6.2;
1616
+ export declare type LoganH264Level = 1 | 2 | 2.1 | 3 | 3.1 | 4 | 4.1 | 5 | 5.1 | 5.2 | 6 | 6.1 | 6.2;
1510
1617
 
1511
1618
  /** @public */
1512
- export declare type NetintH264Profile = "baseline" | "main" | "extended" | "high" | "high10";
1619
+ export declare type LoganH264Profile = "baseline" | "main" | "extended" | "high" | "high10";
1513
1620
 
1514
1621
  /**
1515
1622
  * @public
@@ -1518,12 +1625,12 @@ export declare type NetintH264Profile = "baseline" | "main" | "extended" | "high
1518
1625
  * on the Netint Logan Encoder Documentation
1519
1626
  *
1520
1627
  * These fields have deliberately been written to maintain the same semantics as the
1521
- * Netint documentation where possible.
1628
+ * Logan documentation where possible.
1522
1629
  *
1523
- * If left undefined, all will default to Netint's own defaults
1630
+ * If left undefined, all will default to Logan's own defaults
1524
1631
  * */
1525
- export declare interface NetintHevc {
1526
- type: "ni-hevc";
1632
+ export declare interface LoganHevc {
1633
+ type: "logan-hevc";
1527
1634
  /** This (for convenience) takes the xcoder string that Logan's
1528
1635
  * Ffmpeg integration accepts, this is to aid developers in getting up and running
1529
1636
  * quickly and will override any values set manually in the rest of this interface.
@@ -1544,22 +1651,59 @@ export declare interface NetintHevc {
1544
1651
  rcEnable?: boolean;
1545
1652
  intraQp?: number;
1546
1653
  rcInitDelay?: number;
1547
- profile?: NetintHevcProfile;
1548
- level?: NetintHevcLevel;
1549
- tier?: NetintHevcTier;
1654
+ profile?: LoganHevcProfile;
1655
+ level?: LoganHevcLevel;
1656
+ tier?: LoganHevcTier;
1550
1657
  lossless?: boolean;
1551
1658
  hrdEnable?: boolean;
1552
1659
  dolbyVisionProfile?: number;
1553
1660
  }
1554
1661
 
1555
1662
  /** @public */
1556
- export declare type NetintHevcLevel = 1 | 2 | 2.1 | 3 | 3.1 | 4 | 4.1 | 5 | 5.1 | 5.2 | 6 | 6.1 | 6.2;
1663
+ export declare type LoganHevcLevel = 1 | 2 | 2.1 | 3 | 3.1 | 4 | 4.1 | 5 | 5.1 | 5.2 | 6 | 6.1 | 6.2;
1664
+
1665
+ /** @public */
1666
+ export declare type LoganHevcProfile = "main" | "main10";
1667
+
1668
+ /** @public */
1669
+ export declare type LoganHevcTier = "main" | "high";
1670
+
1671
+ /** @public */
1672
+ export declare type LogicalCpuId = number;
1673
+
1674
+ /** @public */
1675
+ export declare type MediaNodeId = string;
1676
+
1677
+ /** @public */
1678
+ export declare class MediaNodeState {
1679
+ id: MediaNodeId | undefined;
1680
+ constructor(client: MediaClient);
1681
+ close(): void;
1682
+ }
1683
+
1684
+ /**
1685
+ * @public
1686
+ * Generate encryption parameters from from an encryption KeyID and Key,
1687
+ * in the form KEYID:KEY, both 16byte hexadecimal
1688
+ */
1689
+ export declare function mkEncryption(encryption: string | undefined, pssh?: string | undefined): EncryptionSettings | undefined;
1557
1690
 
1558
1691
  /** @public */
1559
- export declare type NetintHevcProfile = "main" | "main10";
1692
+ export declare function mkSine(freq: number): Wave;
1560
1693
 
1561
1694
  /** @public */
1562
- export declare type NetintHevcTier = "main" | "high";
1695
+ export declare interface MultiStreamStatistics {
1696
+ allStreams: SingleStreamStatistics[];
1697
+ sampleSizeSeconds: number;
1698
+ /**
1699
+ * Either `"default"`, if there is only one direction, or `"input"`/`"output"`
1700
+ * (for duplex nodes, where there are two directions)
1701
+ */
1702
+ label: string;
1703
+ total: StreamStatistics;
1704
+ audio: StreamStatistics;
1705
+ video: StreamStatistics;
1706
+ }
1563
1707
 
1564
1708
  /** @public */
1565
1709
  export declare function newSilentMatrix(rows: number, cols: number): Gain[][];
@@ -1696,12 +1840,21 @@ export declare interface NorskInput {
1696
1840
  * Read from a Transport Stream file with realtime playback.
1697
1841
  * @param settings - Configuration for the file input
1698
1842
  */
1699
- fileTs(settings: LocalFileInputSettings): Promise<FileTsInputNode>;
1843
+ fileTs(settings: FileTsInputSettings): Promise<FileTsInputNode>;
1700
1844
  /**
1701
1845
  * Stream from a SRT source
1702
1846
  * @param settings - Configuration for the SRT input
1703
1847
  */
1704
1848
  srt(settings: SrtInputSettings): Promise<SrtInputNode>;
1849
+ /**
1850
+ * Receive media via WebRTC via the WHIP standard.
1851
+ *
1852
+ * Here Norsk acts as the Media Server receiving from a remote WHIP client, to act as the
1853
+ * WHIP client sending to a remote media server see {@link NorskOutput.whip}. For a duplex
1854
+ * connection to a browser peer see {@link NorskDuplex.webRtcBrowser}.
1855
+ *
1856
+ * @param settings - Configuration for the WHIP input
1857
+ */
1705
1858
  whip(settings: WhipInputSettings): Promise<WhipInputNode>;
1706
1859
  /**
1707
1860
  * Read from a Transport Stream on the network
@@ -1764,7 +1917,7 @@ export declare interface NorskOutput {
1764
1917
  * HLS or DASH manifests.
1765
1918
  *
1766
1919
  * These can optionally be served the Norsk web server or be pushed
1767
- * to other locations - see {@link CMAFDestinationSettings}
1920
+ * to other locations - see {@link CmafDestinationSettings}
1768
1921
  *
1769
1922
  * @param settings - Configuration for the CMAF Video Stream
1770
1923
  */
@@ -1774,7 +1927,7 @@ export declare interface NorskOutput {
1774
1927
  * HLS or DASH manifests.
1775
1928
  *
1776
1929
  * These can optionally be served via the Norsk web server or be pushed
1777
- * to other locations - see {@link CMAFDestinationSettings}
1930
+ * to other locations - see {@link CmafDestinationSettings}
1778
1931
  *
1779
1932
  * @param settings - Configuration for the CMAF Audio Stream
1780
1933
  */
@@ -1790,7 +1943,7 @@ export declare interface NorskOutput {
1790
1943
  * Produces a master (hls and/or dash) manifest for a collection of media streams
1791
1944
  *
1792
1945
  * This can optionally be served via the Norsk web server or be pushed
1793
- * to other locations - see {@link CMAFDestinationSettings}
1946
+ * to other locations - see {@link CmafDestinationSettings}
1794
1947
  *
1795
1948
  * @param settings - Configuration for the CMAF Master Manifest
1796
1949
  */
@@ -1798,7 +1951,7 @@ export declare interface NorskOutput {
1798
1951
  /**
1799
1952
  * Produces Transport Stream video segments with the supplied settings for use in
1800
1953
  * HLS manifests and builds a playlist served locally from the Norsk Web Server
1801
- * or from other locations - see {@link CMAFDestinationSettings}
1954
+ * or from other locations - see {@link CmafDestinationSettings}
1802
1955
  *
1803
1956
  * @param settings - Configuration for the HLS TS Stream
1804
1957
  */
@@ -1806,14 +1959,14 @@ export declare interface NorskOutput {
1806
1959
  /**
1807
1960
  * Produces Transport Stream audio segments with the supplied settings for use in
1808
1961
  * HLS manifests and builds a playlist served locally from the Norsk Web Server
1809
- * or from other locations - see {@link CMAFDestinationSettings}
1962
+ * or from other locations - see {@link CmafDestinationSettings}
1810
1963
  *
1811
1964
  * @param settings - Configuration for the HLS TS Stream
1812
1965
  */
1813
1966
  hlsTsAudio(settings: HlsTsAudioOutputSettings): Promise<HlsTsAudioOutputNode>;
1814
1967
  /**
1815
1968
  * Produces Transport Stream segments containing both video and audio with the supplied settings for use in
1816
- * HLS manifests and pushes them to the configured location (see {@link CMAFDestinationSettings})
1969
+ * HLS manifests and pushes them to the configured location (see {@link CmafDestinationSettings})
1817
1970
  *
1818
1971
  * @param settings - Configuration for the HLS TS Stream
1819
1972
  */
@@ -1833,11 +1986,24 @@ export declare interface NorskOutput {
1833
1986
  */
1834
1987
  srt(settings: SrtOutputSettings): Promise<SrtOutputNode>;
1835
1988
  /**
1836
- * Connects and sends media to a remote server via WebRTC using the WHIP standard
1989
+ * Connects and sends media to a remote server via WebRTC using the WHIP standard.
1990
+ *
1991
+ * Here Norsk acts as the WHIP client sending to a remote Media Server; to
1992
+ * have Norsk act as the Media Server ingesting from some other WHIP client, see
1993
+ * {@link NorskInput.whip}
1837
1994
  *
1838
1995
  * @param settings - Configuration for the WebRTC Stream
1839
1996
  */
1840
1997
  whip(settings: WhipOutputSettings): Promise<WhipOutputNode>;
1998
+ /**
1999
+ * Hosts media for clients connecting via WebRTC using the WHEP standard.
2000
+ *
2001
+ * To send media to a remote Media Server via WebRTC see {@link NorskOutput.whip}.
2002
+ * See also {@link NorskInput.whip}, {@link NorskDuplex.webRtcBrowser}.
2003
+ *
2004
+ * @param settings - Configuration for the WebRTC Stream
2005
+ */
2006
+ whep(settings: WhepOutputSettings): Promise<WhepOutputNode>;
1841
2007
  /**
1842
2008
  * Connects and sends media to a remote RTMP server
1843
2009
  *
@@ -2031,12 +2197,19 @@ export declare interface NorskTransform {
2031
2197
  * @param settings - Bitrate and language metadata plus general node settings.
2032
2198
  */
2033
2199
  streamMetadataOverride(settings: StreamMetadataOverrideSettings): Promise<StreamMetadataOverrideNode>;
2200
+ /**
2201
+ * Buffer a stream for the specified number of milliseconds. This can be used
2202
+ * to reduce or eliminate jitter.
2203
+ * @param settings - Buffer delay time.
2204
+ */
2205
+ jitterBuffer(settings: JitterBufferSettings): Promise<JitterBufferNode>;
2034
2206
  /**
2035
2207
  * Sync multiple streams together by timestamps, queuing frames from streams
2036
2208
  * that are behind the others. This is already included in most nodes,
2037
2209
  * especially outputs.
2038
2210
  */
2039
2211
  streamSync(settings: StreamSyncSettings): Promise<StreamSyncNode>;
2212
+ ancillary(settings: AncillarySettings): Promise<AncillaryNode>;
2040
2213
  }
2041
2214
 
2042
2215
  /** @public */
@@ -2284,6 +2457,99 @@ export declare interface ProcessorNodeSettings<T extends MediaNodeState> extends
2284
2457
  /** @public */
2285
2458
  export declare function publicUrlPrefix(): string;
2286
2459
 
2460
+ /**
2461
+ * @public
2462
+ * Settings for a H264 Encode using Netint Quadra hardware
2463
+ * A detailed description of these params can be found
2464
+ * on the Netint Quadra Encoder Documentation
2465
+ *
2466
+ * These fields have deliberately been written to maintain the same semantics as the
2467
+ * Quadra documentation where possible.
2468
+ *
2469
+ * If left undefined, all will default to Quadra's own defaults
2470
+ * */
2471
+ export declare interface QuadraH264 {
2472
+ type: "quadra-h264";
2473
+ /** This (for convenience) takes the xcoder string that Quadra's
2474
+ * Ffmpeg integration accepts, this is to aid developers in getting up and running
2475
+ * quickly and will override any values set manually in the rest of this interface.
2476
+ *
2477
+ * It is expected that developers will choose to use the typed fields for most things instead
2478
+ * when moving to production, as they offer a degree of validation and type safety
2479
+ * */
2480
+ extraOpts?: string;
2481
+ enableAud?: boolean;
2482
+ gpuIndex?: number;
2483
+ bitrate?: number;
2484
+ flushGop?: boolean;
2485
+ enableVfr?: boolean;
2486
+ crf?: number;
2487
+ cbr?: boolean;
2488
+ gopPresetIndex?: number;
2489
+ intraPeriod?: number;
2490
+ rcEnable?: boolean;
2491
+ intraQp?: number;
2492
+ rcInitDelay?: number;
2493
+ profile?: QuadraH264Profile;
2494
+ level?: QuadraH264Level;
2495
+ }
2496
+
2497
+ /** @public */
2498
+ export declare type QuadraH264Level = 1 | 2 | 2.1 | 3 | 3.1 | 4 | 4.1 | 5 | 5.1 | 5.2 | 6 | 6.1 | 6.2;
2499
+
2500
+ /** @public */
2501
+ export declare type QuadraH264Profile = "baseline" | "main" | "extended" | "high" | "high10";
2502
+
2503
+ /**
2504
+ * @public
2505
+ * Settings for a HEVC Encode using Netint Quadra hardware
2506
+ * A detailed description of these params can be found
2507
+ * on the Netint Quadra Encoder Documentation
2508
+ *
2509
+ * These fields have deliberately been written to maintain the same semantics as the
2510
+ * Quadra documentation where possible.
2511
+ *
2512
+ * If left undefined, all will default to Quadra's own defaults
2513
+ * */
2514
+ export declare interface QuadraHevc {
2515
+ type: "quadra-hevc";
2516
+ /** This (for convenience) takes the xcoder string that Quadra's
2517
+ * Ffmpeg integration accepts, this is to aid developers in getting up and running
2518
+ * quickly and will override any values set manually in the rest of this interface.
2519
+ *
2520
+ * It is expected that developers will choose to use the typed fields for most things instead
2521
+ * when moving to production, as they offer a degree of validation and type safety
2522
+ * */
2523
+ extraOpts?: string;
2524
+ enableAud?: boolean;
2525
+ gpuIndex?: number;
2526
+ bitrate?: number;
2527
+ flushGop?: boolean;
2528
+ enableVfr?: boolean;
2529
+ crf?: number;
2530
+ cbr?: boolean;
2531
+ gopPresetIndex?: number;
2532
+ intraPeriod?: number;
2533
+ rcEnable?: boolean;
2534
+ intraQp?: number;
2535
+ rcInitDelay?: number;
2536
+ profile?: QuadraHevcProfile;
2537
+ level?: QuadraHevcLevel;
2538
+ tier?: QuadraHevcTier;
2539
+ lossless?: boolean;
2540
+ hrdEnable?: boolean;
2541
+ dolbyVisionProfile?: number;
2542
+ }
2543
+
2544
+ /** @public */
2545
+ export declare type QuadraHevcLevel = 1 | 2 | 2.1 | 3 | 3.1 | 4 | 4.1 | 5 | 5.1 | 5.2 | 6 | 6.1 | 6.2;
2546
+
2547
+ /** @public */
2548
+ export declare type QuadraHevcProfile = "main" | "main10";
2549
+
2550
+ /** @public */
2551
+ export declare type QuadraHevcTier = "main" | "high";
2552
+
2287
2553
  /** @public */
2288
2554
  export declare type ReceiveFromAddress<Pins extends string> = {
2289
2555
  source: SourceMediaNode;
@@ -2307,6 +2573,25 @@ export declare interface RemoteInputSettings<T extends MediaNodeState> extends I
2307
2573
  port: number;
2308
2574
  }
2309
2575
 
2576
+ /**
2577
+ * @public
2578
+ * Validation function to require at least one audio and at least one video stream. Often the default validation
2579
+ * will happen to ensure this, as audio and video are subscribed from separate media nodes, but when one media node
2580
+ * will produce both audio and video, default validation cannot know that both are required.
2581
+ */
2582
+ export declare const requireAV: (ctx: Context) => boolean;
2583
+
2584
+ /**
2585
+ * @public
2586
+ * Validation function to require exactly N audio and exactly N video streams. Often the default validation
2587
+ * will happen to ensure this, as audio and video are subscribed from separate media nodes, but when one media node
2588
+ * will produce both audio and video, default validation cannot know that both are required.
2589
+ */
2590
+ export declare const requireExactAV: ({ audio, video }: {
2591
+ audio: number;
2592
+ video: number;
2593
+ }) => (ctx: Context) => boolean;
2594
+
2310
2595
  /**
2311
2596
  * @public
2312
2597
  * The resolution of a video within Norsk
@@ -2334,6 +2619,8 @@ export declare interface RtmpOutputSettings extends SinkNodeSettings<RtmpOutputN
2334
2619
  * The URL of the remote RTMP server to connect to, including the full stream path and credentials
2335
2620
  */
2336
2621
  url: string;
2622
+ /** Jitter buffer delay in milliseconds */
2623
+ bufferDelayMs?: number;
2337
2624
  }
2338
2625
 
2339
2626
  /**
@@ -2783,6 +3070,8 @@ export declare interface SrtOutputSettings extends SinkNodeSettings<SrtOutputNod
2783
3070
  * The port to listen on in listener mode, or to connect to in caller mode
2784
3071
  */
2785
3072
  port: number;
3073
+ /** Jitter buffer delay in milliseconds */
3074
+ bufferDelayMs?: number;
2786
3075
  /**
2787
3076
  * On connect callback, notifying that a new caller has connected (in listener mode) and providing the stream_id that was set on the socket
2788
3077
  * @eventProperty
@@ -2817,6 +3106,10 @@ export declare interface StreamChaosMonkeySettings extends ProcessorNodeSettings
2817
3106
  * leaving this undefined means don't drop any frames
2818
3107
  * */
2819
3108
  frameDrop?: DropRandom | DropEvery;
3109
+ /**
3110
+ * Introduce random jitter
3111
+ */
3112
+ jitterMs?: number;
2820
3113
  }
2821
3114
 
2822
3115
  /** @public */
@@ -2873,6 +3166,9 @@ export declare type StreamMetadataMessage = {
2873
3166
  } | {
2874
3167
  case: "subtitle";
2875
3168
  value: SubtitleStreamMetadata;
3169
+ } | {
3170
+ case: "ancillary";
3171
+ value: AncillaryStreamMetadata;
2876
3172
  } | {
2877
3173
  case: undefined;
2878
3174
  value?: undefined;
@@ -3025,6 +3321,9 @@ export declare interface StreamSwitchSmoothSettings<Pins extends string> extends
3025
3321
  outputResolution: Resolution;
3026
3322
  /** The constant samplerate that all output audio will be resampled to */
3027
3323
  sampleRate: SampleRate;
3324
+ /** Callback which will be called if a switch request cannot be fulfilled */
3325
+ onSwitchError?: (message: string, inputPin?: Pins) => void;
3326
+ onInboundContextChange?: (allStreams: Map<Pins, StreamMetadata[]>) => Promise<void>;
3028
3327
  }
3029
3328
 
3030
3329
  /**
@@ -3093,7 +3392,7 @@ export declare type SubscriptionError = {
3093
3392
  };
3094
3393
 
3095
3394
  /** @public */
3096
- export declare const subtitlesToPin: <Pins extends string>(pin: Pins) => (streams: StreamMetadata[]) => PinToKey<Pins>;
3395
+ export declare function subtitlesToPin<Pins extends string>(pin: Pins): (streams: StreamMetadata[]) => PinToKey<Pins>;
3097
3396
 
3098
3397
  /**
3099
3398
  * @public
@@ -3174,6 +3473,8 @@ export declare interface UdpTsOutputSettings extends SinkNodeSettings<UdpTsOutpu
3174
3473
  iface: string;
3175
3474
  /** The port to send to */
3176
3475
  port: number;
3476
+ /** Jitter buffer delay in milliseconds */
3477
+ bufferDelayMs?: number;
3177
3478
  }
3178
3479
 
3179
3480
  /**
@@ -3312,13 +3613,13 @@ export declare interface VideoEncodeRung {
3312
3613
  /**
3313
3614
  * The codec (and detailed configuration) to use for the encoding operation.
3314
3615
  *
3315
- * Note: Nvidia and Netint require Nvidia or Netint hardware to be set up and
3616
+ * Note: Nvidia and Logan/Quadra require Nvidia or Logan/Quadra hardware to be set up and
3316
3617
  * made available to Norsk
3317
3618
  *
3318
3619
  * A ladder can use several different codecs across its various rungs and the
3319
3620
  * VideoEncode node will attempt to build a pipeline that uses the hardware efficently
3320
3621
  */
3321
- codec: X264Codec | X265Codec | NvidiaH264 | NvidiaHevc | NetintH264 | NetintHevc;
3622
+ codec: X264Codec | X265Codec | NvidiaH264 | NvidiaHevc | LoganH264 | LoganHevc | QuadraH264 | QuadraHevc;
3322
3623
  }
3323
3624
 
3324
3625
  /**
@@ -3354,7 +3655,7 @@ export declare interface VideoStreamMetadata {
3354
3655
  export declare function videoStreams(streams: readonly StreamMetadata[]): StreamMetadata[];
3355
3656
 
3356
3657
  /** @public */
3357
- export declare const videoToPin: <Pins extends string>(pin: Pins) => (streams: StreamMetadata[]) => PinToKey<Pins>;
3658
+ export declare function videoToPin<Pins extends string>(pin: Pins): (streams: StreamMetadata[]) => PinToKey<Pins>;
3358
3659
 
3359
3660
  /**
3360
3661
  * @public
@@ -3397,6 +3698,34 @@ export declare class WebRTCBrowserNode extends AutoProcessorMediaNode<"audio" |
3397
3698
  * see: {@link NorskDuplex.webRtcBrowser}
3398
3699
  * */
3399
3700
  export declare interface WebRTCBrowserSettings extends ProcessorNodeSettings<WebRTCBrowserNode>, StreamStatisticsMixin {
3701
+ iceServers?: IceServerSettings[];
3702
+ reportedIceServers?: IceServerSettings[];
3703
+ /** Jitter buffer delay in milliseconds */
3704
+ bufferDelayMs?: number;
3705
+ }
3706
+
3707
+ /**
3708
+ * @public
3709
+ * see: {@link NorskOutput.whep}
3710
+ */
3711
+ export declare class WhepOutputNode extends AutoSinkMediaNode<"audio" | "video"> {
3712
+ /** @public The URL of the local player */
3713
+ playerUrl: string;
3714
+ /** @public The URL of the WHEP endpoint */
3715
+ endpointUrl: string;
3716
+ close(): void;
3717
+ }
3718
+
3719
+ /**
3720
+ * @public
3721
+ * The settings for a WebRTC WHEP Output
3722
+ * see {@link NorskOutput.whep}
3723
+ */
3724
+ export declare interface WhepOutputSettings extends SinkNodeSettings<WhepOutputNode>, StreamStatisticsMixin {
3725
+ iceServers?: IceServerSettings[];
3726
+ reportedIceServers?: IceServerSettings[];
3727
+ /** Jitter buffer delay in milliseconds */
3728
+ bufferDelayMs?: number;
3400
3729
  }
3401
3730
 
3402
3731
  /**
@@ -3404,6 +3733,10 @@ export declare interface WebRTCBrowserSettings extends ProcessorNodeSettings<Web
3404
3733
  * see: {@link NorskInput.whip}
3405
3734
  */
3406
3735
  export declare class WhipInputNode extends SourceMediaNode {
3736
+ /** @public The URL of the local test client */
3737
+ clientUrl: string;
3738
+ /** @public The URL of the WHIP endpoint */
3739
+ endpointUrl: string;
3407
3740
  /**
3408
3741
  * @public
3409
3742
  * Applies a gradual nudge to the outgoing stream timestamps by the specified number of milliseconds
@@ -3414,6 +3747,8 @@ export declare class WhipInputNode extends SourceMediaNode {
3414
3747
 
3415
3748
  /** @public */
3416
3749
  export declare interface WhipInputSettings extends InputSettings<WhipInputNode>, StreamStatisticsMixin {
3750
+ iceServers?: IceServerSettings[];
3751
+ reportedIceServers?: IceServerSettings[];
3417
3752
  }
3418
3753
 
3419
3754
  /**
@@ -3436,6 +3771,8 @@ export declare interface WhipOutputSettings extends SinkNodeSettings<WhipOutputN
3436
3771
  uri: string;
3437
3772
  /** The auth header to supply (for example: 'Bearer: mybearertoken') */
3438
3773
  authHeader: string;
3774
+ /** Jitter buffer delay in milliseconds */
3775
+ bufferDelayMs?: number;
3439
3776
  }
3440
3777
 
3441
3778
  /** @public */
@@ -3527,9 +3864,13 @@ export declare type X264Level = 1 | 1.1 | 1.2 | 1.3 | 2 | 2.1 | 2.2 | 3 | 3.1 |
3527
3864
  /**
3528
3865
  * @public
3529
3866
  * Three possible values:
3867
+ *
3530
3868
  * - "none": specify no HRD information
3869
+ *
3531
3870
  * - "vbr": specify HRD information
3871
+ *
3532
3872
  * - "cbr": specify HRD information and pack the bitstream to the bitrate specified
3873
+ *
3533
3874
  * See the X264 Docs for a further description of this value
3534
3875
  */
3535
3876
  export declare type X264NalHrd = "none" | "vbr" | "cbr";