I'm looking for a MPEG DASH downloader and youtube_dl just hit on me.
Given a .mpd URL, is that possible to use youtube_dl to download all media segments then?
0+ can play that kind of file from a url, just open VLC, use the shortcut CTRL+N, paste the url and enjoy. Show activity on this post. A DASH player plays an MPD by selecting a Period, and in the Period one or more AdaptationSet, and then one Representation per AdaptationSet.
mpd files can be opened by Microsoft Windows users with the Microsoft Project 2010 software and the K-SOL Project Reader application. The Microsoft project program has two packages, namely Project Professional and Project Standard.
The VLC Player was the first media player to implement the MPEG-DASH support (that was in 2011). Since then, it has been updated to today's version of the standard.
A media presentation description (MPD) file is used to hold the information on the various streams and the bandwidths they are associated with. In your video source (src) attribute you point to the MPD instead of to the media file as you would with non-adaptive media.
To download all video and audio segments and mux them into a single file, call youtube-dl
thus:
youtube-dl -f bestvideo+bestaudio http://URL/TO/manifest.mpd
The option -f <id1>[,<id2>]...
is used to select which stream (or streams) of segments to save. The -f bestvideo+bestaudio
in this example makes youtube-dl save only the best video and audio streams. See format selection syntax for details and more advanced format selectors. In order to discover the available streams, use youtube-dl -F http://URL/TO/manifest.mpd
.
In order to mux (merge) video and audio streams into a single file, you must have FFmpeg or libav installed in your system. Otherwise, youtube-dl will produce a separate file for each stream (in my example, one for audio and one for video).
Without explicit format selection, the default is -f bestvideo+bestaudio/best
. Youtube-dl will automatically select the best video and audio, and if there are no separate video-only or audio-only streams, the best stream that contains both video and audio is selected.
youtube-dl http://URL/TO/manifest.mpd
This default is used since version 2015.04.26. Before that (or if -o -
is specified, making youtube-dl write output to stdout), the default was -f best
, ignoring the video-only and audio-only streams. You may want to specify -f best
explicitly when separate video and audio have worse quality than a stream that has both.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With