mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 03:13:51 +02:00
Add support for all audio codecs in the ISOBMFF muxer (& some fixes)
This commit is contained in:
+6
-2
@@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user