yt-dlp sure has gotten complicated
Posted: Thu Feb 05, 2026 2:02 am
I noticed Arch pulled in a javascript runtime called "deno" with yt-dlp. It's a fairly large package. When it started coming up in updates often, I thought: Bollocks!
At that time I was able to just remove deno (it wasn't a hard package dependency) and just use yt-dlp without it. Then, Arch being Arch, they split out a separate package called yt-dlp-ejs, made that a package dependency for yt-dlp and made deno a package dependency for it.
So bollocks... I just started rolling up my own yt-dlp. That's a waste of time for scripts and/or bytecode but I won't have some big redundant javascript interpreter that they can't leave alone, just for snagging the occasional youtube video.
It still works without javascript, but warns admonishingly:
Alright, alright, I have a node.js installation that I built for compiling Firefox. There's no reason I can't use that, eh?
Even that's not good enough, it admonishes for the solver javascript code (ejs). Sigh... OK, I'll just do it temporary like, since it downloads player shit every time anyway. (This stuff gets cached in ~/.cache/yt-dlp so it doesn't actually have to download those players and solver script every time)
That shuts it up but now I've got an awful command line. Fine... I'll make a wrapper script. Very simple.
I have it as /usr/local/bin/yt-dlp-get so it's in PATH.
At that time I was able to just remove deno (it wasn't a hard package dependency) and just use yt-dlp without it. Then, Arch being Arch, they split out a separate package called yt-dlp-ejs, made that a package dependency for yt-dlp and made deno a package dependency for it.
So bollocks... I just started rolling up my own yt-dlp. That's a waste of time for scripts and/or bytecode but I won't have some big redundant javascript interpreter that they can't leave alone, just for snagging the occasional youtube video.
It still works without javascript, but warns admonishingly:
Code: Select all
[grogan@nicetry Downloads]$ yt-dlp -t mp4 https://www.youtube.com/watch?v=QQd0BAQlL2M
[youtube] Extracting URL: https://www.youtube.com/watch?v=QQd0BAQlL2M
[youtube] QQd0BAQlL2M: Downloading webpage
WARNING: [youtube] No supported JavaScript runtime could be found. Only deno is enabled by default; to use another runtime add --js-runtimes RUNTIME[:PATH] to your command/config. YouTube extraction without a JS runtime has been deprecated, and some formats may be missing. See https://github.com/yt-dlp/yt-dlp/wiki/EJS for details on installing one
[youtube] QQd0BAQlL2M: Downloading android vr player API JSON
[info] QQd0BAQlL2M: Downloading 1 format(s): 137+140
[download] Destination: Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].f137.mp4
[download] 100% of 24.45MiB in 00:00:04 at 6.07MiB/s
[download] Destination: Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].f140.m4a
[download] 100% of 4.33MiB in 00:00:00 at 7.56MiB/s
[Merger] Merging formats into "Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].mp4"
Deleting original file Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].f140.m4a (pass -k to keep)
Deleting original file Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].f137.mp4 (pass -k to keep)
[VideoRemuxer] Not remuxing media file "Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].mp4"; already is in target format mp4Code: Select all
[grogan@nicetry Downloads]$ yt-dlp -t mp4 --js-runtimes node:/storage2/shit/build/node/bin/node https://www.youtube.com/watch?v=QQd0BAQlL2M
[youtube] Extracting URL: https://www.youtube.com/watch?v=QQd0BAQlL2M
[youtube] QQd0BAQlL2M: Downloading webpage
[youtube] QQd0BAQlL2M: Downloading android vr player API JSON
[youtube] QQd0BAQlL2M: Downloading web safari player API JSON
[youtube] QQd0BAQlL2M: Downloading player 4e51e895-tv
[youtube] [jsc:node] Solving JS challenges using node
WARNING: [youtube] [jsc] Remote component challenge solver script (node) was skipped. It may be required to solve JS challenges. You can enable the download with --remote-components ejs:github (recommended). For more information and alternatives, refer to https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: [youtube] QQd0BAQlL2M: Signature solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: [youtube] QQd0BAQlL2M: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to https://github.com/yt-dlp/yt-dlp/wiki/EJS
[info] QQd0BAQlL2M: Downloading 1 format(s): 137+140
[download] Destination: Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].f137.mp4
[download] 100% of 24.45MiB in 00:00:01 at 12.47MiB/s
[download] Destination: Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].f140.m4a
[download] 100% of 4.33MiB in 00:00:00 at 12.55MiB/s
[Merger] Merging formats into "Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].mp4"
Deleting original file Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].f137.mp4 (pass -k to keep)
Deleting original file Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].f140.m4a (pass -k to keep)
[VideoRemuxer] Not remuxing media file "Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].mp4"; already is in target format mp4Code: Select all
[grogan@nicetry Downloads]$ yt-dlp -t mp4 --js-runtimes node:/storage2/shit/build/node/bin/node --remote-components ejs:github https://www.youtube.com/watch?v=QQd0BAQlL2M
[youtube] Extracting URL: https://www.youtube.com/watch?v=QQd0BAQlL2M
[youtube] QQd0BAQlL2M: Downloading webpage
[youtube] QQd0BAQlL2M: Downloading android vr player API JSON
[youtube] QQd0BAQlL2M: Downloading web safari player API JSON
[youtube] QQd0BAQlL2M: Downloading player 4e51e895-tv
[youtube] [jsc:node] Solving JS challenges using node
[youtube] [jsc:node] Downloading challenge solver lib script from https://github.com/yt-dlp/ejs/releases/download/0.4.0/yt.solver.lib.min.js
[youtube] QQd0BAQlL2M: Downloading m3u8 information
[info] QQd0BAQlL2M: Downloading 1 format(s): 96
[download] Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].mp4 has already been downloaded
[download] 100% of 28.90MiB
[VideoRemuxer] Not remuxing media file "Uriah Heep - Dreammare (high quality audio) [QQd0BAQlL2M].mp4"; already is in target format mp4I have it as /usr/local/bin/yt-dlp-get so it's in PATH.
Code: Select all
#! /bin/bash
read -p "Paste youtube video URL here: " VIDURL
yt-dlp -t mp4 --js-runtimes node:/storage2/shit/build/node/bin/node --remote-components ejs:github $VIDURL