@remotion/media-parser 4.0.332 → 4.0.333
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/dist/containers/iso-base-media/base-media-box.d.ts +2 -1
- package/dist/containers/iso-base-media/get-video-codec-from-iso-track.d.ts +1 -1
- package/dist/containers/iso-base-media/get-video-codec-from-iso-track.js +3 -0
- package/dist/containers/iso-base-media/mdat/calculate-jump-marks.js +19 -26
- package/dist/containers/iso-base-media/process-box.js +21 -14
- package/dist/containers/iso-base-media/stsd/samples.js +2 -0
- package/dist/containers/iso-base-media/stsd/vpcc.d.ts +19 -0
- package/dist/containers/iso-base-media/stsd/vpcc.js +42 -0
- package/dist/containers/mp3/parse-packet-header.js +1 -4
- package/dist/containers/wav/parse-wav.js +1 -1
- package/dist/esm/index.mjs +108 -47
- package/dist/esm/worker-server-entry.mjs +107 -46
- package/dist/esm/worker-web-entry.mjs +107 -46
- package/dist/get-sample-aspect-ratio.d.ts +2 -0
- package/dist/get-sample-aspect-ratio.js +13 -1
- package/dist/get-video-codec.js +6 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
|
@@ -1228,6 +1228,17 @@ var getAvccBox = (trakBox) => {
|
|
|
1228
1228
|
}
|
|
1229
1229
|
return avccBox;
|
|
1230
1230
|
};
|
|
1231
|
+
var getVpccBox = (trakBox) => {
|
|
1232
|
+
const videoConfig = getStsdVideoConfig(trakBox);
|
|
1233
|
+
if (!videoConfig) {
|
|
1234
|
+
return null;
|
|
1235
|
+
}
|
|
1236
|
+
const vpccBox = videoConfig.descriptors.find((c) => c.type === "vpcc-box");
|
|
1237
|
+
if (!vpccBox || vpccBox.type !== "vpcc-box") {
|
|
1238
|
+
return null;
|
|
1239
|
+
}
|
|
1240
|
+
return vpccBox;
|
|
1241
|
+
};
|
|
1231
1242
|
var getAv1CBox = (trakBox) => {
|
|
1232
1243
|
const videoConfig = getStsdVideoConfig(trakBox);
|
|
1233
1244
|
if (!videoConfig) {
|
|
@@ -3053,21 +3064,25 @@ var getIsoBmColrConfig = (trakBox) => {
|
|
|
3053
3064
|
var getVideoCodecString = (trakBox) => {
|
|
3054
3065
|
const videoSample = getStsdVideoConfig(trakBox);
|
|
3055
3066
|
const avccBox = getAvccBox(trakBox);
|
|
3056
|
-
const hvccBox = getHvccBox(trakBox);
|
|
3057
|
-
const av1cBox = getAv1CBox(trakBox);
|
|
3058
3067
|
if (!videoSample) {
|
|
3059
3068
|
return null;
|
|
3060
3069
|
}
|
|
3061
3070
|
if (avccBox) {
|
|
3062
3071
|
return `${videoSample.format}.${avccBox.configurationString}`;
|
|
3063
3072
|
}
|
|
3073
|
+
const hvccBox = getHvccBox(trakBox);
|
|
3064
3074
|
if (hvccBox) {
|
|
3065
3075
|
return `${videoSample.format}.${hvccBox.configurationString}`;
|
|
3066
3076
|
}
|
|
3077
|
+
const av1cBox = getAv1CBox(trakBox);
|
|
3067
3078
|
if (av1cBox) {
|
|
3068
3079
|
const colrAtom = getColrBox(videoSample);
|
|
3069
3080
|
return parseAv1PrivateData(av1cBox.privateData, colrAtom);
|
|
3070
3081
|
}
|
|
3082
|
+
const vpccBox = getVpccBox(trakBox);
|
|
3083
|
+
if (vpccBox) {
|
|
3084
|
+
return `${videoSample.format}.${vpccBox.codecString}`;
|
|
3085
|
+
}
|
|
3071
3086
|
return videoSample.format;
|
|
3072
3087
|
};
|
|
3073
3088
|
|
|
@@ -3287,6 +3302,9 @@ var getVideoCodecFromIsoTrak = (trakBox) => {
|
|
|
3287
3302
|
if (videoSample.format === "av01") {
|
|
3288
3303
|
return "av1";
|
|
3289
3304
|
}
|
|
3305
|
+
if (videoSample.format === "vp09") {
|
|
3306
|
+
return "vp9";
|
|
3307
|
+
}
|
|
3290
3308
|
if (videoSample.format === "ap4h") {
|
|
3291
3309
|
return "prores";
|
|
3292
3310
|
}
|
|
@@ -10551,7 +10569,9 @@ var videoTags = [
|
|
|
10551
10569
|
"hvc1",
|
|
10552
10570
|
"hev1",
|
|
10553
10571
|
"ap4h",
|
|
10554
|
-
"av01"
|
|
10572
|
+
"av01",
|
|
10573
|
+
"vp08",
|
|
10574
|
+
"vp09"
|
|
10555
10575
|
];
|
|
10556
10576
|
var audioTags = [
|
|
10557
10577
|
0,
|
|
@@ -10950,6 +10970,53 @@ var parseStts = ({
|
|
|
10950
10970
|
};
|
|
10951
10971
|
};
|
|
10952
10972
|
|
|
10973
|
+
// src/containers/iso-base-media/stsd/vpcc.ts
|
|
10974
|
+
var getvp09ConfigurationString = ({
|
|
10975
|
+
profile,
|
|
10976
|
+
level,
|
|
10977
|
+
bitDepth: bitDepth2
|
|
10978
|
+
}) => {
|
|
10979
|
+
return `${String(profile).padStart(2, "0")}.${String(level).padStart(2, "0")}.${String(bitDepth2).padStart(2, "0")}`;
|
|
10980
|
+
};
|
|
10981
|
+
var parseVpcc = ({
|
|
10982
|
+
data,
|
|
10983
|
+
size
|
|
10984
|
+
}) => {
|
|
10985
|
+
const box = data.startBox(size - 8);
|
|
10986
|
+
const confVersion = data.getUint8();
|
|
10987
|
+
if (confVersion !== 1) {
|
|
10988
|
+
throw new Error(`Unsupported AVCC version ${confVersion}`);
|
|
10989
|
+
}
|
|
10990
|
+
data.discard(3);
|
|
10991
|
+
const profile = data.getUint8();
|
|
10992
|
+
const level = data.getUint8();
|
|
10993
|
+
data.startReadingBits();
|
|
10994
|
+
const bitDepth2 = data.getBits(4);
|
|
10995
|
+
const chromaSubsampling = data.getBits(3);
|
|
10996
|
+
const videoFullRangeFlag = data.getBits(1);
|
|
10997
|
+
const videoColorPrimaries = data.getBits(8);
|
|
10998
|
+
const videoTransferCharacteristics = data.getBits(8);
|
|
10999
|
+
const videoMatrixCoefficients = data.getBits(8);
|
|
11000
|
+
data.stopReadingBits();
|
|
11001
|
+
const codecInitializationDataSize = data.getUint16();
|
|
11002
|
+
const codecInitializationData = data.getSlice(codecInitializationDataSize);
|
|
11003
|
+
box.expectNoMoreBytes();
|
|
11004
|
+
return {
|
|
11005
|
+
type: "vpcc-box",
|
|
11006
|
+
profile,
|
|
11007
|
+
level,
|
|
11008
|
+
bitDepth: bitDepth2,
|
|
11009
|
+
chromaSubsampling,
|
|
11010
|
+
videoFullRangeFlag,
|
|
11011
|
+
videoColorPrimaries,
|
|
11012
|
+
videoTransferCharacteristics,
|
|
11013
|
+
videoMatrixCoefficients,
|
|
11014
|
+
codecInitializationDataSize,
|
|
11015
|
+
codecInitializationData,
|
|
11016
|
+
codecString: getvp09ConfigurationString({ profile, level, bitDepth: bitDepth2 })
|
|
11017
|
+
};
|
|
11018
|
+
};
|
|
11019
|
+
|
|
10953
11020
|
// src/containers/iso-base-media/tfdt.ts
|
|
10954
11021
|
var parseTfdt = ({
|
|
10955
11022
|
iterator,
|
|
@@ -11277,7 +11344,7 @@ var processBox = async ({
|
|
|
11277
11344
|
if (boxType === "stsz") {
|
|
11278
11345
|
return {
|
|
11279
11346
|
type: "box",
|
|
11280
|
-
box:
|
|
11347
|
+
box: parseStsz({
|
|
11281
11348
|
iterator,
|
|
11282
11349
|
offset: fileOffset,
|
|
11283
11350
|
size: boxSize
|
|
@@ -11287,7 +11354,7 @@ var processBox = async ({
|
|
|
11287
11354
|
if (boxType === "stco" || boxType === "co64") {
|
|
11288
11355
|
return {
|
|
11289
11356
|
type: "box",
|
|
11290
|
-
box:
|
|
11357
|
+
box: parseStco({
|
|
11291
11358
|
iterator,
|
|
11292
11359
|
offset: fileOffset,
|
|
11293
11360
|
size: boxSize,
|
|
@@ -11298,7 +11365,7 @@ var processBox = async ({
|
|
|
11298
11365
|
if (boxType === "pasp") {
|
|
11299
11366
|
return {
|
|
11300
11367
|
type: "box",
|
|
11301
|
-
box:
|
|
11368
|
+
box: parsePasp({
|
|
11302
11369
|
iterator,
|
|
11303
11370
|
offset: fileOffset,
|
|
11304
11371
|
size: boxSize
|
|
@@ -11308,7 +11375,7 @@ var processBox = async ({
|
|
|
11308
11375
|
if (boxType === "stss") {
|
|
11309
11376
|
return {
|
|
11310
11377
|
type: "box",
|
|
11311
|
-
box:
|
|
11378
|
+
box: parseStss({
|
|
11312
11379
|
iterator,
|
|
11313
11380
|
offset: fileOffset,
|
|
11314
11381
|
boxSize
|
|
@@ -11318,7 +11385,7 @@ var processBox = async ({
|
|
|
11318
11385
|
if (boxType === "ctts") {
|
|
11319
11386
|
return {
|
|
11320
11387
|
type: "box",
|
|
11321
|
-
box:
|
|
11388
|
+
box: parseCtts({
|
|
11322
11389
|
iterator,
|
|
11323
11390
|
offset: fileOffset,
|
|
11324
11391
|
size: boxSize
|
|
@@ -11328,7 +11395,7 @@ var processBox = async ({
|
|
|
11328
11395
|
if (boxType === "stsc") {
|
|
11329
11396
|
return {
|
|
11330
11397
|
type: "box",
|
|
11331
|
-
box:
|
|
11398
|
+
box: parseStsc({
|
|
11332
11399
|
iterator,
|
|
11333
11400
|
offset: fileOffset,
|
|
11334
11401
|
size: boxSize
|
|
@@ -11447,7 +11514,7 @@ var processBox = async ({
|
|
|
11447
11514
|
if (boxType === "stts") {
|
|
11448
11515
|
return {
|
|
11449
11516
|
type: "box",
|
|
11450
|
-
box:
|
|
11517
|
+
box: parseStts({
|
|
11451
11518
|
data: iterator,
|
|
11452
11519
|
size: boxSize,
|
|
11453
11520
|
fileOffset
|
|
@@ -11457,16 +11524,22 @@ var processBox = async ({
|
|
|
11457
11524
|
if (boxType === "avcC") {
|
|
11458
11525
|
return {
|
|
11459
11526
|
type: "box",
|
|
11460
|
-
box:
|
|
11527
|
+
box: parseAvcc({
|
|
11461
11528
|
data: iterator,
|
|
11462
11529
|
size: boxSize
|
|
11463
11530
|
})
|
|
11464
11531
|
};
|
|
11465
11532
|
}
|
|
11533
|
+
if (boxType === "vpcC") {
|
|
11534
|
+
return {
|
|
11535
|
+
type: "box",
|
|
11536
|
+
box: parseVpcc({ data: iterator, size: boxSize })
|
|
11537
|
+
};
|
|
11538
|
+
}
|
|
11466
11539
|
if (boxType === "av1C") {
|
|
11467
11540
|
return {
|
|
11468
11541
|
type: "box",
|
|
11469
|
-
box:
|
|
11542
|
+
box: parseAv1C({
|
|
11470
11543
|
data: iterator,
|
|
11471
11544
|
size: boxSize
|
|
11472
11545
|
})
|
|
@@ -11475,7 +11548,7 @@ var processBox = async ({
|
|
|
11475
11548
|
if (boxType === "hvcC") {
|
|
11476
11549
|
return {
|
|
11477
11550
|
type: "box",
|
|
11478
|
-
box:
|
|
11551
|
+
box: parseHvcc({
|
|
11479
11552
|
data: iterator,
|
|
11480
11553
|
size: boxSize,
|
|
11481
11554
|
offset: fileOffset
|
|
@@ -11485,7 +11558,7 @@ var processBox = async ({
|
|
|
11485
11558
|
if (boxType === "tfhd") {
|
|
11486
11559
|
return {
|
|
11487
11560
|
type: "box",
|
|
11488
|
-
box:
|
|
11561
|
+
box: getTfhd({
|
|
11489
11562
|
iterator,
|
|
11490
11563
|
offset: fileOffset,
|
|
11491
11564
|
size: boxSize
|
|
@@ -11495,7 +11568,7 @@ var processBox = async ({
|
|
|
11495
11568
|
if (boxType === "mdhd") {
|
|
11496
11569
|
return {
|
|
11497
11570
|
type: "box",
|
|
11498
|
-
box:
|
|
11571
|
+
box: parseMdhd({
|
|
11499
11572
|
data: iterator,
|
|
11500
11573
|
size: boxSize,
|
|
11501
11574
|
fileOffset
|
|
@@ -11505,7 +11578,7 @@ var processBox = async ({
|
|
|
11505
11578
|
if (boxType === "esds") {
|
|
11506
11579
|
return {
|
|
11507
11580
|
type: "box",
|
|
11508
|
-
box:
|
|
11581
|
+
box: parseEsds({
|
|
11509
11582
|
data: iterator,
|
|
11510
11583
|
size: boxSize,
|
|
11511
11584
|
fileOffset
|
|
@@ -11515,7 +11588,7 @@ var processBox = async ({
|
|
|
11515
11588
|
if (boxType === "trex") {
|
|
11516
11589
|
return {
|
|
11517
11590
|
type: "box",
|
|
11518
|
-
box:
|
|
11591
|
+
box: parseTrex({ iterator, offset: fileOffset, size: boxSize })
|
|
11519
11592
|
};
|
|
11520
11593
|
}
|
|
11521
11594
|
if (boxType === "moof") {
|
|
@@ -11668,6 +11741,13 @@ var findBestJump = ({
|
|
|
11668
11741
|
const minProgress = Math.min(...Object.values(progresses));
|
|
11669
11742
|
const trackNumberWithLowestProgress = Object.entries(progresses).find(([, progress]) => progress === minProgress)?.[0];
|
|
11670
11743
|
const firstSampleAboveMinProgress = offsetsSorted.findIndex((offset) => sampleMap.get(offset).track.trackId === Number(trackNumberWithLowestProgress) && !visited.has(getKey(sampleMap.get(offset))));
|
|
11744
|
+
if (firstSampleAboveMinProgress === -1) {
|
|
11745
|
+
const backup = offsetsSorted.findIndex((offset) => !visited.has(getKey(sampleMap.get(offset))));
|
|
11746
|
+
if (backup === -1) {
|
|
11747
|
+
throw new Error("this should not happen");
|
|
11748
|
+
}
|
|
11749
|
+
return backup;
|
|
11750
|
+
}
|
|
11671
11751
|
return firstSampleAboveMinProgress;
|
|
11672
11752
|
};
|
|
11673
11753
|
var calculateJumpMarks = ({
|
|
@@ -11683,12 +11763,10 @@ var calculateJumpMarks = ({
|
|
|
11683
11763
|
const jumpMarks = [];
|
|
11684
11764
|
let indexToVisit = 0;
|
|
11685
11765
|
const visited = new Set;
|
|
11686
|
-
let rollOverToProcess = false;
|
|
11687
11766
|
const increaseIndex = () => {
|
|
11688
11767
|
indexToVisit++;
|
|
11689
11768
|
if (indexToVisit >= offsetsSorted.length) {
|
|
11690
|
-
|
|
11691
|
-
indexToVisit = 0;
|
|
11769
|
+
throw new Error("should not roll over, should jump");
|
|
11692
11770
|
}
|
|
11693
11771
|
};
|
|
11694
11772
|
let lastVisitedSample = null;
|
|
@@ -11702,6 +11780,10 @@ var calculateJumpMarks = ({
|
|
|
11702
11780
|
afterSampleWithOffset: lastVisitedSample.samplePosition.offset,
|
|
11703
11781
|
jumpToOffset: offsetsSorted[firstSampleAboveMinProgress]
|
|
11704
11782
|
};
|
|
11783
|
+
if (firstSampleAboveMinProgress === offsetsSorted.indexOf(lastVisitedSample.samplePosition.offset) + 1) {
|
|
11784
|
+
indexToVisit = firstSampleAboveMinProgress;
|
|
11785
|
+
return;
|
|
11786
|
+
}
|
|
11705
11787
|
indexToVisit = firstSampleAboveMinProgress;
|
|
11706
11788
|
jumpMarks.push(jumpMark);
|
|
11707
11789
|
};
|
|
@@ -11721,17 +11803,7 @@ var calculateJumpMarks = ({
|
|
|
11721
11803
|
visited,
|
|
11722
11804
|
progresses
|
|
11723
11805
|
});
|
|
11724
|
-
|
|
11725
|
-
addJumpMark({ firstSampleAboveMinProgress });
|
|
11726
|
-
indexToVisit = firstSampleAboveMinProgress;
|
|
11727
|
-
} else {
|
|
11728
|
-
while (true) {
|
|
11729
|
-
increaseIndex();
|
|
11730
|
-
if (!visited.has(getKey(sampleMap.get(offsetsSorted[indexToVisit])))) {
|
|
11731
|
-
break;
|
|
11732
|
-
}
|
|
11733
|
-
}
|
|
11734
|
-
}
|
|
11806
|
+
addJumpMark({ firstSampleAboveMinProgress });
|
|
11735
11807
|
};
|
|
11736
11808
|
while (true) {
|
|
11737
11809
|
const currentSamplePosition = sampleMap.get(offsetsSorted[indexToVisit]);
|
|
@@ -11741,16 +11813,6 @@ var calculateJumpMarks = ({
|
|
|
11741
11813
|
continue;
|
|
11742
11814
|
}
|
|
11743
11815
|
visited.add(sampleKey);
|
|
11744
|
-
if (rollOverToProcess) {
|
|
11745
|
-
if (!lastVisitedSample) {
|
|
11746
|
-
throw new Error("no last visited sample");
|
|
11747
|
-
}
|
|
11748
|
-
jumpMarks.push({
|
|
11749
|
-
afterSampleWithOffset: lastVisitedSample.samplePosition.offset,
|
|
11750
|
-
jumpToOffset: currentSamplePosition.samplePosition.offset
|
|
11751
|
-
});
|
|
11752
|
-
rollOverToProcess = false;
|
|
11753
|
-
}
|
|
11754
11816
|
lastVisitedSample = currentSamplePosition;
|
|
11755
11817
|
if (visited.size === offsetsSorted.length) {
|
|
11756
11818
|
addFinalJumpIfNecessary();
|
|
@@ -11768,6 +11830,8 @@ var calculateJumpMarks = ({
|
|
|
11768
11830
|
}
|
|
11769
11831
|
if (spread > MAX_SPREAD_IN_SECONDS) {
|
|
11770
11832
|
considerJump();
|
|
11833
|
+
} else if (indexToVisit === offsetsSorted.length - 1) {
|
|
11834
|
+
considerJump();
|
|
11771
11835
|
} else {
|
|
11772
11836
|
increaseIndex();
|
|
11773
11837
|
}
|
|
@@ -13016,10 +13080,7 @@ var innerParseMp3PacketHeader = (iterator) => {
|
|
|
13016
13080
|
throw new Error("Expected Layer I, II or III");
|
|
13017
13081
|
}
|
|
13018
13082
|
const layer = layerBits === 3 ? 1 : layerBits === 2 ? 2 : 3;
|
|
13019
|
-
|
|
13020
|
-
if (protectionBit !== 1) {
|
|
13021
|
-
throw new Error("Does not support CRC yet");
|
|
13022
|
-
}
|
|
13083
|
+
iterator.getBits(1);
|
|
13023
13084
|
const bitrateIndex = iterator.getBits(4);
|
|
13024
13085
|
const bitrateInKbit = getBitrateKB({
|
|
13025
13086
|
bits: bitrateIndex,
|
|
@@ -15123,7 +15184,7 @@ var parseWav = (state) => {
|
|
|
15123
15184
|
if (type === "id3") {
|
|
15124
15185
|
return parseId32({ state });
|
|
15125
15186
|
}
|
|
15126
|
-
if (type === "junk" || type === "fllr") {
|
|
15187
|
+
if (type === "junk" || type === "fllr" || type === "bext") {
|
|
15127
15188
|
return parseJunk({ state });
|
|
15128
15189
|
}
|
|
15129
15190
|
if (type === "fact") {
|
|
@@ -4,6 +4,7 @@ import type { ColorParameterBox } from './containers/iso-base-media/stsd/colr';
|
|
|
4
4
|
import type { HvccBox } from './containers/iso-base-media/stsd/hvcc';
|
|
5
5
|
import type { PaspBox } from './containers/iso-base-media/stsd/pasp';
|
|
6
6
|
import type { VideoSample } from './containers/iso-base-media/stsd/samples';
|
|
7
|
+
import type { VpccBox } from './containers/iso-base-media/stsd/vpcc';
|
|
7
8
|
import type { TkhdBox } from './containers/iso-base-media/tkhd';
|
|
8
9
|
import type { TrakBox } from './containers/iso-base-media/trak/trak';
|
|
9
10
|
import type { MediaParserDimensions } from './get-dimensions';
|
|
@@ -13,6 +14,7 @@ type AspectRatio = {
|
|
|
13
14
|
};
|
|
14
15
|
export declare const getStsdVideoConfig: (trakBox: TrakBox) => VideoSample | null;
|
|
15
16
|
export declare const getAvccBox: (trakBox: TrakBox) => AvccBox | null;
|
|
17
|
+
export declare const getVpccBox: (trakBox: TrakBox) => VpccBox | null;
|
|
16
18
|
export declare const getAv1CBox: (trakBox: TrakBox) => Av1CBox | null;
|
|
17
19
|
export declare const getPaspBox: (trakBox: TrakBox) => PaspBox | null;
|
|
18
20
|
export declare const getHvccBox: (trakBox: TrakBox) => HvccBox | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDisplayAspectRatio = exports.applyAspectRatios = exports.applyTkhdBox = exports.getColrBox = exports.getSampleAspectRatio = exports.getHvccBox = exports.getPaspBox = exports.getAv1CBox = exports.getAvccBox = exports.getStsdVideoConfig = void 0;
|
|
3
|
+
exports.getDisplayAspectRatio = exports.applyAspectRatios = exports.applyTkhdBox = exports.getColrBox = exports.getSampleAspectRatio = exports.getHvccBox = exports.getPaspBox = exports.getAv1CBox = exports.getVpccBox = exports.getAvccBox = exports.getStsdVideoConfig = void 0;
|
|
4
4
|
const traversal_1 = require("./containers/iso-base-media/traversal");
|
|
5
5
|
const getStsdVideoConfig = (trakBox) => {
|
|
6
6
|
const stsdBox = (0, traversal_1.getStsdBox)(trakBox);
|
|
@@ -26,6 +26,18 @@ const getAvccBox = (trakBox) => {
|
|
|
26
26
|
return avccBox;
|
|
27
27
|
};
|
|
28
28
|
exports.getAvccBox = getAvccBox;
|
|
29
|
+
const getVpccBox = (trakBox) => {
|
|
30
|
+
const videoConfig = (0, exports.getStsdVideoConfig)(trakBox);
|
|
31
|
+
if (!videoConfig) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const vpccBox = videoConfig.descriptors.find((c) => c.type === 'vpcc-box');
|
|
35
|
+
if (!vpccBox || vpccBox.type !== 'vpcc-box') {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return vpccBox;
|
|
39
|
+
};
|
|
40
|
+
exports.getVpccBox = getVpccBox;
|
|
29
41
|
const getAv1CBox = (trakBox) => {
|
|
30
42
|
const videoConfig = (0, exports.getStsdVideoConfig)(trakBox);
|
|
31
43
|
if (!videoConfig) {
|
package/dist/get-video-codec.js
CHANGED
|
@@ -60,21 +60,25 @@ exports.getIsoBmColrConfig = getIsoBmColrConfig;
|
|
|
60
60
|
const getVideoCodecString = (trakBox) => {
|
|
61
61
|
const videoSample = (0, get_sample_aspect_ratio_1.getStsdVideoConfig)(trakBox);
|
|
62
62
|
const avccBox = (0, get_sample_aspect_ratio_1.getAvccBox)(trakBox);
|
|
63
|
-
const hvccBox = (0, get_sample_aspect_ratio_1.getHvccBox)(trakBox);
|
|
64
|
-
const av1cBox = (0, get_sample_aspect_ratio_1.getAv1CBox)(trakBox);
|
|
65
63
|
if (!videoSample) {
|
|
66
64
|
return null;
|
|
67
65
|
}
|
|
68
66
|
if (avccBox) {
|
|
69
67
|
return `${videoSample.format}.${avccBox.configurationString}`;
|
|
70
68
|
}
|
|
69
|
+
const hvccBox = (0, get_sample_aspect_ratio_1.getHvccBox)(trakBox);
|
|
71
70
|
if (hvccBox) {
|
|
72
71
|
return `${videoSample.format}.${hvccBox.configurationString}`;
|
|
73
72
|
}
|
|
73
|
+
const av1cBox = (0, get_sample_aspect_ratio_1.getAv1CBox)(trakBox);
|
|
74
74
|
if (av1cBox) {
|
|
75
75
|
const colrAtom = (0, get_sample_aspect_ratio_1.getColrBox)(videoSample);
|
|
76
76
|
return (0, av1_codec_private_1.parseAv1PrivateData)(av1cBox.privateData, colrAtom);
|
|
77
77
|
}
|
|
78
|
+
const vpccBox = (0, get_sample_aspect_ratio_1.getVpccBox)(trakBox);
|
|
79
|
+
if (vpccBox) {
|
|
80
|
+
return `${videoSample.format}.${vpccBox.codecString}`;
|
|
81
|
+
}
|
|
78
82
|
return videoSample.format;
|
|
79
83
|
};
|
|
80
84
|
exports.getVideoCodecString = getVideoCodecString;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.
|
|
1
|
+
export declare const VERSION = "4.0.333";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/media-parser"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/media-parser",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.333",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"devDependencies": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"eslint": "9.19.0",
|
|
12
12
|
"mediabunny": "1.3.0",
|
|
13
13
|
"@types/bun": "1.2.8",
|
|
14
|
-
"@remotion/example-videos": "4.0.
|
|
15
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
14
|
+
"@remotion/example-videos": "4.0.333",
|
|
15
|
+
"@remotion/eslint-config-internal": "4.0.333"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|