@imferno/schema 3.0.2-beta.8b55d2c → 3.0.2-beta.8c7d3cd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,6 +29,8 @@ if (validate(data)) {
29
29
 
30
30
  | Export | Description |
31
31
  |--------|-------------|
32
+ | `validationResult` | `{ package, validation }` as returned by `validate()` in `@imferno/node` |
33
+ | `imfernoPackage` | Full parsed package as returned by `parsePackage()` in `@imferno/node` |
32
34
  | `imfReport` | Full IMF package report (metadata + validation + CPL analysis) |
33
35
  | `validationReport` | Validation issues and diagnostics |
34
36
  | `compositionPlaylist` | SMPTE ST 2067-3 Composition Playlist |
package/index.d.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  /** A JSON Schema object (Draft 7). */
2
2
  type JsonSchema = Record<string, unknown>;
3
3
 
4
+ /** `{ package, validation }` as returned by `validate()` in @imferno/node. */
5
+ export declare const validationResult: JsonSchema;
6
+ /** The full parsed package (`Imferno`) as returned by `parsePackage()` in @imferno/node. */
7
+ export declare const imfernoPackage: JsonSchema;
4
8
  export declare const imfReport: JsonSchema;
5
9
  export declare const validationReport: JsonSchema;
6
10
  export declare const compositionPlaylist: JsonSchema;
@@ -10,6 +14,8 @@ export declare const volumeIndex: JsonSchema;
10
14
  export declare const rulesConfig: JsonSchema;
11
15
 
12
16
  export declare const schemas: {
17
+ validationResult: JsonSchema;
18
+ imfernoPackage: JsonSchema;
13
19
  imfReport: JsonSchema;
14
20
  validationReport: JsonSchema;
15
21
  compositionPlaylist: JsonSchema;
package/index.js CHANGED
@@ -9,6 +9,8 @@ function loadSchema(name) {
9
9
  return JSON.parse(readFileSync(join(schemasDir, `${name}.json`), "utf-8"));
10
10
  }
11
11
 
12
+ export const validationResult = loadSchema("validation-result");
13
+ export const imfernoPackage = loadSchema("imferno-package");
12
14
  export const imfReport = loadSchema("imf-report");
13
15
  export const validationReport = loadSchema("validation-report");
14
16
  export const compositionPlaylist = loadSchema("composition-playlist");
@@ -18,6 +20,8 @@ export const volumeIndex = loadSchema("volume-index");
18
20
  export const rulesConfig = loadSchema("rules-config");
19
21
 
20
22
  export const schemas = {
23
+ validationResult,
24
+ imfernoPackage,
21
25
  imfReport,
22
26
  validationReport,
23
27
  compositionPlaylist,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imferno/schema",
3
- "version": "3.0.2-beta.8b55d2c",
3
+ "version": "3.0.2-beta.8c7d3cd",
4
4
  "description": "JSON Schema definitions for SMPTE ST 2067 IMF types — validates imferno export output",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -101,11 +101,32 @@
101
101
  "volumeIndex"
102
102
  ],
103
103
  "properties": {
104
+ "length": {
105
+ "description": "`<Length>` in bytes, when present.",
106
+ "default": null,
107
+ "type": [
108
+ "integer",
109
+ "null"
110
+ ],
111
+ "format": "uint64",
112
+ "minimum": 0.0
113
+ },
114
+ "offset": {
115
+ "description": "`<Offset>` in bytes, when present.",
116
+ "default": null,
117
+ "type": [
118
+ "integer",
119
+ "null"
120
+ ],
121
+ "format": "uint64",
122
+ "minimum": 0.0
123
+ },
104
124
  "path": {
105
125
  "description": "File path relative to the IMP root directory.",
106
126
  "type": "string"
107
127
  },
108
128
  "volumeIndex": {
129
+ "description": "`<VolumeIndex>`; 1 when absent.",
109
130
  "type": "integer",
110
131
  "format": "uint32",
111
132
  "minimum": 0.0
@@ -946,6 +946,7 @@
946
946
  }
947
947
  },
948
948
  "ExtensionProperties": {
949
+ "description": "The CPL's `ExtensionProperties`: ApplicationIdentification (the Application IDs of every ST 2067-2 instance, space-separated), MaxCLL and MaxFALL.",
949
950
  "type": "object",
950
951
  "properties": {
951
952
  "ApplicationIdentification": {
@@ -975,6 +976,37 @@
975
976
  }
976
977
  }
977
978
  },
979
+ "ExtensionSequence": {
980
+ "description": "A Sequence of a kind imferno does not model (ST 2067-3 §6.9.3 Extension Sequence). Every Sequence derives from SequenceType, so its Id, TrackId and Resources are kept; the element is named by `name` (local name) and `namespace` (namespace URI; null when the element has no namespace).",
981
+ "type": "object",
982
+ "required": [
983
+ "Id",
984
+ "ResourceList",
985
+ "TrackId"
986
+ ],
987
+ "properties": {
988
+ "Id": {
989
+ "$ref": "#/definitions/ImfUuid"
990
+ },
991
+ "Name": {
992
+ "default": "",
993
+ "type": "string"
994
+ },
995
+ "Namespace": {
996
+ "default": null,
997
+ "type": [
998
+ "string",
999
+ "null"
1000
+ ]
1001
+ },
1002
+ "ResourceList": {
1003
+ "$ref": "#/definitions/ResourceList"
1004
+ },
1005
+ "TrackId": {
1006
+ "$ref": "#/definitions/ImfUuid"
1007
+ }
1008
+ }
1009
+ },
978
1010
  "ForcedNarrativeSequence": {
979
1011
  "type": "object",
980
1012
  "required": [
@@ -1014,7 +1046,7 @@
1014
1046
  }
1015
1047
  },
1016
1048
  "IABChannelSubDescriptor": {
1017
- "description": "Presence-only stub for ST 2067-201:2026 Annex E `IABChannelSubDescriptor`.\n\nThe 2026 spec defines the full item set in Table E.1 (`IABBedMetaID`, `IABChannelID`, `IABAudioDescription`, `IABAudioDescriptionText`); imferno's CPL parser only needs to count occurrences to fire the `IabChannelSubDescriptorRecommended` warning, so the inner shape is intentionally permissive — any nested content deserialises into the catch-all map without affecting presence.",
1049
+ "description": "Presence-only stub for ST 2067-201:2026 Annex E `IABChannelSubDescriptor`.\n\nThe 2026 spec defines the full item set in Table E.1 (`IABBedMetaID`, `IABChannelID`, `IABAudioDescription`, `IABAudioDescriptionText`); imferno's CPL parser only needs to count occurrences to fire the `IabChannelSubDescriptorRecommended` notice, so the inner shape is intentionally permissive — any nested content deserialises into the catch-all map without affecting presence.",
1018
1050
  "type": "object",
1019
1051
  "properties": {
1020
1052
  "IABBedMetaID": {
@@ -1080,14 +1112,12 @@
1080
1112
  ]
1081
1113
  },
1082
1114
  "ElectrospatialFormulation": {
1083
- "description": "ST 2067-201 §5.9: ElectrospatialFormulation shall NOT be present.",
1115
+ "description": "ST 2067-201 §5.9: if present, ElectrospatialFormulation shall be 15 (multi-channel mode default). Kept as written: RegXML writes the enumeration as its register symbol (`ElectroSpatialFormulation_MultiChannelMode`), some writers as the number. See [`IABEssenceDescriptor::electrospatial_formulation_value`].",
1084
1116
  "default": null,
1085
1117
  "type": [
1086
- "integer",
1118
+ "string",
1087
1119
  "null"
1088
- ],
1089
- "format": "uint32",
1090
- "minimum": 0.0
1120
+ ]
1091
1121
  },
1092
1122
  "InstanceID": {
1093
1123
  "default": null,
@@ -1244,6 +1274,14 @@
1244
1274
  "description": "ISXD (Immersive Sound XML Data) essence descriptor — Dolby Atmos sidecar format",
1245
1275
  "type": "object",
1246
1276
  "properties": {
1277
+ "ContainerFormat": {
1278
+ "description": "ST 2067-202 §9.1: the Essence Container UL shall be the Frame Wrapped ISXD Container UL (Table 3).",
1279
+ "default": null,
1280
+ "type": [
1281
+ "string",
1282
+ "null"
1283
+ ]
1284
+ },
1247
1285
  "DataEssenceCoding": {
1248
1286
  "default": null,
1249
1287
  "type": [
@@ -1353,6 +1391,21 @@
1353
1391
  }
1354
1392
  }
1355
1393
  },
1394
+ "J2KCcapi": {
1395
+ "description": "`Ccapi` array of `J2KExtendedCapabilities`.",
1396
+ "type": "object",
1397
+ "properties": {
1398
+ "UInt16": {
1399
+ "default": [],
1400
+ "type": "array",
1401
+ "items": {
1402
+ "type": "integer",
1403
+ "format": "uint16",
1404
+ "minimum": 0.0
1405
+ }
1406
+ }
1407
+ }
1408
+ },
1356
1409
  "J2KComponentSizing": {
1357
1410
  "description": "Individual J2K component sizing",
1358
1411
  "type": "object",
@@ -1393,6 +1446,18 @@
1393
1446
  "description": "J2K Extended Capabilities (ISO/IEC 15444-15)",
1394
1447
  "type": "object",
1395
1448
  "properties": {
1449
+ "Ccapi": {
1450
+ "description": "Codestream capabilities (Ccap^i), one UInt16 per Pcap bit set, in increasing order of i (ISO/IEC 15444-1 CAP marker).",
1451
+ "default": null,
1452
+ "anyOf": [
1453
+ {
1454
+ "$ref": "#/definitions/J2KCcapi"
1455
+ },
1456
+ {
1457
+ "type": "null"
1458
+ }
1459
+ ]
1460
+ },
1396
1461
  "Pcap": {
1397
1462
  "description": "Profile capabilities (Pcap)",
1398
1463
  "default": null,
@@ -2298,6 +2363,17 @@
2298
2363
  }
2299
2364
  ]
2300
2365
  },
2366
+ "LeftEye": {
2367
+ "description": "`LeftEye` of a `cc:StereoImageTrackFileResourceType` resource (ST 2067-2:2013, :2016 and :2020). A stereo resource carries its SourceEncoding and TrackFileId per eye, not on the resource itself.",
2368
+ "anyOf": [
2369
+ {
2370
+ "$ref": "#/definitions/StereoEye"
2371
+ },
2372
+ {
2373
+ "type": "null"
2374
+ }
2375
+ ]
2376
+ },
2301
2377
  "Marker": {
2302
2378
  "default": [],
2303
2379
  "type": "array",
@@ -2314,6 +2390,17 @@
2314
2390
  "format": "uint64",
2315
2391
  "minimum": 0.0
2316
2392
  },
2393
+ "RightEye": {
2394
+ "description": "`RightEye` of a `cc:StereoImageTrackFileResourceType` resource.",
2395
+ "anyOf": [
2396
+ {
2397
+ "$ref": "#/definitions/StereoEye"
2398
+ },
2399
+ {
2400
+ "type": "null"
2401
+ }
2402
+ ]
2403
+ },
2317
2404
  "SourceDuration": {
2318
2405
  "default": null,
2319
2406
  "type": [
@@ -2389,6 +2476,14 @@
2389
2476
  "SequenceList": {
2390
2477
  "type": "object",
2391
2478
  "properties": {
2479
+ "ExtensionSequence": {
2480
+ "description": "Sequences whose element imferno does not model (ST 2067-3 §6.9.3 Extension Sequences, e.g. ST 2067-203 `MGASADMSignalSequence` or ST 2067-2 `CommentarySequence`), in document order. Filled by [`parse_cpl`] from the source XML so their EssenceDescriptor and Track File references resolve; no other rules are applied to them.",
2481
+ "default": [],
2482
+ "type": "array",
2483
+ "items": {
2484
+ "$ref": "#/definitions/ExtensionSequence"
2485
+ }
2486
+ },
2392
2487
  "ForcedNarrativeSequence": {
2393
2488
  "default": [],
2394
2489
  "type": "array",
@@ -2490,6 +2585,63 @@
2490
2585
  }
2491
2586
  }
2492
2587
  },
2588
+ "StereoEye": {
2589
+ "description": "One eye of a stereo resource: a `cpl:TrackFileResourceType` (ST 2067-2). Only the track file reference fields are kept; the eye's timing fields are checked by the XSD layer.",
2590
+ "type": "object",
2591
+ "properties": {
2592
+ "Hash": {
2593
+ "default": null,
2594
+ "type": [
2595
+ "string",
2596
+ "null"
2597
+ ]
2598
+ },
2599
+ "Id": {
2600
+ "default": null,
2601
+ "anyOf": [
2602
+ {
2603
+ "$ref": "#/definitions/ImfUuid"
2604
+ },
2605
+ {
2606
+ "type": "null"
2607
+ }
2608
+ ]
2609
+ },
2610
+ "KeyId": {
2611
+ "default": null,
2612
+ "anyOf": [
2613
+ {
2614
+ "$ref": "#/definitions/ImfUuid"
2615
+ },
2616
+ {
2617
+ "type": "null"
2618
+ }
2619
+ ]
2620
+ },
2621
+ "SourceEncoding": {
2622
+ "default": null,
2623
+ "anyOf": [
2624
+ {
2625
+ "$ref": "#/definitions/ImfUuid"
2626
+ },
2627
+ {
2628
+ "type": "null"
2629
+ }
2630
+ ]
2631
+ },
2632
+ "TrackFileId": {
2633
+ "default": null,
2634
+ "anyOf": [
2635
+ {
2636
+ "$ref": "#/definitions/ImfUuid"
2637
+ },
2638
+ {
2639
+ "type": "null"
2640
+ }
2641
+ ]
2642
+ }
2643
+ }
2644
+ },
2493
2645
  "SubtitlesSequence": {
2494
2646
  "type": "object",
2495
2647
  "required": [
@@ -2600,6 +2752,13 @@
2600
2752
  "Jpeg2000Imf4k"
2601
2753
  ]
2602
2754
  },
2755
+ {
2756
+ "description": "JPEG 2000 — IMF 8K profiles (byte [14]=0x04 Single Tile Lossy, 0x07 Single/Multi-Tile Reversible), at the Mainlevel/Sublevel combinations ST 2067-21:2026 §6.5.2 Table 5 lists. Only the 2026 edition of ST 2067-21 permits them.",
2757
+ "type": "string",
2758
+ "enum": [
2759
+ "Jpeg2000Imf8k"
2760
+ ]
2761
+ },
2603
2762
  {
2604
2763
  "description": "JPEG 2000 — Broadcast Contribution profile (ST 422 §A.1, byte [14]=0x01, sub-levels 0x11–0x17). Supports stored widths ≤ 3840 per ST 2067-21.",
2605
2764
  "type": "string",
@@ -2614,6 +2773,13 @@
2614
2773
  "Jpeg2000Ht"
2615
2774
  ]
2616
2775
  },
2776
+ {
2777
+ "description": "The HT-J2K Picture Coding Scheme node label (03010800, a NODE in the SMPTE Labels register). ST 2067-21:2023/2026 §6.2.5 require the leaf label 03010801 ([`VideoCodec::Jpeg2000Ht`]) instead.",
2778
+ "type": "string",
2779
+ "enum": [
2780
+ "Jpeg2000HtNode"
2781
+ ]
2782
+ },
2617
2783
  {
2618
2784
  "description": "VC-5 (SMPTE ST 2117)",
2619
2785
  "type": "string",
@@ -2750,6 +2916,18 @@
2750
2916
  "format": "uint32",
2751
2917
  "minimum": 0.0
2752
2918
  },
2919
+ "ReferenceImageEditRate": {
2920
+ "description": "ST 2067-2 Annex F (2013, 2016) / Annex E (2020): the edit rate of the image the audio is designed to sync to (§5.3.5 Table 6).",
2921
+ "default": null,
2922
+ "anyOf": [
2923
+ {
2924
+ "$ref": "#/definitions/EditRate"
2925
+ },
2926
+ {
2927
+ "type": "null"
2928
+ }
2929
+ ]
2930
+ },
2753
2931
  "SampleRate": {
2754
2932
  "default": null,
2755
2933
  "anyOf": [