Add support for all audio codecs in the ISOBMFF muxer (& some fixes)

This commit is contained in:
Vanilagy
2025-01-05 13:50:50 +01:00
parent 316e16211b
commit ee81e1b674
10 changed files with 560 additions and 155 deletions
+6 -2
View File
@@ -212,7 +212,11 @@ const computeSampleStats = async (drain: EncodedVideoSampleDrain | EncodedAudioS
return {
sampleCount,
averageSampleRate: sampleCount ? Math.fround(sampleCount / (endTimestamp - startTimestamp)) : 0,
averageBitrate: sampleCount ? Math.fround(8 * totalSampleBytes / (endTimestamp - startTimestamp)) : 0,
averageSampleRate: sampleCount
? Number((sampleCount / (endTimestamp - startTimestamp)).toPrecision(16))
: 0,
averageBitrate: sampleCount
? Number((8 * totalSampleBytes / (endTimestamp - startTimestamp)).toPrecision(16))
: 0,
};
};