Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EMMS: Error: "Don't know how to play track"

Tags:

emacs

I work with Emacs 24.0.92 (9.0) on Mac OS X 10.7.3. I downloaded and installed EMMS via git clone git://git.sv.gnu.org/emms.git and my ~/.emacs contains...

(add-to-list 'load-path "~/.emacs.d/emms/lisp")
(require 'emms-setup)
(emms-standard)
(emms-default-players)

... as suggested on http://www.gnu.org/software/emms/quickstart.html

If I use M-x emms-play-directory and choose a directory that contains .mp3 files, I obtain:

Don't know how to play track: (*track* (type . file) (name
. "/path/to/music/first song in this directory.mp3") (info-mtime 19612 57269)
(metadata))

I don't have mplayer installed, but VLC is installed and works perfectly fine. What additional settings do I need in order for this to work?

Note that the player-list contains VLC (and others -- just the default). I also set it to only VLC, but that gave the same error.

Also note that I found a similar error on https://superuser.com/questions/179186/emms-emacs-multimedia-system-error-in-emacs-dont-know-how-to-play-track but the "solution" there does not really explain what the problem is.

like image 202
Marius Hofert Avatar asked Feb 05 '12 08:02

Marius Hofert


3 Answers

try following two steps that works on my Mac OS X 10.7.4

  1. install mplayer on Mac

    brew install mplayer

  2. Add /usr/local/bin (where mplayer located) to emacs's exec-path by Adding following line to your ~/.emacs file

    (setq exec-path (append exec-path '("/usr/local/bin")))

BTW, Following is all configuration related with emms in my .emacs file:

(setq exec-path (append exec-path '("/usr/local/bin")))
(add-to-list 'load-path "~/.emacs.d/site-lisp/emms/lisp")
(require 'emms-setup)
(require 'emms-player-mplayer)
(emms-standard)
(emms-default-players)
(define-emms-simple-player mplayer '(file url)
      (regexp-opt '(".ogg" ".mp3" ".wav" ".mpg" ".mpeg" ".wmv" ".wma"
                    ".mov" ".avi" ".divx" ".ogm" ".asf" ".mkv" "http://" "mms://"
                    ".rm" ".rmvb" ".mp4" ".flac" ".vob" ".m4a" ".flv" ".ogv" ".pls"))
      "mplayer" "-slave" "-quiet" "-really-quiet" "-fullscreen")
like image 154
whunmr Avatar answered Oct 08 '22 21:10

whunmr


I have EMMS working fine with VLC on Mac OS X 10.9.1, this is my configuration related with EMMS:

(add-to-list 'load-path "~/.emacs.d/emms/lisp")
(require 'emms-setup)
(require 'emms-player-vlc)
(emms-standard)
(emms-default-players)
(setq emms-player-vlc-command-name
      "/Applications/VLC.app/Contents/MacOS/VLC")
like image 24
Carlo Espino Avatar answered Oct 08 '22 23:10

Carlo Espino


I had the same problem with Emacs 23.2 on Debian squeeze.

I managed to resolve it thanks to the links you gave, but I've no idea what was going on…
I added the following :

(setq emms-player-list '(emms-player-mpg321
                         emms-player-ogg123
                         emms-player-mplayer))

;debug players
(emms-player-for '(*track* (type . file)
                           (name . "myfile.pls")))

'eval-current-buffer' was not enough, I had to restart emacs. Then if I remove those lines, emms keeps working…
Emms was so difficult to make work for me. Mpg123 is maybe less featureful, but much easier : http://wikemacs.org/wiki/Media_player#Mpg123

like image 41
Ehvince Avatar answered Oct 08 '22 23:10

Ehvince