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

Alexandre Janniaux ajanni at videolabs.io
Mon Sep 21 02:59:30 CEST 2020


Hi,

On Mon, Sep 21, 2020 at 02:20:38AM +0200, Pierre Ynard via vlc-devel wrote:
> Date: Mon, 21 Sep 2020 02:20:38 +0200
> From: Pierre Ynard <linkfanel at yahoo.fr>
> To: vlc-devel at videolan.org
> Subject: Re: [vlc-devel] [PATCH 1/2] share: add wrapper script for the
>  YoutubeDL Python module
> User-Agent: Mutt/1.5.23 (2014-03-12)
>
> > 2) Parsing the output of the youtube-dl program. This is what MPV does.
> >    But this requires a whole new parser for the Python syntax.
>
> I'm confused. What Python syntax? Do you mean JSON?
>
> Now I can see that the youtube-dl binary can output stream URLs, or
> stream information extracted as JSON. Is there anything else it can
> output?
>
> We don't have JSON support in the core like we do for XML, but we've
> mentioned that need elsewhere already.
>
> > With a custom Python script, we can decide on the serialisation format
> > that most suits the usage.
>
> This introduces two levels of indirection: this intermediary Python
> script, and then writing the M3U playlist that will then have to be
> re-parsed by the playlist demux.
>
> What about doing this directly in the access module? And what about
> using the same redirection trick that the HTTP access uses for ICY
> streams? Wouldn't that also solve the long-standing URL expiration
> issue? Moreover, having direct access to core APIs, would it be possible
> to extract a playlist *and* set which item to start playing within it,
> instead of starting with the first item? I'm not sure this would be
> possible going through an M3U playlist.

I have mixed feeling on how to handle the URL reinterpretation here.
I've tried to find a solution for this for a long time but it's quite
difficult to define what we want here.

My first idea was to move to stream extractor but it's annoying in the
case we only handle metadata and input item because we need to
reimplement stream.

The second and most promising idea is what vlc-android is doing, meaning
adding the real origin in the metadata of the file, since it's a UI meta.

In the second case, it's perfectly usable with playlist by adding the
meta, but this is not the scope of the current patchset.

Regarding changing the module, it's an access module, and provide
the features with really few lines, so I don't understand why the
approach needs to be changed.

> Or what about even directly plugging youtube-dl's output of the
> downloading stream as the access's output? (Although I guess there might
> be issues with that.)

I think Rémi covered that with the issues integrating python C api.

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

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list