The tragedy of this software (and many like it) is that despite working exactly as advertised, easily and with a lot of features, because it's a quiet open source project without any SEO rigging it will never appear in page 1 of any searches by laymen trying to download videos ("save youtube to hard drive", "download youtube videos" et al).<p>The amount of crapware I've had to remove from family member's PCs just because they wanted to save a video is ridiculous.
Nostalgia time. Even though I'm not actively involved anymore, youtube-dl has been the first OSS project I seriously contributed to, and strangers still thank me at conferences for it.<p>I owe a lot to the maintainers (hey, phihag!) for tolerating and trusting a much younger version of me :)<p>I still remember the emotion of getting this merged: <a href="https://github.com/rg3/youtube-dl/pull/342" rel="nofollow">https://github.com/rg3/youtube-dl/pull/342</a><p>It's also one of the most impressive community efforts I've seen, with just about anyone contributing support for new sites and fixing broken ones: <a href="https://github.com/rg3/youtube-dl/graphs/contributors" rel="nofollow">https://github.com/rg3/youtube-dl/graphs/contributors</a> (notice how the GH interface is limited to 100 contributors, and #100 still has 3 commits in the tree)
Some of the things that make this the 'ultimate':<p>- Supports hundreds of services, not just youtube [0]<p>- Allows you to extract audio in multiple formats<p>- Download entire playlists (and general batch support)<p>- Configure video/audio quality<p>- Extract/build metadata<p>- Cross platform<p>[0] <a href="https://rg3.github.io/youtube-dl/supportedsites.html" rel="nofollow">https://rg3.github.io/youtube-dl/supportedsites.html</a>
I've been using it for years now and it's great. Not only for Youtube videos, but also for a lot of other video hosters, up to and including TV stations such as the German ZDF or the French Arte.<p>To fully use its features you should install ffmpeg though. Youtube-dl will automatically use it if it's in the PATH, and then can download Youtube videos with higher frame rates and resolutions (they store video and audio in separate files, and ffmpeg is used to mux both together). ffmpeg is also required to download from some streaming video hosters.<p>For me it's essentially:<p><pre><code> youtube-dl -F '<url>'
</code></pre>
to get the list of available video and audio formats, followed by<p><pre><code> youtube-dl -f <video format>+<audio format> '<url>'
</code></pre>
and then wait for the download to complete. And<p><pre><code> youtube-dl -U
</code></pre>
to self-update youtube-dl (because it gets updated just about every day).
Here's something i've added to my .bashrc that lets me type in simply 'play <some song name>' using youtube-dl and mplayer (I forget where I found this gem, and sorry for weird formatting, won):<p><pre><code> function play {
youtube-dl --default-search=ytsearch: \
--youtube-skip-dash-manifest \
--output="${TMPDIR:-/tmp/}%(title)-s%(id)s.%(ext)s" \
--restrict-filenames \
--format="bestaudio[ext!=webm]" \
--exec=mplayer -vvv "$*"
}
</code></pre>
play rick astley never gonna give you up
I'm in China and streaming youtube videos is mostly out of the question, due to the very unpredictable and usually too slow nature of connectivity (I gave up on VPN long time ago and use a number of strategically placed cheap virtual servers). Over the years, youtube-dl has been a godsend. I ssh into one of my servers, download the video and then rsync it over to my laptop. Most of the time I don't really need to have the video stored locally - if I was at home I'd just stream it again - but for some niche applications like mine it's next to nothing. The buffering built in to youtube itself too often just stops or throws me into 'an error has occurred'.
Another great thing about youtube-dl is its integration in mpv[1]. On Windows as long as you have both mpv.exe[2] and youtube-dl.exe in the same folder you can use it to play pretty much whatever youtube-dl supports. This should also work on *nix/Mac as well just check your distro's repo's or wherever you look for stuff like that on Mac (can you tell I've not used Mac stuff ever).<p>I rather like using it for things like twitch streams since I can bypass having to use Flash and get a higher quality renderer in the process (with things like high quality scaling[3] and debanding[4]). And it goes without saying that it's nice for youtube stuff as well because of the aforementioned benefits. Basically it makes stuff look even better than if you watched it the browser, and I like that.<p>[1] <a href="https://mpv.io/" rel="nofollow">https://mpv.io/</a><p>[2] <a href="https://mpv.srsfckn.biz/" rel="nofollow">https://mpv.srsfckn.biz/</a> (official Windows builds)<p>[3] <a href="https://mpv.io/manual/master/#video-output-drivers-opengl" rel="nofollow">https://mpv.io/manual/master/#video-output-drivers-opengl</a> mpv supports ewa_lanczossharp (aka jinc) for scaling among others<p>[4] Also a huge fan of the debanding which can be left on all the time
Mostly OT: A friend of mine posted this article from his local newspaper as an example of how slow news is in his town:<p><a href="http://www.ottumwacourier.com/news/local_news/what-is-a-gif/article_c1d84944-e92a-11e5-a095-eb219cc6cd71.html" rel="nofollow">http://www.ottumwacourier.com/news/local_news/what-is-a-gif/...</a><p>> <i>What is a GIF?</i><p>> <i>OTTUMWA — Chances are if you have been on the Internet lately, you have encountered a GIF...In honor of National Teen Tech Week, the Ottumwa Public Library offered a session on GIF making for local teens Saturday afternoon.</i><p>OK, not a traditional article topic for a newspaper, but the library described seems to be very much on the ball, teaching teens how to use youtube-dl to download movies:<p>> <i>He walked each of the teens through the steps required for making GIFs by using movie trailers found on YouTube. He then had the kids copy the web address and use the program youtube-dl to download the video. OPL also provided flash drives for each person so they could access the program at home.</i>
Note that it is against YouTube's ToS to download videos:
<a href="https://www.youtube.com/static?template=terms" rel="nofollow">https://www.youtube.com/static?template=terms</a><p>"You may access Content for your information and personal use solely as intended through the provided functionality of the Service and as permitted under these Terms of Service. You shall not download any Content unless you see a “download” or similar link displayed by YouTube on the Service for that Content."
The work-horse. If the author/maintainers are here, thanks a lot. With an old laptop I need mpv/mplayer to be able to play videos without overheating. youtube-dl is my youtube backend, one of the most used commands on my terminal.
This is a great project. I have been using it for more than 4 years and it has never disappointed me ever. It picks up from the interrupted download, can convert in any format you prefer and get only audio out if you will.<p>Great work guys! Thanks for creating such an awesome piece of software.
Note that mpv integrates well with youtube-dl. With an "open with" like addon it's relly handy especially on sites that are still stuck on flash.
youtube-dl is great. It belongs to a class of software, that could not exists without a place like github (or any platform, that makes it easy to contribute). Many developers (here: 403) sharing the burden of keeping the scrapers up-to-date, which would be a dull and mind-numbing task for a single person or small group of people.<p>Other wonderful projects in this category would be homebrew[1], wiki*, OSM, ...
Nothing but positive experiences with youtube-dl, invaluable piece of software IMO.<p>For people interested in tools like this, or for people who want to just watch videos without downloading, I would also recommend Livestreamer. I use it to watch Crunchyroll streams, and I avoid all the strange issues that come up with their terrible player. No more skipping to random sections of the episode.
<a href="https://github.com/chrippa/livestreamer" rel="nofollow">https://github.com/chrippa/livestreamer</a>
I actually made a small script to download offline youtube videos using youtube-dl.<p><a href="https://github.com/corradio/watchlater" rel="nofollow">https://github.com/corradio/watchlater</a>
<a href="https://oliviercorradi.wordpress.com/2013/11/19/3/" rel="nofollow">https://oliviercorradi.wordpress.com/2013/11/19/3/</a>
Download mp3 with the maximum possible quality.<p>$ youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 --output "%(title)s.%(ext)s" <URL>
Huge props to the team working on this.<p>I once maintained something similar in Ruby (<a href="https://github.com/rb2k/viddl-rb" rel="nofollow">https://github.com/rb2k/viddl-rb</a>), and the amount of changes necessary just to keep a hand full of plugins up-to-date is crazy.
I use vlctube <a href="https://greasyfork.org/en/scripts/1783-vlctube" rel="nofollow">https://greasyfork.org/en/scripts/1783-vlctube</a> to not only download youtube videos but to also use vlc as default player, there is a huge performance boost, I no longer hear my cpu fan when playing a youtube video.
It would be nice if there was a "shadow" version of youtube on bittorrent. So instead of using youtube-dl, you could just pull the file from bittorrent. Besides this being faster in most cases, it would also mean that a big part of our cultural heritage is no longer locked inside google's silo.
There's an app called Free Download Manager which has this feature. I suspect it may be using youtube-dl under the hood, since the functionality looks similar (with a GUI, of course). The app allows you to copy/paste youtube urls and it parses the page for available downloads (audio and video). I use it regularly for putting technical talks onto my phone to watch or listen to on my commute.<p>The app is very easy to use, and one of the few I would recommend to a non-technical person for the features it has.<p>I know the name makes it sound like spyware, but it's the most lightweight tool I've found for both this and the occasional torrent.<p><a href="http://www.freedownloadmanager.org/" rel="nofollow">http://www.freedownloadmanager.org/</a>
The only thing that irritates me about youtube-dl is that by default it will try download audio and video tracks separately and then remux them on your computer. While it's a cool feature, I don't think this is what most people want 99% of the time.
Here is a script I use to download a lot of videos in a queue with it:
<a href="https://github.com/kissgyorgy/interactive-youtube-dl" rel="nofollow">https://github.com/kissgyorgy/interactive-youtube-dl</a>
User for >4 years. Absolutely love the nifty little tool. But I hated opening up a terminal each time I wanted to initiate a download.<p>For PopClip[1] users on Mac, I made a little YouTube-dl extension[2] which lets you initiate the download just by selecting the video URL (best when done from browser's address bar) and clicking a button. Been using it as my primary ytdl client for past 5 months now.<p>[1]: <a href="https://pilotmoon.com/popclip/" rel="nofollow">https://pilotmoon.com/popclip/</a><p>[2]: <a href="https://github.com/k4rtik/popclip-ytdl" rel="nofollow">https://github.com/k4rtik/popclip-ytdl</a>
I've used this tool a ton of times and it is a standard install on my multimedia fetching VM. I really want to take the time to allow for a Sonarr[0]-for-youtube (and other supported sites) app that uses this on the backend. For example I love CGPGrey but don't want to constantly be downloading new videos (But I do want to watch them through my Plex setup). Some channels have convenient playlists I can download (and keep downloading) but I normally want to change the naming to a convention I specificy.<p>[0] <a href="https://sonarr.tv/" rel="nofollow">https://sonarr.tv/</a>
Honest question: why would you want to download a video from YouTube? The main use case I can think of is you want to watch videos offline on a mobile device but don't want to pay for a YouTube Red subscription.
Recently, I wrote a chrome plugin that saves information of all of the songs I listen to on youtube to amazon since youtube's history API is shit. Theoretically, I could write a nightly job that runs YouTube-dl to turn all of those videos into MP3s. Taking it even further, I could run a nightly SyncMe job on my phone to copy the MP3s locally. A setup like this would be good for people with limited phone bandwidth. Imagine not having to search out MP3s anymore. Is it still considered pirating if a robot does it?
I have a sort of atavistic thing against streaming. I download things, and then I watch.<p>This is a really nifty tool, though I must say that Flashgot on Firefox does the job nicely for me, 99% of the time.
What a funny coincidence - I just discovered and used this a few hours ago. I wanted to rip some YT audio from (mostly) old records that I have that are not on Spotify etc.<p>I looked at some browser plugins but I wasn't really impressed. This, on the other hand, was a great discovery. Really configurable and well documented.<p>Assuming you have `ffmpeg` installed just run:<p>`youtube-dl --extract-audio --audio-format mp3 $URL`<p>and you're done! I expect my phone will be packed of bizarre prog/jazz before the end of the weekend :D
If you want a button built into youtube's webpages in Chrome this will do too. I believe there are other projects that do similar things but many aim at doing much more (mine is solely for the little download button which offers all the video/audio formats that youtube-dl does).<p><a href="https://github.com/bradlys/monochromatic-panda" rel="nofollow">https://github.com/bradlys/monochromatic-panda</a>
I really don't like how others profit from the work of the youtube-dl developers. The developers should build their own client-facing websites and apps.
This is a simple GUI which I made for this script: github.com/yasoob/youtube-dl-gui. I hope you guys would like it :) All bug reports are welcome.
YouTube needs a "download" button; love this code, it works like magic, but for the average user the real answer is that YouTube needs a way to download a video; otherwise, YouTube is just enabling all the 3rd party sites that exploit YouTube making it easy to "hack" a way to download the files, but hard for the average user who ends up getting malware to download the video.
previous discussion : <a href="https://news.ycombinator.com/item?id=8647943" rel="nofollow">https://news.ycombinator.com/item?id=8647943</a><p>I used this (on windows) to easily convert/resize videos i had saved earlier using a file:/// url, but this possibility has been removed since a few months because of the obvious security hole (in a linux context)
Not just YouTube, over 200 websites including daily motion, vimeo and, well were all adults here so I'm just gonna say it,pornhub. Supports authentication. And you can download with any format using -f flag. Also I'm not sure about that, but I thing you can use apt-get to download it as well.
I often use mps-youtube, which I believe is based on youtube-dl and works great to listen to music off youtube from the terminal.<p><a href="https://github.com/mps-youtube/mps-youtube" rel="nofollow">https://github.com/mps-youtube/mps-youtube</a>
I have a docker image to run it on OSX, haven't tested on Windows yet.<p><a href="https://hub.docker.com/r/ontouchstart/docker-youtube-dl/" rel="nofollow">https://hub.docker.com/r/ontouchstart/docker-youtube-dl/</a>
I made something like that over Christmas..it's pretty shit but it works to download youtube videos as mp3 :-/
<a href="http://akagetsu.com/youtube/" rel="nofollow">http://akagetsu.com/youtube/</a>
There's a web app[0] that uses youtube-dl to provide non-cli functionality. Does anyone knows if there's similar tool/lib in Go?<p>[0] <a href="http://pullz.in" rel="nofollow">http://pullz.in</a>
Not exactly related to this but I remember someone wrote a script which lets you download any song (by name, artist or some phrase from the song).<p>It uses youtube api to search the song and then download it using youtube-dl.
Been using it for a while. Great for hacks, downloading 360 VR videos, downloading all videos for a channel.<p>Was happy to see it here, it's nothing new, just a great tool, great job of surfacing it HN!
Why is this so popular last 24h? I am using it for about a year and never saw this much hype. Is there any new feature or is it just that someone rediscovered it and it went viral?
I built a gui/music downloader using this last year. Called musicBoo in case you want to check it out. Its multiplatform, having problems in deployment though (in java swing)
Initial commit is from 2008. I think title should be updated to reflect the initial year, since this is not a new project. I've been personally using this for many years.
fun fact: mpv couples youtube-dl to itself and can view youtube videos simply from the command line.<p>example:<p>mpv "<a href="https://www.youtube.com/watch?v=a3Ey4YChtEU"" rel="nofollow">https://www.youtube.com/watch?v=a3Ey4YChtEU"</a><p>(you need quotes because most shells will try to glob match)
i love youtube-dl. i've been interested in doing the same with soundcloud, but i have no idea how to go about learning how their streaming works. any advice for where to start?
what idiots. there isn't one complete example of how to use the project with a url from Youtube. Instead we have to decrypt what the hell the documentation means.
> It's a bit worrying how many people run to defend corporation profits by default.<p>Surely you are keen to make a profit yourself with your unicorn startup idea, dear unique snowflake.