Skip to content

Error with MPD initialization chunk #1287

@topolog

Description

@topolog

I'm having an error in the demo app when I try to play a dash content. I have been able to run the example, with the Widevine Dash. The error I get is:

com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 416
at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:263)
at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:145)
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:438)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:213)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:145)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)

Doing some debug, I find out that is trying to get an invalid range from the following URL:
{base_url}/media/dash/SD/video/3/init.mp4,

The MPD file is similar to the examples, but it has an initialization url and a segment url:

<SegmentTemplate initialization="video/3/init.mp4" media="video/3/seg-$Number$.m4f" startNumber="0" timescale="24">

The problem is that instead of download the initialization chunk, and then download each chunk, it's trying to download everything from the initialization chunk using the "Range" header, with an invalid range (for example 600-98000 when the file size is less than that), giving a HTTP 416 error in the connection request.

Is there something I'm missing?

Thanks!.

MPD File:
sd.mpd.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions