这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@AminurAlam
Copy link
Contributor

yt-dlp recently added a new requirement of deno for solving javascript challanges yt-dlp/yt-dlp#14404 (comment)

@AminurAlam
Copy link
Contributor Author

AminurAlam commented Sep 25, 2025

so deno isnt available on 32-bit systems...

i dont think yt-dlp should also be limited to 64-bit only (by doing TERMUX_PKG_EXCLUDED_ARCHES="i686, arm"), because it technically works even without deno for websites other than youtube. it could be declared as an optional dependency, but then some people might miss installing it and yt-dlp will not work out of the box.

is there a way to make yt-dlp depend on deno only for 64-bit systems? i can think of splitting this package into python-yt-dlp-64 and python-yt-dlp-32. any better ideas?

@robertkirkman
Copy link
Member

Not going to work because Deno does not support 32-bit. This will need to be a separate package that is only enabled for 64-bit targets.

denoland/deno#2295 (comment)

@robertkirkman
Copy link
Member

is there a way to make yt-dlp depend on deno only for 64-bit systems?

yes, separate package. I suggest actually the name python-yt-dlp-deno, but up to you.

@robertkirkman
Copy link
Member

In my opinion, it might also be better to wait for upstream yt-dlp to finish the nodejs support as an alternative to Deno and force the Termux package into defaulting to nodejs instead. This is because Nodejs supports 32-bit.

https://github.com/yt-dlp/yt-dlp/pull/14157/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5

@robertkirkman
Copy link
Member

robertkirkman commented Sep 25, 2025

seemingly, the reason deno will be preferred and recommended as the default choice by upstream is because deno has a better security model in the general case than Nodejs:

yt-dlp/yt-dlp#14404 (comment)

I do see a pretty valid point in that because, if I understand correctly, the concern is that Youtube and any other sites that require the change will be running non-free Javascript on the device, when the videos are downloaded, and that is possibly more unsafe than using a web browser to do so, because Nodejs does not, as far as I know, have the same kind of sandbox for Javascript that browsers do. Maybe deno does have a similar sandbox.

@Biswa96
Copy link
Member

Biswa96 commented Sep 25, 2025

Would it be appropriate to added deno in TERMUX_PKG_RECOMMENDS ?

@AminurAlam
Copy link
Contributor Author

AminurAlam commented Sep 25, 2025

i previously wrote this

it could be declared as an optional dependency, but then some people might miss installing it and yt-dlp will not work out of the box.

i think most people ignore optional dependencies.
downloading from the youtube website is the most common usecase for yt-dlp, not having deno alredy installed will cause a lot of failed downloads. maybe yt-dlp will give users warning that deno is required and then people will have to install it manually.

@licy183
Copy link
Member

licy183 commented Sep 25, 2025

I think it should be added in RECOMMENDS rather than DEPENDS. It will be automatically installed by default unless the user specifies the --no-install-recommends flag.

@robertkirkman
Copy link
Member

I think it should be added in RECOMMENDS rather than DEPENDS. It will be automatically installed by default unless the user specifies the --no-install-recommends flag.

I assumed it may also be a build dependency, if it is not a build dependency and is only an optional runtime dependency, then yes that is good.

@licy183
Copy link
Member

licy183 commented Sep 25, 2025

In Termux, deno only ships binary, and it is also the practice of most distributions, so I think yt-dlp won't use it as a build dependency.

@TomJo2000
Copy link
Member

As far as I understand from the discussion linked above this is a soft, runtime-only, dependency.
So it shouldn't need to go in the DEPENDS field anyway.

@AminurAlam
Copy link
Contributor Author

AminurAlam commented Sep 28, 2025

i was going to rebase and push changes but github auto closed the pull 😢, and new commits i push arent showing up
the changes are trivial so feel free to open a fresh pr, while i learn how to use git

@TomJo2000
Copy link
Member

Happens, just make a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants