Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support xlinks in DASH manifests #1574

Open
berti opened this issue Jun 6, 2016 · 18 comments
Open

Support xlinks in DASH manifests #1574

berti opened this issue Jun 6, 2016 · 18 comments

Comments

@berti
Copy link

berti commented Jun 6, 2016

I was experiencing errors while trying to play the examples in http://dash.edgesuite.net/dash264/TestCases/5c/nomor/. After some debugging I realized that most of the MPD files in that location use xlinks to load parts of the content. However, the XML parser was not fetching these links. Therefore some periods were missing, and as a result the parsing was missing information.

Setting xmlParserFactory.setNamespaceAware(true); in the constructor of MediaPresentationDescriptionParser fixes this, i.e. the xlinks are fetched and the whole MPD is parsed properly.

However, this also leads to a failure in MediaPresentationDescriptionParserTest. This test parses an MPD file which has a yt:earliestMediaSequence attribute with no namespace declaration. I guess the correct namespace would be xmlns:yt="http://www.youtube.com/xml/schemas/2015" (the test passes with this), but I cannot be sure.

I'm using the latest from master (632a270).

To reproduce this problem, you can modify the Samples class of the ExoPlayer demo app to load one of the problematic files:

public static final Sample[] NEW_DASH = new Sample[] {
  new Sample("Big Buck Bunny - With xlinks", "http://dash.edgesuite.net/dash264/TestCases/5c/nomor/4_1a.mpd", Util.TYPE_DASH),
  new Sample("Big Buck Bunny - No xlinks", "http://dash.edgesuite.net/dash264/TestCases/5c/nomor/4_1f.mpd", Util.TYPE_DASH)
};

This is the error I got when playing the first video (with xlink attributes):

06-06 13:10:02.600 32404-32404/com.google.android.exoplayer.demo E/EventLogger: internalError [0.11, rendererInitError]
    com.google.android.exoplayer.ParserException: Unable to determine start of period 2
        at com.google.android.exoplayer.dash.mpd.MediaPresentationDescriptionParser.parseMediaPresentationDescription(MediaPresentationDescriptionParser.java:146)
        at com.google.android.exoplayer.dash.mpd.MediaPresentationDescriptionParser.parse(MediaPresentationDescriptionParser.java:102)
        at com.google.android.exoplayer.dash.mpd.MediaPresentationDescriptionParser.parse(MediaPresentationDescriptionParser.java:57)
        at com.google.android.exoplayer.upstream.UriLoadable.load(UriLoadable.java:93)
        at com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:209)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
        at java.util.concurrent.FutureTask.run(FutureTask.java:234)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
        at java.lang.Thread.run(Thread.java:864)

That file has three Period elements. The second one is empty with a xlinks attribute. The third one (period 2) is the one that makes the parsing fail, due to the missing values in the previous period.

This error should be independent of the device. I've tried with a Nexus 5X with Android 6.0.1, and a HTC One with Android 4.2.2.

@ojw28
Copy link
Contributor

ojw28 commented Jun 6, 2016

Setting xmlParserFactory.setNamespaceAware(true); in the constructor of MediaPresentationDescriptionParser fixes this, i.e. the xlinks are fetched and the whole MPD is parsed properly.

I don't think this is true. There's no logic anywhere in ExoPlayer for fetching xlinks; it's not functionality that we currently support.

@ojw28 ojw28 changed the title Xlinks are ignored when parsing MPD files Support xlinks in DASH manifests Jun 6, 2016
@berti
Copy link
Author

berti commented Jun 6, 2016

I'm sorry, you're absolutely right. I was testing with a local copy of the test case in which I had replaced the xlink with the proper contents, and I forgot I had changed that.

@ojw28
Copy link
Contributor

ojw28 commented Jun 6, 2016

Cool :). I'm not sure whether we'll be implementing xlink support any time soon, by the way. It seems preferable that the server side should inline the proper content, rather than pushing (a) complexity, and (b) extra request round trips, onto the client.

@kevleyski
Copy link

Hi Olly, I’m planning to use xlinks for dynamic live dash ad replacement, can you please let me know where things are at vs period and representation substitution?

@ojw28
Copy link
Contributor

ojw28 commented Jul 5, 2018

We do not support xlinks and have no immediate (i.e. 2018) plans to do so.

@kevleyski
Copy link

kevleyski commented Jul 5, 2018 via email

@manjusha221
Copy link

Hi Oliver, Does Exoplayer dev-v2-r2.10.3 have support for xlinks in Dash?

@ojw28
Copy link
Contributor

ojw28 commented Jul 25, 2019

Does Exoplayer dev-v2-r2.10.3 have support for xlinks in Dash?

No. As an aside, the details of how xlinks work seems like a topic that's a source of confusion. The concept of loading part of the manifest from somewhere else seems simple enough, but when you look at the details there are quite a lot of weird cases, like this (@mediaPresentationDuration doesn't make sense with xlinks), this (id uniqueness unclear with xlinks) and this (manifest transformations when live events end unclear with xlinks).

@ronak2121
Copy link

ronak2121 commented Jul 24, 2021

Hi @ojw28 and @kevleyski the recent DASH specifications also reference xlink in order to do dynamic ad pod resolution. Since I haven't heard anything on my above issue since March, is it fair to say Exoplayer will never support the latest DASH specifications? (i.e. we cannot expect Exoplayer to implement it in the next 2 years)

and if not....is there a way to build this support on top of Exoplayer ourselves, by overriding your parsers and networking components?

@kevleyski
Copy link

It's unlikely

Some other mainstream players such as Roku will also never support

@ronak2121
Copy link

ronak2121 commented Jul 25, 2021

That’s fine for me. I only need support on ShakaPlayer and Exoplayer to field this for me (audio ads). Do you have any pointers on where to start to look into overriding the dash parsers, timing model and networking components to implement this ourselves?

is that what you’ve done as your plan B? @kevleyski?

@ronak2121
Copy link

@kevleyski ?

@kevleyski
Copy link

Plan b was lots of presentation offset manipulation
I've moved on from interstitial support for now so not looking at this right now, but it's likely to come back on my plate :-)
Anyhow nothing to add today

@Gheri
Copy link

Gheri commented Dec 6, 2021

Hey Team,
Is MPD Chaining supported in exo player ??
Generally what we have been doing to implement Static Pre roll in exo player for DASH ??
Any examples / references ??
Thanks,
Gheri.

@ojw28 ojw28 assigned tonihei and unassigned ojw28 Jul 5, 2022
@ronak2121
Copy link

ronak2121 commented Jul 7, 2022

@tonihei is there any timeline on your end when this would be delivered? This is the first update in close to a year...if not, do you have any pointers on how we could implement it on our own and contribute it back to Exoplayer?

@tonihei
Copy link
Collaborator

tonihei commented Jul 7, 2022

No immediate plan to implement this I'm afraid. We were just reassigning issues.

@ronak2121
Copy link

ronak2121 commented Jul 7, 2022

@tonihei Do you have any pointers on implementing this ourselves? I’ll be more than happy with contributing that support back to you guys.

@ronak2121
Copy link

Getting off of IMA SDK is one of our main goals this year. It’s causing lots of issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants