[vlc-devel] [PATCH 1/4] share: add wrapper script for the YoutubeDL Python module

Steve Lhomme robux4 at ycbcr.xyz
Thu Sep 24 09:20:37 CEST 2020


On 2020-09-23 17:43, RĂ©mi Denis-Courmont wrote:
> This script generates a M3U playlist from a given URL, providing a
> simple serial format that can be read and parsed by another process.

Shouldn't it give access to the actual DASH/HLS/whatever manifest so 
that our adaptive streaming stack can be used in the most optimum way ? 
Will this turn every adaptive streaming source (or most) into a 
simplified playlist ? Including live adaptive streams ?

> There are in principles two other alternative ways to access it:
> 
> 1) Calling the YoutubeDL module directly in-process through CPython.
>     This poses a number of problems:
>     - CPython must be loaded by the main executable. Python modules will
>       fail to resolve their CPython symbols otherwise.
>     - Multiple CPython interpreters are still very immature; GIL behaves
>       weirdly. CPython is really not meant for multithread.
>     - The GIL prevents concurrent uses (that's the whole point of it).
>     - CPython network I/O cannot be interrupted by VLC interruptions, so
>       the calling thread may get stuck inside CPython.
>     - A build-time dependency on CPython is added.
> 
> 2) Parsing the JSON output of the youtube-dl program. This is what MPV
>     does (through Lua, ironically), but it requires a whole new parser
>     for the JSON schema. This patch reuses an existing playlist parser.
> 
> With a custom Python script, we can decide on the serialisation format
> that most suits the usage.


More information about the vlc-devel mailing list