Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Fix the decrypt function - the decryption of the encrypted videos #3245

Closed
unixfox opened this issue Aug 6, 2022 · 5 comments
Labels
enhancement Improvement of an existing feature

Comments

@unixfox
Copy link
Member

unixfox commented Aug 6, 2022

Currently, the decrypt function doesn't work anymore.

For example, encrypted age-restricted videos won't load anymore as we fetch them not through the special ANDROID user agent that allow to have decrypted URLs for all videos, but instead through the TVHTML5_SIMPLY_EMBEDDED_PLAYER agent.

@PrivacyDevel
Copy link
Contributor

Here are some videos that seem to cause this bug: hc0ZDaAZQT0, 7a0qw5Ziqm8

The bug seems to currently affect some instances but not others.
Here is a list of instances that are now able to play these videos but didn't use to: PrivacyDevel/DPR-addon@c36b7a6

It is also possible that one of these videos works on one instance but not the other one as well. The instances on this list manage to play both.

@PrivacyDevel
Copy link
Contributor

Late update: some invidious instances may or may not play those videos. None of them managed to play them reliably over a longer period of time.

As far as I am aware only my Invidious instance is able to play them reliably because of the patch that I made so that it uses the Piped-Backend in the background to get its videoplayback urls.

@user234683
Copy link

Is it known why it's not working? I have the same decryption method implemented in youtube-local and I'm getting 403s even though parsing the function is working fine. What is yt-dlp doing differently? It doesn't seem to be the nsig decryption (I used --verbose in yt-dlp, took one of the decrypted URLS, undid the nsig decryption, and it still loaded for this decryption-required age restricted video: https://www.youtube.com/watch?v=fV4LHzN_ZKY)

user234683 added a commit to user234683/youtube-local that referenced this issue Apr 25, 2023
Does not work for videos that require decryption because
decryption is not working (giving 403) for some reason.

Related invidious issue for decryption not working:
iv-org/invidious#3245

Partial fix for #146
@unixfox
Copy link
Member Author

unixfox commented Apr 25, 2023

The decryption function is completely outdated, nowadays it's a big JavaScript file that need to be evaluated then the result is the decryption key.

Someone tried to push a fix here: #2222

@github-actions github-actions bot added the stale label Apr 25, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2024
@unixfox unixfox added enhancement Improvement of an existing feature and removed bug Something isn't working stale labels May 26, 2024
@unixfox unixfox changed the title [Bug] Fix the decrypt function - the decryption of the encrypted videos [Enhancement] Fix the decrypt function - the decryption of the encrypted videos May 26, 2024
@unixfox unixfox reopened this May 26, 2024
@iv-org iv-org deleted a comment from github-actions bot May 26, 2024
@unixfox
Copy link
Member Author

unixfox commented Nov 1, 2024

Was fixed with the introduction of inv_sig_helper and will now be moved to invidious companion: #4985

@unixfox unixfox closed this as completed Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants