I am trying to use DASH using ExoPlayer in android,
I need to get url for mpd file.
Can I get URL for .mpd file for any YouTube video?
How to find URL .mpd file for a particular YouTube video ?
As I commented out, you could use the python library extract-youtube-mpd for that. But it requires python and Linux.
Through it's code, I've found these are the steps it follows plus extra ones if you like to create your own automation/extension:
1) Right click in page and select to show page's source code
2) search the HTML file (the one that will be shown) for "dashmpd"
3) extract the text within quotes, as in (e.g.): "dashmpd":"https://manifest.googlevideo.com/api/manifest/dash/ ... "_
4) replace "/" for "/" if needed (i.e. if not using regex). This will give you a source for a XML file
5) parse the XML, through periods, adaptation sets and representation settings (this is when it gets complicated)
Since I'm also in the need for this, I'll probably release a node module for this.. Will update here
来源:https://stackoverflow.com/questions/43843237/how-to-get-mpd-file-for-a-youtube-video