Thursday, October 17, 2024

Re: yt-dlp missing 3 dependencies?

On Thu, Oct 17, 2024 at 12:01:17AM +0100, Stuart Henderson wrote:
> On 2024/10/16 23:37, Stuart Henderson wrote:
> > On 2024/10/15 19:15, Anon Loli wrote:
> > > hello, folks
> > >
> > > I had previously compiled OpenBSD by myself and applied some azalia patch which
> > > fixed my computer for OpenBSD.
> > >
> > > After doing sysupgrade the other day, to 7.6, yt-dlp seems to be broken.
> > > I even tried deleting everything like so: pkg_delete -Xa, which did not help.
> > >
> > > The fix is installing the following 3 libraries:
> > > py-certifi
> > > py-urllib3
> > > py-requests
> >
> > or more, from pyproject.yaml:
> >
> > dependencies = [
> > "brotli; implementation_name=='cpython'",
> > "brotlicffi; implementation_name!='cpython'",
> > "certifi",
> > "mutagen",
> > "pycryptodomex",
> > "requests>=2.32.2,<3",
> > "urllib3>=1.26.17,<3",
> > "websockets>=13.0",
> > ]
> >
> > some are probably only used for certain site handlers but probably
> > makes sense to follow upstream's list.
>
> oops, sent too soon - wrong path for certifi and we don't have a
> cryptodomex port (we probably should) but the main user for the latter
> is hls which can use ffmpeg instead:
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/www/yt-dlp/Makefile,v
> diff -u -p -r1.43 Makefile
> --- Makefile 29 Sep 2024 19:56:58 -0000 1.43
> +++ Makefile 16 Oct 2024 22:57:32 -0000
> @@ -2,6 +2,7 @@ COMMENT = CLI program to download videos
>
> VERSION = 2024.09.27
> MODPY_EGG_VERSION = ${VERSION:S/.0/./g}
> +REVISION = 0
>
> DISTNAME = yt-dlp-${VERSION}
> DISTFILES = yt-dlp-${VERSION}{yt-dlp}${EXTRACT_SUFX}
> @@ -18,6 +19,17 @@ SITES = https://github.com/yt-dlp/yt-dl
> MODULES = lang/python
>
> MODPY_PYBUILD = hatchling
> +
> +# from pyproject.toml; also lists cryptodomex which we don't have in
> +# ports but the main use is for hls which can use ffnpeg instead
> +RUN_DEPENDS = archivers/py-brotli${MODPY_FLAVOR} \
> + archivers/py-brotlicffi${MODPY_FLAVOR} \
> + devel/py-certifi${MODPY_FLAVOR} \
> + audio/py-mutagen${MODPY_FLAVOR} \
> + www/py-requests${MODPY_FLAVOR} \
> + www/py-urllib3${MODPY_FLAVOR} \
> + net/py-websockets${MODPY_FLAVOR}
> +RUN_DEPENDS += graphics/ffmpeg
>
> TEST_DEPENDS += devel/flake8
>

So I was not "doing it" wrong? *wipes sweat from forehead*
Also a slight typo in the comment, it's "ffnpeg", should be "ffmpeg".
I almost sent the above sentence with a typo myself - "type"

I cannot live without yt-dlp, my entire life depends on it... it is the main
and actually the only way that I access internet media such as videos,
primarily YouTube.



I have been writing a data hoarding script for YouTube, Odysee (and PeerTube?)
called "archivemedia".
I have been working on it a few years and rewriting it.

I spent insurmountable time, effort and extensive testing which took a lot of
storage space as well as downloading time... but war if it was not worth it
after all!

archivemedia can do the following:
- download a single video, a single audio, entire playlists or even
channels, all with efficient parameters
- video audio quality || audio as selected, all available audio tracks for
example many languages (example MrBeast's videos)
- downloads subtitles and puts them in a separate directory
- downloads info.json file containing ALL data related to the video
- downloads ALL comments and separates them in a file
- downloads thumbnails
- every video/audio is in it's own directory names for example
2024y08m26d II It's TOO Easy to Accidentally Do Illegal Stuff with This II 00h11m10s II OPckpjBSAOw /
- if entire channel, it creates directories accordingly not just for videos but
also for playlists and puts everything where it ought to be
- I2P and Tor proxy options
- replaces given URL with the main site configured, useful if you're giving it
a link someone else gave you
- TODO switch instances if current one overloaded/offline/broken
- 10 other TODOs

While writing this dream script, the most difficult thing was getting the
script to be reliable, so that you can leave it running FOR DAYS while it
downloads the ENTIRE channel that you want, with 0 interaction.

Why all that? Because information is priceless, more valuable than money.
Be it for learning, sharing, caring or entertainment, YouTube is still a
paradise for yt-dlp users, but it won't be that for long if you have been
tracking YT's policy changes in 2023-4, you'll know what I mean.


You can also very easily make your own YouTube from the data downloaded by
archivemedia, because everything is uniquely sorted as well as parsable by jq,
the JSON processor.
You can then use that information to place it on your web-site or some
application, literally your own YouTube, be it for public use or just your
"offline YouTube" browser for your media.


I hope that you, dear reader, grasped my love for yt-dlp use-wise.
Yt-dlp itself is a piece of shit bloated concept, but it makes the use of
JavaScript evil extinct!
I believe that videos, and even embedded images have no place in something like
a web-site!

I love the Gemini-style protocol because of that



--
Anon Loli
#########
This mortal strives for omnisciency. Some tags: perfectionist, minimalist,
researcher, scientist, philosopher, developer, autist, anarchist, data hoarder,
99 other tags and interests.

I am always up for conversing as long as you meet these requirements:
1. Use PGP encryption for all data shared,
2. Use a open source operating system,NOT Windows, NOT MacOS,
3. Have a open mind - are ready to let go of any and all imperfect views on
anything, if they are.
Let's change this world for the better, one action at a time
########################
<anonloli@autistici.org>

No comments:

Post a Comment