yt-dlp will soon require a JavaScript runtime for YouTube downloads

3 respuestas [Último envío]
Jacob K
Desconectado/a
se unió: 01/13/2022

https://github.com/yt-dlp/yt-dlp/issues/14404

yt-dlp will soon require a JavaScript runtime called Deno [1] to solve the JavaScript challenges that YouTube generates to try to prevent people from downloading videos. The developer who posted the issue thread suggested updating the integrated interpreter could be possible, but maintaining that interpreter would be much more expensive (to the point of impracticality) than it was in the past, because the challenges have gotten a lot more complicated. yt-dlp will be switching to a "AST-based approach" instead; I'm not sure whether this means for sure that the JavaScript is actually "executed," but maybe someone who understands this better can weigh in.

The existing integrated JavaScript interpreter was already a bit controversial [2], but it seems like most people thought it was okay, as yt-dlp is included in Trisquel, Guix, Parabola, and PureOS. I thought Hyperbola used hypervideo instead, which removed the built-in interpreter, but now it seems like they don't have either package.

After this change, it seems like downloading YouTube videos may require downloading and executing nonfree JavaScript. I don't know how this interacts with Trisquel's rules, since yt-dlp is still useful to download videos from other websites, but it could be easy to run nonfree software accidentally depending on how this is implemented. On the other hand, the usecase for the nonfree JavaScript that is downloaded and executed is unlike most software, so maybe it doesn't matter as much that it is nonfree.

Long term, it seems good to move away from YouTube. Maybe it would be a good idea to ask people who make YouTube videos to release them under a free license, so that someone else could choose to mirror the channel to PeerTube or something similar. If we don't yet have enough resources to host lots of videos that way, even just a directory of video channels with mostly libre videos could be helpful for the future. Does anyone know if something like this exists? (I suppose CC-BY-ND videos would also work for this specific purpose.)

What do you think about this upcoming change to yt-dlp? Should we modify yt-dlp to remove this new feature? Maybe downloading from Invidious instead is a good idea, but running an Invidious instance would probably also require running nonfree software in that case.

[1] https://deno.com/
[2] https://lists.gnu.org/r/guix-devel/2019-08/msg00073.html

Avron

I am a translator!

Desconectado/a
se unió: 08/18/2020

it could be easy to run nonfree software accidentally depending on how this is implemented

It is currently easy to run nonfree Javascript accidentally in abrowser, like what will happen if one goes to YouTube website.

I suppose CC-BY-ND videos would also work for this specific purpose

Yes, or perhaps even CC BY-NC-ND.

Legimet
Desconectado/a
se unió: 12/10/2013

To be honest, I mostly watch Youtube videos in the browser, running a lot of nonfree JS. So I have bigger things to worry about than yt-dlp running nonfree JS. But this sucks nonetheless.

Zoma
Desconectado/a
se unió: 11/05/2024

invidio instance or similar?

or regular youtube?

The first is wiser if possible.

Only issue is if its not age appropriate they will give you a hard time allowing it on other frontends like a bunch of effing idiots.

Damn google...