Live data from Hacker News

Bypassing YouTube video download throttling

blog.0x7d0.dev

91–100 of 242 posts

Re: Bypassing YouTube video download throttling

#93
Anyone else having throttling problems with yt-dlp lately? I always watch youtube through mpv that uses yt-dlp on the background, but last week it's been terrible. It starts quickly (I've throttled it to 500kBps so that's the starting speed) but then after a while I'm getting a second of stream for three seconds of download, so I gotta queue up the video long time before playing. I'm using git version of yt-dlp and haven't noticed anything related in the git issues.

Re: Bypassing YouTube video download throttling

#94
post #66

Earlier quoted context omitted.

Sooner or later, youtube will do the same thing as twitch, which is to dynamically splice ads into the video stream - making it impossible to block with current mechanisms. They don't do it yet, probably because they don't see the need quite yet. But i have no doubts that it will happen sooner or later. Adblocking will have to evolve to a new level to block such things.

splicing video is pretty easy - there are certain points - key frames - where video streams can be spliced with nearly zero computational overhead, no loss of quality, no loading delay, etc.

Indeed, we've done exactly this with production quality adverts where we'd add real-time information (e.g. betting odds) into the ad at selected points.s

Re: Bypassing YouTube video download throttling

#95
post #74

Earlier quoted context omitted.

>Almost all of them have the same protection: some code that triggers only when you open the tools and stops the video by creating a debugger statement you cannot skip If you missed it, not so long ago there was a submission that evaded exactly this. Their solution is so simple yet effective: Recompiling the browser with the debugger keyword renamed. Made me smile. https://news.ycombinator.com/item?id=36961445

Honestly recompilation shouldn't even be necessary, browsers should just let us disable the debugger statement when "clever" sites start taking advantage of it. This usage of debuggers to circumvent our tools is abuse and should be literally impossible unless we consent to it. Our computers are our realms. God giveth and god taketh away.

Chrome Developer Tools allows this. There's a button in the Source tab to deactivate breakpoints from debug statements. The button looks like an arrow cut in half.

Re: Bypassing YouTube video download throttling

#96
post #17
post #10

Technically, all interesting. Ethically, if you don't only think “fuck Google”, I feel like it's reasonable to stop after the first optimization (“pass the real browser test to get regular browser speeds”). There you're not “wasting” any more of YouTube's resources than a browser user with ad-block. Getting full Gb/s without paying anything feels to me like you're pushing all the ad-blocked users' luck. But then agai…

>Ethically, if you don't only think “fuck Google" Companies do not have ethics, only interests. It's only natural I behave similarly.

> It's only natural I behave similarly.

Are you meaning towards everyone? Or are you meaning your behaviour back towards those companies?

Re: Bypassing YouTube video download throttling

#97
post #24

Earlier quoted context omitted.

The only real thing they could try to do is to try enforcing video/IP speed cap. They probably don't due to false positives - for example people jumping around a long video also make may "range" requests. And the other approach is currently in progress - soon logged users won't be able to view videos without watching(or at least displaying/downloading) adds, so the logical next step is to nerf anonymous(as is without…

There’s plenty they could do. They could flip a switch tomorrow and limit access to only signed-in users, and they could further enable DRM, as pretty much by now the majority of users are already on DRM-handicapped platforms. Any will-be-called "legacy" users would just get limited to 480p.

> They could flip a switch tomorrow and limit access to only signed-in users

Huge amount of users of youtube are literally babies, they don't know how to read or write so they don't sign in.

I'm starting to also suspect the trend of YTs algorithm insisting on recommending videos you've already watched is also a decision from this huge baby user base.

Re: Bypassing YouTube video download throttling

#98

I've never tried YouTube, but I have downloaded videos from sketchier streaming websites using the web developer tools. Almost all of them have the same protection: some code that triggers only when you open the tools and stops the video by creating a debugger statement you cannot skip and triggering some cpu-heavy code (probably an infinite loop, although I wouldn't discard cryptominers). More importantly this code…

Have you tried using wireshark to analyze the traffic? That's the first idea I had since you said these pages are trying to detect your browser's developer tools.

Re: Bypassing YouTube video download throttling

#99

Earlier quoted context omitted.

Like, press the "Download" button and pay for Premium?

Premium is not available worldwide. I tried to trick google by creating an account using VPN in Europe. I even managed to subscribe for Premium. Even with an active Premium subscription Youtube app won't let me use its features such as downloading, background play and picture in picture (you know, basically everything) Because "you live in the wrong part of the world". Creating a problem, selling the solution is what…

Baffling they enforce those fake restrictions in parts of the world the product to enable them doesn't exist.

The fact Apple allows Google to resell their multitasking and PIP features as part of their own subscription is pretty un-Apple.

Re: Bypassing YouTube video download throttling

#100
post #4

So make a nice, good documented blog post for google engineers to understand and fix this issue?? Whyy

There's nothing in there that wasn't obvious to the engineers who implemented the throttling. 1. Solve the challenge the same way the browser would. By actually running the JS code. 2. Segmented downloading. Pretty sure they allow that on purpose so starting or resuming a video feels snappy.

> Pretty sure they allow that on purpose so starting or resuming a video feels snappy.

Also for switching to a different bitrate stream seamlessly.

Post reply on HN