gpac / mp4box.js

JavaScript version of GPAC's MP4Box tool
https://gpac.github.io/mp4box.js/
BSD 3-Clause "New" or "Revised" License
1.89k stars 318 forks source link

"kbps" should be 1000 bits per second, not 1024 bits per second #382

Open duckware opened 5 months ago

duckware commented 5 months ago

I was using https://gpac.github.io/mp4box.js/test/filereader.html -- and comparing what mp4box.js reports vs another MP4 analyzer, the bitrates are slightly off. As soon as I multiplied mp4box.js numbers by "1024/1000", I got the correct numbers.

To convert bits to kbps divide by 1000 (do not divide by 1024). 1024 would be correct for the amount of memory (KB), but in data communications, network speeds are based on "1000".

Original Ethernet is 10,000,000 bits/sec, or 10,000 kbps, or 10 Mbps. It is NOT 9765.625 kbps (as mp4box.js would say).