emacs-orgmode
[Top][All Lists]
Advanced

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

Re: watch YT videos through in Emacs [Was: Interest in an Org video meet


From: Robert Weiner
Subject: Re: watch YT videos through in Emacs [Was: Interest in an Org video meetup?]
Date: Wed, 12 Oct 2022 06:52:04 -0400

 More info on my blog in Spanish (if anyone is interested, I can translate it)

Yes, please translate it to English.

-- rsw


On Wed, Oct 12, 2022 at 6:24 AM Juan Manuel Macías <maciaschain@posteo.net> wrote:
Ihor Radchenko writes:

> Quiliro Ordóñez <quiliro@riseup.net> writes:
>
>> Hola Juan Manuel.
>>
>>> There is the YouTube option, which I imagine no one would like (me
>>> neither). The only thing in its favor is that Invidious can be used to
>>> watch the videos. BTW, I watch YT videos through Invidious in Emacs,
>>> with the Ytel package and EMMS/MPV.
>>
>> Nice.  Is there a guide to do this specificly?
>
> I simply use
>
> #+begin_src bash :tangle ~/.local/bin/qutebrowser-call.sh :shebang #!/bin/bash
> URL=""> >
> if echo "$URL" | grep "youtube.com"; then
>     # URL="" "$URL" | sed -r 's/\\(www\\)?youtube\.com/invidious.namazso.eu/')"
>     if [[ ! -z $(echo "$URL" | grep "/watch") ]]; then
>       mpv $URL && exit;
>     fi
> fi
>
> if echo "$URL" | grep "ted.com/talks"; then
>       mpv $URL && exit;
> fi
>
> # if echo "$URL" | grep "reddit.com"; then
> #     URL="" "$URL" | sed -rE 's/www\.reddit\.com/libredd.it/')"
> # fi
>
> if echo "$URL" | grep "bilibili.com"; then
>     mpv $URL && exit;
> fi
>
> grep "$URL" ~/.data/web-mirror/sources/* >/dev/null 2>&1 &&\
>     ARCHIVE_DIR="$(echo "$URL" | archivebox-cmd list 2>/dev/null | tail -n1 | cut -d' ' -f1  | sed -r 's|/data|~/.data/web-mirror|')"
>
> if [[ ! -z "$ARCHIVE_DIR" ]]; then
>     [[ -f "${ARCHIVE_DIR}/singlefile.html" ]] && URL=""> > fi
>
> #from https://github.com/qutebrowser/qutebrowser/blob/master/scripts/open_url_in_instance.sh
> _url="$URL"
> _command=":later 4000 :jump-mark last-position"
>
> qutebrowser "${_command}" ":spawn -u untrack-url -r -O ${_url}"
>
> #+end_src
>
> and my mpv is configured to use youtube-dl.

In this short video I show an example of my procedure to watch youtube
videos without leaving Emacs:

https://cloud.disroot.org/s/X3cfi2orT38CPyM

I use:

1. Helm-google-suggest (set to use duckduckgo)

2. Ytel (based on elfeed). With a few hacks that I have added, in order
to:

  - Display thumbnails in the searches.

  - Watch the video at point (via invidious) with EMMS/MPV,
    configured with yt-dlp, which is a fork of youtube-dl that works
    much better.

  - Download the video at point with yt-dlp (full video or only audio)

  - Create a bookmark of the video with org-capture

More info on my blog in Spanish (if anyone is interested, I can translate it):

https://gnutas.juanmanuelmacias.com/ytel_invidious.html

Best regards,

Juan Manuel


reply via email to

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