989 points · by h43k3r · 10y ago · 321 comments
The amount of crapware I've had to remove from family member's PCs just because they wanted to save a video is ridiculous.
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.
edit: with an installer ! And the application updates youtube-dl to the last version. Very nice.
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.
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.
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
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.
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.
Just gotta remember the old "Alt-Space, E, P" shortcut sequence. And Alt-Space, E, K for selecting/copying.
Lot's of open source projects come up top of the results when you search for stuff because of this fact.
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.
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.
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/
> 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.
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).
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?
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...
Not a single family member would touch this here.
It's sad but understandable.
#!/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 whateverThey 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.
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.
> 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")
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.
- Select browser icon
- Double click browser icon
- Click into search box
- Type "youtube"
- Disregard suggestions, hit enter
- Click on first thing that says YouTube
not really, if you copy url of a clip in a playlist it will start downloading WHOLE playlist :(
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.Are you sure you apprehend the differences between the look and feel of a browser and that of a command line?
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.
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.
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
[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.
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.
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.
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.
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). -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...
youtube-dl --extract-audio --audio-format mp3 <url>Edit: I mentioned that because you don't lose any quality reencoding.
[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...
alias youtubemp3='youtube-dl --extract-audio --audio-format mp3' 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 upIn fact, VLC does too.
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.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.
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 frequently backup entire channels using youtube-dl just to avoid the chance of that content getting destroyed.
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.
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.
Sometimes one may be in area of good connectivity, but often not.
This is commonplace in countries with limited internet access.
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.