-
Rémi Denis-Courmont authored
This script generates a JSON playlist from a given URL, providing a simple serial format that can be read and parsed by another process. The JSON schema is the same as YoutubeDL's. 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) Calling the YouTubeDL executable directly. This is impractical because logging infos get interleaved on the standard output alongside the proper output data. Worse yet, there are no obvious ways to separate (flat) playlist extraction and item parsing (which becomes necessary in a later patch in the series). 3) Using a playlist format already supported by VLC (as done in previous versions of the patchest). This causes loss of potentially useful information.
3f5d4031