Comment by embedding-shape
9 hours ago
Seems its already in Arch's repositories, and seems to work, just add another flag to the invocation:
yt-dlp --cookies-from-browser firefox --remote-components ejs:github -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" 'https://www.youtube.com/watch?v=XXX'
It is downloading a solver at runtime, took maybe half a second in total, downloads are starting way faster than before it seems to me.
[youtube] [jsc:deno] Solving JS challenges using deno
[youtube] [jsc:deno] Downloading challenge solver lib script from https://github.com/yt-dlp/ejs/releases/download/0.3.1/yt.solver.lib.min.js
It would be great if we could download the solver manually with a separate command, before running the download command, as I'm probably not alone in running yt-dlp in a restricted environment, and being able to package it up together with the solver before runtime would let me avoid lessening the restrictions for that environment. Not a huge issue though, happy in general the start of downloads seems much faster now.
Glad to hear it’s faster now!
YouTube barely works in a full-on browser these days, props to the team that keeps it accessible via a Python script!
I use YouTube on a daily basis. I haven't seen any of these problems.
Airplay from youtube is broken for me. I airplay and instead of english, I get german and no way to change the language. This is not an isolated incident.
See https://www.reddit.com/r/youtube/comments/1id4amh/youtube_ch... and https://discussions.apple.com/thread/255931836
It is likely you use Chrome or a browser that uses Blink for its engine and the OP uses a non-blink browser like Firefox. I use Firefox and I can cofirm since the last few months Youtube usability borders on usable
16 replies →
Well... I have many new, emerging problems with YouTube as of lately.
For example I have to scroll down a lot to get to the comment section, the suggestions are all over the place, and so forth. Annoying.
Also due to uBlock Origin, some videos do not start and I have to refresh. It is not much of an issue for me but the fact that apparently I need a huge monitor to see the "old layout" is a problem for me.
Are you using Chrome or a Chromium browser? From experience and reports I’ve seen, that seems to make a huge difference.
1 reply →
Only if you use Googles Chrome Browser. Other browsers have issues like Firefox[1].
[1]: https://news.ycombinator.com/item?id=41379517
2 replies →
Since some days I suddenly get freezes in the tab; these unfreeze after some time, say 20 seconds or so, but I notice a delay.
Something has really changed to the worse lately. I think it has to do with anti-ad programs as well as AI, like the UI also changed. It is important to point out that while you do not have any issues, other people do or may.
2 replies →
do you never encounter opening youtube video in a new tab only for video itself to load, while rest of the page doesn't?
10 replies →
[dead]
Do you use Firefox on Linux, too? 4K Videos freeze so often for me, I don't even try watching them online, and always just download them with yt-dlp. It doesn't bother me enough to give Chrome a try, but maybe that'd make a difference.
I do too use Firefox on Linux, 4K videos seems to work fine for me, but I've never been able to download higher than 1080p with yt-dlp, seems it's just not available without DRM as far as I can tell, so now I'm curious how exactly you've been downloading that?
1 reply →
I'm n=1 using chromium but the only problem I have is the video losing focus when maximizing, meaning l/r/space don't work for video controls anymore, happened about when the liquid glass styled interface did
I use YouTube daily in safari and edge, this is complete hyperbole.
As a counter-anecdote, I use YouTube daily in Safari and it will not infrequently hang for tens of seconds when trying to load a video, occasionally play the sound without the video, reasonably frequently put the video over most of the page with no way to get to the controls, etc.
(This may be because I have a whole swathe of adblockers, etc., plus I do a lot of `yt-dlp`ing from the same IP which may have me on a naughty list.)
2 replies →
Youtube is pretty unusable, as they throttle videos, and links sometimes dont work. It has gone downhill fast in recent years.
14 replies →
That's a bit like complaining no cars have trouble because your Fiat doesn't have a problem. There are more browser engines out there than the ones you use, some in direct competition with Google themselves, maybe people using those engines are experiencing issues? Jumping to calling out "hyperbole!" sounds like hyperbole itself, since you don't actually have broad experience enough to say if that's true or not.
FWIW, when I use Chromium (logged out/in) on Linux, everything works fine. If I use Firefox (logged in), it works worse. If I change the user-agent to Chromium in Firefox, I get faster buffering than when I use the default user-agent. Make of that what you will.
4 replies →
I run it in firefox. Today a video kept freezing when I scrolled down to load the comments. Sometimes I bizarrely have to scroll super far down to get past recommended videos to see the comments, which sometimes crashes the tab.
On mobile (Firefox) I frequently have issues with videos freezing or videos crashing when I try to replay a section.
I freely admit to holding google software to a higher standard than e.g. random FOSS tools I use or saas from startups, however I also believe google has the talent, time, and money to where their software should basically be the best on Earth, and it's kinda shocking how often it's not and in what ways it's not. And YouTube is how old now?
The fact alone that I still can't toggle off Google maps "we found a faster route, tap ok to not change the route you change" thing...
> YouTube barely works in a full-on browser these days
Agreed. Shorts about half the time don't display comments, the back button breaks in mysterious ways. And I use Chrome on both Intel and M macOS machines, so the best in class there is, but my Windows Chrome doesn't fare much better. And Adblock ain't at fault, I pay for premium.
And that's just the technical side. The content side is even worse, comments sections are overrun by bots, not to mention the countless AI slop and content thieves, and for fucks sake I get that high class youtubers have a lot of effort to do to make videos, but why youtube doesn't step in and put clear regulations on sponsorship blocks is beyond me. Betterhelp, AG1, airup, NordVPN (and VPNs in general) should be outright banned.
And the ads, for those who aren't paying for premium, are also just fucked up. Fake game ads (Kingshot who stole sound effects from the original indie Thronefall ...) galore.
Google makes money here, they could go and actually hire a few people to vet ads and police the large youtubers with their sponsors.
I use an extension that turns shorts back into regular videos, and another one that undoes the auto-dubbing when watching videos in a (different) language that I understand.
With that, uBO and Sponsorblock, I never see any ads and have a great YT experience. (I don't have premium either)
I use YouTube in a browser (Brave) almost everyday. Works great for me.
Also on Brave and uBlock Origin. Mostly works great but every video now has a 3-4 second pause before starting. Pretty sure it's an anti-ad-blocker measure. Because I'm not watching their ads, I have no room to complain, just throwing out the data point that it's not a flawless experience anymore.
1 reply →
you don't get the "are you still watching" popups? sometimes it buffers hard for me. They also removed dislikes and constantly push shitty clickbai AI thumbnails. They're also adding shitty ai translation, so if you like learning languages you're SOL. They also changed thier rec algo to be more "right wing\tech bro" leaning
What environment are you using that: - Has access to Youtube - Can run Python code - Can’t run JS code
If the concern is security, it sounds like the team went to great lengths to ensure the JS was sandboxed (as long as you’re using Deno).
If you’re using some sort of weird OS or architecture that Deno/Node doesn’t support, you might consider QuickJS, which is written in pure C and should work on anything. (Although it will be a lot slower, I’m not clear just how slow.) Admittedly, you then loose the sandboxing, although IMO it seems like it should safe to trust code being served by Google on the official Youtube domain. (You don’t have to trust Google in general to trust that they won’t serve you actual malware.)
> What environment are you using that: - Has access to Youtube - Can run Python code - Can’t run JS code
Nothing specific, just tend to run tools in restricted VMs where things are whitelisted and it's pretty much as locked down as it can be. It can run whatever I want it to run, including JS, and as the logs in my previous comment shows, it is in fact running both Python and JS, and has access to YouTube, otherwise it wouldn't have worked :)
I tend to have the rule of "least possible privileges" so most stuff I run like that has to be "prepped" basically, especially things that does network requests sometimes (updating the solver in this case), just a matter of packaging it before I run it, so it's not the end of the world.
No weird OS or architecture here, just good ol' Linux.
> IMO it seems like it should safe to trust code being served by Google on the official Youtube domain
The JS script being downloaded is from the yt-dlp GitHub organization (https://github.com/yt-dlp/ejs/releases/download/0.3.1/yt.sol...), not from Google or any websites, FWIW.
> The JS script being downloaded is from the yt-dlp GitHub organization
I meant the challenge that is the reason they need the Javascript in the first place.
You can’t very well run yt-dlp without trusting yt-dlp code.
3 replies →
This is the way. Leaving so many packages with unfettered access to your system is only so secure.
This works for me:
> What environment are you using that: - Has access to Youtube - Can run Python code - Can’t run JS code
They didn't say “can't run JS code”, but that from that location the solver could not be downloaded currently. It could be that it is an IPv6-only environment (IIRC youtube supports IPv6 but github does not), or just that all external sites must be assessed before whitelisted (I'm not sure why youtube would be but not github, but it is certainly possible).
It's just me being paranoid after seeing npm/pypi supply chain attacks, and since then I basically run most software touching the internet in a VM one way or another.
I think in this case, my own laziness is what makes it worse than it has to, currently I'm doing whitelisting by domains, so youtube.com for the yt-dlp runner is obviously OK, and I'd want to avoid whitelisting github.com for that, since it's just downloading one JS file.
For now manually copying the config file into my SCM or just whitelisting GitHub for initial download does the trick. I guess I just had to squeeze in one complaint in my previous comment so I could get the HN stamp of approval, can't be too positive.
2 replies →
I've just hit the IPv6 problem. I routinely use yt-dlp -6 to cycle through my (basically infinite) set of IPv6 addresses. However when you do this, it tries the github EJS download over IPv6, which fails as github doesn't support IPv6 (because it's still the year 2000 over there).
Actually I think this is kind of a yt-dlp bug, since it doesn't need to use IPv6 for the github download.
> Although it will be a lot slower, I’m not clear just how slow.
Around 30-50x slower than V8 (node/deno).
I've been recently benchmarking a lot of different engines: https://ivankra.github.io/javascript-zoo/
> Around 30-50x slower than V8 (node/deno).
A solver running at 50ms instead of 1ms I would say is practically imperceptible to most users, but I don't know what time span you are measuring with those numbers.
2 replies →
> It would be great if we could download the solver manually with a separate command
Download a random video and then copy ejs from yt-dlp’s cache directory (I think it’s in /home/username/.cache)
> being able to package it up together with the solver
`make yt-dlp-extra`
https://aur.archlinux.org/packages/yt-dlp-ejs looks like what you need?
No, don't need anything extra, `extra/yt-dlp` works perfectly fine and is enough. You'll get a warning if you run it without the flag:
Providing one of the flags automatically lets it automatically get what it needs. No need for AUR packages :)
Edit: Maybe I misunderstood, now when I re-read your post. You meant it'll prevent the automatic download at runtime perhaps? That sounds about right if so.
Yes exactly, if you install the package you don't need the download the solver on the fly. AT least that's my understanding of what the package is supposed to do. Personally I have no need for it.
I manually installed Deno via Chocolately, but I also installed yt-dlp from choco so it's on v2025.10.22
> It would be great if we could download the solver manually with a separate command, before running the download command
...Can they not just bundle a solver? For that matter, deno is available as a PyPI package.
> as I'm probably not alone in running yt-dlp in a restricted environment
...An environment that doesn't allow you to install Deno, but does allow you to install yt-dlp?
yt-dlp --cookies-from-browser firefox --remote-components ejs:github -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" 'https://www.youtube.com/watch?v=XXX'
It was just updated again today, and at least for me, when you install it using the package name "yt-dlp[default]", it already downloads both deno and the solver automatically.