From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6JLeGa+cRmMxDAAAbAwnHQ (envelope-from ) for ; Wed, 12 Oct 2022 12:53:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YPfKGa+cRmPgQQEAauVa8A (envelope-from ) for ; Wed, 12 Oct 2022 12:53:35 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E2F0C3FBF for ; Wed, 12 Oct 2022 12:53:34 +0200 (CEST) Received: from localhost ([::1]:33028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiZMk-0008Qs-1k for larch@yhetil.org; Wed, 12 Oct 2022 06:53:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiZLu-0008P4-7s for emacs-orgmode@gnu.org; Wed, 12 Oct 2022 06:52:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52930) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiZLt-0000QO-U5 for emacs-orgmode@gnu.org; Wed, 12 Oct 2022 06:52:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=To:Subject:Date:From:In-Reply-To:References: MIME-Version; bh=VLntoUTL+b+iyHHic9cm+/3JNJrVNjfMjIpcVQRhPbQ=; b=Q+LEh17CNcb/ OOHSvEx0FVD8/Fz5d7Os0Wk7ed8xcJji8hG4jTG+ESPbKBSCMqSyZh7LTd2evowNb+KOH7/wsgERQ dKNw68Ri4bD1NvcyZAYh/J7I+eCmVYYgkFjDagQKToZX0C62+TXoWgST8BRGRKiT84rDf9kkdxWdw k7x+a8Laa0yEJrFGqRS5pFEn+a8e8Payyrtt6B6o3lHBLA81VUheai3CA/aA1rOoTiWq464qlMwgo INLlbhq6H0lT7yRPxssaiYlk+FnHAqe/3dS+I85F/9lUv2VmhiKlfTZ044j35S0T9PS3G1pPtKf/s fnODVmKv5RSr4mSxRNtjig==; Received: from mail-vk1-f179.google.com ([209.85.221.179]:44669) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiZLj-0000es-C6 for emacs-orgmode@gnu.org; Wed, 12 Oct 2022 06:52:41 -0400 Received: by mail-vk1-f179.google.com with SMTP id o28so4173368vkn.11 for ; Wed, 12 Oct 2022 03:52:31 -0700 (PDT) X-Gm-Message-State: ACrzQf3u7ADn04CDnYA9qgzRgwKBsFCClYLgkPaQV+RY0J7zgvCbANOt 1jci26jJj+uZ3jm5slF4x75AxO6w9dFck3SeeLg= X-Google-Smtp-Source: AMsMyM5y2Pb1crCmHWGimc9aS355gEiJ2zjpT+ihd7Tt0i03ZcoRs1+hDOFWqd+kYyfbchLBCPArJDt1QFatiM5E9sQ= X-Received: by 2002:a1f:9bd7:0:b0:3a3:a3c3:68f7 with SMTP id d206-20020a1f9bd7000000b003a3a3c368f7mr14139148vke.0.1665571950866; Wed, 12 Oct 2022 03:52:30 -0700 (PDT) MIME-Version: 1.0 References: <87a668emt3.fsf@posteo.net> <87a6684ddw.fsf@localhost> <87czb3syv9.fsf@posteo.net> <52cf28741d1e497e68a419bd4952fd0d@riseup.net> <878rlliea5.fsf@localhost> <87wn95ibok.fsf@posteo.net> In-Reply-To: <87wn95ibok.fsf@posteo.net> From: Robert Weiner Date: Wed, 12 Oct 2022 06:52:04 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: watch YT videos through in Emacs [Was: Interest in an Org video meetup?] To: =?UTF-8?Q?Juan_Manuel_Mac=C3=ADas?= Cc: Ihor Radchenko , =?UTF-8?B?UXVpbGlybyBPcmTDs8OxZXo=?= , emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="0000000000007ab7ef05ead4303d" X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rswgnu@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665572015; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=VLntoUTL+b+iyHHic9cm+/3JNJrVNjfMjIpcVQRhPbQ=; b=bHrJR4SHT69ODDUIxIh2x1qeUw3h++SH4gQyHCJNneqwTwUltnVhf4ZOxvoMYHtu4WFi/q cvvhXxsL6OtSkQ8ycS8uqkAqiPDtqvoxTPVmVY34M7CvDZvRbbmj3ITq9yPjt0JmeK6S7c njbRu35/is1iQPivh+uz1QSvTZ0etSUIJJSdyXmHvcvCmNtKM9C4XE/nCB7l8nwpuIbE32 MM9KJBWiZqc0K6Mo3rT/MsbPGp90fI5wb1sAJwlgQMpmJrau750VWcK9lypsPTmVvsBijh 6J9Oe34e8YwYlsxu3/HTQlCYy1WQf0Ma9u5SAw2ZaKFGHDm5fO7Z3WgZKjolJg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665572015; a=rsa-sha256; cv=none; b=VKNhXBUu5YZkVepYBo1VeUUVztaXHESDOWgozVEI5P3wkYPLQqT5uGJQNyCagfOEyDPsPs jy6r0e7ty2CWtTFpihnY+zznDSqGJXFJwFwLIW42LL1oNQ5wWaCB+bHH1J07bLnOwI2+lk mdJrnyQnSAQmjG5k/dGe3YkFamCjYVGbuxSb1OeQY2jUFY29Tdtdh9gqeAwucF+X0wZact GA/mLxZKamIo6qa4RnL5QJEmu/eNmPJA8cM0lupRFmoKvs7M9xlUeM7PvfJ9vklC7NuYY+ auRf2zR9mrP1IrenNh4kiMH7oBwEFdE4ZRODC9bi7KlOFt3MaVLXwi0bmEd+Bg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=Q+LEh17C; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -7.20 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=Q+LEh17C; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E2F0C3FBF X-Spam-Score: -7.20 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1o6JHjaiquvR --0000000000007ab7ef05ead4303d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > 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=C3=ADas wrote: > Ihor Radchenko writes: > > > Quiliro Ord=C3=B3=C3=B1ez 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 t= o > >>> 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=3D"$1" > > > > if echo "$URL" | grep "youtube.com"; then > > # URL=3D"$(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=3D"$(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=3D"$(echo "$URL" | archivebox-cmd list 2>/dev/null | ta= il > -n1 | cut -d' ' -f1 | sed -r 's|/data|~/.data/web-mirror|')" > > > > if [[ ! -z "$ARCHIVE_DIR" ]]; then > > [[ -f "${ARCHIVE_DIR}/singlefile.html" ]] && > URL=3D"${ARCHIVE_DIR}/singlefile.html"; > > fi > > > > #from > https://github.com/qutebrowser/qutebrowser/blob/master/scripts/open_url_i= n_instance.sh > > _url=3D"$URL" > > _command=3D":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 > > --0000000000007ab7ef05ead4303d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>=C2=A0=C2=A0More= info on my blog in Spanish (if anyone is interested, I can translate it)

= Yes, please translat= e it to English.

--= rsw


On Wed, Oct 12, 2022 at 6:24 AM Juan Manuel Mac=C3= =ADas <maciaschain@posteo.net<= /a>> wrote:
I= hor Radchenko writes:

> Quiliro Ord=C3=B3=C3=B1ez <
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.=C2=A0 Is there a guide to do this specificly?
>
> I simply use
>
> #+begin_src bash :tangle ~/.local/bin/qutebrowser-call.sh :shebang #!/= bin/bash
> URL=3D"$1"
>
> if echo "$URL" | grep "youtube.com"; then
>=C2=A0 =C2=A0 =C2=A0# URL=3D"$(echo "$URL" | sed -r '= ;s/\\(www\\)?youtube\.com/invidious.namazso.eu/')"
>=C2=A0 =C2=A0 =C2=A0if [[ ! -z $(echo "$URL" | grep "/wa= tch") ]]; then
>=C2=A0 =C2=A0 =C2=A0 =C2=A0mpv $URL && exit;
>=C2=A0 =C2=A0 =C2=A0fi
> fi
>
> if echo "$URL" | grep "ted.com/talks"; then
>=C2=A0 =C2=A0 =C2=A0 =C2=A0mpv $URL && exit;
> fi
>
> # if echo "$URL" | grep "reddit.com"; then
> #=C2=A0 =C2=A0 =C2=A0URL=3D"$(echo "$URL" | sed -rE = 9;s/www\.reddit\.com/libredd.it/')"
> # fi
>
> if echo "$URL" | grep "bilibili.com"; then
>=C2=A0 =C2=A0 =C2=A0mpv $URL && exit;
> fi
>
> grep "$URL" ~/.data/web-mirror/sources/* >/dev/null 2>= &1 &&\
>=C2=A0 =C2=A0 =C2=A0ARCHIVE_DIR=3D"$(echo "$URL" | archi= vebox-cmd list 2>/dev/null | tail -n1 | cut -d' ' -f1=C2=A0 | se= d -r 's|/data|~/.data/web-mirror|')"
>
> if [[ ! -z "$ARCHIVE_DIR" ]]; then
>=C2=A0 =C2=A0 =C2=A0[[ -f "${ARCHIVE_DIR}/singlefile.html" ]]= && URL=3D"${ARCHIVE_DIR}/singlefile.html";
> fi
>
> #from htt= ps://github.com/qutebrowser/qutebrowser/blob/master/scripts/open_url_in_ins= tance.sh
> _url=3D"$URL"
> _command=3D":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:

=C2=A0 - Display thumbnails in the searches.

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

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

=C2=A0 - Create a bookmark of the video with org-capture

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

https://gnutas.juanmanuelmacias.com/ytel_invi= dious.html

Best regards,

Juan Manuel

--0000000000007ab7ef05ead4303d--