When requesting HLS Levels (hls.levels) I'm getting this JSON (extract only):
"height": 240, // 1st level
"bitrate": 655336, // 1st level
"height": 360, // 2nd level
"bitrate": 1283444, // 2nd level
"height": 600, // 3rd
"bitrate": 1864521,
"height": 720, // 4th
"bitrate": 2703471,
"height": 1080, // 5th
"bitrate": 5295051
However, these bitrates are in the 100,000s. However, when I use services such as:
https://streamfrogs.com/bitrate-calculator
They suggest bitrate figures in the 1000s - e.g. 1638 kbps, 3686 kbps, etc
Why is there such a discrepancy? Are the bitrate figures given by hls.js given in a different unit of measurement? How do I convert? TIA
OPTIONAL: For those interested, the reason I want to convert is because we are supporting 2 players - flow player and native player with hls.js (don't ask why its my bosses decision) - flow player videos are the ones giving the extracted figures quoted above - however, we need to create our own videos for hls.js using ffmpeg and I want to match the HLS videos we are creating as close as possible to the flow player bitrates. The bitrates we are currently using for our own videos are quoted below. Given that in the future we may (or may not) drop flow player, I cannot rely solely on the flow player videos. Thanks again.
const qualities = [
{ height: 240, appleBitrate16x9: null, twitchBitrate4x3: 230, calcBitrate4x3: 182 }, // calcBitrate4x3 high 346
{ height: 360, appleBitrate16x9: 365, twitchBitrate4x3: 518, calcBitrate4x3: 410 }, // calcBitrate4x3 high 778
{ height: 540, appleBitrate16x9: 2000, twitchBitrate4x3: 1166, calcBitrate4x3: 921 }, // calcBitrate4x3 high 1750
{ height: 720, appleBitrate16x9: 3000, twitchBitrate4x3: 2074, calcBitrate4x3: 1638 },
{ height: 720, appleBitrate16x9: 4500, twitchBitrate4x3: 2074, calcBitrate4x3: 3110 },
{ height: 1080, appleBitrate16x9: 6000, twitchBitrate4x3: 4666, calcBitrate4x3: 3686 },
{ height: 1080, appleBitrate16x9: 7800, twitchBitrate4x3: 4666, calcBitrate4x3: 6998 }
]