Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Download free YouTube videos (the legit version)
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Download free YouTube videos (the legit version)

raindog308raindog308 Administrator, Veteran
edited July 2017 in Tutorials

I saw we dumped a thread on downloading YT videos...I thought I'd share a legit method that I've used.

It's not a stunning revelation: youtube-dl

Something like this:

$ # discover supported formats
$ youtube-dl -F 'some youtube url'
$ # download one format and specify a file name
$ youtube-dl -f 18 -o 'jarland dances.mp4' 'some youtube url'
$ # download a playlist
$ youtube-dl -f 18 'some youtube url'

youtube-dl has been pretty bulletproof for me. I'm still an iPod Classic man, and nearly every week I dump some URLs in a script and have it download them for syncing.

Some notes:

  1. It handles playlists quite well - just give it the playlist URL and it'll suck down all videos in the playlist. Unfortunately, the sequence isn't preserved (e.g., they'll all just be named the video name, not 1, 2, 3, etc.)

  2. Your distro's version of youtube-dl is worthless. It's sensitive to HTML changes, so if a download fails, your first step is to either run youtube-dl -u (update) or manually get the latest from github. Your distro's youtube-dl is hopelessly out of date.

  3. There isn't a magic "format = mp3" flag, but it's trivial to download in one of the audio-only formats and run it through a converter. See below

Been a great tool for me...enjoy!

Thanked by 4Pwner Janevski fan riot

Comments

  • DamianDamian Member

    I've been using youtube-dl too, mostly for things that I cant' buy in the United States because of arbitrary restrictions. You'd think corporations would be more interested in giving me a way to give them money for stuff that I want to buy, but hey, welcome to 2017.

    youtube-dl --extract-audio --audio-format mp3 --audio-quality 0

    If you're a Youtube Red subscriber, newer versions can download the subscription versions of things too.

    Thanked by 1riot
  • rm_rm_ IPv6 Advocate, Veteran

    Holy fuck next time a tutorial how to use "apt-get".

  • MasonRMasonR Community Contributor
    edited July 2017

    +1 for youtube-dl. It is being actively developed and receives constant updates with new features/bug fixes.

    Plus it can pull videos from a fuckton of video sites.

    Edit: just realized it supports your favorite site @raindog308, xhamster. No wonder you like it so much :P

    Thanked by 1raindog308
  • raindog308raindog308 Administrator, Veteran

    Thanks @Damian - I didn't know about --audio-format mp3. I suspect it only works for some vids i.e., if they use that codec because I don't think youtube-dl will convert for you - ?

    MasonR said: Edit: just realized it supports your favorite site @raindog308, xhamster. No wonder you like it so much :P

    That's why one of my sock puppet accounts was on here asking for 600TB storage...

    rm_ said: Holy fuck next time a tutorial how to use "apt-get".

    image

  • DamianDamian Member

    raindog308 said: I suspect it only works for some vids i.e., if they use that codec because I don't think youtube-dl will convert for you - ?

    If you have ffmpeg/avconv installed, and you use the "audio-quality 0" switch, youtube-dl will automatically download whatever will have the best audio quality, then convert it to mp3 for you. Example:

    $ youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 https://www.youtube.com/watch?v= oiKj0Z_Xnjc [youtube] oiKj0Z_Xnjc: Downloading webpage [youtube] oiKj0Z_Xnjc: Downloading video info webpage [youtube] oiKj0Z_Xnjc: Extracting video information [youtube] oiKj0Z_Xnjc: Downloading js player vflZQAwO8 [youtube] oiKj0Z_Xnjc: Downloading MPD manifest [download] Destination: Stromae - Papaoutai-oiKj0Z_Xnjc.webm [download] 100% of 3.84MiB in 00:00 [ffmpeg] Destination: Stromae - Papaoutai-oiKj0Z_Xnjc.mp3 Deleting original file Stromae - Papaoutai-oiKj0Z_Xnjc.webm (pass -k to keep)

  • joepie91joepie91 Member, Patron Provider

    My alias for archival-quality downloads, with all metadata:

    alias ytdl="youtube-dl --title --continue --retries 4 --write-info-json --write-description --write-thumbnail --write-annotations --all-subs --ignore-errors --merge-output-format mkv -f 'bestvideo+bestaudio/best'"
    
    Thanked by 3ehab NanoG6 vimalware
  • noamannoaman Member

    For beginners

    Youtube-dl webui

    Rapidleech YouTube plugin...though less powerful than youtube-dl

  • noamannoaman Member

    @joepie91 said:
    My alias for archival-quality downloads, with all metadata:

    alias ytdl="youtube-dl --title --continue --retries 4 --write-info-json --write-description --write-thumbnail --write-annotations --all-subs --ignore-errors --merge-output-format mkv -f 'bestvideo+bestaudio/best'"
    

    Nice share thanks man...

  • MikeAMikeA Member, Patron Provider

    Doesn't YouTube block IPs using youtube-dl? Is there some rate limit or something? Pretty sure I've had people who got IPs basically blocked completely for using it for a while.

  • EdmondEdmond Member

    Youtube-dl is great, but mostly I just use it because Sinusbot uses it to pull music for me...

  • williewillie Member

    MikeA said:

    Doesn't YouTube block IPs using youtube-dl?

    Not as far as I can tell. I'm not a super heavy user but I've used it from a few static IP addresses for quite a long time.

  • joepie91joepie91 Member, Patron Provider

    @MikeA said:
    Doesn't YouTube block IPs using youtube-dl? Is there some rate limit or something? Pretty sure I've had people who got IPs basically blocked completely for using it for a while.

    I've downloaded entire channels (2000+ videos, sometimes over 500GB for a single channel) from my home IP, and I've never been blocked. Worst I've seen is specific videos slowing down to a crawl, but that seems to be down to specific servers on YouTube's end having issues.

    Thanked by 1vimalware
  • Shot2Shot2 Member
    edited July 2017

    @rm_ said:
    "apt-get".

    what the hell is that

  • @Shot2 said:

    @rm_ said:
    "apt-get".

    what the hell is that

    Dunno. Must be for the Linux gods

  • 4K downloader

  • JanevskiJanevski Member
    edited July 2017

    youtube-dl is the proper way of using youtube and other such sites.

    Just download it from the website and update if from time to time: sudo youtube-dl -U

    We should send some love towards the person that develops it.

    https://rg3.github.io/youtube-dl/donations.html

  • GamerTech24GamerTech24 Member
    edited July 2017

    Shot2 said: what the hell is that

    some say it's a competitor to "yum install"

  • WSSWSS Member

    @ethancedrik said:

    Shot2 said: what the hell is that

    some say it's a competitor to "yum install"

    The hell you say!!!!!oneone!!11!

  • tbh, 99% of people know what youtube-dl is on this forum.

  • YmpkerYmpker Member

    For everyone else there is:

  • r0xzr0xz Member
    edited July 2017

    what about ssyoutube? just add "ss" in front of youtube like ssyoutube.com/watch?blabla and you're good to go

    Thanked by 1vimalware
Sign In or Register to comment.