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.
Youtube 4K support #2400
Youtube 4K support #2400
Comments
|
Concisely: It does, however, seem odd that the correctly identified 1080p (format code 137) is not considered higher-quality than 720p, by default. Related issue? |
|
I think youtube-dl chose the 720p because there is no single-file 1080p, only 1080p DASH, which would require muxing to produce a playable file. Since most users aren't likely to have a muxer on their systems, this seems like reasonable behavior, though automatically detecting a usable muxer and fetching the two DASH formats would be a nice feature. I'll put in a pull request to get the format descriptions changed, though automatic handling of DASH formats having better quality will probably have to be tackled by someone a bit more familiar with the code. |
|
|
|
AGSPhoenix, I'm confused about what you're saying. The file mentioned in the OP downloads as a single file, by default, for me when using -f138. If the muxing is required, it's not requiring me to do anything. |
|
All the DASH Video formats contain only video - no audio. The audio is in a separate file, specifically format 140. To use the DASH video formats, youtube-dl has to download both the video and audio files, then use a separate program (ffmpeg or avconv) to 'mux' the two files together into a single file that any video player can handle. If you tell youtube-dl to download format 138, you'll get a complete file you can play, but there will be no audio. |
|
Oh, I see. It makes perfect sense then that it should not be the default. Thank you for explaining. |
|
Actually supporting automation of downloading a&v separately and muxing them would be very nice. https://gist.github.com/ckorn/7284075 There actually is fork of this script with better ffmpeg compatibility: https://gist.github.com/lwr/7b1e57ea5540d8b1af55 What would be more optimal? Incorporating this feature into core youtube-dl or trying to fully automate what shell-script does by actually parsing |
|
In the last versions of youtube-dl you can run |
|
Why isn't -f bestvideo+bestaudio done by default, at least for 4K videos? Is there a shorter switch for this combo? |
|
It's something that has been on the list for a while, but requires a lot of As for a default, I suspect you could add that to your config file, though
|
|
@AGSPhoenix - I don't like the idea of automagically detecting things on user's system. When you get error thrown in your face, you either install ffmpeg or decide to use Silent fails are bad. Just compare what PHP does when something goes wrong to what Python does. But! This can be done better. So what I always do is:
It would be nice, if youtube-dl could do that algorithm internally. For people who like silent fails and fallbacks, made a commandline option to do that. Just not make it default, please. |
|
@Xender, it's just not reasonable to fail out and make the user specifically allow the downloading of low er quality content just because they don't have a very niche tool installed. If you personally prefer this behavior, you can add the equivalent of More gracefully handling the availability of higher quality formats is something that has been planned for a while, and implementing a warning message when the user isn't getting the highest quality is something we've idly considered, but no one has expressed an interest in it, so it hasn't been done. If you think that would be a step in the right direction, I might take a crack at it, as I've been looking for an excuse to get back into coding in my spare time. |
|
@AGSPhoenix - How is FFmpeg more niche than youtube-dl? Also, maybe silent-fallbacking on Windows makes sense, but if I don't have ffmpeg installed on my Linux station, I just type one command, go for tea, and bam, it's installed. |
|
ffmpeg is probably less niche than youtube-dl, but the overlap isn't necessarily that large. I'd be shocked if more than half of the youtube-dl userbase had it installed. Outright breaking downloads for the rest of them would crush our support resources. There are already issues on the tracker that go weeks without a response, and even with well worded and clear instructions on how to proceed, we'd still be flooded with people who can't be bothered to read. Again, we have a configuration file for users who prefer to change the default behavior, and I'd encourage you to use it. Also, if you think about the bare command you run ( If you still think the majority of the userbase would be benefited by this change, hop on IRC and discuss it with the project runners, and if they're willing to try it, do up a pull request. |
|
@AGSPhoenix - If you are bothered with users of CLI program who cannot read, then making it a warning is acceptable minimum. And again, how can ffmpeg/libav be niche, when it's a required dependency for Linux video players? |
|
@Xender, I didn't have much time to double check, but based on a cursory examination of Ubuntu's package repository (which unfortunately only has avconv), it doesn't seem like there are many packages that actually depend on libav-tools (the package that contains avconv). Though the same might not be true for other distros, I would assume any reasonable media player would depend on the actual software libraries and not a command line transcoder to do their work. Keep in mind that I don't have much of a final say in the matter. If you really want this, open a new issue or bug one of the real devs and see what they think about it. |
|
+1 for 4K default. I’m having to do the |
|
@vjk2005 note that you can add |
|
@jaimeMF that’s a nifty trick, will try it out. Thanks. |
|
I'll just say this, from the user perspective, you should automatically:
Thanks for your great work |
|
@jleaders this is already there for more than 2 years. Bother to read FAQ before posting. |
I wanted to download a 4k youtube video:
http://www.youtube.com/watch?v=hHKJ5eE7I1k
By default, youtube-dl only downloads the 1280x720 version:
youtube-dl -F http://www.youtube.com/watch?v=hHKJ5eE7I1k
[info] Available formats for hHKJ5eE7I1k:
format code extension resolution note
140 m4a audio only DASH audio , audio@128k (worst)
160 mp4 192p DASH video
133 mp4 240p DASH video
134 mp4 360p DASH video
135 mp4 480p DASH video
136 mp4 720p DASH video
137 mp4 1080p DASH video
264 mp4 1080p DASH video
138 mp4 >1080p DASH video
17 3gp 176x144
36 3gp 320x240
5 flv 400x240
43 webm 640x360
18 mp4 640x360
22 mp4 1280x720 (best)
I managed to get it to download the 4k version by doing this:
youtube-dl -f 138 http://www.youtube.com/watch?v=hHKJ5eE7I1k
But maybe it would be nice if you could find the 4k by default or have some easier command line prompt?