YouTube-dl: Open-source YouTube downloader
rg3.github.io
rg3.github.io
The amount of crapware I've had to remove from family member's PCs just because they wanted to save a video is ridiculous.
1. Open Explorer where you downloaded youtube-dl
2. Shift+Right click -> Open command window here
3. Type 'youtube-dl <space>' and paste url[0], then enter
As I said it really is a discoverability problem, one that the organiser of the world's information is neither incentivised nor really expected to address.
[0] ok, this is a pain pre Win 10, but ^V is supported now
Just gotta remember the old "Alt-Space, E, P" shortcut sequence. And Alt-Space, E, K for selecting/copying.
Same: many people still use peer-to-peer software to download movies, mostly porn. I guess it is better now but for a long time you had to do some port forwarding -- yes, port forwarding -- on your home router to get bearable download speed. Nowadays it still seem very difficult to get the proper non English subtitles for movies, but it is very attractive so people do it despite all the "steps".
So, please, let's stop this "Family memebers are below-two-clicks stupid" mantra. It is false. The truths is: they usually do not care enough for the second click. When they do care enough, typing a command line is very feasible.
When someone else wants the user to do a task, e.g. a business wants users to install and use its software, then it's definitely better to assume that users will give up at minor annoyances or complications. Again, especially when money is involved; i.e. it should be as easy as possible for people to give you money.
Nothing has changed for me. Did I miss something ?
They want to learn email? They do.
They want to learn to use FaceBook? They do.
If they really wanted to learn to download YouTube videos (Ideally using youtube-dl), they would.
Already too complicated for my parents. I have shown my mother how to open her downloads folder for over a decade and she still can't do it. Sigh.
1. Download Python 2.7 and install. Encountered error where the installer stopped with no indication that it had completed or failed. Tried to install again and it messed up the original installer which was hiding in the background and it failed.
2. Downloaded the YouTube-dl.exe. Running it does nothing. Youtube-dl gives no instructions on how to install.
3. Reading the documentation of youtube-dl, installation instruction is just "place it in their home directory or any other location on their PATH."
4. Google about PATH variables and home directories... I wouldn't expect a nontechnical user to get past this step.
5. Add C:\Python27 to the Path variable.
6. Drop youtube-dl.exe into C:\Python27.
7. Start Powershell. Doubt a nontechnical user would know how to do this, but whatever.
8. Figure out how to format a command to youtube-dl. Reading through the documentation is kind of confusing at first, but I will just copy a command from this HN thread.
9. Paste "youtube-dl --extract-audio --audio-format mp3 dQw4w9WgXcQ" into powershell. As you mentioned yourself, something a nontechnical user would have trouble doing since control-v is disabled.
10. "ERROR: ffprobe or avprobe not found. Please install one." So Google how to install ffprobe.
11. First link links to another page, which has a long 14 step guide asking me to figure out how to install PHP before I even start, so I'm just giving up here, 30 minutes in.
Sadly I didn't even get to the "it's working but I don't know where it's saving the files to" issue.
I read this as not having to install python for it to work.
I think some powershell commands that have required arguments start interactively prompting the user for values for those arguments if they aren't specified on the command line. That would probably work:
1. Download youtube-dl.exe
2. double-click
3. youtube-dl.exe notices the lack of url as argument and prompts:
URL:
4. paste URL and hit enter
5. Progress bar of download (?)
Yes, your software's download page is part of the user experience also.
Can't comment on the rest as we have yet to get Python installed.
I chose mp3 because it's the only format my ipod accepts. The formats it downloads by default won't play, even if they might be higher quality.
Not a single family member would touch this here.
It's sad but understandable.
I'm inclined to agree with you though, except hard drive space is a lot cheaper these days, for about $10 I can have a 32 GB USB 3.0 thumb drive. Eventually the cheaper iPhone options should just carry a minimal 32GB if they decide to stop overcharging for more space. Videos and images are only going to increase in file size over the years to account for 4K adaptability, granted that might take quite a while.
My mom did teach me DOS, and programming, and a lot of other things – but these days she doesn't have that kind of patience anymore. If things don't work right away, out the window they go. For a lot of people the patience with technology decreases as they age.
Now, if my hardware fails I just call tech support, I mostly use Windows, I almost never spend more than 5 minutes configuring anything, and any program I need to compile from sources is basically a no-no except if it's something I really need or can't avoid. In fact I'm so lazy that I tend not to install games that aren't on Steam, after being spoiled by Steam anything harder than double clicking to install game in each of my PCs seems like too much work to me.
In other aspects I don't think I'm so different from 15 years ago, this laziness with technology may be the aspect where I think age has manifested the most!
It reminds me of a C64 TV ad of a student who had to drop out of college because he didn't have computer skills to be competitive (https://www.youtube.com/watch?v=jDcZeGbElnM). Somehow, it all seems relevant now, as C64 gave me a start on programming.
> Not a single family member would touch this here.
> It's sad but understandable.
I can understand why many people will avoid using commandlines. The part I don't understand is how they're quite comfortable when those commandlines are surrounded by "Forward", "Back", "Stop" and "Reload" buttons; or when they have an "I'm feeling lucky" button underneath.
In the case of this discussion, the typical user flow would be something like:
- Double click browser
- Enter special string of text "youtube.com" in URL box and hit enter
- Enter strings of text into YouTube search box to find videos
- Copy special string "https://youtube.com/watch?v=abcdefg" from URL box
- Enter another special string "google.com" in URL box and hit enter
- Enter strings of text into Google search box and hit enter
- Click SuperDuperVideoDownload link
- Paste special string "https://youtube.com/watch?v=abcdefg" into SuperDuperVideoDownload box and hit enter
Present this user with a CLI like youtube-dl, and they'll complain that they don't like the idea of copy/pasting special strings into boxes.
youtube-dl actually has quite sane defaults too; e.g. "youtube-dl https://......" will Just Work (TM). Switches are only needed for fancier stuff (e.g. "Download highest quality Free format and extract the audio track")
Are you sure you apprehend the differences between the look and feel of a browser and that of a command line?
Take, Chrome, flip it such that the input bar is on the bottom, and allow it to display console output as HTML.
Or, hell, keep it the way it is and just run the console HTML downward; why maintain the current terminal layout at all...
- Select browser icon
- Double click browser icon
- Click into search box
- Type "youtube"
- Disregard suggestions, hit enter
- Click on first thing that says YouTube
Still, the point is that it's not much different than running a commandline, e.g. something like:
- Click Gnome Do icon
- type "youtube-dl " and paste URL
- Click the "run" suggestion
- Click on Home launcher
- Watch filename until ".f123." bit disappears from the extension
not really, if you copy url of a clip in a playlist it will start downloading WHOLE playlist :(
One thing I always change from the default behaviour is video quality: by default it wastes a ton of bandwidth and disk space getting "HD" versions. I can understand why that's the default, but I don't particularly care about resolution, as it's a pretty negligible contributor to quality compared to the actual content of the video.
Some people want to download the whole playlist when passing a URL from one of the videos (because otherwise it's hard to get an URL that contains just the playlist). Some other people just want to download the video they are currently watching.
That's why we have the --no-playlist option, which you can use and even stick in the configuration file. There's also --yes-playlist to override the configuration file if you need to.
Side-benefit: force care to be taken to be explicit if used in a script.
Personally, without reading any docs the first thing I did was paste in just a video ID (i.e. not the entire URL) so it seems natural to me that including both would be ambiguous.
Introducing breaking changes like this are no longer an option once your program has more than 5 users.
In addition, well-behaved command line programs aren't supposed to gratuitously prompt for input anyway.
Let me tell you how it works now:
I've installed a download addon for them. Because they have no idea and before they install crap, I'll do it for them.
I did not explain anything nor did I tell them that I did install that addon.
They automatically clicked the red "download" icon under every youtube video they watch and it downloads the video.
So short: 1 step.
This is userfriendly and easy.
Probably not, but that doesn't really matter as it was never the intention (if it were, there's probably a better place to write it than Hacker News).
I was offering software developers a perspective which demonstrates that the GUI/CLI distinction is mostly artificial, and that a CLI doesn't automatically mean "hard to use". After all, as others have pointed out, people managed just fine on DOS back in the day (where "managed just fine" == "shouting at machine for not doing things right", just like today).
> This is userfriendly and easy.
I don't like applying the phrase "userfriendly" to a piece of software, as it depends just as much on the user.
For example, I'm a user of youtube-dl, and I find it incredibly userfriendly: when I use it in scripts, I just write "youtube-dl" followed by flags for the appropriate behaviour. In contrast, your solution sounds really unfriendly to me. First my script would need to open a browser, and since the downloader is part of an addon, I wouldn't be able to use PhantomJS like I usually would. Instead, I'd probably have to go off and learn Selenium, assuming that Selenium drivers can use browser addons? If not, I might have to write a custom XUL app (not done that in a while!), and make sure it's compatible with the addon. Does XUL even work on a headless machine (in my case, RaspberryPi with SSH access)?
So yes, it depends on the users just as well as your target group.
I'm not sure what your assumption that the difference is mostly artificial bases on since just the difference in the physical act is already overwhelming.
Are you sure that this is true? Starting many updates ago, but continuing into the present (I just updated to 2016.04.06 to be sure), I encountered a weird situation where
$ ./youtube-dl https://www.youtube.com/watch?v=wbKJt1NQtZE
fails but $ ./youtube-dl wbKJt1NQtZE
works. I have no problem with the second working, but don't understand why the first fails. It seems to be fine for other video services; only YouTube requires this URL-processing step. $ youtube-dl https://www.youtube.com/watch?v=wbKJt1NQtZE
[youtube] wbKJt1NQtZE: Downloading webpage
[youtube] wbKJt1NQtZE: Downloading video info webpage
[youtube] wbKJt1NQtZE: Extracting video information
[youtube] wbKJt1NQtZE: Downloading MPD manifest
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: True Detective - My Least Favorite Life - Lera Lynn Scene-wbKJt1NQtZE.f136.mp4
[download] 19.3% of 35.60MiB at 1.51MiB/s ETA 00:18
Seems to work for me. I always double-quote the parameter anyway (I never trust the shell to handle my strings...)I just tried `youtube-dl wbKJt1NQtZE` and that works too. I didn't know the "v" parameter could be given like that!
EDIT: Very strange; I thought I'd give a try to what seemed a throwaway comment in your post, about quoting the string, and that fixed it. Thanks!
Without the double quotes (which seemed to be unnecessary for you), I still get:
$ youtube-dl https://www.youtube.com/watch?v=wbKJt1NQtZE
Usage: youtube-dl [OPTIONS] URL [URL...]
youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.
I guess that some alias is grabbing some part of the URL string. $ echo youtube-dl https://www.youtube.com/watch\?v\=wbKJt1NQtZE
youtube-dl https://www.youtube.com/watch?v=wbKJt1NQtZE
$ echo youtube-dl https://www.youtube.com/watch?v=wbKJt1NQtZE
zsh: no matches found: https://www.youtube.com/watch?v=wbKJt1NQtZE $ bash --version
GNU bash, version 4.3.42(1)-release (x86_64-apple-darwin13.4.0)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ echo a ? = =?
a =It's a ponderous java monster but it works great and comes with a huge plugin collection for numerous sites.
The fact that it has a gui makes it really accessibly to non-technical people.
There seems to be talk about AdWare in the installer but I personally never had that problem and you can get around that by downloading the executable .jar.
If they ever did something really sinister they would be quickly out of business.
They had been complaining about how difficult it was to follow all the crazy windows popping up everywhere and never knowing which button to click. This is actually a problem for many seniors.
One day he installed Linux on a PC, booted into the console, and told them that this was "story mode". He gave them a list of commands along with mnemonics, and talked about how in "story mode" you always had a list of all the commands you typed so you always knew what you'd been doing.
Still need to uninstall Chrome from time to time though. Thanks Avast Update.
#!/bin/bash
clear
youtube-dl -U
echo " "
echo "YouTube Downloader Script"
echo "A video file will be created in the folder where this script is located"
echo " "
echo "Please paste a URL and hit [ENTER]:"
read URL
youtube-dl $URL
Edit: youtube-dl -U only works if it was manually installed, so leave that out if you installed from apt or whateverGranted you still need to know how to cut and paste
I don't know how they account for people clicking multiple links in new tabs. My guess is they reorder links sometimes so that users that click multiple links cancel each other out. They just try to maximize the probability you will click on a link and not come back to the search page.
Not saying they don't, but it seems unlikely and I'd be curious to know if this can be confirmed.
edit: with an installer ! And the application updates youtube-dl to the last version. Very nice.
As for the SEO - I haven't had any problems in the last years. First or second hit was a working webpage that gave me the downlaod url (not much options though).
Lot's of open source projects come up top of the results when you search for stuff because of this fact.
You have tell Google what your site is about, otherwise it's pretty hopeless; you're pretty much well asking Google to guess what terms the site should rank for.
The five-minute-basics this site needs are to create a meaningful title tag (getting "YouTube Downloader" in there would be a great start. With zero research, maybe even "YouTube Downloader - Save Videos for Later"), create a friendly meta description that'll tell people what it's about in the search result pages, and use an H1 where it's currently using a TD with "subtitle" class.
It wouldn't hurt to also have a short bullet-point list of uses cases, just to get related search terms - e.g. "save youtube to my computer" - that the big G can use to direct users to the site.
>Lot's of open source projects come up top of the results when you search for stuff because of this fact.
The problem is so bad, I know lots of people - myself included - who hunt for projects first on Github, and Google a distant second.
Google is capable of some quite incredible things; using mind-reading to find out the important parts of a project or what it relates to, sadly, isn't one of their core strengths.
> The problem is so bad, I know lots of people - myself
> included - who hunt for projects first on Github, and
> Google a distant second.
Seriously?I search with `site:github.com` all the time.
>I search with `site:github.com` all the time.
Yup - I find that Google's index isn't always as fresh as Github's, and being able to filter by code vs. repository vs. issues and then by language if necessary is a great help.
Basically, for me, finding open-source projects is a real unsolved problem!
My point is I find that I have more success with Google's indexing than Github's own (same with SO; many others).
Example would be linking to this project page from the wikipedia page for youtube. Also the text used for links is important.
Yes google is a mind reader and it does figure what your page is about. It's actually not that hard using natural language toolkits to process the text on the page and figure it out. See http://www.nltk.org/
This is a myth perpetrated by Google and it's entirely false. The fact is that if you aren't actively engaged in spa--err, SEO--, you will be outgamed and crushed by anyone moderately competent at spa-- err, "internet marketing".
I make a point of replying to this because my established, objectively-superior-in-every-tangible-way company was creamed by a bad copycat that had a pre-existing spam apparatus, despite our one-year head start and, as already stated, every conceivable advantage (we were cheaper, more effective (their stuff basically didn't work at all), and much more attractive (they were using a crappy WordPress template; we had a beautiful custom design created by professional designers)).
I was dumb enough to believe Google's statement that if you're good, you'll gain organic links and your rank will rise. Our SEO strategy was based on writing a lot of blog posts and hoping their relevance and high-quality information would facilitate a rise in the ranks (our competitor had no content at all; just a landing page promoting his bad knockoff product). This strategy had basically no effect. Making good content and/or products and crossing your fingers simply does not work if you have commercial competitors.
>Lots of open source projects come up top of the results when you search for stuff because of this fact.
Technical projects that are either so ubiquitous it wouldn't make any sense for Google to display anything else, so niche that there is no real commercial competition targeting non-technical people, or both. As can be clearly seen with youtube-dl, if it's a keyword that other parties are interested in monetizing, you have to either play the game or lose. The game is not what Google or Matt Cutts say it is (that's disinformation), the game is what actually gets you to a high ranking on Google.
Because you can't just rely on 'on site' SEO to succeed. Adding a bunch of content on your own site is good, but what's really needed is to get authorities elsewhere to link to it. So you need to get good at marketing/PR, in the sense of talking to people with popular sites and social media channels.
You can do a ton of stuff on your own site, but it's irrelevant if you're not being linked to or mentioned elsewhere. And one good link from say, the New York Times or BBC or some other popular site is worth a ton more than a thousand spam links from low quality domains.
As for niche authorities, there are only a very small handful of them. I did contact them. One of them never replied and started deleting all references to my project off of their message boards where users had been raving about it. I don't have any official reason why, I can only speculate that they saw some sort of competitive threat in it, though it wasn't competing other than providing a service to the same small niche at the time.
Another niche authority I spoke with pretended that they were interested in running a story about me long enough to get into the beta and get a feel for how it worked, at which point they stopped replying to me, blocked me everywhere that has a block function, and tried to copy the idea themselves. Their copycat was so bad that it was shut down by their host for spam violations within a month. I tried to follow up after the fact here and never got a reply.
I got one or two sites to link to me as a paid sponsorship thing. I don't think they put nofollow on their links, but I'm sure their PageRank was pretty small anyway. My guess would be that most domains in the niche don't have a lot of influence with Google.
In a dysfunctional niche like the one I was involved in, where everyone is hyper-paranoid that any new person on the scene, even if they're not directly competing, could be their death, Google's link authority approach doesn't really work.
I made extensive use of social media through the advertising options on Facebook and Twitter. I also ran AdWords. The results from the first 2 were fine and the results from AdWords were below average. However, all that was proven to be useless when compared with an organized spam campaign, which I was intentionally trying not to run.
I've since accepted that you have to deploy some of these tactics that everyone complains about and pretends are so evil, whilst they do them behind their back. I wish I would've accepted that earlier instead of believing the bullshit that's put out about this.
Last time I heard stories like that was about heavily spammed niches, like casinos or pharmacies or SEO itself.
But yeah, if you're in a field where competitors are either ultra paranoid or sleazy, then you'll likely have to resort to 'dirty' tactics.
The larger issue here is that Google's algorithms can't identify quality content without something that it already believes to be quality pointing out to it (and in a very specific way that Google detects as a "natural" link, whatever that means). This causes issues with innovative solutions that aren't immediately accepted within their niche, niches that are small and heavily paranoid, and in which incumbents maintain their positions by offensively seeking to harm and/or silence discussion of anyone they dislike, or other sites that deserve good rankings but are unable to get acclaim from either the NYT or the niche-equivalent. You shouldn't need an entity Google trusts to run a story on you to get good rankings. It'd be great if Google fixed that, but I don't really expect them to do so.
We should just make it known among real entrepreneurs that they shouldn't have reservations about SEO tactics (which are almost all somewhat uncomfortable, at least) and that they are required to compete so that no one else with a good, legit business gets quashed by a spammer because Matt Cutts and Google swears up and down that not only do you not need to do anything but "make good content", but that you'll be hurt if you take artificial steps to enhance your rank. It's BS -- those artificial steps are mandatory to control ranking.
Also, popularity may not be tied to quality, but to some degree, it's tied to what people expect to get when they search. Which is its own problem, since someone like Microsoft or Apple could do anything, yet people would be suspicious if they didn't show up for obvious queries. So it's a balancing act between 'rank the sites that might be better but less obscure', or 'rank the ones people expect to find because they already know about them'.
As for having reservations about SEO tactics... it should depend on exactly what they are. Something that hurts communities or users (like spamming forums or social media) is pretty damn sleazy, and is a quick way to commit business suicide. As is outright or borderline criminal behaviour for rankings.
While this is true in absolute terms, there are ways to improve that I don't really know of Google doing (not that they aren't, as I don't have information on their internal workings). Google's algorithms seem to consider linking supreme and they don't appear to do any of their own research. I think a research/polling program to get users to rate some content would greatly improve search results. Other signals like the average reading level of the page's text could also be used to surmise the type and quality of content.
Overall, we need more humanity in the search results and less blind belief in the academic theory. This is a lapse in judgment frequently made by academics and mathematicians; they refuse to accept the evidence of failure that lies in front of them (since their theory/model/whatever doesn't say it should exist) until the failure reaches catastrophic, impossible-to-ignore thresholds. We need more humanity in a lot of systems, in my estimation.
I think it is time antivirus, Google Chrome, et al recognize those installers as crapware and give a warning before installation (yes, including Java SDK and Skype trying to install toolbars). Currently Google Chrome is giving a malware warning just because you have an .exe in your web page that for them seems malware, and if you work in
So how should one make available for download windows executables?
Downloading from YouTube is in most cases not illegal - it could be considered time-shifting for personal consumption, in some cases fair use, both of which are legal in US. In some cases though - like downloading the movies that are paid or videos with limited distributions and not available in the States, could be considered copyright infringement.
What downloading does though is break YouTube's Terms of Service. Even though some courts already stated explicitly that breaking Terms of Service is not illegal, doing so might still get you in trouble in civil court, as you are breaking an agreement between yourself and the company services of which you are using.
If you would be using YouTube APIs for your product, they would probably suspend your access if they wouldn't like your product, so something to consider.
Is it ok to download the videos for offline viewing? Your choice - might not be illegal, but not 'ok' from YouTube's point of view.
Doesn't youtube lose out on advertising revenue this way? Yes - that's is precisely the reason for the rule :)
The big unknown here is that the issue has not been presented in US courts yet, at least as far as I know, so there is no precedent.
Hope it helps.
--------------
Also check http://www.pcadvisor.co.uk/how-to/internet/is-it-legal-downl...
--------------
Also check http://lifehacker.com/5901773/breaking-a-terms-of-service-is...
Even if it were litigated all the way up to SCOTUS, there is no guarantee that the Supremes would see a video downloading device the same way they see a video recording device (and the ruling that stated home recording was fair use, Sony Corp. of America v. Universal City Studios, Inc (colloquially, the "Betamax case"), was itself a controversial 5-4 ruling) instead of the way they see a peer-to-peer distribution network like Napster.
There are many spurious C&Ds sent to people for violations of the CFAA based upon a site's Terms of Use each year; big companies squashing competitors they dislike, or even non-competitors that embarrass the company by providing a service that they've as yet been unable to figure out, etc. The argument that violation of the Terms of Use constitutes unauthorized access under the CFAA has prevailed in court multiple times, and even if it hadn't, once a C&D is received, the authorization is at that point certainly revoked and thus, continued access equates to a violation of the CFAA.
There are copyright and trademark issues here too, even if you can prevail on the CFAA issues (not likely). Judges have ruled that downloading a webpage into RAM in order to extract non-copyrightable data is copyright infringement, because the momentary existence of the entire page in RAM is an unauthorized copy.
Various counterarguments that shift the blame to the consumer, e.g., "we don't actually talk to YouTube's server, we just take a URL that the customer submits via the extension and convert it to another URL, and that doesn't involve accessing YouTube's servers", usually fail (though logically extension developers shouldn't be any more liable than browser developers for their customers' use). One could be considered a conspirator or an accessory to CFAA violations.
So, yes, it could and would be stopped by a C&D unless Richard Branson or some other megamillionaire is secretly bankrolling youtube-dl, and even then, its chances of surviving the legal battle unscathed are pretty slim.
Similar considerations apply to something like PriceZombie, which Amazon just shut down because it doesn't like what the data reveals. The legal situation here is a seriously understated social problem.
You may read this and say it sounds like web crawlers like Google are illegal. Well, yes, they are. The difference is that Google was able to hit critical mass before such a devastating lawsuit was brought, and now they're effectively too big to sue out of existence. If you are making an internet company or product, you have to hope this happens to you before you make someone mad and get sued to death.
Well, ubuntu is a company. It was always their intention to become profitable at some point, even if they were willing to operate at a loss to build their market.
I very much doubt debian would go the same way if it got the same level of publicity, for example. But then, as the GP said, it's unlikely to happen because they're a community project without a marketing budget.
A minor nitpick: Canonical is a company, Ubuntu is their (main) product.
If I want to do a one off task, I'm not going to download any software for it, when I know there is an alternative that can be used entirely on the browser.
There are plenty of addons for major browsers that do this. Those belong on page 1, not this. Most users don't give a shit about FOSS.
SHHH - dont talk about ytdl...
obv if the masses start talking about things like this, then sites like YT will go on the attack. WE DO NOT WANT THIS.
However I worry that if projects such as this or mps-youtube (console youtube player) get mainstream, they would be effectively shut down in some way...
But what about mildly obscure software like this? This is something I would completely use, but have no way to find it. There's so many tools out there which are totally awesome, but wilting away because you can't find it in the search engines.
As much as I love technology, it still seems the best stuff is usually found through the old tried and true methodologies. Word of mouth, conferences, or from friends or other developers.
I owe a lot to the maintainers (hey, phihag!) for tolerating and trusting a much younger version of me :)
I still remember the emotion of getting this merged: https://github.com/rg3/youtube-dl/pull/342
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: https://github.com/rg3/youtube-dl/graphs/contributors (notice how the GH interface is limited to 100 contributors, and #100 still has 3 commits in the tree)
- Supports hundreds of services, not just youtube [0]
- Allows you to extract audio in multiple formats
- Download entire playlists (and general batch support)
- Configure video/audio quality
- Extract/build metadata
- Cross platform
once something is published on the internet then it is assumed it can be viewed / copied / downloaded / etc.
see https://en.wikipedia.org/wiki/Web_scraping , the legal issues part.
I download some conference videos from YouTube to watch on my train journey. I can't stream them because reception on the train isn't good enough. It's the only place I can find the videos (they're not available for sale) and I don't share them with anybody afterwards.
I don't consider that to be unethical, and I don't imagine the police are going to hunt me down.
It's a bit worrying how many people run to defend corporation profits by default.
Not the OP but I don't think it has anything to do with corporation profits. If I spend money creating a video, put it on Youtube, and try to recoup costs through ads you're bypassing that by downloading the video with this tool.
99% of the people and organizations in YouTube never recoup costs. For almost all this is wishful thinking.
The bits are on my computer. I get that I can't just go redistributing it (legally), and that youtube probably doesn't _like_ it, but if it's illegal (and honestly, maybe it is in the US given how ridiculous copyright and licensing law is there) that's ridiculous.
Germany introduced a poorly-worded cybercrime law that basically made all network tools illegal (including nmap, wi-spy), but also disassemblers, on the basis that they "could be used in digital crime".
It's similar to making cars illegal because of a traffic fatality.
It's more about the intent than about what software you use.
[0] With my script: http://timbennett.github.io/movie-barcodes/
No need to first jump on Youtube/Vimeo/... for the source URL of the video.
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.
For me it's essentially:
youtube-dl -F '<url>'
to get the list of available video and audio formats, followed by youtube-dl -f <video format>+<audio format> '<url>'
and then wait for the download to complete. And youtube-dl -U
to self-update youtube-dl (because it gets updated just about every day). youtube-dl --extract-audio --audio-format mp3 <url> alias youtubemp3='youtube-dl --extract-audio --audio-format mp3'[1] A bit of self-promotion here, if you are interested this is my soundcloud playlist https://soundcloud.com/melicerte/sets/extraits-de-vieux-film...
Edit: I mentioned that because you don't lose any quality reencoding.
-f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]'
this is what I'm using in my case (on youtube).Posting this here, because it's not obvious from the docs that this works.
> Since the end of April 2015 and version 2015.04.26 youtube-dl uses -f bestvideo+bestaudio/best as default format selection […] If ffmpeg or avconv are installed this results in downloading bestvideo and bestaudio separately and muxing them together into a single file giving the best overall quality available. Otherwise it falls back to best and results in downloading the best available quality served as a single file. best is also needed for videos that don't come from YouTube because they don't provide the audio and video in two different files.
Oh ye, the list's pretty comprehensive actually [1].
[1]: https://github.com/rg3/youtube-dl/tree/master/youtube_dl/ext...
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 "$*"
}
play rick astley never gonna give you up ytdl()
{
mkdir /tmp/ytdl && cd /tmp/ytdl
for item in "$@" ; do youtube-dl "$@" ; done ;
mv /tmp/ytdl/* ~/Desktop/
rm -rf /tmp/ytdl
exit
}
Now I can Ctrl + Alt + T a new Terminal window, type ytdl http://www.bbc.co.uk/iplayer/episode/... (can use multiple links) then minimise the window and move on to other things.In fact, VLC does too.
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.
[1] https://mpv.io/
[2] https://mpv.srsfckn.biz/ (official Windows builds)
[3] https://mpv.io/manual/master/#video-output-drivers-opengl mpv supports ewa_lanczossharp (aka jinc) for scaling among others
[4] Also a huge fan of the debanding which can be left on all the time
http://www.ottumwacourier.com/news/local_news/what-is-a-gif/...
> What is a GIF?
> 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.
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:
> 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.
[1] E.g. 4chan, which even has its own boards just for animated gifs: /gif/ (NSFW) and /wsg/ (SFW)
"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."
I have a NUC server at my parents house (they have a fast connection) where I connect remotely and make all my downloads. When I visit them I bring an external HD with me.
I think something could be said about how an agreement of that manner is not legally binding so you can ignore it, but IANAL. Just a faint memory something from the legality of TOS and maybe I'm not remembering it right. I place my confidence at 85% for "not legally enforceable".
It has to be brought to your attention and usually that step is when creating an account.
I'm also not sure if "please do not use the Service" is equivalent to "you may not use the Service". It's a request, not a demand. But I'm not sure if that sort of pedantic attitude would slide in court.
Regardless - Google/YouTube aren't enforcing this so I don't think it matters from a legal standpoint - just a moral one.
>By using or visiting the YouTube website or any YouTube products, software, data feeds, and services provided to you on, from, or through the YouTube website (collectively the "Service") you signify your agreement to (1) these terms and conditions (the "Terms of Service"), (2) Google's Privacy Policy, found at http://www.youtube.com/t/privacy and incorporated herein by reference, and (3) YouTube's Community Guidelines, found at http://www.youtube.com/t/community_guidelines and also incorporated herein by reference. If you do not agree to any of these terms, the Google Privacy Policy, or the Community Guidelines, please do not use the Service.
Great work guys! Thanks for creating such an awesome piece of software.
Other wonderful projects in this category would be homebrew[1], wiki*, OSM, ...
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. https://github.com/chrippa/livestreamer
https://github.com/corradio/watchlater https://oliviercorradi.wordpress.com/2013/11/19/3/
$ youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 --output "%(title)s.%(ext)s" <URL>
I once maintained something similar in Ruby (https://github.com/rb2k/viddl-rb), and the amount of changes necessary just to keep a hand full of plugins up-to-date is crazy.
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.
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.
-f best
It's in the documentation. You can also use special names to select particular edge case format:
* best: Select best quality format represented by
single file with video and audio
And again:> Since the end of April 2015 and version 2015.04.26 youtube-dl uses -f bestvideo+bestaudio/best as default format selection (see #5447, #5456). If ffmpeg or avconv are installed this results in downloading bestvideo and bestaudio separately and muxing them together into a single file giving the best overall quality available. Otherwise it falls back to best and results in downloading the best available quality served as a single file
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.
I don't do it very often (except for mobile watching without burning quite as much battery) but I see a number of use cases.
I actually do pay for Youtube Red, but I like to download my Youtube videos because a) my internet connection is a bit spotty, and b) I like to keep as much as I can open source.
Sometimes one may be in area of good connectivity, but often not.
This is commonplace in countries with limited internet access.
youtube-dl is also helpful for other video serivces. For example, twitch.tv doesn't have as good of a CDN on my country as youtube does so youtube-dl is sometimes the only way for me to watch a twitch.tv VOD at decent quality (even in those days when I can watch youtube videos just fine).
Honestly, those are the only scenarios I've seen in the wild. It's not like we are still living in the days of Napster.
I frequently backup entire channels using youtube-dl just to avoid the chance of that content getting destroyed.
This is a really nifty tool, though I must say that Flashgot on Firefox does the job nicely for me, 99% of the time.
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.
Assuming you have `ffmpeg` installed just run:
`youtube-dl --extract-audio --audio-format mp3 $URL`
and you're done! I expect my phone will be packed of bizarre prog/jazz before the end of the weekend :D
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)
Surely running youtube-dl inside a docker container inside a virtualbox VM created by boot2docker isn't easier?
[0] http://pullz.in
4 year old bug https://github.com/rg3/youtube-dl/issues/343
It uses youtube api to search the song and then download it using youtube-dl.
Was happy to see it here, it's nothing new, just a great tool, great job of surfacing it HN!
Gives you decent quality audio file from pretty much any video, you can even feed it a playlist.
example:
mpv "https://www.youtube.com/watch?v=a3Ey4YChtEU"
(you need quotes because most shells will try to glob match)
youtube-dl [OPTIONS] URL [URL...]
Any examples would be just noise.Germany has a law that permits downloading for personal use. AFAIK in Germany that would trump YouTube's Terms of Service. ToS are legally binding, for the most part [0]. Though there may be parts that aren't enforceable or wouldn't hold up in the court of law.
YouTube Terms of Service [1] doesn't permit "creating a copy". In practice this is never enforced when the video is used under Fair Use. Otherwise you'd never see any Youtubers reviewing other Youtube videos. While it is against the Terms of Service, I'm not sure if it would actually hold up in court.
[0] https://en.wikipedia.org/wiki/Terms_of_service
[1] https://www.youtube.com/static?template=terms
>Content is provided to you AS IS. 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. You shall not copy, reproduce, distribute, transmit, broadcast, display, sell, license, or otherwise exploit any Content for any other purposes without the prior written consent of YouTube or the respective licensors of the Content. YouTube and its licensors reserve all rights not expressly granted in and to the Service and the Content.
youtube-dl -g url | mplayer
Surely you are keen to make a profit yourself with your unicorn startup idea, dear unique snowflake.
We detached it from https://news.ycombinator.com/item?id=11453077 and marked it off-topic.