<html><head></head><body>Hi,<br><br>The same "problem" exists for all tge dozens of system dependencies that VLC has. The packaging system is responsible to handle this. We only provide source code at that level.<br><br>If you do package YoutubeDL, say in the VLC Snap package, then you are responsible for putting a compatible version in there. The VLC run-time can't do much more than fail safe on mismatched version.<br><br>We have the same approach for the decomp stream filter already.<br><br><div class="gmail_quote">Le 21 septembre 2020 11:34:11 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On 2020-09-21 10:30, Marvin Scholz wrote:<br>> <br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><br>On 21 Sep 2020, at 10:22, Steve Lhomme wrote:<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">On 2020-09-20 20:57, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"> This script generates a M3U playlist from a given URL, providing a<br> simple serial format that can be read and parsed by another process.<br><br> There are in principles two other alternative ways to access it:<br><br> 1) Calling the YoutubeDL module directly in-process through CPython.<br>     This poses a number of problems:<br>     - CPython must be loaded by the main executable. Python modules will<br>       fail to resolve their CPython symbols otherwise.<br>     - Multiple CPython interpreters are still very immature; GIL behaves<br>       weirdly. CPython is really not meant for multithread.<br>     - The GIL prevents concurrent uses (that's the whole point of it).<br>     - CPython network I/O cannot be interrupted by VLC interruptions, so<br>       the calling thread may get stuck inside CPython.<br>     - A build-time dependency on CPython is added.<br><br> 2) Parsing the output of the youtube-dl program. This is what MPV does.<br>     But this requires a whole new parser for the Python syntax.<br><br> With a custom Python script, we can decide on the serialisation format<br> that most suits the usage.<hr>   share/Makefile.am     |   2 +<br>   share/ytdl-extract.py | 103 ++++++++++++++++++++++++++++++++++++++++++<br>   2 files changed, 105 insertions(+)<br>   create mode 100755 share/ytdl-extract.py<br><br> diff --git a/share/Makefile.am b/share/Makefile.am<br> index 2373ffbe91..8a92f04360 100644<br> --- a/share/Makefile.am<br> +++ b/share/Makefile.am<br> @@ -49,6 +49,8 @@ nobase_dist_pkgdata_SCRIPTS = \<br>       utils/audio-vlc-default.sh \<br>       utils/video-vlc-default.sh \<br>       $(NULL)<br> +<br> +dist_pkgdata_SCRIPTS = ytdl-extract.py<br>   endif<br>    EXTRA_DIST += \<br> diff --git a/share/ytdl-extract.py b/share/ytdl-extract.py<br> new file mode 100755<br> index 0000000000..2d784c5090<br> --- /dev/null<br> +++ b/share/ytdl-extract.py<br> @@ -0,0 +1,103 @@<br> +#! /usr/bin/python3<br> +#<br> +# Copyright (C) 2020 Rémi Denis-Courmont<br> +#<br> +# This program is free software; you can redistribute it and/or <br> modify it<br> +# under the terms of the GNU Lesser General Public License as <br> published by<br> +# the Free Software Foundation; either version 2.1 of the License, or<br> +# (at your option) any later version.<br> +#<br> +# This program is distributed in the hope that it will be useful,<br> +# but WITHOUT ANY WARRANTY; without even the implied warranty of<br> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br> +# GNU Lesser General Public License for more details.<br> +#<br> +# You should have received a copy of the GNU Lesser General Public <br> License<br> +# along with this program; if not, write to the Free Software <br> Foundation,<br> +# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.<br> +<br> +import sys<br> +import youtube_dl<br></blockquote>How does this work if the import library is not there ? Do we have <br>requirements on the version of the library ? Can we check it in <br>configure.ac ?<br></blockquote>Checking it in configure.ac seems useless as this is about the host <br>system, not a build time requirement.<br>If the library is not there or its the wrong version so API does not <br>match, it the script would just fail<br>which IIUC is handled properly by the access module calling the script.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">Can it be part of contribs ?<br></blockquote>Could be possible, but IMO out of scope of this patchset.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">Should we run python with out local environment with our little set of <br>dependencies ?<br></blockquote>Why would you want to do that? I dont really see any benefit doing so <br>while possibly<br>breaking the import.<br></blockquote><br>I think it's the opposite. Using the system dependencies might be the <br>one breaking the version we support.<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>