2024-10-30, 10:17 AM
(2024-10-29, 10:45 PM)gnattu Wrote: > The problem is that if the reported bitrate of 32710kbit is used for the transcoding decision, then it's going to be the wrong choice for streaming this particular film.
Not quite because networking also does not work the same way you think it is and I highly doubt your stalling is caused by those peaks because the avg could be way higher if the peak is that high. I really, really think it is that your ISP might doing some sort of QoS so that sustained upload is limited. You can verify that by just generating an 80Mbit constant bitrate video and see if that still stalls.
The video contains 5285 chunks, the number of chunks of very high bitrate would of course raise the average-bit rate. But if I set my client max bandwidth to 40Mbit/sec, then there are 640 chunks that will exceed that bandwidth and those are the chunks that will cause the stream to stall:
>>> len(list(filter(lambda x: x > 90000.0, data['bitrate_per_chunk'])))
5
>>> len(list(filter(lambda x: x > 80000.0, data['bitrate_per_chunk'])))
25
>>> len(list(filter(lambda x: x > 70000.0, data['bitrate_per_chunk'])))
58
>>> len(list(filter(lambda x: x > 60000.0, data['bitrate_per_chunk'])))
103
>>> len(list(filter(lambda x: x > 50000.0, data['bitrate_per_chunk'])))
234
>>> len(list(filter(lambda x: x > 40000.0, data['bitrate_per_chunk'])))
640
>>> len(list(filter(lambda x: x > 32000.0, data['bitrate_per_chunk'])))
1575
>>> len(list(filter(lambda x: x < 32000.0, data['bitrate_per_chunk'])))
3710
>>> len(list(filter(lambda x: x < 20000.0, data['bitrate_per_chunk'])))
1397
>>> len(list(filter(lambda x: x < 10000.0, data['bitrate_per_chunk'])))
344