mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
Add computeFrameRateMetrics and heuristics to determine a video's true frame rate
This commit is contained in:
+1
-7
@@ -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());
|
||||
|
||||
/*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user