Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Given a MPEG DASH .mpd URL, is that possible to down all media segments through youtube_dl?

Tags:

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?

like image 636
Drake Guan Avatar asked Aug 06 '15 03:08

Drake Guan


People also ask

How do I play a .MPD file?

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.

How do I view a .MPD file?

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.

Does VLC support DASH?

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.

What is MPD video?

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.


1 Answers

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.

like image 85
iuridiniz Avatar answered Oct 13 '22 15:10

iuridiniz