youtube-dl: n-parameter: Unhandled exception in decode
Checklist
- I’m reporting a broken site support issue
- I’ve verified that I’m running youtube-dl version 2021.12.17
- 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 bug reports including closed ones
- I’ve read bugs section in FAQ
Verbose log
[2023-04-20 10:45:46,804 - INFO] Downloading Парибок Андрей. Искусство сопряженное с психотехнологиями. Трансляция состояний и намерений. (id 21922) from https://youtu.be/i2-ViOyC7Ek
[debug] Encodings: locale cp1251, fs utf-8, out utf-8, pref cp1251
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.10.5 (CPython) - Windows-10-10.0.19045-SP0
[debug] exe versions: ffmpeg 4.2.3, ffprobe 5.1.2-full_build-www.gyan.dev
[debug] Proxy map: {}
[youtube] i2-ViOyC7Ek: Downloading webpage
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (Unhandled exception in decode; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.
org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
File "C:\Users\USER\AppData\Local\pypoetry\Cache\virtualenvs\wapatools-3SjGFAFe-py3.10\lib\site-packages\youtube_dl\extractor\youtube.py", line 1672, in _n_descramble
raise ExtractorError('Unhandled exception in decode')
youtube_dl.utils.ExtractorError: Unhandled exception in decode; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call you
tube-dl with the --verbose flag and include its complete output.
)
[debug] Invoking downloader on 'https://rr3---sn-fpaq25g3-oa8l.googlevideo.com/videoplayback?expire=1681998348&ei=rO1AZOLpGMOM7ATZ17jIDQ&ip=109.104.175.34&id=o-AKknyKgyubMl4R9EHIXwjBdgPDw6dl3Tx7K0_vRY3z0R&itag=140&source=youtube
&requiressl=yes&mh=QJ&mm=31%2C29&mn=sn-fpaq25g3-oa8l%2Csn-3c27snel&ms=au%2Crdu&mv=m&mvi=3&pcm2cms=yes&pl=21&initcwndbps=1542500&vprv=1&mime=audio%2Fmp4&ns=6BAWLWBNpwisYfXPM4aWKiUM&gir=yes&clen=59473523&dur=3674.813&lmt=164976146
2988446&mt=1681976453&fvip=15&keepalive=yes&fexp=24007246&c=WEB&txp=1311224&n=3cemMzCD7mQvT9&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAMvN1Ck7ififLU9D
gB2gUEyMJIq-Chp90btXUIsM_4EXAiBrVtfI5tuSrr74nfCB0Bfc3CqJs4qb3O_CHCXnLgDnNA%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgWPmhU0H_-_-em5QH0po1qzSn7vHNYSV8QH8FD5CUX00CIHTF3ofj_wY5cga1_z7
r_T4Gc4yi6z28HdeyCpBIeZBF'
[dashsegments] Total fragments: 6
[download] Destination: D:\au\youtube\Парибок Андрей. Искусство сопряженное с психотехнологиями. Трансляция состояний и намерений.-i2-ViOyC7Ek-20161004.m4a
Description
When attempting to download from Youtube, I get Unable to decode n-parameter: download likely to be throttled (Unhandled exception in decode error. Downloading happens at low speed ~50-80 Kib/s
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 33 (17 by maintainers)
Commits related to this issue
- [jsinterp] Minimally handle arithmetic operator precedence Resolves #32066 — committed to dirkf/youtube-dl by dirkf a year ago
- [jsinterp] Handle NaN in bitwise operators * also add _NaN * also pull function naming from yt-dlp — committed to ytdl-org/youtube-dl by dirkf a year ago
It’s just that, currently, the player ID is only shown in the debug output when first downloading the player JS, and not when fetching from cache.
Coming soon (the above commit):
Already fixed in master: https://github.com/ytdl-org/youtube-dl/issues/32292#issuecomment-1603399597
See #32292.
Success:
The relevant change:
Thank you, @dirkf !
Ok thanks again! ps: Commit 211cbfd5d fixes the problem.
Please try the brand new master code (#31530 provides updating instructions if you’re not just checking it out with git, but the unofficial nightly builds won’t be updated yet). Also, perhaps first, try
--no-cache-dirand if that works--rm-cache-dir. The problem expression is in the player code that is processed correctly here.Your URL is working fine here: hence the question.
You can just pull the
jsinterp.pyfrom my repo, or apply the diff, if you want to integrate this into your Python script ASAP.https://github.com/yt-dlp/yt-dlp/issues/6131#issuecomment-1516363514
Oh, I’m sorry. I’m actually using a script here, not the CLI, so the log is not cropped. But here are the options I use:
And this happens to every video I try to download. Started yesterday.
Please post the whole log without cropping the top!
In this case, I can see that you’re trying to get the YT video with ID
i2-ViOyC7Ek, but not what options you used. Anyhow, I can reproduce the issue and will investigate.