Skip to content

🎥 Make videos programmatically with React

good progress

Jonny Burger40de49ea4269
diff --git a/packages/media-parser/av1.json b/packages/media-parser/av1.json
deleted file mode 100644
index 8d37a662a1..0000000000
--- a/packages/media-parser/av1.json
+++ /dev/null
@@ -1,503 +0,0 @@
-[
- {
- "type": "main-segment",
- "children": [
- {
- "type": "seek-head-segment",
- "length": 59,
- "children": [
- {
- "type": "seek-segment",
- "seekId": "0x53ab8415",
- "child": {
- "id": "0x49a96653",
- "type": "unknown-segment"
- }
- },
- {
- "id": "0x054cc1ec",
- "type": "unknown-segment"
- }
- ]
- },
- {
- "type": "info-segment",
- "length": 48,
- "children": [
- {
- "type": "timestamp-scale-segment",
- "timestampScale": 1000000
- },
- {
- "type": "muxing-app-segment",
- "value": "Lavf60.3.100"
- },
- {
- "type": "writing-app-segment",
- "value": "Lavf60.3.100"
- },
- {
- "type": "duration-segment",
- "duration": 1000
- }
- ]
- },
- {
- "type": "tracks-segment",
- "children": [
- {
- "type": "track-entry-segment",
- "children": [
- {
- "type": "track-number-segment",
- "trackNumber": 1
- },
- {
- "type": "track-uid-segment",
- "trackUid": "ab2171012bb9020a"
- },
- {
- "type": "flag-lacing-segment",
- "lacing": false
- },
- {
- "type": "language-segment",
- "language": "und"
- },
- {
- "type": "codec-segment",
- "codec": "V_AV1"
- },
- {
- "type": "track-type-segment",
- "trackType": "video"
- },
- {
- "type": "default-duration-segment",
- "defaultDuration": 40000000
- },
- {
- "type": "video-segment",
- "children": [
- {
- "type": "width-segment",
- "width": 1920
- },
- {
- "type": "height-segment",
- "height": 1080
- },
- {
- "type": "color-segment",
- "length": 16
- }
- ]
- },
- {
- "type": "codec-private-segment",
- "codecPrivateData": [
- 129,
- 8,
- 12,
- 0,
- 10,
- 14,
- 0,
- 0,
- 0,
- 66,
- 171,
- 191,
- 195,
- 118,
- 0,
- 8,
- 8,
- 8,
- 8,
- 32
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "tags-segment",
- "children": [
- {
- "type": "tag-segment",
- "length": 31
- },
- {
- "type": "tag-segment",
- "length": 51
- }
- ]
- },
- {
- "type": "cluster-segment",
- "children": [
- {
- "type": "timestamp-segment",
- "timestamp": 0
- },
- {
- "type": "simple-block-segment",
- "length": 279307,
- "trackNumber": 1,
- "timecode": 0,
- "headerFlags": 128,
- "keyframe": true,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 96,
- "trackNumber": 1,
- "timecode": 40,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 556,
- "trackNumber": 1,
- "timecode": 80,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 948,
- "trackNumber": 1,
- "timecode": 120,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 577,
- "trackNumber": 1,
- "timecode": 160,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 779,
- "trackNumber": 1,
- "timecode": 200,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 793,
- "trackNumber": 1,
- "timecode": 240,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 740,
- "trackNumber": 1,
- "timecode": 280,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1095,
- "trackNumber": 1,
- "timecode": 320,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1097,
- "trackNumber": 1,
- "timecode": 360,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1155,
- "trackNumber": 1,
- "timecode": 400,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1526,
- "trackNumber": 1,
- "timecode": 440,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1487,
- "trackNumber": 1,
- "timecode": 480,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 2046,
- "trackNumber": 1,
- "timecode": 520,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1372,
- "trackNumber": 1,
- "timecode": 560,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1441,
- "trackNumber": 1,
- "timecode": 600,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 2947,
- "trackNumber": 1,
- "timecode": 640,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 2652,
- "trackNumber": 1,
- "timecode": 680,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 4199,
- "trackNumber": 1,
- "timecode": 720,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 3998,
- "trackNumber": 1,
- "timecode": 760,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 6373,
- "trackNumber": 1,
- "timecode": 800,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 5955,
- "trackNumber": 1,
- "timecode": 840,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 7943,
- "trackNumber": 1,
- "timecode": 880,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 8241,
- "trackNumber": 1,
- "timecode": 920,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 9506,
- "trackNumber": 1,
- "timecode": 960,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- }
- ]
- },
- {
- "id": "0x1c53bb6b",
- "type": "unknown-segment"
- }
- ]
- }
-]
\ No newline at end of file
diff --git a/packages/media-parser/dar.json b/packages/media-parser/dar.json
deleted file mode 100644
index 2d9bc1dce7..0000000000
--- a/packages/media-parser/dar.json
+++ /dev/null
@@ -1,2556 +0,0 @@
-[
- {
- "type": "ftyp-box",
- "majorBrand": "isom",
- "minorVersion": 512,
- "compatibleBrands": [
- "isom",
- "iso2",
- "avc1",
- "mp41"
- ],
- "offset": 0,
- "boxSize": 32
- },
- {
- "offset": 32,
- "boxSize": 7433,
- "type": "moov-box",
- "children": [
- {
- "creationTime": null,
- "modificationTime": null,
- "timeScale": 1000,
- "durationInUnits": 5725,
- "durationInSeconds": 5.725,
- "rate": 1,
- "volume": 1,
- "matrix": [
- 1,
- 0,
- 0,
- 0,
- 1,
- 0,
- 0,
- 0,
- 1
- ],
- "nextTrackId": 3,
- "type": "mvhd-box",
- "boxSize": 108,
- "offset": 40
- },
- {
- "offset": 148,
- "boxSize": 3130,
- "type": "trak-box",
- "children": [
- {
- "offset": 156,
- "boxSize": 92,
- "type": "tkhd-box",
- "creationTime": null,
- "modificationTime": null,
- "trackId": 1,
- "duration": 5700,
- "layer": 0,
- "alternateGroup": 0,
- "volume": 0,
- "matrix": [
- 1,
- 0,
- 0,
- 0,
- 1,
- 0,
- 0,
- 0,
- 1
- ],
- "width": 404.9717559814453,
- "height": 720,
- "version": 0,
- "rotation": 0,
- "unrotatedWidth": 404.9717559814453,
- "unrotatedHeight": 720
- },
- {
- "type": "regular-box",
- "boxType": "edts",
- "boxSize": 36,
- "children": [],
- "offset": 248
- },
- {
- "type": "regular-box",
- "boxType": "mdia",
- "boxSize": 2994,
- "children": [
- {
- "type": "mdhd-box",
- "duration": 87552,
- "timescale": 15360,
- "version": 0,
- "language": 21956,
- "quality": 0
- },
- {
- "type": "regular-box",
- "boxType": "hdlr",
- "boxSize": 45,
- "children": [],
- "offset": 324
- },
- {
- "type": "regular-box",
- "boxType": "minf",
- "boxSize": 2909,
- "children": [
- {
- "type": "regular-box",
- "boxType": "vmhd",
- "boxSize": 20,
- "children": [],
- "offset": 377
- },
- {
- "type": "regular-box",
- "boxType": "dinf",
- "boxSize": 36,
- "children": [],
- "offset": 397
- },
- {
- "type": "regular-box",
- "boxType": "stbl",
- "boxSize": 2845,
- "children": [
- {
- "type": "stsd-box",
- "boxSize": 197,
- "offset": 441,
- "numberOfEntries": 1,
- "samples": [
- {
- "format": "avc1",
- "offset": 457,
- "dataReferenceIndex": 1,
- "version": 0,
- "revisionLevel": 0,
- "vendor": [
- 0,
- 0,
- 0,
- 0
- ],
- "size": 181,
- "type": "video",
- "width": 1280,
- "height": 720,
- "horizontalResolutionPpi": 72,
- "verticalResolutionPpi": 72,
- "spacialQuality": 0,
- "temporalQuality": 0,
- "dataSize": 0,
- "frameCountPerSample": 1,
- "compressorName": [
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
- ],
- "depth": 24,
- "colorTableId": -1,
- "descriptors": [
- {
- "type": "avcc-box",
- "data": {
- "0": 1,
- "1": 100,
- "2": 0,
- "3": 31,
- "4": 255,
- "5": 225,
- "6": 0,
- "7": 30,
- "8": 103,
- "9": 100,
- "10": 0,
- "11": 31,
- "12": 172,
- "13": 217,
- "14": 64,
- "15": 80,
- "16": 5,
- "17": 187,
- "18": 255,
- "19": 0,
- "20": 56,
- "21": 0,
- "22": 177,
- "23": 16,
- "24": 0,
- "25": 0,
- "26": 3,
- "27": 0,
- "28": 16,
- "29": 0,
- "30": 0,
- "31": 3,
- "32": 3,
- "33": 192,
- "34": 241,
- "35": 131,
- "36": 25,
- "37": 96,
- "38": 1,
- "39": 0,
- "40": 6,
- "41": 104,
- "42": 235,
- "43": 227,
- "44": 203,
- "45": 34,
- "46": 192,
- "47": 253,
- "48": 248,
- "49": 248,
- "50": 0
- },
- "configurationString": "64001f"
- },
- {
- "type": "pasp-box",
- "boxSize": 16,
- "offset": 602,
- "hSpacing": 56,
- "vSpacing": 177
- },
- {
- "type": "regular-box",
- "boxType": "btrt",
- "boxSize": 20,
- "children": [],
- "offset": 618
- }
- ]
- }
- ]
- },
- {
- "type": "stts-box",
- "sampleDistribution": [
- {
- "sampleCount": 171,
- "sampleDelta": 512
- }
- ]
- },
- {
- "type": "stss-box",
- "version": 0,
- "flags": [
- 0,
- 0,
- 0
- ],
- "sampleNumber": [
- 1,
- 33
- ],
- "boxSize": 24,
- "offset": 662
- },
- {
- "type": "ctts-box",
- "boxSize": 1152,
- "offset": 686,
- "version": 0,
- "flags": [
- 0,
- 0,
- 0
- ],
- "entryCount": 142,
- "entries": [
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2048
- },
- {
- "sampleCount": 2,
- "sampleOffset": 512
- },
- {
- "sampleCount": 13,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2048
- },
- {
- "sampleCount": 2,
- "sampleOffset": 512
- },
- {
- "sampleCount": 13,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1536
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1536
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1536
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 4,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- },
- {
- "sampleCount": 1,
- "sampleOffset": 2560
- },
- {
- "sampleCount": 1,
- "sampleOffset": 1024
- },
- {
- "sampleCount": 1,
- "sampleOffset": 0
- },
- {
- "sampleCount": 1,
- "sampleOffset": 512
- }
- ]
- },
- {
- "type": "stsc-box",
- "boxSize": 40,
- "offset": 1838,
- "version": 0,
- "flags": [
- 0,
- 0,
- 0
- ],
- "entryCount": 2,
- "entries": [
- {
- "firstChunk": 1,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 2,
- "samplesPerChunk": 1
- }
- ]
- },
- {
- "type": "stsz-box",
- "boxSize": 704,
- "offset": 1878,
- "version": 0,
- "flags": [
- 0,
- 0,
- 0
- ],
- "sampleCount": 171,
- "countType": "variable",
- "entries": [
- 1725,
- 439,
- 301,
- 127,
- 150,
- 464,
- 306,
- 99,
- 182,
- 552,
- 346,
- 235,
- 328,
- 531,
- 496,
- 216,
- 329,
- 667,
- 312,
- 332,
- 1436,
- 18331,
- 24767,
- 30638,
- 37033,
- 40871,
- 45520,
- 47903,
- 48646,
- 48968,
- 49073,
- 47246,
- 66081,
- 44620,
- 44392,
- 39625,
- 34043,
- 36566,
- 34207,
- 27497,
- 22077,
- 27023,
- 20139,
- 15038,
- 18497,
- 14809,
- 14673,
- 11944,
- 12792,
- 9315,
- 9795,
- 7869,
- 8182,
- 7209,
- 7152,
- 6409,
- 7634,
- 7035,
- 3385,
- 6727,
- 3174,
- 7839,
- 4374,
- 2722,
- 2472,
- 4484,
- 2166,
- 2883,
- 3509,
- 2430,
- 2405,
- 5235,
- 2684,
- 1645,
- 1593,
- 4453,
- 2558,
- 1657,
- 1492,
- 5717,
- 2736,
- 1642,
- 1568,
- 4939,
- 1992,
- 1281,
- 1238,
- 3307,
- 1541,
- 1025,
- 899,
- 3167,
- 1314,
- 764,
- 718,
- 2767,
- 974,
- 677,
- 561,
- 1632,
- 769,
- 582,
- 484,
- 1489,
- 728,
- 423,
- 513,
- 1516,
- 649,
- 472,
- 381,
- 1642,
- 549,
- 375,
- 367,
- 1255,
- 509,
- 370,
- 330,
- 1407,
- 500,
- 368,
- 300,
- 1123,
- 443,
- 357,
- 252,
- 2897,
- 576,
- 359,
- 326,
- 1046,
- 422,
- 259,
- 249,
- 1211,
- 407,
- 235,
- 211,
- 421,
- 268,
- 256,
- 235,
- 331,
- 253,
- 199,
- 179,
- 218,
- 258,
- 242,
- 200,
- 176,
- 255,
- 189,
- 192,
- 286,
- 217,
- 168,
- 195,
- 266,
- 255,
- 203,
- 194,
- 79,
- 247,
- 177,
- 156,
- 105,
- 237,
- 185,
- 173
- ]
- },
- {
- "type": "stco-box",
- "boxSize": 696,
- "offset": 2582,
- "version": 0,
- "flags": [
- 0,
- 0,
- 0
- ],
- "entries": [
- 7481,
- 9669,
- 9982,
- 10115,
- 10277,
- 10747,
- 11065,
- 11176,
- 11364,
- 11928,
- 12280,
- 12527,
- 12861,
- 13404,
- 13906,
- 14134,
- 14475,
- 15201,
- 16638,
- 17620,
- 20297,
- 39076,
- 64764,
- 96182,
- 133636,
- 175163,
- 221062,
- 269672,
- 318686,
- 368342,
- 417774,
- 465711,
- 532460,
- 577532,
- 622781,
- 662695,
- 697363,
- 734263,
- 769117,
- 797304,
- 819710,
- 847403,
- 867867,
- 883592,
- 902427,
- 917920,
- 932940,
- 945587,
- 959064,
- 968725,
- 979253,
- 987471,
- 996357,
- 1003925,
- 1011795,
- 1018890,
- 1026873,
- 1034594,
- 1038314,
- 1045740,
- 1049266,
- 1057756,
- 1062489,
- 1065937,
- 1069152,
- 1073991,
- 1076817,
- 1080043,
- 1084242,
- 1087038,
- 1090148,
- 1096083,
- 1099083,
- 1101372,
- 1103296,
- 1108421,
- 1111317,
- 1113612,
- 1115403,
- 1121777,
- 1125127,
- 1127159,
- 1129444,
- 1134766,
- 1137413,
- 1139044,
- 1140962,
- 1144967,
- 1146862,
- 1148556,
- 1149853,
- 1153702,
- 1155364,
- 1156790,
- 1157840,
- 1161279,
- 1162940,
- 1163983,
- 1165206,
- 1167190,
- 1168588,
- 1169513,
- 1170694,
- 1172846,
- 1173926,
- 1175048,
- 1175922,
- 1178166,
- 1179138,
- 1180292,
- 1181034,
- 1183324,
- 1184599,
- 1185323,
- 1186339,
- 1187937,
- 1189113,
- 1189840,
- 1190896,
- 1192922,
- 1193745,
- 1194767,
- 1195447,
- 1197276,
- 1198038,
- 1199040,
- 1199660,
- 1203278,
- 1204549,
- 1205229,
- 1206160,
- 1207561,
- 1208659,
- 1209268,
- 1210214,
- 1212123,
- 1212883,
- 1213783,
- 1214379,
- 1215437,
- 1216055,
- 1216988,
- 1217562,
- 1218589,
- 1219542,
- 1220062,
- 1220966,
- 1221548,
- 1222490,
- 1223040,
- 1223921,
- 1224795,
- 1225370,
- 1226244,
- 1226776,
- 1227739,
- 1228278,
- 1229164,
- 1229696,
- 1230632,
- 1231561,
- 1232128,
- 1232971,
- 1233402,
- 1234328,
- 1234899,
- 1235725,
- 1236551,
- 1237114,
- 1237974
- ],
- "entryCount": 170
- }
- ],
- "offset": 433
- }
- ],
- "offset": 369
- }
- ],
- "offset": 284
- }
- ]
- },
- {
- "offset": 3278,
- "boxSize": 4089,
- "type": "trak-box",
- "children": [
- {
- "offset": 3286,
- "boxSize": 92,
- "type": "tkhd-box",
- "creationTime": null,
- "modificationTime": null,
- "trackId": 2,
- "duration": 5725,
- "layer": 0,
- "alternateGroup": 1,
- "volume": 256,
- "matrix": [
- 1,
- 0,
- 0,
- 0,
- 1,
- 0,
- 0,
- 0,
- 1
- ],
- "width": 0,
- "height": 0,
- "version": 0,
- "rotation": 0,
- "unrotatedWidth": 0,
- "unrotatedHeight": 0
- },
- {
- "type": "regular-box",
- "boxType": "edts",
- "boxSize": 36,
- "children": [],
- "offset": 3378
- },
- {
- "type": "regular-box",
- "boxType": "mdia",
- "boxSize": 3953,
- "children": [
- {
- "type": "mdhd-box",
- "duration": 274768,
- "timescale": 48000,
- "version": 0,
- "language": 21956,
- "quality": 0
- },
- {
- "type": "regular-box",
- "boxType": "hdlr",
- "boxSize": 45,
- "children": [],
- "offset": 3454
- },
- {
- "type": "regular-box",
- "boxType": "minf",
- "boxSize": 3868,
- "children": [
- {
- "type": "regular-box",
- "boxType": "smhd",
- "boxSize": 16,
- "children": [],
- "offset": 3507
- },
- {
- "type": "regular-box",
- "boxType": "dinf",
- "boxSize": 36,
- "children": [],
- "offset": 3523
- },
- {
- "type": "regular-box",
- "boxType": "stbl",
- "boxSize": 3808,
- "children": [
- {
- "type": "stsd-box",
- "boxSize": 126,
- "offset": 3567,
- "numberOfEntries": 1,
- "samples": [
- {
- "format": "mp4a",
- "offset": 3583,
- "dataReferenceIndex": 1,
- "version": 0,
- "revisionLevel": 0,
- "vendor": [
- 0,
- 0,
- 0,
- 0
- ],
- "size": 110,
- "type": "audio",
- "numberOfChannels": 2,
- "sampleSize": 16,
- "compressionId": 0,
- "packetSize": 0,
- "sampleRate": 48000,
- "samplesPerPacket": null,
- "bytesPerPacket": null,
- "bytesPerFrame": null,
- "bitsPerSample": null,
- "children": [
- {
- "type": "esds-box",
- "version": 0,
- "tag": 3,
- "sizeOfInstance": 37,
- "esId": 2,
- "descriptors": [
- {
- "type": "decoder-config-descriptor",
- "objectTypeIndication": "aac",
- "asNumber": 64
- },
- {
- "type": "sl-config-descriptor"
- }
- ]
- },
- {
- "type": "regular-box",
- "boxType": "btrt",
- "boxSize": 20,
- "children": [],
- "offset": 3673
- }
- ]
- }
- ]
- },
- {
- "type": "stts-box",
- "sampleDistribution": [
- {
- "sampleCount": 269,
- "sampleDelta": 1024
- }
- ]
- },
- {
- "type": "stsc-box",
- "boxSize": 1804,
- "offset": 3717,
- "version": 0,
- "flags": [
- 0,
- 0,
- 0
- ],
- "entryCount": 149,
- "entries": [
- {
- "firstChunk": 1,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 2,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 3,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 4,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 5,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 6,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 8,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 9,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 10,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 11,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 12,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 13,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 14,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 15,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 17,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 18,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 19,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 20,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 21,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 22,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 24,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 25,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 26,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 27,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 28,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 29,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 30,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 31,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 33,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 34,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 35,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 36,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 37,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 38,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 40,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 41,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 42,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 43,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 44,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 45,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 46,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 47,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 49,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 50,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 51,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 52,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 53,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 54,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 56,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 57,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 58,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 59,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 60,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 61,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 62,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 63,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 65,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 66,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 67,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 68,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 69,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 70,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 72,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 73,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 74,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 75,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 76,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 77,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 78,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 79,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 81,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 82,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 83,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 84,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 85,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 86,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 88,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 89,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 90,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 91,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 92,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 93,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 94,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 95,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 97,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 98,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 99,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 100,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 101,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 102,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 104,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 105,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 106,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 107,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 108,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 109,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 110,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 111,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 113,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 114,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 115,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 116,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 117,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 118,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 120,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 121,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 122,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 123,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 124,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 125,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 126,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 127,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 129,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 130,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 131,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 132,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 133,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 134,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 136,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 137,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 138,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 139,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 140,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 141,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 142,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 143,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 145,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 146,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 147,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 148,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 149,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 150,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 152,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 153,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 154,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 155,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 156,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 157,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 158,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 159,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 161,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 162,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 163,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 164,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 165,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 166,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 168,
- "samplesPerChunk": 1
- },
- {
- "firstChunk": 169,
- "samplesPerChunk": 2
- },
- {
- "firstChunk": 170,
- "samplesPerChunk": 5
- }
- ]
- },
- {
- "type": "stsz-box",
- "boxSize": 1096,
- "offset": 5521,
- "version": 0,
- "flags": [
- 0,
- 0,
- 0
- ],
- "sampleCount": 269,
- "countType": "variable",
- "entries": [
- 24,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 6,
- 59,
- 490,
- 635,
- 650,
- 639,
- 602,
- 448,
- 459,
- 462,
- 383,
- 397,
- 421,
- 326,
- 330,
- 379,
- 350,
- 357,
- 368,
- 363,
- 325,
- 359,
- 326,
- 365,
- 352,
- 316,
- 452,
- 434,
- 423,
- 289,
- 306,
- 319,
- 334,
- 321,
- 326,
- 351,
- 339,
- 329,
- 331,
- 339,
- 325,
- 337,
- 350,
- 338,
- 339,
- 345,
- 347,
- 339,
- 364,
- 337,
- 348,
- 346,
- 344,
- 389,
- 349,
- 358,
- 346,
- 359,
- 364,
- 354,
- 364,
- 322,
- 349,
- 332,
- 354,
- 335,
- 361,
- 338,
- 352,
- 342,
- 309,
- 359,
- 366,
- 360,
- 377,
- 366,
- 355,
- 339,
- 321,
- 343,
- 352,
- 338,
- 366,
- 349,
- 356,
- 355,
- 345,
- 316,
- 333,
- 311,
- 331,
- 322,
- 350,
- 338,
- 310,
- 328,
- 299,
- 325,
- 332,
- 279,
- 335,
- 390,
- 363,
- 354,
- 383,
- 359,
- 296,
- 350,
- 373,
- 307,
- 332,
- 366,
- 354,
- 332,
- 337,
- 398,
- 376,
- 306,
- 348,
- 335,
- 327,
- 332,
- 345,
- 327,
- 353,
- 334,
- 366,
- 335,
- 327,
- 352,
- 312,
- 317,
- 343,
- 346,
- 351,
- 325,
- 338,
- 352,
- 345,
- 354,
- 361,
- 336,
- 392,
- 323,
- 353,
- 329,
- 361,
- 315,
- 333,
- 328,
- 398,
- 349,
- 351,
- 298,
- 343,
- 346,
- 321,
- 357,
- 364,
- 362,
- 321,
- 298,
- 323,
- 339,
- 315,
- 380,
- 363,
- 343,
- 319,
- 317,
- 328,
- 368,
- 366,
- 355,
- 351,
- 344,
- 321,
- 295,
- 310,
- 355,
- 332,
- 344,
- 350,
- 380,
- 317,
- 347,
- 351,
- 353,
- 313,
- 352,
- 385,
- 302,
- 335,
- 350,
- 326,
- 351,
- 339,
- 354,
- 342,
- 344,
- 356,
- 321,
- 361,
- 364,
- 364,
- 366,
- 318,
- 308,
- 382,
- 299,
- 355,
- 343,
- 320,
- 361,
- 324,
- 340,
- 331,
- 346,
- 322,
- 372,
- 346,
- 337,
- 327,
- 343,
- 339,
- 335,
- 364,
- 292,
- 357,
- 352,
- 358,
- 321,
- 394,
- 300,
- 370,
- 336,
- 385,
- 326,
- 320,
- 355,
- 328,
- 332,
- 331,
- 337,
- 152
- ]
- },
- {
- "type": "stco-box",
- "boxSize": 696,
- "offset": 6617,
- "version": 0,
- "flags": [
- 0,
- 0,
- 0
- ],
- "entries": [
- 9645,
- 9970,
- 10109,
- 10265,
- 10741,
- 11053,
- 11164,
- 11358,
- 11916,
- 12274,
- 12515,
- 12855,
- 13392,
- 13900,
- 14122,
- 14463,
- 15142,
- 15513,
- 16970,
- 19056,
- 38628,
- 63843,
- 95402,
- 133215,
- 174507,
- 220683,
- 268965,
- 318318,
- 367654,
- 417415,
- 465020,
- 531792,
- 577080,
- 621924,
- 662406,
- 696738,
- 733929,
- 768470,
- 796614,
- 819381,
- 846733,
- 867542,
- 882905,
- 902089,
- 917236,
- 932593,
- 944884,
- 958379,
- 968379,
- 978520,
- 987122,
- 995653,
- 1003566,
- 1011077,
- 1018204,
- 1026524,
- 1033908,
- 1037979,
- 1045041,
- 1048914,
- 1057105,
- 1062130,
- 1065211,
- 1068409,
- 1073636,
- 1076157,
- 1079700,
- 1083552,
- 1086672,
- 1089443,
- 1095383,
- 1098767,
- 1100728,
- 1102965,
- 1107749,
- 1110979,
- 1112974,
- 1115104,
- 1121120,
- 1124513,
- 1126769,
- 1128727,
- 1134383,
- 1136758,
- 1138694,
- 1140282,
- 1144269,
- 1146508,
- 1147887,
- 1149455,
- 1153020,
- 1155016,
- 1156128,
- 1157508,
- 1160607,
- 1162253,
- 1163617,
- 1164544,
- 1166838,
- 1167959,
- 1169170,
- 1169997,
- 1172183,
- 1173574,
- 1174349,
- 1175561,
- 1177438,
- 1178815,
- 1179610,
- 1180673,
- 1182676,
- 1183873,
- 1184974,
- 1185690,
- 1187594,
- 1188446,
- 1189483,
- 1190170,
- 1192303,
- 1193422,
- 1194113,
- 1195067,
- 1196570,
- 1197719,
- 1198395,
- 1199292,
- 1202557,
- 1203854,
- 1204908,
- 1205555,
- 1207206,
- 1207983,
- 1208918,
- 1209517,
- 1211425,
- 1212530,
- 1213118,
- 1213994,
- 1214800,
- 1215705,
- 1216311,
- 1217223,
- 1217893,
- 1218842,
- 1219741,
- 1220241,
- 1221184,
- 1221806,
- 1222732,
- 1223240,
- 1224097,
- 1225050,
- 1225559,
- 1226436,
- 1227062,
- 1227956,
- 1228446,
- 1229359,
- 1229962,
- 1230887,
- 1231764,
- 1232322,
- 1233050,
- 1233649,
- 1234505,
- 1235055,
- 1235830,
- 1236788,
- 1237299,
- 1238147
- ],
- "entryCount": 170
- },
- {
- "type": "regular-box",
- "boxType": "sgpd",
- "boxSize": 26,
- "children": [],
- "offset": 7313
- },
- {
- "type": "regular-box",
- "boxType": "sbgp",
- "boxSize": 28,
- "children": [],
- "offset": 7339
- }
- ],
- "offset": 3559
- }
- ],
- "offset": 3499
- }
- ],
- "offset": 3414
- }
- ]
- },
- {
- "type": "regular-box",
- "boxType": "udta",
- "boxSize": 98,
- "children": [],
- "offset": 7367
- }
- ]
- },
- {
- "type": "regular-box",
- "boxType": "free",
- "boxSize": 8,
- "children": [],
- "offset": 7465
- },
- {
- "type": "regular-box",
- "boxType": "mdat",
- "children": [],
- "boxSize": 1232154,
- "offset": 7473
- }
-]
\ No newline at end of file
diff --git a/packages/media-parser/parsed.json b/packages/media-parser/parsed.json
deleted file mode 100644
index 7ee2ed3b92..0000000000
--- a/packages/media-parser/parsed.json
+++ /dev/null
@@ -1,511 +0,0 @@
-{
- "dimensions": {
- "width": 1920,
- "height": 1080
- },
- "durationInSeconds": 1,
- "fps": null,
- "boxes": [
- {
- "type": "main-segment",
- "children": [
- {
- "type": "seek-head-segment",
- "length": 59,
- "children": [
- {
- "type": "seek-segment",
- "seekId": "0x53ab8415",
- "child": {
- "id": "0x49a96653",
- "type": "unknown-segment"
- }
- },
- {
- "id": "0x054cc1ec",
- "type": "unknown-segment"
- }
- ]
- },
- {
- "type": "info-segment",
- "length": 48,
- "children": [
- {
- "type": "timestamp-scale-segment",
- "timestampScale": 1000000
- },
- {
- "type": "muxing-app-segment",
- "value": "Lavf60.3.100"
- },
- {
- "type": "writing-app-segment",
- "value": "Lavf60.3.100"
- },
- {
- "type": "duration-segment",
- "duration": 1000
- }
- ]
- },
- {
- "type": "tracks-segment",
- "children": [
- {
- "type": "track-entry-segment",
- "children": [
- {
- "type": "track-number-segment",
- "trackNumber": 1
- },
- {
- "type": "track-uid-segment",
- "trackUid": "ab2171012bb9020a"
- },
- {
- "type": "flag-lacing-segment",
- "lacing": false
- },
- {
- "type": "language-segment",
- "language": "und"
- },
- {
- "type": "codec-segment",
- "codec": "V_AV1"
- },
- {
- "type": "track-type-segment",
- "trackType": "video"
- },
- {
- "type": "default-duration-segment",
- "defaultDuration": 40000000
- },
- {
- "type": "video-segment",
- "children": [
- {
- "type": "width-segment",
- "width": 1920
- },
- {
- "type": "height-segment",
- "height": 1080
- },
- {
- "type": "color-segment",
- "length": 16
- }
- ]
- },
- {
- "type": "codec-private-segment",
- "codecPrivateData": [
- 129,
- 8,
- 12,
- 0,
- 10,
- 14,
- 0,
- 0,
- 0,
- 66,
- 171,
- 191,
- 195,
- 118,
- 0,
- 8,
- 8,
- 8,
- 8,
- 32
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "tags-segment",
- "children": [
- {
- "type": "tag-segment",
- "length": 31
- },
- {
- "type": "tag-segment",
- "length": 51
- }
- ]
- },
- {
- "type": "cluster-segment",
- "children": [
- {
- "type": "timestamp-segment",
- "timestamp": 0
- },
- {
- "type": "simple-block-segment",
- "length": 279307,
- "trackNumber": 1,
- "timecode": 0,
- "headerFlags": 128,
- "keyframe": true,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 96,
- "trackNumber": 1,
- "timecode": 40,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 556,
- "trackNumber": 1,
- "timecode": 80,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 948,
- "trackNumber": 1,
- "timecode": 120,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 577,
- "trackNumber": 1,
- "timecode": 160,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 779,
- "trackNumber": 1,
- "timecode": 200,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 793,
- "trackNumber": 1,
- "timecode": 240,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 740,
- "trackNumber": 1,
- "timecode": 280,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1095,
- "trackNumber": 1,
- "timecode": 320,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1097,
- "trackNumber": 1,
- "timecode": 360,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1155,
- "trackNumber": 1,
- "timecode": 400,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1526,
- "trackNumber": 1,
- "timecode": 440,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1487,
- "trackNumber": 1,
- "timecode": 480,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 2046,
- "trackNumber": 1,
- "timecode": 520,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1372,
- "trackNumber": 1,
- "timecode": 560,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 1441,
- "trackNumber": 1,
- "timecode": 600,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 2947,
- "trackNumber": 1,
- "timecode": 640,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 2652,
- "trackNumber": 1,
- "timecode": 680,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 4199,
- "trackNumber": 1,
- "timecode": 720,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 3998,
- "trackNumber": 1,
- "timecode": 760,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 6373,
- "trackNumber": 1,
- "timecode": 800,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 5955,
- "trackNumber": 1,
- "timecode": 840,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 7943,
- "trackNumber": 1,
- "timecode": 880,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 8241,
- "trackNumber": 1,
- "timecode": 920,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- },
- {
- "type": "simple-block-segment",
- "length": 9506,
- "trackNumber": 1,
- "timecode": 960,
- "headerFlags": 0,
- "keyframe": false,
- "lacing": [
- 0,
- 0
- ],
- "invisible": false,
- "children": null
- }
- ]
- },
- {
- "id": "0x1c53bb6b",
- "type": "unknown-segment"
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/media-parser/src/boxes/webm/segments.ts b/packages/media-parser/src/boxes/webm/segments.ts
index 93ffea36c8..eace381597 100644
--- a/packages/media-parser/src/boxes/webm/segments.ts
+++ b/packages/media-parser/src/boxes/webm/segments.ts
@@ -7,7 +7,12 @@ import {parseInfoSegment} from './segments/info';
import {type MainSegment} from './segments/main';
import {parseMuxingSegment, type MuxingAppSegment} from './segments/muxing';
import {expectChildren} from './segments/parse-children';
-import {parseSeekSegment, type SeekSegment} from './segments/seek';
+import type {SeekIdSegment} from './segments/seek';
+import {
+ parseSeekIdSegment,
+ parseSeekSegment,
+ type SeekSegment,
+} from './segments/seek';
import type {SeekHeadSegment} from './segments/seek-head';
import {parseSeekHeadSegment} from './segments/seek-head';
import {
@@ -18,6 +23,8 @@ import type {TimestampScaleSegment} from './segments/timestamp-scale';
import {parseTimestampScaleSegment} from './segments/timestamp-scale';
import type {
AlphaModeSegment,
+ BlockElement,
+ BlockGroupSegment,
ClusterSegment,
CodecPrivateSegment,
CodecSegment,
@@ -45,6 +52,8 @@ import type {
} from './segments/track-entry';
import {
parseAlphaModeSegment,
+ parseBlockElementSegment,
+ parseBlockGroupSegment,
parseCodecPrivateSegment,
parseCodecSegment,
parseColorSegment,
@@ -115,7 +124,10 @@ export type MatroskaSegment =
| TagSegment
| ClusterSegment
| TimestampSegment
- | SimpleBlockSegment;
+ | SimpleBlockSegment
+ | BlockGroupSegment
+ | BlockElement
+ | SeekIdSegment;
const parseSegment = (
segmentId: string,
@@ -137,12 +149,16 @@ const parseSegment = (
return parseSeekHeadSegment(iterator, length);
}
+ if (segmentId === '0x53ab') {
+ return parseSeekIdSegment(iterator);
+ }
+
if (segmentId === '0x4dbb') {
- return parseSeekSegment(iterator);
+ return parseSeekSegment(iterator, length);
}
if (segmentId === '0x53ac') {
- return parseSeekPositionSegment(iterator);
+ return parseSeekPositionSegment(iterator, length);
}
if (segmentId === '0xec') {
@@ -269,6 +285,14 @@ const parseSegment = (
return parseSimpleBlockSegment(iterator, length);
}
+ if (segmentId === '0xa0') {
+ return parseBlockGroupSegment(iterator, length);
+ }
+
+ if (segmentId === '0xa1') {
+ return parseBlockElementSegment(iterator, length);
+ }
+
const bytesRemaining = iterator.byteLength() - iterator.counter.getOffset();
const toDiscard = Math.min(
bytesRemaining,
diff --git a/packages/media-parser/src/boxes/webm/segments/seek-position.ts b/packages/media-parser/src/boxes/webm/segments/seek-position.ts
index d27978b982..ef219db309 100644
--- a/packages/media-parser/src/boxes/webm/segments/seek-position.ts
+++ b/packages/media-parser/src/boxes/webm/segments/seek-position.ts
@@ -7,6 +7,7 @@ export type SeekPositionSegment = {
export const parseSeekPositionSegment = (
iterator: BufferIterator,
+ length: number,
): SeekPositionSegment => {
const seekPosition = iterator.getDecimalBytes(length);
diff --git a/packages/media-parser/src/boxes/webm/segments/seek.ts b/packages/media-parser/src/boxes/webm/segments/seek.ts
index 3084f556f2..08530dc7d1 100644
--- a/packages/media-parser/src/boxes/webm/segments/seek.ts
+++ b/packages/media-parser/src/boxes/webm/segments/seek.ts
@@ -1,24 +1,37 @@
import type {BufferIterator} from '../../../buffer-iterator';
import type {MatroskaSegment} from '../segments';
-import {expectSegment} from '../segments';
+import {expectChildren} from './parse-children';
export type SeekSegment = {
type: 'seek-segment';
- seekId: string;
- child: MatroskaSegment;
+ children: MatroskaSegment[];
};
-export const parseSeekSegment = (iterator: BufferIterator): SeekSegment => {
- const seekId = iterator.getMatroskaSegmentId();
- const child = expectSegment(iterator);
-
- if (child.status === 'incomplete') {
- throw new Error('Incomplete child');
+export const parseSeekSegment = (
+ iterator: BufferIterator,
+ length: number,
+): SeekSegment => {
+ const children = expectChildren(iterator, length, [], null);
+ if (children.status === 'incomplete') {
+ throw new Error('Incomplete children');
}
return {
type: 'seek-segment',
+ children: children.segments as MatroskaSegment[],
+ };
+};
+
+export type SeekIdSegment = {
+ type: 'seek-id-segment';
+ seekId: string;
+};
+
+export const parseSeekIdSegment = (iterator: BufferIterator): SeekIdSegment => {
+ const seekId = iterator.getMatroskaSegmentId();
+
+ return {
+ type: 'seek-id-segment',
seekId,
- child: child.segments[0] as MatroskaSegment,
};
};
diff --git a/packages/media-parser/src/boxes/webm/segments/track-entry.ts b/packages/media-parser/src/boxes/webm/segments/track-entry.ts
index de0b4202c7..6ba5d438cd 100644
--- a/packages/media-parser/src/boxes/webm/segments/track-entry.ts
+++ b/packages/media-parser/src/boxes/webm/segments/track-entry.ts
@@ -14,7 +14,7 @@ export const parseTrackEntry = (
): TrackEntrySegment => {
const children = expectChildren(iterator, length, [], null);
if (children.status === 'incomplete') {
- throw new Error('Incomplete children');
+ throw new Error('Incomplete children ' + length);
}
return {
@@ -539,3 +539,40 @@ export const parseTrackNumber = (
trackNumber,
};
};
+
+export type BlockGroupSegment = {
+ type: 'block-group-segment';
+ children: MatroskaSegment[];
+};
+
+export const parseBlockGroupSegment = (
+ iterator: BufferIterator,
+ length: number,
+): BlockGroupSegment => {
+ const children = expectChildren(iterator, length, [], null);
+ if (children.status === 'incomplete') {
+ throw new Error('Incomplete boxes are not allowed');
+ }
+
+ return {
+ type: 'block-group-segment',
+ children: children.segments as MatroskaSegment[],
+ };
+};
+
+export type BlockElement = {
+ type: 'block-element-segment';
+ length: number;
+};
+
+export const parseBlockElementSegment = (
+ iterator: BufferIterator,
+ length: number,
+): BlockElement => {
+ iterator.discard(length);
+
+ return {
+ type: 'block-element-segment',
+ length,
+ };
+};
diff --git a/packages/media-parser/src/buffer-iterator.ts b/packages/media-parser/src/buffer-iterator.ts
index e3b65d1eb7..5c512c19e8 100644
--- a/packages/media-parser/src/buffer-iterator.ts
+++ b/packages/media-parser/src/buffer-iterator.ts
@@ -212,6 +212,8 @@ export const getArrayBufferIterator = (
'0xe7',
'0xa3',
'0xa0',
+ '0xa1',
+ '0xfb',
];
if (knownIdsWithOneLength.includes(firstOneString)) {
return firstOneString;
@@ -234,6 +236,10 @@ export const getArrayBufferIterator = (
'0x63a2',
'0x73a4',
'0x7373',
+ '0x75a1',
+ '0x53ab',
+ '0x56aa',
+ '0x56bb',
];
const firstTwoString = `${firstOneString}${Array.from(
diff --git a/packages/media-parser/src/test/matroska.test.ts b/packages/media-parser/src/test/matroska.test.ts
index b34fe25b7f..4d4a08e15a 100644
--- a/packages/media-parser/src/test/matroska.test.ts
+++ b/packages/media-parser/src/test/matroska.test.ts
@@ -21,7 +21,6 @@ test('Should get duration of AV1 video', async () => {
width: 1920,
height: 1080,
});
- await Bun.write('parsed.json', JSON.stringify(parsed, null, 2));
expect(parsed.boxes).toEqual([
{
type: 'main-segment',
@@ -32,18 +31,62 @@ test('Should get duration of AV1 video', async () => {
children: [
{
type: 'seek-segment',
- seekId: '0x53ab8415',
- child: {
- id: '0x49a96653',
- type: 'unknown-segment',
- },
+ children: [
+ {
+ type: 'seek-id-segment',
+ seekId: '0x1549a966',
+ },
+ {
+ type: 'seek-position-segment',
+ seekPosition: 161,
+ },
+ ],
},
{
- id: '0x054cc1ec',
- type: 'unknown-segment',
+ children: [
+ {
+ seekId: '0x1654ae6b',
+ type: 'seek-id-segment',
+ },
+ {
+ seekPosition: 214,
+ type: 'seek-position-segment',
+ },
+ ],
+ type: 'seek-segment',
+ },
+ {
+ children: [
+ {
+ seekId: '0x1254c367',
+ type: 'seek-id-segment',
+ },
+ {
+ seekPosition: 322,
+ type: 'seek-position-segment',
+ },
+ ],
+ type: 'seek-segment',
+ },
+ {
+ children: [
+ {
+ seekId: '0x1c53bb6b',
+ type: 'seek-id-segment',
+ },
+ {
+ seekPosition: 347329,
+ type: 'seek-position-segment',
+ },
+ ],
+ type: 'seek-segment',
},
],
},
+ {
+ type: 'void-segment',
+ length: 88,
+ },
{
type: 'info-segment',
length: 48,
diff --git a/packages/media-parser/src/test/stream-local.test.ts b/packages/media-parser/src/test/stream-local.test.ts
index 6a88a08675..2adbfbc14e 100644
--- a/packages/media-parser/src/test/stream-local.test.ts
+++ b/packages/media-parser/src/test/stream-local.test.ts
@@ -76,8 +76,6 @@ test('Should stream AV1 with no duration', async () => {
reader: nodeReader,
});
- await Bun.write('av1.json', JSON.stringify(parsed.boxes, null, 2));
-
expect(parsed.durationInSeconds).toBe(1);
expect(parsed.fps).toBe(null);
expect(parsed.dimensions).toEqual({