5 ms·
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
by Kristine1975 11y ago
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.
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).
- deleted 11y ago[deleted]
- awqrre 11y agoI like this command to extract audio from youtube videos: youtube-dl --extract-audio --audio-format mp3 <url>
- DarkLinkXXXX 11y agoOr you could use -x, which would only download the audio (because there's seperate audio and video streams on youtube).
- awqrre 11y agoyes -x is the same as --extract-audio, but I use an alias in my bashrc like this (if you don't use --audio-format mp3, you might not get mp3 (not necessarily a bad thing)): alias youtubemp3='youtube-dl --extract-audio --audio-format mp3'
- melicerte 11y agoThat's my main use of youtube-dl for years now. I'm extracting audio from old french movies available on youtube, work a small sound extract with audacity and then post the result on soudcloud[1]. [1] A bit of self-promotion here, if you are interested this is my soundcloud playlist https://soundcloud.com/melicerte/sets/extraits-de-vieux-films https://soundcloud.com/melicerte/sets/extraits-de-vieux-film...
- wingerlang 11y agoWhy?
- luxpir 11y agoWhy not!
- wingerlang 11y agoI'm not against it or anything, I'm just wondering if it is a personal interest or if there is some niche usage I am unaware of.
- x0 11y agoThat is a really cool playlist.
- rg3 11y agoIf your music player supports OGG, you can also use youtube-dl -f FORMAT VIDEO_URL and give a numeric format that corresponds to a DASH webm audio-only stream, with vorbis audio (e.g. format 171 these days). The container is webm but it can be trivially changed to OGG with ffmpeg, which you can call via --exec automatically. Edit: I mentioned that because you don't lose any quality reencoding.
- otterpro 11y agoI like to keep it in original audio format (usually AAC) instead of mp3, because with mp3 conversion, there is also some loss of quality due to re-compression.
- reacweb 11y ago$ youtube-dl -U It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update. TIL: https://rg3.github.io/youtube-dl/download.html https://rg3.github.io/youtube-dl/download.html
- ubercow 11y agoyou can also do youtube-dl -f bestvideo+bestaudio '<url>' to skip a step, since 90% of the time that's what I want anyways.
- masklinn 11y agoThat's been the default since April 2015,so `youtube-dl url...` is sufficient to get either the best single-file video (if no ffmpeg installed or non-youtube video) or to get both the best video and the best audio remuxed.
- pilif 11y ago-f also supports some symbolic names, which is very handy because it allows you to easily get the best possible quality without having to check the formats every time: -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.
- masklinn 11y agoFWIW > 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.
- pilif 11y agobestvideo+bestaudio has been flip-flopping ver time and releases between mp4 and webm though. As I'm mostly using this for consumption on an iPad, I prefer mp4, so I'm happy to have found a way to get the best possible mp4 version without having to go format hunting.
- dstryr 11y agoI'm pretty sure the '-f best' setting is the default for updated versions of ytdl, so no real need for that.
- Kristine1975 11y agoUnless you always want to download the best mp4, not webm (or vice versa).
- oxplot 11y ago> Not only for Youtube videos, but also for a lot of other video hosters Oh ye, the list's pretty comprehensive actually [1]. [1]: https://github.com/rg3/youtube-dl/tree/master/youtube_dl/extractor https://github.com/rg3/youtube-dl/tree/master/youtube_dl/ext...