[vlc-devel] [PATCH 2/4] ytdl: access module for YoutubeDL

Pierre Ynard linkfanel at yahoo.fr
Tue Sep 22 19:10:22 CEST 2020


> That sounds like a terrible idea. What is the extra time and memory
> consumption added to every HTTP call ?

It forks a new process and launches the python interpreter in it, then
youtube-dl checks the URL against its list of supported websites. If
unsupported, it throws an exception and prints a stack trace to stderr,
but nothing to stdout. The ytdl access then detects the lack of output
and fails the access module probing.

Forking a python process sounds subobtimal indeed, but I don't see a
better way that avoids that. youtube-dl support hundreds of website at
the same time, including ones you never heard of or would never think
of. It's the component that has the up-to-date knowledge of what's
supported or not, so it's not possible to detect that without calling
it.

Among the few things we could do, is deciding not to enable it by
default, or adding a hardcoded website whitelist - partial, duplicated
and/or out of date - in the access module. But both would be very
self-defeating.

-- 
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."


More information about the vlc-devel mailing list