-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Description
Checklist
- I'm reporting a broken site support
- I've verified that I'm running youtube-dl version 2025.05.05
- I've checked that all provided URLs are alive and playable in a browser
- I've checked that all URLs and arguments with special characters are properly quoted or escaped
- I've searched the bugtracker for similar issues including closed ones
Verbose log
... to come ...
Description
Since your webbrowser's HTML5 video player isn't good enough for YT, every video page that you open downloads a 2MB JS module. yt-dl wouldn't care about it except that accessing the video content requires some of this code to be run, in particular to resolve the signature and n-sig challenges without which the video download won't succeed. We were able to do this thanks to a minimal JS interpreter module JSInterp within yt-dl.
Currently, a new style of player JS is beginning to be sent where the challenge code is no longer modular but is hooked into other code throughout the player JS.
In the past yt-dl and yt-dlp projects have maintained the JSInterp module in the face of novel challenge features, but this doesn't seem to be practical now. Even if JSInterp could run the new player JS code you might have to wait orders of magnitude longer for your YT video.
yt-dlp is initially solving this problem in two ways:
- as an interim measure, enable forcing a known-good player JS, while that is still valid
- as a full solution, support solving the challenges using the deno JS runtime.
The same solutions can be implemented in yt-dl, but for the yt-dl use-case to support watching videos on platforms that have no, or can have no, browser, deno (basically, a headless browser JS) is equally impractical. A more lightweight solution should be sought.