Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Question about format selection: DASH video only #8017
Comments
|
|
|
I didn't realize filters work with |
|
This is all covered in format selection. |
|
I read that, but somehow missed the |
|
@zmwangx : I had the very same objective, I had stated it to myself like this: The result must be a MP4 container -- for optimal Apple device compatibility plus for the usage of @dstftw : Thanks for your command line! This is real insider knowledge, thanks. The documentation section on https://github.com/rg3/youtube-dl/#format-selection currently does not mention the possibility to use the extension filter. I had attempted a lot of trial and error. Lucky to now know of this possibility. Nevertheless your command line can still not achieve to automatically get the maximum possible quality according to my criteria as stated in the beginning. In some examples the combined A/V file contains a better MP4 stream (higher resolution and bitrate) than the best MP4 DASH file, but nevertheless the DASH variation is chosen over it, or vice versa. I have conducted intense testing and preliminary (possibly confusing) protocols, which I can provide if you are interested (maybe also contains false assumptions as I don't know the inner workings of youtube-dl), but I simply hand you over my "troublemaker test set" (a subset of PL5117944B5ABF7038 ) and you will realize yourself most likely:
Then try to lookup |
Sorry, nevermind, I didn't see ids on the command line (because it's long). |
|
Example: A4qgxzqG40Q The A/V file has the same resolution but a higher bitrate, nevertheless DASH is chosen. |
|
Example: fRO_Z38KhyY The MP4 A/V file has a higher resolution AND a higher bitrate, nevertheless MP4 DASH is chosen. |
This is working as "expected" ( |
|
@jaimeMF I hope that one day youtube-dl will be able to really choose the best video stream or audio stream regardless wether contained in a single stream (DASH file) or multi stream container (muxed A/V file). |
I was considering a one-stop configuration for downloading YouTube videos for native playback on iOS, which means I need the highest quality H.264+AAC, so I need to select the highest quality
mp4video (usually DASH) plus the highest qualitym4aaudio.bestvideois no good since it could easily be VP9 in WebM these days.mp4also doesn't work in most cases, since 720p non-DASH all-in-one stream is preferred (see example at the bottom).Currently I'm hard coding format codes
which works but is certainly not ideal.
Therefore, my question is: Is it possible to filter out non-DASH streams? I glanced at how selectors and especially filters are built in
YoutubeDl.py, but there seems to be nothing about DASH. Even filtering out certain format ids doesn't seem to be possible. If I'm right that this is indeed not possible right now, I'll convert this to a feature request: either add anidfilter (so that we can possibly write[id > 22]), or better yet, a possibly boolean filter specifically for DASH.Example of
mp4selecting 720p non-DASH (22):