Live data from Hacker News

Bypassing YouTube video download throttling

blog.0x7d0.dev

151–160 of 242 posts

Re: Bypassing YouTube video download throttling

#151
post #95

Earlier quoted context omitted.

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.

This doesn't work for debugger statements.

You're wrong, it very much does work for debugger

Re: Bypassing YouTube video download throttling

#152
post #74

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…

>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

> Their solution is so simple yet effective: Recompiling the browser with the debugger keyword renamed

Not exactly what I'd call simple...

Re: Bypassing YouTube video download throttling

#153
YouTube changes small things in this process all the time. I used to work on an internal editing tool for YouTube videos that needed the MP4 files. Every month or so the editor would break because of a YouTube change and I needed to dive into the debugger to see what they changed and adjust to that.

Re: Bypassing YouTube video download throttling

#154

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…

I just use the logs of my filtering proxy.

What proxy do you use?

Re: Bypassing YouTube video download throttling

#155
post #75

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…

You can use something like mitmproxy or HTTP Toolkit to examine things exactly, as those can't be interacted with or detected like the dev tools can.

You can also use mitmproxy to remove or add debugger statements.

Re: Bypassing YouTube video download throttling

#156
post #77

Earlier quoted context omitted.

What filter the player uses for scaling (and chroma scaling) affects sharpness. Playing a native resolution stream fullscreen should eliminate differences here for monochrome edges. Depending on OS you might be able to toggle rapidly between two fullscreen apps to test for differences (cf ISO 29170-2, which recommends 5 Hz). Colour shifts (as in, input != output, not gradients) can come from bad handling of video col…

I'm "eyeballing" switching between Infuse and YouTube on an Apple TV 4k 2nd Gen (2021). The Sony TV is 1080p but I've been chosing 1440p now in YouTube as it definitely looks better overall (more details). The downloaded video is also 1440p, same audio/video streams as far I can tell. So both Infuse and YouTube will do some scaling to the viewport 1440 > 1080p. This is an example video: https://www.youtube.com/watch?…

Have you used `mediainfo` to check the codecs, bitrate and encoding settings? Curious what you'd find there...

Re: Bypassing YouTube video download throttling

#157

On a sidenote am I imagining things or do videos actually look a tiny bit better in YouTube? This really has puzzled me. I downloaded a few favourites and watch them on VLC or Infuse on my AppleTV. In the YouTube app I can use the "nerd stats" to confirm I am viewing the exact same video/audio streams... ... it could be my imagination but it seems like YouTube does a really subtle kind of filter that makes the "block…

I can answer about the audio. YouTube (and most other streaming sites like Spotify etc) use something called ReplayGain. It's essentially a tag that specifies the calculated average loudness of the video/song/whatever (this number is calculated at upload time). Upon playback, the official YT client knows to use that tag and adjust its volume level accordingly, but I'd imagine either the tag isn't getting downloaded,…

Interesting! TIL!

Re: Bypassing YouTube video download throttling

#158

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…

One trick that sometimes works for me on Firefox is shift+right click the video -> This Frame -> Open Frame in New Tab. and the dev tools work there

Sometimes, especially if you're on the mobile version of the site, the video will be an actual tag you can open in another tab.

Also, the "Open With"[0] browser extension can detect a video/frame's URL when you right click on it, if you want to use that to quickly open it in yt-dlp/mpv.

0: https://addons.mozilla.org/en-US/firefox/addon/open-with/

Re: Bypassing YouTube video download throttling

#159
post #66

Earlier quoted context omitted.

I don't think youtube really cares if you pirate their content or use a 3rd party client. What they care about is you wasting their bandwidth. For an ad-supported video streaming site, bandwidth is normally more expensive than revenue - Google only manages to make it just about work because they have probably the worlds cheapest bandwidth due to being able to bully ISP's into peering with them for free. (they don't l…

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.

Then how do they report back to the advertisers that the ads weren't skipped?

Edit: Or make them unskippable?

Re: Bypassing YouTube video download throttling

#160

Earlier quoted context omitted.

They already lowered bitrates for non premium members.

Proof? The news I recently saw, if you're referring to that, actually said they'd offer a higher-bitrate 1080p option for YouTube Premium, not that they'd lock the (then) current bitrate behind YouTube Premium and downgrade everyone else. Edit: I did some searching. In addition to that, the only relevant news I could find were about Google testing locking the 4K (2160p) resolution behind the Premium doors, which they…

I was speaking from anectodal evidence because I've been feeling my 1080p streams look worse than before the new option showed up.

But it seems I'm mistaken [1].

[1] https://www.theverge.com/2023/2/23/23612647/youtube-1080p-pr...

Post reply on HN