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
+2 -2
View File
@@ -27,8 +27,8 @@ if (videoTrack) {
await videoTrack.getRotation(); // in degrees clockwise
// Estimate frame rate (FPS)
const packetStats = await videoTrack.computePacketStats(100);
const averageFrameRate = packetStats.averagePacketRate;
const frameRateMetrics = await videoTrack.computeFrameRateMetrics();
const frameRate = frameRateMetrics.bestGuessFrameRate;
}
// Extract audio metadata