Remix.run Logo
embedding-shape 17 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.
WD-42 16 hours ago | parent | next [-]

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!

recursive 15 hours ago | parent | next [-]

I use YouTube on a daily basis. I haven't seen any of these problems.

PuercoPop 13 hours ago | parent | next [-]

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

jorvi 11 hours ago | parent | next [-]

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.

SchemaLoad 5 hours ago | parent | next [-]

Almost everything blocks you on a VPN until you sign in now. AI scrapers were the final nail in the coffin.

Eduard 8 hours ago | parent | prev | next [-]

> 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.

mikestorrent 7 hours ago | parent | prev | next [-]

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?

hhh 7 minutes ago | parent [-]

Free speech doesn't die with this. Host your own site.

galaxy_gas 10 hours ago | parent | prev | next [-]

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

immibis 9 hours ago | parent | prev [-]

it's already like that

velcrovan 9 hours ago | parent | prev | next [-]

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.

jcalvinowens 9 hours ago | parent | prev | next [-]

YT works pretty flawlessly for me with firefox on debian. What's the issue you're seeing?

therein 9 hours ago | parent [-]

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.

ciberado 9 hours ago | parent [-]

Same here. Still, I prefer to wait instead of suffering those aggressive ads.

recursive 13 hours ago | parent | prev | next [-]

I'm using Firefox.

MrNeon 13 hours ago | parent | prev | next [-]

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.

viftodi 12 hours ago | parent | next [-]

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.

tedivm 10 hours ago | parent | prev | next [-]

For the last two days I haven't been able to watch youtube videos on Firefox without disabling uBlock.

o11c 11 hours ago | parent | prev [-]

Recently I've found Youtube to just show a white screen if it detects Firefox+uBO.

Ohmec 3 hours ago | parent [-]

There's probably scripts you can add to your ubo to combat this.

RHSeeger 8 hours ago | parent | prev | next [-]

Interesting. I use Firefox and it works flawlessly for me. I wonder if it's a computing power thing?

rajamaka 8 hours ago | parent [-]

I am constantly having serious issues running YouTube (Pentium II, IE3, Windows SQL Server 2003)

rubyn00bie 12 hours ago | parent | prev | next [-]

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.

dotancohen 5 hours ago | parent [-]

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.

TiredOfLife 12 hours ago | parent | prev [-]

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.

johnisgood 12 hours ago | parent | prev | next [-]

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.

ryandrake 6 hours ago | parent [-]

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.

taneq 4 hours ago | parent [-]

This is the essence of enshittification. The good fast useful free offering is the bait, and this... stuff... is the switch.

latexr 14 hours ago | parent | prev | next [-]

Are you using Chrome or a Chromium browser? From experience and reports I’ve seen, that seems to make a huge difference.

recursive 14 hours ago | parent [-]

Firefox

taneq 4 hours ago | parent [-]

There are dozens of us!

dotancohen 5 hours ago | parent | prev | next [-]

YouTube is currently A/B testing some real annoyances:

https://news.ycombinator.com/item?id=45868987

Khaine 8 hours ago | parent | prev | next [-]

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

shevy-java 13 hours ago | parent | prev | next [-]

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.

BrenBarn 12 hours ago | parent | next [-]

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. . .

embedding-shape 13 hours ago | parent | prev [-]

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.

tuhgdetzhh 11 hours ago | parent | prev | next [-]

Only if you use Googles Chrome Browser. Other browsers have issues like Firefox[1].

[1]: https://news.ycombinator.com/item?id=41379517

metalliqaz 11 hours ago | parent [-]

I can no longer watch videos on YouTube with Firefox.

When Firefox dies, the last glimmer of hope will go out.

immibis 9 hours ago | parent [-]

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?

NooneAtAll3 14 hours ago | parent | prev | next [-]

do you never encounter opening youtube video in a new tab only for video itself to load, while rest of the page doesn't?

gaudystead 13 hours ago | parent | next [-]

I experience this, but only with YouTube Shorts. Video loads, but none of the elements around it.

kiwijamo 13 hours ago | parent | prev | next [-]

That's never happened for me and I normally watch 5-10+ YouTube videos daily. Firefox.

wiml 11 hours ago | parent | prev | next [-]

That sounds pretty nice. Is there a way to do it on purpose?

recursive 13 hours ago | parent | prev | next [-]

I've never seen that. I use Firefox.

mikkupikku 14 hours ago | parent | prev | next [-]

That happens to me about 50% of the time. I assume it's google engineers not testing on Firefox.

mavamaarten 13 hours ago | parent [-]

Hah. I always assume it's them actively trying to make the experience worse on anything that is not Chrome.

raydev 11 hours ago | parent | prev | next [-]

Are you running any extensions that modify content?

riidom 13 hours ago | parent | prev | next [-]

Yes happens sometimes to me, Vivaldi.

busymom0 12 hours ago | parent | prev | next [-]

This has happened to me frequently.

Also many times, the video won't play. If I reload the page, then it will play.

thenthenthen 13 hours ago | parent | prev [-]

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

dtlarson 13 hours ago | parent | prev [-]

[dead]

tux1968 15 hours ago | parent | prev | next [-]

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.

embedding-shape 15 hours ago | parent | next [-]

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?

do_not_redeem 15 hours ago | parent [-]

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.

xmcp123 5 hours ago | parent | prev [-]

This absolutely screams graphics card drivers problems to me.

tux1968 3 hours ago | parent [-]

Does it? Why do they play perfectly fine after being downloaded?

WorldPeas 13 hours ago | parent | prev | next [-]

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

gilfoy 15 hours ago | parent | prev | next [-]

I use YouTube daily in safari and edge, this is complete hyperbole.

zimpenfish 15 hours ago | parent | next [-]

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.)

sebra 14 hours ago | parent [-]

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.

zimpenfish 8 hours ago | parent [-]

> 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.

phplovesong 15 hours ago | parent | prev | next [-]

Youtube is pretty unusable, as they throttle videos, and links sometimes dont work. It has gone downhill fast in recent years.

ConceptJunkie 15 hours ago | parent | next [-]

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.

cons0le 14 hours ago | parent | next [-]

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 )

weaksauce 14 hours ago | parent | next [-]

> 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.

charcircuit 14 hours ago | parent | prev | next [-]

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.

raydev 11 hours ago | parent | prev | next [-]

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.

jack_pp 12 hours ago | parent | prev | next [-]

You get music discovery, radios, go to album, go to artist

j45 14 hours ago | parent | prev [-]

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.

supportengineer 14 hours ago | parent | prev | next [-]

No one ever got a promotion for maintaining software

anonym29 14 hours ago | parent | prev [-]

Quick, everyone start sending unwanted junk mail to this guy's house, he'll pay you to stop!

dyselon 14 hours ago | parent [-]

Heaven forbid someone pay for an online service they use and enjoy.

kiwijamo 13 hours ago | parent | prev | next [-]

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).

ranger_danger 14 hours ago | parent | prev | next [-]

No issues here for me with uBO, logged in or not, no premium

shermantanktop 15 hours ago | parent | prev [-]

No idea what you are talking about. I don’t have premium and use in both logged in and logged out.

nancyminusone 15 hours ago | parent [-]

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.

embedding-shape 14 hours ago | parent | prev | next [-]

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.

darkwater 13 hours ago | parent [-]

> 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.

Too 10 hours ago | parent | next [-]

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.

embedding-shape 13 hours ago | parent | prev [-]

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)?

badlibrarian 13 hours ago | parent [-]

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.

komali2 15 hours ago | parent | prev [-]

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...

mschuster91 15 hours ago | parent | prev | next [-]

> 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.

ranger_danger 14 hours ago | parent [-]

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)

ElijahLynn 15 hours ago | parent | prev [-]

I use YouTube in a browser (Brave) almost everyday. Works great for me.

qwerpy 15 hours ago | parent | next [-]

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.

15 hours ago | parent [-]
[deleted]
cons0le 14 hours ago | parent | prev [-]

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

Wowfunhappy 16 hours ago | parent | prev | next [-]

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.)

mike-cardwell 9 hours ago | parent | next [-]

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"]
embedding-shape 14 hours ago | parent | prev | next [-]

> 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.

Wowfunhappy 12 hours ago | parent | next [-]

> 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.

embedding-shape 11 hours ago | parent [-]

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.

Wowfunhappy 10 hours ago | parent | next [-]

> 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.

embedding-shape 8 hours ago | parent [-]

Correct, the data needed to solve the challenge comes from YouTube.

imnewton 4 hours ago | parent | prev [-]

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?

j45 14 hours ago | parent | prev [-]

This is the way. Leaving so many packages with unfettered access to your system is only so secure.

dspillett 15 hours ago | parent | prev | next [-]

> 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).

embedding-shape 14 hours ago | parent | next [-]

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.

dspillett 14 hours ago | parent | next [-]

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.

j45 14 hours ago | parent | prev [-]

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.

rwmj 13 hours ago | parent | prev [-]

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.

Cogito 4 hours ago | parent | prev | next [-]

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!

ivankra 14 hours ago | parent | prev | next [-]

> 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/

ranger_danger 14 hours ago | parent [-]

> 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.

ivankra 13 hours ago | parent [-]

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...):

  $ 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.031s
So about 10x slower for the current flavor of YouTube challenges: 0.2s -> 2.2s.

A 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.202s
ivankra 2 hours ago | parent | next [-]

Tidied 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).

rdtsc 12 hours ago | parent | prev [-]

Thanks for the benchmark!

I tried it on my slower laptop. I get:

   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
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!
15 hours ago | parent | prev [-]
[deleted]
gamer191 16 hours ago | parent | prev | next [-]

> 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`

khannn 16 hours ago | parent | prev | next [-]

I manually installed Deno via Chocolately, but I also installed yt-dlp from choco so it's on v2025.10.22

mnmalst 13 hours ago | parent | prev | next [-]

https://aur.archlinux.org/packages/yt-dlp-ejs looks like what you need?

embedding-shape 13 hours ago | parent [-]

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:

    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/EJS
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.

mnmalst 13 hours ago | parent [-]

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.

Jogo_Alex 14 hours ago | parent | prev | next [-]

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'

zahlman 10 hours ago | parent | prev | next [-]

> 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?

rmunn 3 hours ago | parent [-]

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.)

ranger_danger 14 hours ago | parent | prev | next [-]

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.

adam1996TL 6 hours ago | parent | prev [-]

[flagged]

efskap 6 hours ago | parent [-]

Claude wrote this comment. I recognize the "you're hitting on a", "your X is the correct architectural fix"