question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use actual chunk bitrate instead of average in ABR decisions to improve performance for VBR streams.

See original GitHub issue

Hi,

In our experience ExoPlayer does not use lower bitrate even there is latency in downloading big chunks and this causes freezing and buffering. However the bandwith is 6 Mbit, because of VBR sometimes the size of one 2 second chunk differs from 1.5 MegeByte to 15 MegaByte. In our experience when there is increase in bitrate the player still tries to download next chunk using same bitrate instead of lowering bitrate. What is causing this problem. Is there a way or configuration to fix this?

Trace Screenshot

image

Our MPD

<?xml version="1.0" encoding="UTF-8"?> <MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" xmlns:mspr="urn:microsoft:playready" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" minimumUpdatePeriod="PT500S" suggestedPresentationDelay="PT2S" availabilityStartTime="2020-09-09T00:10:16Z" publishTime="2021-01-23T17:28:55Z" minBufferTime="PT4.0S" timeShiftBufferDepth="PT86400.0S"> <ProgramInformation /> <Period id="0" start="PT0.0S"> <AdaptationSet id="0" contentType="video" segmentAlignment="true" bitstreamSwitching="true" maxFrameRate="50/1"> <Representation id="0" mimeType="video/mp4" codecs="avc1.4d4015" bandwidth="800000" width="480" height="270" frameRate="25/1"> <SegmentTemplate timescale="12800" duration="25600" initialization="ExtAst1599610204_init_$RepresentationID$.m4i?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" media="ExtAst1599610204_chunk_20200909T001000_$RepresentationID$_$Number$.m4v?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" startNumber="1" /> </Representation> <Representation id="1" mimeType="video/mp4" codecs="avc1.4d401e" bandwidth="1400000" width="704" height="396" frameRate="25/1"> <SegmentTemplate timescale="12800" duration="25600" initialization="ExtAst1599610204_init_$RepresentationID$.m4i?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" media="ExtAst1599610204_chunk_20200909T001000_$RepresentationID$_$Number$.m4v?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" startNumber="1" /> </Representation> <Representation id="2" mimeType="video/mp4" codecs="avc1.4d401f" bandwidth="2000000" width="960" height="540" frameRate="25/1"> <SegmentTemplate timescale="12800" duration="25600" initialization="ExtAst1599610204_init_$RepresentationID$.m4i?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" media="ExtAst1599610204_chunk_20200909T001000_$RepresentationID$_$Number$.m4v?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" startNumber="1" /> </Representation> <Representation id="3" mimeType="video/mp4" codecs="avc1.4d4020" bandwidth="3150000" width="1280" height="720" frameRate="50/1"> <SegmentTemplate timescale="12800" duration="25600" initialization="ExtAst1599610204_init_$RepresentationID$.m4i?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" media="ExtAst1599610204_chunk_20200909T001000_$RepresentationID$_$Number$.m4v?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" startNumber="1" /> </Representation> <Representation id="4" mimeType="video/mp4" codecs="avc1.4d402a" bandwidth="6000000" width="1920" height="1080" frameRate="50/1"> <SegmentTemplate timescale="12800" duration="25600" initialization="ExtAst1599610204_init_$RepresentationID$.m4i?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" media="ExtAst1599610204_chunk_20200909T001000_$RepresentationID$_$Number$.m4v?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" startNumber="1" /> </Representation> <Representation id="5" mimeType="video/mp4" codecs="avc1.4d400d" bandwidth="400000" width="416" height="234" frameRate="25/1"> <SegmentTemplate timescale="12800" duration="25600" initialization="ExtAst1599610204_init_$RepresentationID$.m4i?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" media="ExtAst1599610204_chunk_20200909T001000_$RepresentationID$_$Number$.m4v?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" startNumber="1" /> </Representation> <Representation id="6" mimeType="video/mp4" codecs="avc1.4d400d" bandwidth="200000" width="416" height="234" frameRate="25/1"> <SegmentTemplate timescale="12800" duration="25600" initialization="ExtAst1599610204_init_$RepresentationID$.m4i?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" media="ExtAst1599610204_chunk_20200909T001000_$RepresentationID$_$Number$.m4v?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" startNumber="1" /> </Representation> </AdaptationSet> <AdaptationSet id="1" contentType="audio" segmentAlignment="true" bitstreamSwitching="true" lang="tur"> <Representation id="8" mimeType="audio/mp4" codecs="mp4a.40.5" bandwidth="128000" audioSamplingRate="48000"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" /> <SegmentTemplate timescale="48000" duration="96000" initialization="ExtAst1599610204_init_$RepresentationID$.m4i?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" media="ExtAst1599610204_chunk_20200909T001000_$RepresentationID$_$Number$.m4a?hw_dash=1&amp;servicetype=1&amp;rrsip=izmottrrs.tvplus.com.tr:443&amp;zoneoffset=0&amp;devkbps=190-7000&amp;accounttype=1&amp;limitflux=-1&amp;limitdur=-1&amp;tenantId=9001&amp;validdev=5499,5270&amp;vqe=3&amp;mount=1000001&amp;targetdev=5387&amp;pbf=2_2_2_2331729884" startNumber="1" /> </Representation> </AdaptationSet> </Period> <UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-iso:2014" value="https://time.akamai.com/?iso" /> </MPD>

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tanhancommented, Jan 26, 2021

I am not sure latency is the problem. Because making the connections is fast however downloading the big chunks takes some time. How is the download speed is calculated in this case?

I am trying to understand why is the player insisting on downloading big chunks on same high profile instead of lowering bitrate on this experience which causes an empty buffer as a result. Can high VBR cause this problem?

0reactions
toniheicommented, Jul 25, 2022

I think we should turn this into a low-priority enhancement. If I understand the issue correctly, our ABR algorithm works with the average bitrate when making decisions and may run into problems if the actual chunk bitrate is much higher.

Note that all the information about the actual bitrate of potential future and past chunks is already available in the queue and mediaChunkIterators parameters of updateSelectedTrack, so it’s possible to adjust the logic by overriding AdaptiveTrackSelection or providing a completely custom track selection class.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ABR Streaming of VBR-encoded Videos
Using the average bitrate of W chunks (instead of the bitrate of chunk i) leads to smoother bandwidth requirement from the chunks, avoiding...
Read more >
Adaptive Bitrate Streaming Over Cellular Networks - arXiv
The first approach is Chunk-Based Filtering (CBF), which can be retrofitted to any existing ABR scheme.
Read more >
ABR streaming of VBR-encoded videos - ResearchGate
Adaptive Bitrate (ABR) video streaming is widely used for over-the-top (OTT) ... To improve the performance of adaptive video streaming, ...
Read more >
Adaptive Bitrate Streaming: What it Is and How ABR Works
Buffering means the video player cannot download the video file fast enough to keep the video playing at normal speed. That is what...
Read more >
Exploiting the layer correlation to improve DASH scheduling ...
However, nearly all researches to date assume that the average bitrate information manifested in the MPD file reflects the real video chunk size ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found