emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] emms-info-ytdl


From: Daniel Semyonov
Subject: Re: [PATCH] emms-info-ytdl
Date: Tue, 10 Dec 2024 01:21:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

>>>>> Yuchen Pei writes:

    > On Tue 2024-12-10 00:17:43 +0200, Daniel Semyonov wrote:
    >>>>>>> Yoni Rabkin writes:

    >> > Konstantin <reichcv@gmail.com> writes:
    >> >> Hello,
    >> >> 
    >> >> Few years ago Yuchen Pei started to develop emms-info-ytdl (branch
    >> >> info-ytdl), which provides info for links like:
    >> >> https://www.youtube.com/watch?v=.....
    >> >> 
    >> >> I do not know why these changes where not accepted in master.
    >> >> Perhaps it is because ytdl is called synchronously, and therefore
    >> >> emms-info-ytdl freezes Emacs.

    >> > You would need to dive into these threads to read the backstory:
    >> > https://lists.gnu.org/archive/html/emms-help/2022-03/msg00035.html
    >> > https://lists.gnu.org/archive/html/emacs-devel/2022-03/msg00754.html

    >> > If the situation has changed in the interim, I'm willing to reconsider
    >> > merging it into Emms.

    >> Using yt-dlp with Invidious or Piped just makes it redirect the requests
    >> to Youtube, and I haven't looked too deep into it but there's still a
    >> JavaScript interpreter included in yt-dlp which is imported by the
    >> Youtube extractor (so it is very likely to still run JavaScript code
    >> locally in order to function).

    >> It's a shame really, as yt-dlp supports many sites other than Youtube,
    >> but obviously using an info method in EMMS should never run non-free
    >> code automatically.

    > Instead of relying on youtube-dl or yt-dlp, why not just do it all in
    > emacs? If you fetch a youtube video url (e.g. the rickroll video
    > https://youtube.com/watch?v=dQw4w9WgXcQ) without executing any
    > javascript (e.g. with wget), the resulting html includes all the video
    > metadata info - just search for "var ytInitialPlayerResponse" and the
    > json value that's assigned to it contains the video metadata needed by
    > emms-info.

Not a bad idea, though I think in this won't work in the EU as Youtube
will try to display an intermediate page due to GDPR (not tested, I'm
not in the EU, I experienced a similar issue in the past while using a
VPN).  An alternative could be to use an Invidious instance, but this
might also be unreliable (I usually use yewtu.be, doesn't seem to work
for the Rickroll video for example).

It will also limit this info method to Youtube only.

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]