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.
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
They've also started to be really aggressive against VPNs. I've tried Private Internet Access, Mulvad and AirVPN and often I have to cycle through 5-15(!) servers before YouTube stops saying "sign in to confirm you're not a bot".
Discord has started to become absurdly aggressive with it too, to the point that they don't even let you load messages whilst logged in if you're on a VPN.
It really makes me feel like there will be an inflection point in a few years, where the internet is cleaved in two. You'll have the 'free' internet that is full of interesting stuff but also full of malware, spam and scams, and you'll have the squeaky clean corporate internet, basically a facsimile of WeChat's super-app, of which you'll only have access with a government ID. No VPNs or anti-fingerprinting allowed.
Almost everything blocks you on a VPN until you sign in now. AI scrapers were the final nail in the coffin.
> It really makes me feel like there will be an inflection point in a few years, where the internet is cleaved in two.
Hasn't it been like that for already many years?
arguably, already 90's AOL very much pushed its users to stay within its walled garden.
100%. Web Credentials + Digital ID + age verification will all be handled with Secure Attestation backing it. Cloudflare will have a checkbox for site admins... [X] Require Age Verification... and that's it. Boom. Your site is "safe" from accidentally allowing kids in.
...of course, free speech and anonymity die with this, but why would that be a problem? You don't want to say anything the current or potential future government wouldn't like, do you?
Free speech doesn't die with this. Host your own site.
The year is 2041. Google announces that only a negligible fraction of users acceses websites outside of the clean pool. These users are at risk, they claim, due to "all the bad stuff on the free web". They refuse to clarify if this refers to malware or to content not aligned with The Party doctrine. However, they draw the consequence that "free web" sites will no longer be supported by Chrome, to protect the users. Less than an hour later, Mozilla releases a new version of Firefox that also disables access to websites that were not whitelistet by The Party, using the same reasoning.
Press fork.
For Discord it is basic rate limiting ( anty-VPN is other separate thing require phone number )
There a bunch of bad actors doing mass scrape of all public server and history via all of those VPN
What's so clean about YouTube, Discord, X etc? It's full of low quality content, scams, malware, influencers, advertisers and other scum and villainy.
I think it refers to the fact they can deperson you from their platforms if they want to. It's only "dirty" and "clean" if you emphasize the quote marks, but it's definitely "heavily censored" and "free".
There are allegations going around that e.g. some platforms are lax on child protection because some high up executives are pedophiles. But I'd still place those platforms in the "heavily sanitised" bucket if they're heavily restricting everything else. Those platforms just have a slightly different definition of "clean" than most of us.
You can say Roblox directly you know, Death Eaters aren’t coming after you for saying the name.
Mullvad Frankfurt 102 seems to always be OK in this regard.
it's already like that
I use it on Firefox and Safari on Mac OS (mainly Safari), and it's been OK except it's started doing a thing where it blips a bit after roughly the first 1sec of video plays.
I wonder if being a YouTube Premium subscriber is also a factor here. I do pay for it so I don't see ads. But maybe the way ads are being served/injected has changed things for the worse for people that get them.
I use Firefox with uBlock and besides a couple of times where video start was delayed by a few seconds it has been working as well as before.
Google does A/B testing for anti ad blockers.
Not only do I get slowdowns and some videos don't load at all at times, but I also get a notification that explains that the reason is using adblockers.
Here I am, totally given up on adblockers, and no way I’m paying for premium, but jesus christ the amount of ads I get, sometimes seems to be one every minute, making most videos unwatchable.
Though it’s mostly good for my addiction since it makes me use youtube less.
For the last two days I haven't been able to watch youtube videos on Firefox without disabling uBlock.
I had the same problem. Make sure you're running the latest version of uBlock Origin. By that I mean you should explicitly check for updates and install the latest version. That fixed it for me.
I've disabled adblock/vpn and can watch maybe 1-2 videos before the video player starts blacking out on each one. Only restarting firefox "resets" it and I haven't been able to find a reason for this happening. Time for yt-dlp I guess
I disable youtube instead when this happens.
If I care enough I'll yl-dlp it to my jellyfin server, but yeah I mostly just don't bother.
Recently I've found Youtube to just show a white screen if it detects Firefox+uBO.
There's probably scripts you can add to your ubo to combat this.
Yeah, big same here. It’s pretty frustrating, because I pay for YouTube premium, but cannot use my preferred browser. I have to use Chromium in order to have it work reliably. Doubly so considering it worked fine in Firefox for YEARS… until maybe six months ago?
It feels like something the FTC should be investigating, or perhaps a European equivalent, but I doubt it will.
The FTC will not investigate anything that was not reported to them. Did you report your experience? They do care about these issues, if you care enough to take six minutes to report it.
YT works pretty flawlessly for me with firefox on debian. What's the issue you're seeing?
If you are blocking ads now, the videos will start in a very delayed fashion almost as if the server is waiting the length expected for the ad to take before streaming you any bytes.
Same here. Still, I prefer to wait instead of suffering those aggressive ads.
The worst part is if someone doesn’t put 2+2 together and starts blaming their ISP for poor load issues because their Youtube “keeps buffering” because of this continue cat-and-mouse game messing with the player client.
I do not enjoy having to troubleshoot “Youtube isn’t working” calls where it’s because of this adblock ‘protection’ bullshit.
It’s just as bad as Ad-Shield’s bullshit “an error occured loading this page” — no, the page loaded just fine until your malware decided to dump the CSS and hijack my pageload to some “error-report.com” website to tell me my adblocker did it.
I've seen that too, but it's still better than somebody yelling in your face about toilet paper.
I use Firefox + uBlock Origin on both Linux (Debian 12) and on Android to watch Youtube without ads and it works without issue.
I'm using Firefox.
I use Chrome and it's not good. They recently removed ability to force AV1 to only low resolution videos and as a result I had to disable HW acceleration in Chrome because accelerated AV1 decoding is broken on Steam Deck.
Interesting. I use Firefox and it works flawlessly for me. I wonder if it's a computing power thing?
I am constantly having serious issues running YouTube (Pentium II, IE3, Windows SQL Server 2003)
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.
It feels like "serving you the video you actually want to see" has become some kind of unimportant side quest, as opposed to serving you the crap (Ads, Shorts, recommendations, comments, sponsored content) that they would rather you be looking at.
This is the essence of enshittification. The good fast useful free offering is the bait, and this... stuff... is the switch.
YouTube is currently A/B testing some real annoyances:
Are you using Chrome or a Chromium browser? From experience and reports I’ve seen, that seems to make a huge difference.
Firefox
There are dozens of us!
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.
I've been seeing weird stuff where the video will play but the page is unresponsive: can't click to pause, can't click the time index bar to move to a different point in the video, etc. Then I close the tab, and the audio keeps playing! It will play for 10-15 seconds before cutting out. Bizarre. . .
I had that happen some week ago too! I had to clear site data + cookies for YouTube in Firefox before I got it to work again.
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
do you never encounter opening youtube video in a new tab only for video itself to load, while rest of the page doesn't?
That's never happened for me and I normally watch 5-10+ YouTube videos daily. Firefox.
That sounds pretty nice. Is there a way to do it on purpose?
I know that's a tongue-in-cheek joke, but just in case I'm fond of the plugin unhook.
I experience this, but only with YouTube Shorts. Video loads, but none of the elements around it.
This has happened to me frequently.
Also many times, the video won't play. If I reload the page, then it will play.
I've never seen that. I use Firefox.
That happens to me about 50% of the time. I assume it's google engineers not testing on Firefox.
Hah. I always assume it's them actively trying to make the experience worse on anything that is not Chrome.
Are you running any extensions that modify content?
Yes happens sometimes to me, Vivaldi.
I have, and recently, i nothing is loading until i open a new video in another tab, then all of a sudden both pages start loading and playing :s
Only if you use Googles Chrome Browser. Other browsers have issues like Firefox[1].
I can no longer watch videos on YouTube with Firefox.
When Firefox dies, the last glimmer of hope will go out.
I considered it as motivation to switch more from Firefox to Zen, where it works, I guess because Google doesn't recognize it as Firefox and doesn't apply the anti-competition script?
[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?
yt-dlp + 4K works fine for me. The only special thing I remember doing is adding the impersonate feature (which it prompts you to do if it needs it). In other words, instead of `uv tool install yt-dlp`, run `uv tool install yt-dlp[default,curl-cffi]`
The version in the Arch repos does not include the impersonate feature.
This absolutely screams graphics card drivers problems to me.
Does it? Why do they play perfectly fine after being downloaded?
On Linux? One can dream But if the correct drivers are installed and work, I think it will solve the issue.
> 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)
How are you using Youtube if you feel like it is "barely working"?
I personally use Youtube almost exclusively for my entertainment. I am using Chromium on Raspberry Pi 5. I am running some flavor of uBlock, SponsorBlock, and some Shorts remover extension. It just works.
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.)
I have the same issue. I think it's because I'm adblocking because if I try in chrome with no adblocker it loads the ads instantly.
But eh either 5s of black screen or 60s of ads. I tried watching a 15 min yt video without adblock and it had 5 ad breaks with some unskippable ads.
> I tried watching a 15 min yt video without adblock and it had 5 ad breaks with some unskippable ads.
Yeah - I watch most of my YouTubes on the Apple TV and the ads are a pestilence. Sometimes it'll be 50s pre-roll[1] with multiple 30-50s breaks for a 10m videos.
Luckily there exist[0] many fine technologies that let you view them without ads via something like Infuse with a DLNA server if you're that way inclined.
[0] Currently. YT-DLP is fighting the good fight but I don't know how much longer they'll be able to keep in front. But then I'll just stop watching YouTube, really, because it's a horror show without adblock/circumventions.
[1] The video doesn't appear in your history until the pre-roll has finished which means if you can't be arsed sitting through a 50s pre-roll just that second and - at least on the Apple TV - you've not clicked on the video from your homepage / subscriptions, good luck trying to find it again unless you remember the name + channel etc. (which it also won't properly show you until after the pre-roll!)[2]
[2] I hate YouTube corporate.
Youtube is pretty unusable, as they throttle videos, and links sometimes dont work. It has gone downhill fast in recent years.
I have no problems with YouTube at all. Perhaps it's because I pay for Premium (primarily to get YouTube music).
Regardless, Google services getting worse over time is becoming a law rather than a tendency.
I don't get the value ad of youtube music. Everything's already on youtube and they let you make playlists, and they have playlists of the top charts already.
What else does youtube music get you? I can play on my phone with the screen off with yt vanced ( and I would never pay just for that feature, because I remember when it was free and they took it away )
> I can play on my phone with the screen off with yt vanced
there's a lot of iphone/ipad users out there.
> Everything's already on youtube and they let you make playlists, and they have playlists of the top charts already
I don't use it but ui probably. ads maybe. plenty of people have money and don't want the inconvenience of trying to get around it.
No ads on music, no ads on shorts (shorts are allowed to freely use copyrighted music unlike long form video), background playback, downloading music to your device. These all are big value ads for me.
You can play youtube videos (ad free) as music on any chromecast device including chromecast homes with the microphone turned off.
Also, when playing music you won't be hit with ads.
Your setup can move with you wherever you are, home, travel, in the vehicle. This can be helpful for engaging the audible sensors of small aliens sans screen.
Youtube without ads on every device, anywhere, is quite a different experience.
You get music discovery, radios, go to album, go to artist
For me, it just comes with Premium, and I buy Premium to support the creators I watch often without having to watch ads. I want them to get paid.
Quick, everyone start sending unwanted junk mail to this guy's house, he'll pay you to stop!
Heaven forbid someone pay for an online service they use and enjoy.
Their point is that it's not "paying for" but it's "paying off".
Sure, it's just a poor analogy. YouTube doesn't show up at your door unprompted as junk mail does. You go there intentionally for the purpose of watching a video. You can pay for that video with your time or your money. No one is being "paid off" in that scenario.
Third option: I don't pay for it, I don't load the ads, and the trillion dollar company figures out a way to live with the economic consequences of their own decisions.
The company voluntarily decided to serve the content at no charge to consumers, at the company's own expense, to the internet at large, with no reasonable expectation of any obligations from the people they're freely offering the content to.
They're welcome to stop freely offering it the moment they decide they don't want to be the world's most popular video sharing and viewing platform anymore.
Until then, neither I nor anyone else has any obligation to pay them, run any part of their front-end code (includig the ad-serving parts), or view any of their ads.
I do, but not for services that treat their users (and content creators!) like YT does.
No one ever got a promotion for maintaining software
They limit the buffer to around 30secs or so like all other streaming services but otherwise 95%+ of the time it just plays smoothing with no buffering at all from start to end. YouTube is generally in the top 3 of the video streaming services I use. Even on 4G wireless (which I occassionally use) it works well enough which is impressive as other video steaming services struggle (with the sole exception of Netflix which is probably the only one better than YouTube).
No issues here for me with uBO, logged in or not, no premium
No idea what you are talking about. I don’t have premium and use in both logged in and logged out.
If I'm logged out, I get "Sign in to confirm you're not a bot" about once a week from both home and the office.
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.
> That's a bit like complaining no cars have trouble because your Fiat doesn't have a problem.
No. Because even if it might be complicated, any website developer can test their website against a wide array of browsers, in a more or less automated way.
When it comes to video it’s not only the browser. It’s also your gpu, your OS and your gpu drivers.
Notably, YouTube these days prioritize AV1 codec even if you don’t have gpu acceleration for it, making lots of systems fall back to CPU decoding and making it completely unusable. Install the h264ify extension to force h264 during content negotiation and get your gpu decoding back.
Even if you can make a matrix of all those combinations, it’s even more complex than that to test in practice. Take my laptop for example, it starts off good and manages the cpu decoding for a while, a few minutes into a video it overheats and throttles, causing stutter.
What YouTube should do on the other hand, and I’m sure they already do, is to collect metrics from all playbacks. That should show black on white how many users struggle with each codec.
I don’t think I’m in any minority here given how many million installations the h264ify extension has. Google simply care more about their bandwidth cost than the user experience.
So you're expecting Google engineers and managers to prioritize adding broad cross-browser support, which adds more work for them, when the same company is also developing a competing browser?
No, Firefox always been a second-rate guest at Google properties, and I'm not expecting it to change soon either. Why would they make it better when status quo means more Chrome users (in their mind)?
It's not 2003, the browser isn't the battle.
I would expect YouTube managers to pressure the Chrome managers, because YouTube brings in billions of dollars every month. Likewise I would expect the trend to move in favor of YouTube, because the browser loses money at an increasing amount and YouTube generates money at an increasing amount. 70% of YouTube happens on Mobile, and in the US more people are now watching on TVs than phones. Source: Nielsen, the old-school company that has huge influence over ads.
The site pops a literal warning saying "having problems? turn off your ad blocker" so I'm not sure where the mysteries lie here.
They're testing on thousands of devices. And they're probably even testing against ad-blockers on your bro-browser. But they're certainly not motivated to optimize that experience, so you get what you get.
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...
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.
- [deleted]
Brave is a series scam company.
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.
The original point was this:
> > IMO it seems like it should safe to trust code being served by Google on the official Youtube domain
Which came from a misunderstanding about where the downloadable solver script comes from, as it doesn't come from youtube.com, it comes from github.com (yt-dlp org), I was just correcting that misunderstanding.
> You can’t very well run yt-dlp without trusting yt-dlp code.
That makes a ton of sense and I agree! I'm not sure how that is related to anything though? I download yt-dlp from Arch repositories, so yes I'm trusting Arch maintainers and of course yt-dlp developers. Then I'm adding a manifest which controls what this application can actually access, which is basically a VM config, where I define that it can access youtube.com (and a bunch of other sites I mirror/archive). This is the part that shouldn't have github.com/* access.
Again as mentioned, not a big issue, plenty of workarounds, so not the end of the world.
> Which came from a misunderstanding about where the downloadable solver script comes from, as it doesn't come from youtube.com, it comes from github.com (yt-dlp org), I was just correcting that misunderstanding.
But that script is ultimately running a JS challenge from Youtube, right? That’s why we actually needed a JS runtime in the first place.
Correct, the data needed to solve the challenge comes from YouTube.
Restricting or sandboxing software is something I've been looking into recently. Would you mind sharing what you use and possibly an example as well? Perhaps an example for yt-dlp?
This is the way. Leaving so many packages with unfettered access to your system is only so secure.
This works for me:
FROM python:3-slim RUN python3 -m pip --no-cache-dir install 'yt-dlp[default]' RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -q -y ffmpeg curl unzip \ && curl -fsSL https://deno.land/install.sh -o /tmp/deno.sh \ && sh /tmp/deno.sh -y \ && mv /root/.deno/bin/deno /usr/local/bin/ \ && rm --force --recursive /var/lib/apt/lists/* /tmp/* /var/tmp/* ENTRYPOINT ["yt-dlp"]Thank you!
> 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.
You could serve the files yourself from a server populated by updating them from github after review. You'd need to either sign the domain with your own CA that the host running yt-dlp trusts, or patch yt-dlp to use a different server name, but neither of those steps should be too onerous.
It's not paranoid, it's more attack surfaces that don't need to be.
Happy to read and learn more about the setups you've found helpful to do this.
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.
You can set up a 'socat' process to listen on a certain IPv6 address and relay traffic to GitHub, and add it to your hosts file, and you don't even need to break TLS since it's forwarding traffic unchanged
> 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.
My page is about generic JS benchmarks. Just did a quick run with a sample javascript challenge I got via yt-dlp (https://raw.githubusercontent.com/ivankra/javascript-zoo/ref...):
So about 10x slower for the current flavor of YouTube challenges: 0.2s -> 2.2s.$ time ./v8 /bench/yt-dlp.js | md5sum - a730e32029941bf1f60f9587a6d9554f - real 0m0.252s user 0m0.386s sys 0m0.074s $ time ./quickjs /bench/yt-dlp.js | md5sum - a730e32029941bf1f60f9587a6d9554f - real 0m2.280s user 0m2.507s sys 0m0.031sA few more results on same input:
spidermonkey 0.334s v8_jitless 1.096s => about the limit for JIT-less interpreters like quickjs graaljs 2.396s escargot 3.344s libjs 4.501s brimstone 6.328s modernc-quickjs 12.767s (pure Go port of quickjs) fastschema-qjs 1m22.801s (Wasm port of quickjs) boa 1m28.070s quickjs-ng 2m49.202sTidied up benchmark and results: https://gist.github.com/ivankra/a950b2c37db48c66fe5dceb0acd8...
Looks like quickjs is the next best option after the big three engines (V8/JSC/SM).
Thanks for the benchmark!
I tried it on my slower laptop. I get:
A 5x slowdown for an interpreted C JS engine is pretty good I think, compared to all the time, code and effort put into v8 over the years!node(v8) : 1.25s user 0.12s system 154% cpu 0.892 total quickjs : 6.54s user 0.11s system 99% cpu 6.671 total quickjs-ng: 545.55s user 202.67s system 99% cpu 12:32.28 total
I've found having yt-dlp available on my iPhone useful, and used Pythonista to achieve that, but haven't figured out how to get the new requirements to work yet. Would love any ideas people have!
- [deleted]
Can QuickJS be compiled to WASM and executed in WASM sandbox?
> 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 :)WARNING: [youtube] [jsc] Remote components challenge solver script (deno) and NPM package (deno) were skipped. These may be required to solve JS challenges. You can enable these downloads with --remote-components ejs:github (recommended) or --remote-components ejs:npm , respectively. For more information and alternatives, refer to https://github.com/yt-dlp/yt-dlp/wiki/EJSEdit: 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.
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'
I manually installed Deno via Chocolately, but I also installed yt-dlp from choco so it's on v2025.10.22
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.
> 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 doesn't need to be installed, you can download the binary from GitHub and run it without installing. You might say that a restricted environment really really should prevent running binaries just downloaded from the Internet, and I agree (malware could do many nasty things to a user's home folder without needing to request admin access), but some people think merely preventing admin access is enough. So for anyone under that kind of restricted computing environment, yt-dlp used to run just fine until Google's changes to Youtube forced them to add a Deno requirement. (Though I haven't yet checked if Deno could also be run without installing.)
> Though I haven't yet checked if Deno could also be run without installing.
A third party is packaging it for PyPI (although yt-dlp doesn't support this, nobody has properly verified it etc.) and the wheel looks to be just a monolithic executable and a "tell me the executable path" wrapper (much like the official PyPI package for uv), so I would assume it can.