HACKER Q&A
📣 tjrgergw

What's the Situation with YouTube-Dl?


I wanted to download some lectures [1] off youtube as I'm going to be without internet or a long period, and but A) just apt install get me a version which is too old, and I get ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. and B) going to the update url I see Access denied; Due to a ruling of the Hamburg Regional Court, access to this website is blocked.

So, what's the situation with youtube-dl? How do I get it working? As a separate question, how else can I download something off youtube?

I guess last resort I'll have to dig into the python to figure out why that regex is failing and what else I can do about it, but that's not sustainable.

[1] if anyone is curious, just discovered this from HN: https://www.youtube.com/watch?v=tNOu-SEacNU&list=PLDcUM9US4XdPz-KxHM4XHt7uUVGWWVSus&index=5


  👤 stop50 Accepted Answer ✓
You can use youtube-dlp: https://github.com/yt-dlp/yt-dlp its an activ maintained fork

👤 tjrgergw
Searching reddit I found a subreddit: https://old.reddit.com/r/youtubedl/

Man google sucks.


👤 chrisjj
[delayed]

👤 cpach
yt-dlp/youtube-dl depends on APIs defined by Google. Those APIs can be changed at any point in time, so I’m not sure it’s sensible to include this package in Debian stable, where packages aren’t expected to change often.

Glad to hear you found a newer version!


👤 II2II
The last time I checked, youtube-dl and yt-dlp can both be obtained via (Python) pip. To my knowledge, these will be the latest releases.

👤 thefz
Open Video Downloader works for me, manual installation of ffmpeg may be required though.

👤 eska
Just get the standalone yt-dlp from github and occasionally update it with yt-dlp -U since Google constantly tries to interfere with the download mechanism.

👤 pajko
As a last resort, you could try https://yt5s.io/en90. It worked for me every time I had to download something.

👤 dbcooper
yt-dlp is its successor, but I'm having a lot of trouble with it too.

I've been having more success with JDownloader2.


👤 xbmcuser
use pip install not apt

👤 Vvector
As a last resort, you could subscribe to YouTube Premium, which allows you to download the content.

I don't mind paying for ad-free content.


👤 brucethemoose2
This is a microcosm of my experience with Ubuntu.

Install something with apt, run into an issue... Oh, the version is ancient, and its fixed in official releases.

Then my options are:

- Fight with apt/.deb packaging and try to roll it forward, maybe breaking my system.

- Figure out how to compile it from source, and manually integrate it until its kinda like the system package.


👤 simonw
It looks to me like apt might be a poor fit for a package like youtube-dl - unless I'm reading this wrong it looks like the packaged version is a couple of years out of date: https://packages.ubuntu.com/lunar/youtube-dl

Due to its nature something like youtube-dl needs to be constantly updated, as it's scraping websites that are constantly changing. So best to install it through other mechanisms like pip instead.


👤 m348e912
For those on macOS, if you use homebrew to install the latest version of yt-dlp you can download the whole playlist provided above without any issues.

👤 marcolucidi
i installed `yt-dlp` once with:

    $ wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp && chmod +x yt-dlp && mv yt-dlp "$HOME/bin/"
(actually this command is in my "install script" that i run when i install a new distro)

when something doesn't work, i run `yt-dlp -U` and 8 times out of 10 it automatically upgrades itself to a new version with the fix, if it still doesn't work i wait a few days and usually the fix arrives :)

note: `$HOME/bin` comes first in my `$PATH` so that programs like `mpv` always uses the newer version of `yt-dlp` and not the obsolete version installed by the package manager.


👤 overtomanu
One popular hack to download files manually in the browser is to replace "youtube" in the URL with "ssyoutube". It redirects you to another website which has the download option

👤 IndigoIncognito
I have found that using YTDLP, (a fork of YT-DL) with no throttling works flawlessly.

I recommend using a frontend: https://www.reddit.com/r/youtubedl/wiki/info-guis/#wiki_gui.... GUIs can be better in this situation since they show you all the cmd line options like -embed-metadata, -embed-chapters, and show you all the resolutions you can download at, I would really checkout a frontend if you plan to download multiple files or a playlist


👤 nyarlathotep_
Just downloaded a bunch of things last night. My approach is typically using docker. Considering the rate at which a version has failures/low-bandwidth, I don't bother installing it on my host system:

`docker run -it --name ubuntu-mantic -v path/to/your/videodir/:/VideosDir ubuntu:mantic /bin/bash`

Install stuff needed on the container, typically curl python3 etc and the install from GitHub: https://github.com/yt-dlp/yt-dlp/wiki/Installation

and you're good to go. I've honestly found this easier than fighting with my host system and constantly reinstalling broken versions etc.


👤 AugustoCAS
The best way is to download the source from github, run `make`, and copy the the file to $HOME/bin . There hasn't been a release for about a year now and the files on the distro repos are even older (I think).

Also YouTube has been doing some changes lately on the the player and a lot of the tools fail to download audio or video.

For example, in the last couple of weeks there have been some issues with a redirect to a 'consent page' : https://github.com/ytdl-org/youtube-dl/issues/32499


👤 animeshz
For about a year its hasn't updated the expired token, yt-dlp has been forked out of it by the community to provide a continuous support.