emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: "Quiliro Ordóñez" <quiliro@riseup.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: watch YT videos through in Emacs [Was: Interest in an Org video meetup?]
Date: Wed, 12 Oct 2022 17:26:10 +0800	[thread overview]
Message-ID: <878rlliea5.fsf@localhost> (raw)
In-Reply-To: <52cf28741d1e497e68a419bd4952fd0d@riseup.net>

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="$1"

if echo "$URL" | grep "youtube.com"; then
    # URL="$(echo "$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="$(echo "$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="${ARCHIVE_DIR}/singlefile.html";
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.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  parent reply	other threads:[~2022-10-12  9:27 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06 13:20 Interest in an Org video meetup? Russell Adams
2022-10-06 13:28 ` Kaushal Modi
2022-10-06 14:40   ` Leslie Watter
2022-10-06 15:28     ` Marcin Borkowski
2022-10-06 17:24       ` Russell Adams
2022-10-07  4:43         ` Marcin Borkowski
2022-10-06 16:33 ` Tory S. Anderson
2022-10-06 20:09 ` Juan Manuel Macías
2022-10-06 21:06   ` Russell Adams
2022-10-07  1:43   ` Ihor Radchenko
2022-10-07  1:47     ` Russell Adams
2022-10-07 10:37       ` Juan Manuel Macías
2022-10-07 11:28         ` watch YT videos through in Emacs [Was: Interest in an Org video meetup?] Quiliro Ordóñez
2022-10-07 13:17           ` Juan Manuel Macías
2022-10-12  9:26           ` Ihor Radchenko [this message]
2022-10-12 10:22             ` Juan Manuel Macías
2022-10-12 10:52               ` Robert Weiner
2022-10-12 10:24             ` Max Nikulin
2022-10-12 11:52               ` Ihor Radchenko
2022-10-07 12:06         ` Interest in an Org video meetup? George Mauer
2022-10-24 18:25           ` Leo Vivier
2022-10-09 15:12     ` Jean Louis
2022-10-06 20:22 ` Rudolf Adamkovič
2022-10-07  6:14 ` Ihor Radchenko
2022-11-06  3:55 ` Ihor Radchenko
2022-11-06 15:00   ` Russell Adams
2022-11-07  3:05     ` Ihor Radchenko
2022-11-07  5:28       ` Timothy
2022-11-07 11:28         ` Russell Adams
2022-11-07 12:05           ` Sacha Chua
2022-11-07 12:08           ` Ihor Radchenko
2022-11-07 12:42             ` Russell Adams
2022-11-07 13:12               ` Sacha Chua
2022-11-08  7:44               ` Ihor Radchenko
2022-11-08 13:02                 ` Russell Adams
2022-11-08 13:45                   ` Ihor Radchenko
2022-11-09  1:45                     ` Sacha Chua
2022-11-09  1:59                       ` Sacha Chua
2022-11-09 14:08                       ` Quiliro Ordóñez
2022-11-09 15:32                         ` Sacha Chua
2023-04-24 20:19     ` Ihor Radchenko
2023-04-24 20:27 ` Carlo Tambuatco
2023-04-26 14:31   ` Matt
2023-04-26 21:13     ` Corwin Brust
2023-04-28  1:43       ` Matt
2023-05-15 14:58       ` Russell Adams
2023-05-15 15:23         ` Ihor Radchenko
2023-05-15 15:43           ` Sacha Chua
2023-05-17 23:52             ` Sacha Chua
2023-06-12 10:39         ` Ihor Radchenko
2023-06-12 12:04           ` Ravi Sagar
2023-07-27  7:52         ` Ihor Radchenko
2023-07-28 12:35           ` Sacha Chua
2023-07-28 12:52             ` Ihor Radchenko
2023-07-29  5:35           ` Adham Omran
2023-07-30  3:53             ` Esteban Ordóñez
2023-07-30 15:49           ` [ANN] [[bbb:OrgMeetup]] on Wed, Aug 9, 19:00 UTC+3 (was: Interest in an Org video meetup?) Ihor Radchenko
2023-08-01 19:07             ` Ravi Sagar
2023-08-02  7:32               ` Ihor Radchenko
2023-08-02  8:11                 ` Ravi Sagar
2023-08-02  8:14                   ` Ihor Radchenko
2023-08-08 15:40             ` Ihor Radchenko
2023-08-10  8:13             ` [SUMMARY] " Ihor Radchenko
2023-08-10  9:13               ` Adham Omran
2023-08-10  9:16                 ` Ihor Radchenko
2023-08-10 10:35                   ` Adham Omran
2023-08-10 19:37               ` Carlo Tambuatco
2023-08-11 10:08                 ` Ihor Radchenko
2023-08-11 16:38               ` William Denton
2023-08-14  3:46               ` [SUMMARY] [[bbb:OrgMeetup]] on Wed, Aug 9, 19:00 UTC+3 Esteban Ordóñez
2023-04-27 12:42 ` Interest in an Org video meetup? Dave Marquardt
2023-04-27 13:26   ` George Mauer
2023-05-05  5:42   ` Adham Omran
2023-05-06 18:20     ` Matt
2023-05-06 18:39       ` Ihor Radchenko
2023-05-06 19:22         ` Adham Omran
2023-05-06 20:05           ` Ihor Radchenko
2023-05-07  8:11             ` Adham Omran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rlliea5.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=quiliro@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).