Add computeFrameRateMetrics and heuristics to determine a video's true frame rate

This commit is contained in:
Vanilagy
2026-08-12 16:10:28 +02:00
parent a08e262dfc
commit dc068a0aa8
7 changed files with 660 additions and 16 deletions
+1 -7
View File
@@ -18,13 +18,7 @@
});
const track = await input.getPrimaryVideoTrack();
const packetSink = new Mediabunny.EncodedPacketSink(track);
const first = await packetSink.getFirstPacket({ verifyKeyPackets: true });
const second = await packetSink.getNextPacket(first, { verifyKeyPackets: true });
const third = await packetSink.getNextPacket(second, { verifyKeyPackets: true });
const fourth = await packetSink.getNextPacket(third, { verifyKeyPackets: true });
console.log(first, second, third, fourth);
console.log(await track.computeFrameRateMetrics());
/*