kljohann / mpv.el

control mpv for easy note taking
GNU General Public License v3.0
142 stars 14 forks source link

Failed to connect to mpv #18

Closed AtomicNess123 closed 2 years ago

AtomicNess123 commented 3 years ago

When I do (mpv-start "--no-video" "--idle=yes" "--keep-open=yes")

I get this:

Debugger entered--Lisp error: (error "Failed to connect to mpv")
  signal(error ("Failed to connect to mpv"))
  error("Failed to connect to mpv")
  mpv-start("--no-video" "--idle=yes" "--keep-open=yes")
  eval-buffer()  ; Reading at buffer position 56
  funcall-interactively(eval-buffer)
  call-interactively(eval-buffer record nil)
  command-execute(eval-buffer record)
  helm-M-x-execute-command(eval-buffer)
  helm-execute-selection-action-1()
  helm-execute-selection-action()
  helm-internal((((name . "Emacs Commands history") (candidates . #f(compiled-function () #<bytecode 0x1fee27922571>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1fee29fb4aa1>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t)) ((name . "Emacs Commands") (candidates . #f(compiled-function () #<bytecode 0x1fee27ccb51d>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1fee29fb4aa1>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t))) nil "M-x " nil nil "*helm M-x*" nil nil helm-M-x-input-history)
  apply(helm-internal ((((name . "Emacs Commands history") (candidates . #f(compiled-function () #<bytecode 0x1fee27922571>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1fee29fb4aa1>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) (67108989 . helm-narrow-window) (19 . undefined) (24 keymap ... ... ... ... ... ... ... ... ... ... ... ...) (11 . helm-delete-minibuffer-contents) (67108896 . helm-toggle-visible-mark-forward) (0 . helm-toggle-visible-mark) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keeping se...") (must-match . t) (group . helm-command) (match-dynamic . t)) ((name . "Emacs Commands") (candidates . #f(compiled-function () #<bytecode 0x1fee27ccb51d>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1fee29fb4aa1>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) (67108989 . helm-narrow-window) (19 . undefined) (24 keymap ... ... ... ... ... ... ... ... ... ... ... ...) (11 . helm-delete-minibuffer-contents) (67108896 . helm-toggle-visible-mark-forward) (0 . helm-toggle-visible-mark) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keeping se...") (must-match . t) (group . helm-command) (match-dynamic . t))) nil "M-x " nil nil "*helm M-x*" nil nil helm-M-x-input-history))
  helm((((name . "Emacs Commands history") (candidates . #f(compiled-function () #<bytecode 0x1fee27922571>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1fee29fb4aa1>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t)) ((name . "Emacs Commands") (candidates . #f(compiled-function () #<bytecode 0x1fee27ccb51d>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1fee29fb4aa1>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t))) nil "M-x " nil nil "*helm M-x*" nil nil helm-M-x-input-history)
  apply(helm ((((name . "Emacs Commands history") (candidates . #f(compiled-function () #<bytecode 0x1fee27922571>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1fee29fb4aa1>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) (67108989 . helm-narrow-window) (19 . undefined) (24 keymap ... ... ... ... ... ... ... ... ... ... ... ...) (11 . helm-delete-minibuffer-contents) (67108896 . helm-toggle-visible-mark-forward) (0 . helm-toggle-visible-mark) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keeping se...") (must-match . t) (group . helm-command) (match-dynamic . t)) ((name . "Emacs Commands") (candidates . #f(compiled-function () #<bytecode 0x1fee27ccb51d>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1fee29fb4aa1>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) (67108989 . helm-narrow-window) (19 . undefined) (24 keymap ... ... ... ... ... ... ... ... ... ... ... ...) (11 . helm-delete-minibuffer-contents) (67108896 . helm-toggle-visible-mark-forward) (0 . helm-toggle-visible-mark) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keeping se...") (must-match . t) (group . helm-command) (match-dynamic . t))) nil "M-x " nil nil "*helm M-x*" nil nil helm-M-x-input-history))
  helm(:sources (((name . "Emacs Commands history") (candidates . #f(compiled-function () #<bytecode 0x1fee27922571>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1fee29fb4aa1>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t)) ((name . "Emacs Commands") (candidates . #f(compiled-function () #<bytecode 0x1fee27ccb51d>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1fee29fb4aa1>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t))) :prompt "M-x " :buffer "*helm M-x*" :history helm-M-x-input-history)
  helm-M-x-read-extended-command([doom-gruvbox undo-tree-id29990 undo-tree-id29991 undo-tree-id22370 undo-tree-id22371 undo-tree-id22372 undo-tree-id17240 undo-tree-id13730 undo-tree-id13731 undo-tree-id13732 counsel-alias-expand undo-tree-id13734 undo-tree-id13735 undo-tree-id13736 undo-tree-id13737 undo-tree-id13738 undo-tree-id13739 biblio--selection-insert adwaita undo-tree-id22380 undo-tree-id22381 undo-tree-id22382 undo-tree-id17250 undo-tree-id13740 cl-print--preprocess undo-tree-id13742 undo-tree-id13743 counsel-evil-register-face undo-tree-id13745 undo-tree-id13746 undo-tree-id13747 undo-tree-id13748 undo-tree-id13749 jupyter-repl-prompt-margin-width \" undo-tree-id22390 undo-tree-id22391 undo-tree-id22392 undo-tree-id17260 \' undo-tree-id13751 undo-tree-id13752 undo-tree-id13753 undo-tree-id13754 undo-tree-id13755 tramp-gvfs-unmount undo-tree-id13757 undo-tree-id13758 undo-tree-id13759 item-vv ...])
  helm-M-x(nil)
  funcall-interactively(helm-M-x nil)
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)
ZGFabian commented 3 years ago

I got this in IELM. I guess I need to set up some default option...

*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (mpv-version)
"0.33.1-dirty"
ELISP> (mpv-start)
*** Eval error ***  make client process failed: Connection refused, :name, mpv-socket, :family, local, :service, /tmp/mpv-X9zDgV
kljohann commented 3 years ago

You have to provide mpv-start with some argument, else mpv will quit because it has nothing to do. For example

(mpv-start "--idle=once")
(mpv-run-command "loadfile" "something")

That said, unfortunately I cannot reproduce the original issue right now (which seemed to include --idle).

ZGFabian commented 3 years ago

Thank you.

(require 'mpv)
(mpv-start "--idle")
(mpv-play "/PATH/TO/MEDIAFILE.EXT")

img

owensys commented 2 years ago

This error message still on windows, how to fix?

kljohann commented 2 years ago

There also is a separate issue for Windows support (#12). Unfortunately I cannot help there, as I don't use Windows.

nowislewis commented 2 years ago

I met the same problem in macOS when using "brew install mpv". And problems are fixed when I remove mpv and use "brew install --cask mpv". So this problem may due to a wrong installation of the application "mpv".

AtomicNess123 commented 2 years ago

Still getting the same problem.

tjsheth76 commented 2 years ago

I met the same problem in macOS when using "brew install mpv". And problems are fixed when I remove mpv and use "brew install --cask mpv". So this problem may due to a wrong installation of the application "mpv".

This worked- thanks @nowislewis !