Closed Speyedr closed 1 month ago
Note: A peer of mine has pointed out that yt-dlp
supports downloading "1080p (Premium)" quality video streams, and so if the video has such a quality setting, it will pass the protected stream to FFmpeg
, which will of course fail to download it because it doesn't know how to.
This would also need to be somehow addressed, either by figuring out how to download the protected stream using FFmpeg, or preventing yt-dlp
from returning the Premium quality video stream. It should be noted that the stream ID for 1080p Premium is 616
.
Thank you for the extensive description and research!
I've updated the project to use yt-dlp instead of youtube-dl as you suggested and excluded all video formats tagged as premium. Check out the changes here
Feel free to reopen this thread if any of the issues remain unresolved
Seems to be working on my end now, thank you very much!
Likely due to changes on YouTube's end, the current version of
youtube-dl
(used to acquire the video and audio streams) can no longer extract the information necessary to complete a download.While the
youtube-dl
app recommends running an update, this does not (currently) fix the issue. This is because the pip package is no longer updated. The latest version for this package is2021.12.17
, whereas the current ytdl-nightly release is at version2024.07.11
, which has recently received an nsig update which presumably fixes the bug. However, I couldn't find an official pip package for the nightly builds. In fact, the repo hosting these builds explicitly claims that "These nightly releases are not available through package managers like brew."I believe that the easiest solution to this problem that requires the least amount of changes is to switch to a fork of
youtube-dl
known asyt-dlp
which is significantly more robust. It has a pip package and as far as I'm aware the only change necessary would be to import the new module, as the components of theyt-dlp
fork that are used by this project have the exact same shape.Application version: 1.1.10
OS version: Windows 10
Application input:
https://ytks.app/search?url=https://www.youtube.com/watch?v=kvET0B-F2Ow&query=anything good&lvid=kvET0B-F2Ow&lmt=19480
Application output:
[youtube] kvET0B-F2Ow: Downloading webpage [youtube] kvET0B-F2Ow: Downloading player 8d9f6215 ERROR: Unable to extract nsig jsi, player_id, func_codefunction code (caused by RegexNotFoundError('Unable to extract Initial JS player n function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. [youtube] kvET0B-F2Ow: Downloading webpage [youtube] kvET0B-F2Ow: Downloading player 8d9f6215 ERROR: Unable to extract nsig jsi, player_id, func_codefunction code (caused by RegexNotFoundError('Unable to extract Initial JS player n function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. [youtube] kvET0B-F2Ow: Downloading webpage [youtube] kvET0B-F2Ow: Downloading player 8d9f6215 ERROR: Unable to extract nsig jsi, player_id, func_codefunction code (caused by RegexNotFoundError('Unable to extract Initial JS player n function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.')); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Error: Unable to download clip from video "https://ytks.app/search?url=https://www.youtube.com/watch?v=kvET0B-F2Ow&query=anything good&lvid=kvET0B-F2Ow&lmt=19480"
Additional screenshot:![image](https://github.com/user-attachments/assets/7b094c64-3f12-4963-a23a-031e71997ae6)