Code Monkey home page Code Monkey logo

elfeed-tube's People

Contributors

danilevy1212 avatar gemmaro avatar karthink avatar lfpraca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

elfeed-tube's Issues

elfeed-tube-add-feeds doesn't work with handle-based channel urls

If I try to run elfeed-tube-add-feeds for a channel like https://www.youtube.com/@Bisqwit, it always fails.

Looking at the source for elfeed-tube-add-feeds, it looks like the way it checks whether or not an input is a channel is by using the original channel URL format: https://youtube.com/channel/base-64-id. It is tedious to find the channel's base-64 id now. It requires hunting through the channel's page source for it.

Could this function be updated to add a channel automatically given the new URL format?

Title: C-c C-c etc dont work in results buffer

Description:

Called elfeed-tube-add-feeds successfully and it appeared to find the
feed, see results buffer below.

However none of the listed keys in that buffer e.g. c-c c-c, c-c c-w
etc work:
Emacs claims those keys are undefined in that buffer.


Pen Bhakti watch?v=dnloFi1GT9Q&list=PLa6CHPhFNfadNcnVZRXa6csHL5sFdkwmV&index=3 https://www.youtube.com/feeds/videos.xml?channel_id=UCHKGDg0GJKBsA9mFraDOLHA

All queries resolved successfully.

 C-c C-c: Add all feeds to the Elfeed database.

C-u C-c C-c: Add all feeds, fetch entries from them and open Elfeed.
C-c C-w: Copy the list of feed URLs as a list

q or C-c C-k: Quit and cancel this operation.

elfeed-tube-curl-enqueue can return a nil :status-code

There are several places where status-code is queried after elfeed-tube-curl-enqueue returns using (= status-code 200) or similar. If status-code is nil then the function errors out with a (wrong-type-argument number-or-marker-p nil).

I experienced this when the invidious server being queried started returning HTTP 301 messages but with a nil :status-code. Unfortunately the error is signaled before the error handling is set up, so it never gets a chance to try rotating the server list. Had to manually rotate the server list to get out of the bad state.

Sponsorblock?

[2023-05-17 17:27:27] [error]: [Sponsorblock][video:VRG: Lecture on KRP]: HTTP 404

How do I get around this block?

Question: how to show captions

I am very excited in this package.
I was able to fetch feeds. When I open it, it displays (empty) as its content. I just don't know where to look at to fix the problem. Would you kindly advise me?
I am using Doom emacs on OS X if this is relevant.

Invidious is unstable

Timeouts occur often. Do we use invidious for:

  1. video data;
  2. other features (e.g. closed captions)?

If 1: could we put invidious behind a feature toggle? MPV supports direct YT links via YT-DLP.

Another good addition would be a scoring system: the API has a monitor field that we could easily map, reduce, and sort at boot.

Could you clarify what purpose invidious serves within this package?

Thanks.

Support for Channels

Hey there!

I've been using Elfeed with YouTube for some time now, taking advantage of YouTube's channel RSS Feeds - here are some examples:

https://www.youtube.com/feeds/videos.xml?channel_id=UCDpL0v-Ifie7u05lbfO3zJQ
https://www.youtube.com/feeds/videos.xml?channel_id=UCckETVOT59aYw80B36aP9vw
https://www.youtube.com/feeds/videos.xml?channel_id=UC3_AWXcf2K3l9ILVuQe-XwQ
https://www.youtube.com/feeds/videos.xml?channel_id=UC7FkqjV8SU5I8FCHXQSQe9Q
https://www.youtube.com/feeds/videos.xml?channel_id=UCHsqqRjziUaMwZgQZHw-n1w

The equivilent invidious URL is simply:

https://youtube.076.ne.jp/api/v1/channels/UCDpL0v-Ifie7u05lbfO3zJQ
https://youtube.076.ne.jp/api/v1/channels/UCckETVOT59aYw80B36aP9vw
https://youtube.076.ne.jp/api/v1/channels/UC3_AWXcf2K3l9ILVuQe-XwQ
https://youtube.076.ne.jp/api/v1/channels/UC7FkqjV8SU5I8FCHXQSQe9Q
https://youtube.076.ne.jp/api/v1/channels/UCHsqqRjziUaMwZgQZHw-n1w

I've been using elfeed-org up until now, but I've been able to try things out with the following snippet:

(defun jjh/org-link-info (link)
  "Extract the URL from an org LINK."
  (let ((path (org-element-property :path link))
        (type (org-element-property :type link)))
    (format "%s:%s" type path)))

(defun jjh/get-links-from-org-file (file)
  "Extract the URLs of all LINKs in the org FILE."
  (with-temp-buffer
    (insert-file-contents file)
    (org-mode)
    (org-element-map (org-element-parse-buffer) 'link 'jjh/org-link-info)))

(elfeed-tube-add-feeds (jjh/get-links-from-org-file "~/org/feeds/youtube.org"))

Unfortunately elfeed-tube doesn't support the RSS feed style of URL. I will take a look and see if I can submit a PR.

Edit: I see now that elfeed-tube is designed for RSS feeds.

Caption style: one caption per line

elfeed-tube/elfeed-tube.el

Lines 682 to 694 in 18d89f1

(string-join
(mapcar (lambda (tx-cons)
(propertize (cdr tx-cons)
'timestamp
(car tx-cons)
'mouse-face
'highlight
'help-echo
#'elfeed-tube--caption-echo
'keymap
elfeed-tube-captions-map))
para)
vspace)

Hi @karthink , it is a great package to have!

Could we have an option to enable one caption per line? I find it much more readdable (for me) to use caption one by one instead of putting them together. Maybe something like elfeed-tube-one-caption-per-line, or elfeed-tube-caption-style with options:

I tweak it with `elfeed-tube-one-caption-per-line' as starting point:

(defcustom elfeed-tube-one-caption-per-line nil
  "If non-nil, show one caption per line."
  :group 'elfeed-tube
  :type 'boolean)

And change the quoted code with:

(string-join
 (mapcar (lambda (tx-cons)
           (propertize (cdr tx-cons)
                       'timestamp
                       (car tx-cons)
                       'mouse-face
                       'highlight
                       'help-echo
                       #'elfeed-tube--caption-echo
                       'keymap
                       elfeed-tube-captions-map))
         para)
 (if elfeed-tube-one-caption-per-line
     "\n"
   vspace))

(I believe this "\n" should be put together with `vspace', but this is only a rough demostration. :-))

Result:

Transcript:

[0:00] - [0:30]:
hey guys welcome back today we will be
making banana bread overnight oats let's
get started
[Music]
[Music]
so for this recipe you will need oats
yogurt vanilla almond extract maple
syrup one mashed banana and almond milk
all right guys so I'm gonna start with

[0:30] - [1:00]:
adding oats to the jar first there
really is no correct order for this
because at the end we're just gonna mix
everything up really good so I just
added my oats and then I'm going to add
some almond milk on top
foreign
next I'll add my vanilla yogurt you can
use any flavor vanilla or any flavor
yogurt that you'd like and then I'll add

Additional: maybe add a timestamp before each caption line?

Appreciate that if we could have all this options 😄
Zheng

wrong-type-argument number-or-marker-p error with elfeed-protocol

Minimal configuration to produce, obviously requires tinytiny installed and elfeed protocol configured to auth and connect to it. The tinytiny part is simple enough with docker installation. Replace ttrss+https://[email protected] with whatever server you wish to use and create the authinfo.

(setq straight-disable-compile t)
(setq straight-build-dir "/tmp/debug-elfeed") ;; Don't pollute our normal builds
(defvar bootstrap-version)
 (let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 5))
   (unless (file-exists-p bootstrap-file)
     (with-current-buffer
         (url-retrieve-synchronously
         "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
          'silent 'inhibit-cookies)
       (goto-char (point-max))
       (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

(straight-use-package 'use-package)
(straight-use-package 'el-patch)
(setq straight-use-package-by-default t)


(use-package elfeed
  :config
    (setq shr-width 80)) ;; Read view narrowing

(use-package elfeed-protocol
  :straight (elfeed-protocol
             :local-repo "~/git/own/github/elfeed-protocol"
             :type git)
  :config
  (setq elfeed-use-curl t)
  (setq elfeed-protocol-ttrss-maxsize 2000) ;; bigger than 200 is invalid (unless you hack tt ;)
  (setq elfeed-feeds
      '(
        ("ttrss+https://[email protected]"
         :use-authinfo t
        )))
  (elfeed-protocol-enable))

(use-package elfeed-tube
  :straight (:host github :repo "karthink/elfeed-tube" :build (:not compile))
  :config
  (elfeed-tube-setup)
  :bind (:map elfeed-show-mode-map
         ("F" . elfeed-tube-fetch)
         ([remap save-buffer] . elfeed-tube-save)
         :map elfeed-search-mode-map
         ("F" . elfeed-tube-fetch)
         ([remap save-buffer] . elfeed-tube-save)))

(use-package elfeed-tube-mpv
  :straight (:host github :repo "karthink/elfeed-tube")
  :bind (:map elfeed-show-mode-map
              ("C-c C-f" . elfeed-tube-mpv-follow-mode)
              ("C-c C-w" . elfeed-tube-mpv-where)))

Produces error:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  signal(wrong-type-argument (number-or-marker-p nil))
  (closure ((cps-state-atom-826 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-if-825 closure #2 nil (setq cps-current-state-764 ...)) (cps-state-atom-824 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-atom-823 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-let*-822 closure #2 nil (progn ... ...)) (cps-state-atom-821 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-let*-820 closure #2 nil (progn ... ...)) (cps-state-atom-819 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-let*-818 closure #2 nil (progn ... ...)) (cps-state-atom-817 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-let*-816 closure #2 nil (progn ... ...)) (cps-state-atom-815 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-let*-814 closure #2 nil (progn ... ...)) (cps-state-atom-813 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-let*-812 closure #2 nil (progn ... ...)) (cps-state-atom-811 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-if-810 closure #2 nil (setq cps-current-state-764 ...)) (cps-state-atom-809 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-atom-808 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-and-807 closure #2 nil (setq cps-current-state-764 ...)) (cps-state-atom-806 closure #2 nil (setq cps-current-value-763 ...)) (cps-state-iter-yield-805 closure #2 nil (progn ... ...)) (cps-state-let*-804 closure #2 nil (progn ... ...)) (cps-state-atom-803 closure #2 nil (setq cps-current-value-763 ...)) (cps-binding-cps-argument-801-802) (cps-state-let*-800 closure #2 nil (progn ... ...)) ...) nil (signal (car cps-binding-condition-case-error-770) (cdr cps-binding-condition-case-error-770)))()
  funcall((closure ((cps-state-atom-826 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-if-825 closure #3 nil (setq cps-current-state-764 ...)) (cps-state-atom-824 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-atom-823 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-let*-822 closure #3 nil (progn ... ...)) (cps-state-atom-821 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-let*-820 closure #3 nil (progn ... ...)) (cps-state-atom-819 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-let*-818 closure #3 nil (progn ... ...)) (cps-state-atom-817 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-let*-816 closure #3 nil (progn ... ...)) (cps-state-atom-815 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-let*-814 closure #3 nil (progn ... ...)) (cps-state-atom-813 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-let*-812 closure #3 nil (progn ... ...)) (cps-state-atom-811 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-if-810 closure #3 nil (setq cps-current-state-764 ...)) (cps-state-atom-809 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-atom-808 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-and-807 closure #3 nil (setq cps-current-state-764 ...)) (cps-state-atom-806 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-iter-yield-805 closure #3 nil (progn ... ...)) (cps-state-let*-804 closure #3 nil (progn ... ...)) (cps-state-atom-803 closure #3 nil (setq cps-current-value-763 ...)) (cps-binding-cps-argument-801-802) (cps-state-let*-800 closure #3 nil (progn ... ...)) (cps-state-atom-799 closure #3 nil (setq cps-current-value-763 ...)) (cps-binding-api-data-798) (cps-state-atom-797 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-if-796 closure #3 nil (setq cps-current-state-764 ...)) (cps-state-atom-795 closure #3 nil (setq cps-current-value-763 ...)) (cps-state-atom-794 closure #3 nil (setq cps-current-value-763 ...)) ...) nil (signal (car cps-binding-condition-case-error-770) (cdr cps-binding-condition-case-error-770))))
  (if (funcall fetched-p) (progn (elfeed-tube-show (or entry elfeed-show-entry))))
  (closure ((entry . #s(elfeed-entry :id ("www.youtube.com" . "{\"ver\":2,\"uid\":1,\"hash\":\"SHA1:ceeb4216a3ba603ff48d...") :title "Beaver State Fling | Final Round, Back 9 | Gurthie..." :link "https://www.youtube.com/watch?v=lo7Qo5mLzcc" :date 1655152928 :content #s(elfeed-ref :id "da39a3ee5e6b4b0d3255bfef95601890afd80709") :content-type html :enclosures nil :tags (Discgolf) :feed-id "ttrss+https://[email protected]::https://www.you..." :meta (:author "Disc Golf Pro Tour" :protocol-id "ttrss+https://[email protected]" :id 1098203 :guid-hash "{\"ver\":2,\"uid\":1,\"hash\":\"SHA1:ceeb4216a3ba603ff48d..." :feed-id 638))) cl-struct-elfeed-tube-item-tags t) (fetched-p) (if (funcall fetched-p) (progn (elfeed-tube-show (or entry elfeed-show-entry)))))((closure ((cps-state-atom-826 closure #3 nil ...) (cps-state-if-825 closure #3 nil ...) (cps-state-atom-824 closure #3 nil ...) (cps-state-atom-823 closure #3 nil ...) (cps-state-let*-822 closure #3 nil ...) (cps-state-atom-821 closure #3 nil ...) (cps-state-let*-820 closure #3 nil ...) (cps-state-atom-819 closure #3 nil ...) (cps-state-let*-818 closure #3 nil ...) (cps-state-atom-817 closure #3 nil ...) (cps-state-let*-816 closure #3 nil ...) (cps-state-atom-815 closure #3 nil ...) (cps-state-let*-814 closure #3 nil ...) (cps-state-atom-813 closure #3 nil ...) (cps-state-let*-812 closure #3 nil ...) (cps-state-atom-811 closure #3 nil ...) (cps-state-if-810 closure #3 nil ...) (cps-state-atom-809 closure #3 nil ...) (cps-state-atom-808 closure #3 nil ...) (cps-state-and-807 closure #3 nil ...) (cps-state-atom-806 closure #3 nil ...) (cps-state-iter-yield-805 closure #3 nil ...) (cps-state-let*-804 closure #3 nil ...) (cps-state-atom-803 closure #3 nil ...) (cps-binding-cps-argument-801-802) (cps-state-let*-800 closure #3 nil ...) ...) nil (signal (car cps-binding-condition-case-error-770) (cdr cps-binding-condition-case-error-770))))
  apply((closure ((entry . ...) cl-struct-elfeed-tube-item-tags t) (fetched-p) (if (funcall fetched-p) (progn ...))) (closure ((cps-state-atom-826 closure #4 nil ...) (cps-state-if-825 closure #4 nil ...) (cps-state-atom-824 closure #4 nil ...) (cps-state-atom-823 closure #4 nil ...) (cps-state-let*-822 closure #4 nil ...) (cps-state-atom-821 closure #4 nil ...) (cps-state-let*-820 closure #4 nil ...) (cps-state-atom-819 closure #4 nil ...) (cps-state-let*-818 closure #4 nil ...) (cps-state-atom-817 closure #4 nil ...) (cps-state-let*-816 closure #4 nil ...) (cps-state-atom-815 closure #4 nil ...) (cps-state-let*-814 closure #4 nil ...) (cps-state-atom-813 closure #4 nil ...) (cps-state-let*-812 closure #4 nil ...) (cps-state-atom-811 closure #4 nil ...) (cps-state-if-810 closure #4 nil ...) (cps-state-atom-809 closure #4 nil ...) (cps-state-atom-808 closure #4 nil ...) (cps-state-and-807 closure #4 nil ...) (cps-state-atom-806 closure #4 nil ...) (cps-state-iter-yield-805 closure #4 nil ...) (cps-state-let*-804 closure #4 nil ...) (cps-state-atom-803 closure #4 nil ...) (cps-binding-cps-argument-801-802) (cps-state-let*-800 closure #4 nil ...) ...) nil (signal (car cps-binding-condition-case-error-770) (cdr cps-binding-condition-case-error-770))))
  timer-event-handler([t 25255 45306 296085 nil (closure ((entry . #s(elfeed-entry :id ("www.youtube.com" . "{\"ver\":2,\"uid\":1,\"hash\":\"SHA1:ceeb4216a3ba60...") :title "Beaver State Fling | Final Round, Back 9 | G..." :link "https://www.youtube.com/watch?v=lo7Qo5mLzcc" :date 1655152928 :content #s(elfeed-ref :id "da39a3ee5e6b4b0d3255bfef95601890afd80709") :content-type html :enclosures nil :tags (Discgolf) :feed-id "ttrss+https://[email protected]::https://w..." :meta (:author "Disc Golf Pro Tour" :protocol-id "ttrss+https://[email protected]" :id 1098203 :guid-hash "{\"ver\":2,\"uid\":1,\"hash\":\"SHA1:ceeb4216a3ba60..." :feed-id 638))) cl-struct-elfeed-tube-item-tags t) (fetched-p) (if (funcall fetched-p) (progn (elfeed-tube-show (or entry elfeed-show-entry))))) ((closure ((cps-state-atom-826 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-if-825 closure #5 nil (setq cps-current-state-764 ...)) (cps-state-atom-824 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-atom-823 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-let*-822 closure #5 nil (progn ... ...)) (cps-state-atom-821 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-let*-820 closure #5 nil (progn ... ...)) (cps-state-atom-819 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-let*-818 closure #5 nil (progn ... ...)) (cps-state-atom-817 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-let*-816 closure #5 nil (progn ... ...)) (cps-state-atom-815 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-let*-814 closure #5 nil (progn ... ...)) (cps-state-atom-813 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-let*-812 closure #5 nil (progn ... ...)) (cps-state-atom-811 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-if-810 closure #5 nil (setq cps-current-state-764 ...)) (cps-state-atom-809 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-atom-808 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-and-807 closure #5 nil (setq cps-current-state-764 ...)) (cps-state-atom-806 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-iter-yield-805 closure #5 nil (progn ... ...)) (cps-state-let*-804 closure #5 nil (progn ... ...)) (cps-state-atom-803 closure #5 nil (setq cps-current-value-763 ...)) (cps-binding-cps-argument-801-802) (cps-state-let*-800 closure #5 nil (progn ... ...)) (cps-state-atom-799 closure #5 nil (setq cps-current-value-763 ...)) (cps-binding-api-data-798) (cps-state-atom-797 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-if-796 closure #5 nil (setq cps-current-state-764 ...)) (cps-state-atom-795 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-atom-794 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-and-793 closure #5 nil (setq cps-current-state-764 ...)) (cps-state-atom-792 closure #5 nil (setq cps-current-value-763 ...)) (cps-state-iter-yield-791 closure #5 nil (progn ... ...)) (cps-state-let*-790 closure #5 nil (progn ... ...)) (cps-state-atom-789 closure #5 nil (setq cps-current-value-763 ...)) (cps-binding-cps-argument-787-788 closure (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) nil (signal ... ...)) (cps-state-let*-786 closure #5 nil (progn ... ...)) (cps-state-atom-785 closure #5 nil (setq cps-current-value-763 ...)) (cps-binding-caps-new-784) (cps-state-atom-783 closure #5 nil (setq cps-current-value-763 ...)) (cps-binding-error-782) (cps-binding-caps-781) ...) nil (signal (car cps-binding-condition-case-error-770) (cdr cps-binding-condition-case-error-770)))) nil 491000 nil])

Tested with GNU Emacs 28.1.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-05-12.

Elfeed-tube launches a minimized mpv instance, but video does not consistently play

Hello!

First of all, thanks for the hard work you've put into creating Emacs packages. They have been greatly helpful to me.

I came across an issue while trying to use elfeed-tube. After setting everything up as per the README and loading the videos in my feed, launching elfeed-tube-mpv opens a minimized mpv instance, but no video starts playing. The strange thing is, after numerous attempts, the video does begin to play, and live transcripts work just fine, but I cannot figure out what change causes this to happen.

I did find errors in elfeed-tube-log, like the following:

[2023-11-01 08:48:59] [error]: [Sponsorblock][video:Grano Saraceno. Il c]: HTTP 502

I was hoping you could provide some assistance or guidance on where I can start to debug this issue.
Thank you for your time and your contributions to the Emacs community.

Best regards

How reliable is elfeed-tube-fill-feeds?

I've been trying to backfill the feeds using elfeed-tube-fill-feeds, but not very successfully. This is what I've been trying to do:

  • I would set the filter - (elfeed-search-live-filter) to a specific channel, e.g., I set it to "=MIT" for "MIT OpenCourseWare" channel
  • It shows initial 15 videos
  • I would execute elfeed-tube-fill-feeds, it opens the confirmation buffer where the channel is listed
  • I would press "C-c C-c"
  • *elfeed-search* buffer header changes to "Filling Feed" MIT OpenCourseWare ... fetch metadata (4500 pending)
  • It spins up a bunch of hidden *curl* buffers, there's also some commotion in a hidden *code-conversion-work* buffer
  • Understandably, it's takes long time. For some reason the number of pending operations during the whole process only increases

In the end - results are the same - the feed either adds only a few vids, or doesn't get updated at all, no matter how long I wait. I even tried leaving it overnight and it still didn't work. Is it possible that I'm missing something in my setup?

Oh, I also see some errors like this in the Messages buffer:

Error running timer ‘elfeed-curl--call-callback’: (wrong-type-argument stringp ("invidious.perennialte.ch/api/v1/videos/oEskbXrhkkk?fields=published" "invidious.perennialte.ch/api/v1/videos/q0PxCQWG3ic?fields=published" "invidious.perennialte.ch/api/v1/videos/zmzyW1rP-hk?fields=published" "invidious.perennialte.ch/api/v1/videos/qbyeQum8qTE?fields=published"))

error when running elfeed-tube-fill-feeds

got this error when running elfeed-tube-fill-feeds with latest commit:

 execute-extended-command: Autoloading file ~/.emacs.d/straight/build/elfeed-tube-mpv/elfeed-tube-utils.elc failed to define function elfeed-tube-fill-feeds

`elfeed-tube-fill-feeds` Does not fill channel feeds.

Aloha Karthink,

When using elfeed-tube-fill-feeds on a playlist, elfeed-tube will properly add all the videos of a playlist to my *elfeed-search* buffer. When doing the same on a channel, I notice that there is no updating happening. Both *elfeed-tube-log* and *elfeed-log* are blank for me (namely, no errors or warning popping up). The modeline states that there is 0 jobs pending for the update and 1 active job. On the top of the elfeed buffer it states that it is "Filling Feed: $CHANNEL".

If I may throw in my two cents. I think YouTube has been changing how channel IDs are working recently. This may be related to this issue, assuming of course I did not misconfigure something.

Here is my configuration for everything elfeed related.

(setq elfeed-feeds $FEEDS) ;; Will these be relevant here? I don't intend on doing free advertising on your repo.
(require 'elfeed-tube)
(elfeed-tube-setup)
(setq-default elfeed-search-filter "")
(setq-default elfeed-search-title-max-width 100)
(setq-default elfeed-search-title-min-width 100)
(defun browse-url-mpv (url &optional new-window)
    (start-process "mpv" "*mpv*" "mpv" url))

(add-to-list 'browse-url-handlers (cons "https:\\/\\/www\\.youtube." 'browse-url-mpv))
(add-hook 'elfeed-new-entry-hook
   (elfeed-make-tagger :feed-url "youtube\\.com"
               				 :add '(video youtube)))
	   
(require 'elfeed-tube)
(elfeed-tube-setup)

Big fan of the package. Thank you so much for developing this. It really brings together the benefits of freely available information on YouTube and the freedom of Emacs.

Using `elfeed-org` and `elfeed-tube` to download youtube playlists

I was reading through the elfeed-tube documentation and the docs indicate that youtube feeds are "org-linkable". I was trying to setup a youtube playlist in elfeed-org but I seem to be getting an error in the *elfeed-log*. I was wondering what the correct way to do this is.

So I have an elfeed1.org file, that contains all of my blog and video feeds. The file works just find for downloading both types of files, so that elfeed tag is set, etc. I created an org link for a playlist. Since this is a playlist, I took the basic URL from the playist share button. A copy of the link is below.

[[https://www.youtube.com/playlist?list=PLxdnSsBqCrrF9KOQRB9ByfB0EUMwnLO9o][Lum Control]]

Now the error I get in the elfeed-log is below. I was wondering why this error is displaying in the elfeed-log instead of the elfeed-tube-log? The elfeed-tube-log is clear of any references to this playlist.

[2024-07-27 11:08:28] [error]: https://youtube.com/playlist?list=PLai5B987bZ9CoVR-QEIN9foz4QCJ0H2Y8&si=2rk8eDphkE2d-c5e: (error XML: (Well-Formed) Couldn’t parse tag: lang="en" d)

Did I put in the playlist wrong or should I try this a different way? Any suggestions would be appreciated.

Incorrect MPV URL when using `elfeed-tube-mpv`

When I use elfeed-tube-mpv on an elfeed filter entry, It launches MPV with https://www.youtube.com/watch?v=<<id>>&t0 -- for some reason this doesn't work.

I launch this manually via MPV and it breaks. However, YT-DLP will work just fine.

I opened this issue initially because I thought it was an elfeed issue, but now I am thinking it's an issue with my installation.

Can someone try this and see if it works: mpv 'https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=0'.

elfeed-tube-mpv feels slow

I think if it reported progress as it downloads the video or even just said Starting mpv: Downloading XXMB video ✓ after Starting mpv: Connected to Elfeed ✓ it would fix things? Maybe it's more accurate to say "starting stream for video" if mplayer is just filling some buffer. And perhaps I can modify the buffer size on a stable internet connection to improve this a bit as well.

Or perhaps there are ways to improve things not starting so fast?

It looks like mpv https://youtu.be/DYeh7_FdmDg takes about 4 seconds for me and I see mpv doesn't output progress by default.

Skimming through the mpv manual I can't see a good way to do this. I suppose it's not that big of an issue, but in those 4 seconds I frequently think "is it working".

Transcripts have moved to the description

For youtube videos whose "transcripts have moved to the description", the M-x elfeed-tube-fetch does not get the transcript. Is this a known issue or something new? Workaround? Suggestions?

"Transcripts have moved to the description" is youtube message when you click on Show Transcript for the video. M-x elfeed-tube-fetch does not get fetch transcripts for such videos.

(wrong-type-argument arrayp nil) in inserting captions in the elfeed entry buffer

Hello,
Thank you for sharing this as a package. I've just started using it and have run into issues when downloading a custom subtitle (not the auto generated one, which works fine). I'm attaching a trimmed backtrace below as the full backtrace is very large. Let me know in case this isn't sufficient and you need a full one.

This is the code I use:

(use-package elfeed-tube
  :after elfeed
  :bind (:map elfeed-show-mode-map
              ("F" . elfeed-tube-fetch)
              ([remap save-buffer] . elfeed-tube-save)
              :map elfeed-search-mode-map
              ("F" . elfeed-tube-fetch)
              ([remap save-buffer] . elfeed-tube-save))
  :commands (elfeed-tube-setup)
  :config
  (elfeed-tube-setup)
  (setq elfeed-tube-captions-languages '("en-gb" "en" "english" "english (auto generated)")))

Backtrace:

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  replace-regexp-in-string("\n" " " nil)
  (propertize (replace-regexp-in-string "\n" " " text) 'face (elfeed-tube--caption-get-face type) 'type type)
  (cons time (propertize (replace-regexp-in-string "\n" " " text) 'face (elfeed-tube--caption-get-face type) 'type type))
  (list (cons time (propertize (replace-regexp-in-string "\n" " " text) 'face (elfeed-tube--caption-get-face type) 'type type)))
  (nconc para (list (cons time (propertize (replace-regexp-in-string "\n" " " text) 'face (elfeed-tube--caption-get-face type) 'type type))))
  (setq para (nconc para (list (cons time (propertize (replace-regexp-in-string "\n" " " text) 'face (elfeed-tube--caption-get-face type) 'type type)))))
  (while (consp --cl-var--) (setq --cl-var-- <trimmed>) (setq chapter <trimmed>) <trimmed> (setq para (nconc para (list (cons time (propertize (replace-regexp-in-string "\n" " " text) 'face (elfeed-tube--caption-get-face type) 'type type))))) <trimmed>)
  (let* <trimmed>)
  (let ((caption-ordered <trimmed>) (inhibit-read-only t)) (goto-char (point-max)) (insert "\n" (propertize "Transcript:" 'face 'message-header-name) "\n\n") (let* <trimmed>))
  (if (and (listp caption) (eq (car-safe caption) 'transcript)) <trimmed> (elfeed-tube-log 'debug "[Captions][video:%s][Not available]" (or <trimmed> "")))
  elfeed-tube--insert-captions((transcript nil (text ((start . "58.75") (dur . "1.57")) "Can I ask more questions? - Please.") <trimmed> (text ((start . "214.64") (dur . "0.52")) "Sure.") ...))
  (progn (if (not <trimmed> (progn (kill-region (point) (point-max)))) (elfeed-tube--insert-captions caption) (setq insertions (cons 'caps insertions)))
  (if caption (progn <trimmed> (setq insertions (cons 'caps insertions))))
  (let* ((c (and t (elfeed-tube-include-p 'captions))) (caption <trimmed)) (if caption <trimmed>))
  (let ((elfeed-db-directory elfeed-tube--captions-db-dir)) <trimmed>)
  (let* <trimmed>)
  (save-current-buffer <trimmed>)
  (progn (save-current-buffer <trimmed>))
  (if (elfeed-tube--same-entry-p entry intended-entry) <trimmed>)
  (if intended-entry (if (elfeed-tube--same-entry-p entry intended-entry) <trimmed>))
  (let* <trimmed>)
  elfeed-tube-show()
  apply(elfeed-tube-show nil)
  elfeed-show-refresh--mail-style()
  funcall-interactively(elfeed-show-refresh--mail-style)
  elfeed-show-refresh()

Improve local downloading of videos

I use the function posted by @karthink in #5 (comment)_ to download the videos. Can somebody help modify this function to 1) not require user interaction after it is called (unnecessary), 2) skip downloading if the video is already there, and 3) Mark the entry as read when the user asks a video to be downloaded.

elfeed-tube-mpv only accepts youtube links

Hello,

I'm aware that this project is focused on watching / getting info about youtube videos in elfeed, however I have a few feeds from sites like Odysee or Peertube in my RSS. These sites work fine when being played via mpv, however the elfeed-tube-mpv function does nothing, presumably because it checks if the url is specifically a youtube link.

I understand a use case where sending mpv an unplayable url on accident wouldn't be ideal, but could there be a variable added to allow indiscriminate passing of links to mpv? This would make the functionality much more versatile imo.

EDIT: Upon further inspection, I believe the function relies on a video id being present. A variable that would simply make the alternative to a video id being present passing the entry's url to elfeed as 'video-url' would be much appreciated

Is video saved locally

Didn't find anywhere in the readme mention this, just wondering is video saved locally? Since playback initially is not smooth, wonder would it be better after sometime if video will be cached locally...

How do I use elfeed as usual?

Intro

Hello.
I'm very sorry for this tiny meta-issue, but I was wondering how do people normally use this package?

The README mentions (https://github.com/karthink/elfeed-tube#step-ii-use-elfeed-as-usual) "use elfeed as usual", but I'm not sure if I'm using it as intended, or perhaps my config makes certain features work improperly

How I elfeed-tube (probably improper)

Anyways, here's how I use elfeed-tube:

  1. M-x elfeed (I use evil-collection)
  2. Move in the *elfeed-search* buffer to some RSS entry that interests me (but don't press enter - just move the cursor to it)
  3. M-x elfeed-tube-mpv-follow-mode - this results in "this only works in elfeed-entry" message
  4. Now that we've ran elfeed-tube-mpv-follow-mode, the M-x elfeed-tube-mpv command is available
  5. Press RET to enter some RSS entry's elfeed-entry buffer
  6. Run elfeed-tube-mpv, and mpv plays the video

It seems to me as if I'm doing something wrong. Running elfeed-tube-mpv-follow-mode just so elfeed-tube-mpv becomes available to run seems fishy

For some reason I always assumed that in *elfeed-search* buffer, if I press RET while on an entry, and that entry's link happens to be a video, elfeed-tube will open mpv automatically, and if not, it will open *elfeed-entry* for regular reading. I assume this package was designed with a different flow in mind

Ideal use case

  1. M-x elfeed to enter *elfeed-search*
  2. Pick some YT RSS feed entry then press RET to enter *elfeed-search* buffer
  3. M-x SomeMysteriousFunction to start mpv and play a video

Relevant config excerpts

  (use-package evil
    :straight t
    :init 
    (setq evil-want-integration t)
    (setq evil-want-keybinding nil)
    :config
    ;(evil-set-leader 'normal (kbd "SPC"))
    (evil-mode 1))

  (use-package evil-collection
    :straight t
    :after evil
    :config 
    (evil-collection-init))

  (use-package elfeed
    :straight t
    :init
    (setq elfeed-feeds
	  '("https://www.youtube.com/feeds/videos.xml?channel_id=UClOGLGPOqlAiLmOvXW5lKbw" ; Mandalore Gaming
	    "https://www.youtube.com/feeds/videos.xml?channel_id=UCsvn_Po0SmunchJYOWpOxMg")))
  (use-package elfeed-tube
  :straight t 
  :after elfeed
  :demand t
  :config
  (elfeed-tube-setup)

  :bind (:map elfeed-show-mode-map
	 ("F" . elfeed-tube-fetch)
	 ([remap save-buffer] . elfeed-tube-save)
	 :map elfeed-search-mode-map
	 ("F" . elfeed-tube-fetch)
	 ([remap save-buffer] . elfeed-tube-save)))

  
(use-package elfeed-tube-mpv
  :straight t ;; or :straight t
  :bind (:map elfeed-show-mode-map
              ("C-c C-f" . elfeed-tube-mpv-follow-mode)
              ("C-c C-w" . elfeed-tube-mpv-where)))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.