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.

Offline DASH `StreamKey` mismatch between `DownloadHelper` and `DashMediaSource`

See original GitHub issue

I’ve noticed that there is a mismatch between the track groups advertised by DownloadHelper, and those advertised by DashMediaSource.

Consider a single-period DASH VOD stream with the following tracks, as advertised by DownloadHelper:

  • Period 0
    • TrackGroup 0: video tracks (6 representations)
    • TrackGroup 1: application/cea-708 (embedded)
    • TrackGroup 2: audio/eac3 (1 representation)
    • TrackGroup 3: audio/mp4-latm (1 representation)
    • TrackGroup 4: text/vtt (1 representation)
    • TrackGroup 5: application/x-emsg (embedded)

Track groups at index 1 and 5 are embedded in the video segments.

In this example, let’s suppose we would like to download:

  • the highest bitrate video track (StreamKey(0,0,1))
  • the MP4 audio track (StreamKey(0,3,0))

When ExoPlayer re-parses the manifest to get the segments to download, it is unaware of the embedded CEA-708 and SCTE track groups, so the DashMediaSource looks like this:

  • Period 0
    • TrackGroup 0: video tracks (6 representations)
    • TrackGroup 1: audio/eac3 (1 representation)
    • TrackGroup 2: audio/mp4-latm (1 representation)
    • TrackGroup 3: text/vtt (1 representation)

…so the copied manifest (persisting only provided StreamKeys) contains the wrong tracks, in this example, using our previously selected StreamKeys, the WebVTT track not MP4 Audio track will be downloaded, resulting in a silent playback (but at least you get subtitles I guess!).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ojw28commented, Sep 9, 2021

Closing this on the assumption it’s an app issue as described, but please let us know if not. Doing so here is fine as long as the issue isn’t locked (it doesn’t matter that it’s closed; we can re-open it if needed).

We updated the StreamKey documentation to try and make it a little clearer in the commit referenced above.

0reactions
benlancastercommented, Oct 7, 2021

Is there another way to allow tracks from MappingTrackSelector.MappedTrackInfo.unmappedTrackGroups to be downloaded?

If the track ends up in unmappedTrackGroups then that implies that it’s not playable, assuming you’re using equivalent RenderersFactorys for downloading and playback, which we’d expect to be the case. So I think my question would be: Why would you want to do this 😃? I suspect that you may have a somewhat unusual use case.

Thumbnails (for thumbnail scrubbing)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Offline playback still requires online connection #4512 - GitHub
So we have the logic to do the offline playback...but when i go ... FLAG_BLOCK_ON_CACHE); DashMediaSource mediaSource = new DashMediaSource.
Read more >
TrackSelector | Android Developers
The component of an ExoPlayer responsible for selecting tracks to be consumed by each of the player's Renderer s.
Read more >
Index (ExoPlayer library)
Method in class com.google.android.exoplayer2.offline.DownloadHelper. Convenience method to add selections of tracks for all specified audio languages.
Read more >
Viewing online file analysis results for 'apka.apk'
(Lcom/google/android/exoplayer2/offline/DownloadHelper;)V ... com/google/android/exoplayer2/source/dash/DashMediaSource$Factory.
Read more >
FAQ - DownloadHelper - Video download browser extension
You are on a Mac and you watch a HLS or DASH video with QuickTime. ... or Video DownloadHelper really only downloaded the...
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