Download only a single DASH representation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
We have an app that streams DASH/Widevine content. The app also allows for downloading of the content for the user to view offline. I have been tasked with either increasing the download speed and/or decreasing the time taken for a download to complete.
I have noticed that when we download the content, all chunks from all representations inside the adaptationSet's in the dash manifest are obtained.
<AdaptationSet id="3" group="2" contentType="video" par="16:9" minBandwidth="196124" maxBandwidth="3192361" maxWidth="1280" maxHeight="720" segmentAlignment="true" sar="1:1" frameRate="25" mimeType="video/mp4" startWithSAP="1">
<!-- ContentProtection / Role / SegmentTemplate sections removed for brevity -->
<Representation id="video=196124" bandwidth="196124" width="512" height="288" codecs="avc1.4D401F" scanType="progressive">
</Representation>
<Representation id="video=368039" bandwidth="368039" width="512" height="288" codecs="avc1.4D401F" scanType="progressive">
</Representation>
<Representation id="video=417021" bandwidth="417021" width="512" height="288" codecs="avc1.4D401F" scanType="progressive">
</Representation>
<Representation id="video=1011188" bandwidth="1011188" width="896" height="504" codecs="avc1.4D401F" scanType="progressive">
</Representation>
<Representation id="video=1548849" bandwidth="1548849" width="896" height="504" codecs="avc1.4D401F" scanType="progressive">
</Representation>
<Representation id="video=3192361" bandwidth="3192361" width="1280" height="720" codecs="avc1.4D4028" scanType="progressive">
</Representation>
</AdaptationSet>
This doesn't happen when the content is streamed online, as the player only fetches the representation it needs for playback - these may change during playback, but that's irrelelvant for this question.
Is there a way in which I can configure exoplayer to only get the highest supported representation for the device at the time of download? I've tried to configure the track selector parameters with what I believe should do what I'm asking but this didn't seem to have any effect, as all the listed representation chunks were again downloaded.
trackSelector.getParameters.buildUpon()
.setAllowMultipleAdaptiveSelections(false)
.setForceHighestSupportedBitrate(true)
.build()
Is this possible?
Are there other places I should look?
Is there other terminology used in the exoplayer library that I should be using for this task?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.