No next track in playlist

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

No next track in playlist

arthur miller

This is making me crazy! :-)

Emms played just fine 2 days ago, and then since yesterday I am getting
"No next track in playlist" for any folder I try to play.

I have re-build emacs (28.0.50) and I have updated packages yesterday,
however Emms since to be same as of three days ago: emms-20201230.2142

I see tracks loaded in the playlist, with absolute paths, yet Emms says
"No next track in playlist". When I open the playlist and press Enter
key on the first song, I see it go rapidly through the list from top to
bottem and rapport at the end "No next track in the playlist"

I can open any folder in dired and just execute & mpv on it and it will
play no problems.

Below is an excerpt from the message buffer and below that is my Emms
setup (which I tried to tweak in last two days to get it to work so it
changed somewhat so there might be an error in it now).

Loading /home/arthur/.emacs.d/emms/cache...done
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/01 Study No. 1.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/02 Study No. 2.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/03 Study No. 3.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/04 Study No. 4.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/05 Study No. 5.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/06 Study No. 6.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/07 Study No. 7.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/08 Study No. 8.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/09 Study No. 9.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/10 Study No. 10.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/11 Study No. 11.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/12 Study No. 12.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/13 Study No. 13.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/14 Study No. 14.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/15 Study No. 15.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/16 Study No. 16.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/17 Study No. 17.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/18 Study No. 18.flac
EMMS: All track information loaded.
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/19 Study No. 19.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/20 Study No. 20.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/21 Study No. 21.flac
Playing: /home/arthur/Musik/classical guitar/Andrea Pace - 22 Studies for Guitar/22 Study No. 22.flac
No next track in playlist


              (require 'emms)
              (require 'emms-setup)
              (require 'emms-volume)
              (require 'emms-source-file)
              (require 'emms-source-playlist)
              (require 'emms-playlist-mode)
              (require 'emms-playlist-limit)
              (require 'emms-playing-time)
              (require 'emms-mode-line-cycle)
              (require 'emms-player-mpv)
              (emms-all)
              (emms-history-load)
              (emms-default-players)
              (helm-mode 1)
              (emms-mode-line 1)
              (emms-playing-time 1)

              (setq-default emms-player-list '(emms-player-mpv)
                            emms-player-mpv-ipc-method nil
                                emms-player-mpv-environment '("PULSE_PROP_media.role=music")
                                emms-player-mpv-parameters
                                '("--quiet" "--really-quiet" "--no-audio-display" "--force-window=no" "--vo=null"))
              (custom-set-variables '(emms-player-mpv-update-metadata t t))
             
              (setq emms-directory (expand-file-name "etc/emms/" user-emacs-directory)
                    emms-cache-file (expand-file-name "cache" emms-directory)
                    emms-history-file (expand-file-name "history" emms-directory)
                    emms-score-file (expand-file-name "scores" emms-directory)
                    emms-stream-bookmark-file (expand-file-name "streams" emms-directory)
                    emms-playlist-buffer-name "*Music Playlist*"
                    emms-show-format "Playing: %s"
                    emms-mode-line-icon-before-format "["
                    emms-mode-line-format " %s]"
                    emms-playing-time-display-format "%s ]"
                    emms-mode-line-icon-color "lightgrey"
                    global-mode-string '("" emms-mode-line-string " " emms-playing-time-string)
                    emms-source-file-default-directory (expand-file-name "~/Musik")
                    emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find
                    emms-browser-covers 'emms-browser-cache-thumbnail)

              (add-to-list 'emms-info-functions 'emms-info-cueinfo)
             
              (when (executable-find "emms-print-metadata")
                (require 'emms-info-libtag)
                (add-to-list 'emms-info-functions 'emms-info-libtag)
                (delete 'emms-info-ogginfo emms-info-functions)
                (delete 'emms-info-mp3info emms-info-functions)
                (add-to-list 'emms-info-functions 'emms-info-ogginfo)
                (add-to-list 'emms-info-functions 'emms-info-mp3info))
             
              ;; (add-hook 'emms-browser-tracks-added-hook 'z-emms-play-on-add)
              ;; Show the current track each time EMMS
              (add-hook 'emms-player-started-hook 'emms-show)

Reply | Threaded
Open this post in threaded view
|

Re: No next track in playlist

Yoni Rabkin-2
Arthur Miller <[hidden email]> writes:

> This is making me crazy! :-)
>
> Emms played just fine 2 days ago, and then since yesterday I am getting
> "No next track in playlist" for any folder I try to play.

What you are describing is what happens when Emms fails to call the
player. What you are seeing is a processing trying to be started,
failing, and then moving on to the next track.

I would recommend starting with a simplified mpv player setup to see if
that works, and similarly to try and set vlc, mplayer or similar as the
only player instead to see if those get executed and play correctly.

Certainly nothing has changed on the Emms side (listening to a radio
stream with mpv via Emms as I type this.)

--
   "Cut your own wood and it will warm you twice"

Reply | Threaded
Open this post in threaded view
|

Re: No next track in playlist

arthur miller
Yoni Rabkin <[hidden email]> writes:

> Arthur Miller <[hidden email]> writes:
>
>> This is making me crazy! :-)
>>
>> Emms played just fine 2 days ago, and then since yesterday I am getting
>> "No next track in playlist" for any folder I try to play.
>
> What you are describing is what happens when Emms fails to call the
> player. What you are seeing is a processing trying to be started,
> failing, and then moving on to the next track.
Yes I understood that part, but Emacs can start mpv, no problems. I can
run it either from Dired or from minibuffer (via shell). I am not sure
what is difference. Does Emms go via shell, or uses process control
built into Emacs? Must be path right?

> I would recommend starting with a simplified mpv player setup to see if
> that works, and similarly to try and set vlc, mplayer or similar as the
> only player instead to see if those get executed and play correctly.

> Certainly nothing has changed on the Emms side (listening to a radio
> stream with mpv via Emms as I type this.)
I understand that too :). Didn't thought it was, but I don't understand
what changed. I did rebuild Emacs; maybe something else in my config.

I am listening to mpv too as I write this (but via dired :-)).

Reply | Threaded
Open this post in threaded view
|

Re: No next track in playlist

Mike Kazantsev-2
On Wed, 06 Jan 2021 21:01:04 +0100
Arthur Miller <[hidden email]> wrote:

> Yoni Rabkin <[hidden email]> writes:
>
> > Arthur Miller <[hidden email]> writes:
> >  
> >> This is making me crazy! :-)
> >>
> >> Emms played just fine 2 days ago, and then since yesterday I am getting
> >> "No next track in playlist" for any folder I try to play.  
> >
> > What you are describing is what happens when Emms fails to call the
> > player. What you are seeing is a processing trying to be started,
> > failing, and then moving on to the next track.  

> Yes I understood that part, but Emacs can start mpv, no problems. I can
> run it either from Dired or from minibuffer (via shell). I am not sure
> what is difference.

I'd still suspect something getting updated in mpv, maybe even default
config, preventing emms-player-mpv to talk to it.

Try setting (setq emms-player-mpv-debug t) and checking what it says in
the Messages buffer, maybe send it here, if it's unclear what's the
problem there.

There should be errors in Messages buffer regardless of that option if
something known-wrong happens, but some api change or configuration
issue, might not be as easy to detect.


> Does Emms go via shell, or uses process control
> built into Emacs? Must be path right?

It uses process control in emacs, doesn't wrap it in shell by default.

You can customize binary/path and other startup parameters in
emms-player-mpv customization group interactively, or via
custom-set-variables for emms-player-mpv-command-name,
emms-player-mpv-parameters, emms-player-mpv-environment, etc
(all should be listed under that group, and at the top of .el file too).


> I am listening to mpv too as I write this (but via dired :-)).

Current emms-player-mpv.el runs mpv as a persistent process and sends
it commands to play files via its ipc interface, which is probably the
relevant difference here - I'd suspect that this IPC interface doesn't
work as expected in your case.

There's a way to work around the issue by using 'file for
emms-player-mpv-ipc-method, but I'd suggest at least checking debug log
first, as it's quite possible that problem is very trivial, and running
mpv daemon has a bunch of advantages (like getting current-playing
track names updated from it with internet radios, avoiding volume resets
between tracks for .mp3 files, etc).


--
Mike Kazantsev // fraggod.net

Reply | Threaded
Open this post in threaded view
|

Re: No next track in playlist

arthur miller
Mike Kazantsev <[hidden email]> writes:

> On Wed, 06 Jan 2021 21:01:04 +0100
> Arthur Miller <[hidden email]> wrote:
>
>> Yoni Rabkin <[hidden email]> writes:
>>
>> > Arthur Miller <[hidden email]> writes:
>> >  
>> >> This is making me crazy! :-)
>> >>
>> >> Emms played just fine 2 days ago, and then since yesterday I am getting
>> >> "No next track in playlist" for any folder I try to play.  
>> >
>> > What you are describing is what happens when Emms fails to call the
>> > player. What you are seeing is a processing trying to be started,
>> > failing, and then moving on to the next track.  
>
>> Yes I understood that part, but Emacs can start mpv, no problems. I can
>> run it either from Dired or from minibuffer (via shell). I am not sure
>> what is difference.
>
> I'd still suspect something getting updated in mpv, maybe even default
> config, preventing emms-player-mpv to talk to it.
>
> Try setting (setq emms-player-mpv-debug t) and checking what it says in
> the Messages buffer, maybe send it here, if it's unclear what's the
> problem there.
I set emms-player-mpv-debug but I see nothing different in messages.
Does debug info goes elsewhere?

> There should be errors in Messages buffer regardless of that option if
> something known-wrong happens, but some api change or configuration
> issue, might not be as easy to detect.
>
>
>> Does Emms go via shell, or uses process control
>> built into Emacs? Must be path right?
>
> It uses process control in emacs, doesn't wrap it in shell by default.

Just as a test exec-path looks good, and Emacs can run mpv with start process:

(start-process
 "mpv"
 nil
 "mpv"
 "--quiet"
 "--really-quiet"
 "--no-audio-display"
 "--force-window=no"
 "--vo=null"
"/home/arthur/Musik/classical/12 Danzas EspaƱolas-Enrique Granados/10 Danza triste.mp3")

It plays fine; so I guess it is something to my emms mpv configuration.

> You can customize binary/path and other startup parameters in
> emms-player-mpv customization group interactively, or via
> custom-set-variables for emms-player-mpv-command-name,
> emms-player-mpv-parameters, emms-player-mpv-environment, etc
> (all should be listed under that group, and at the top of .el file too).

Ok, I have simplified the setup, removed all custom paths and
unnecessary stuff; now there is just "mpv" part to it.

Above start-process call plays fine, yet when I run setup
below I still get no-next-track message.

(with-eval-after-load 'emms
              (require 'emms)
              (require 'emms-setup)
              (require 'emms-volume)
              (require 'emms-source-file)
              (require 'emms-source-playlist)
              (require 'emms-playlist-mode)
              (require 'emms-playlist-limit)
              (require 'emms-playing-time)
              (require 'emms-mode-line-cycle)
              (require 'emms-player-mpv)
              (emms-all)
              (emms-history-load)
              (emms-default-players)
              (helm-mode 1)
              (emms-mode-line 1)
              (emms-playing-time 1)

              (setq-default emms-player-list '(emms-player-mpv)
                            emms-player-mpv-ipc-method t
                            emms-player-mpv-debug t
                            emms-player-mpv-environment '("PULSE_PROP_media.role=music")
                            emms-player-mpv-parameters '("--quiet" "--really-quiet" "--no-audio-display" "--force-window=no" "--vo=null")))

Debug flag does not give me much: this is what I get from a freshly
started Emacs in *Messages* after running emms on a directory:

[yas] Prepared just-in-time loading of snippets successfully. [2 times]
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading /home/arthur/.emacs.d/emms/cache...done
Waiting for git... [2 times]
Loading /home/arthur/.emacs.d/helm-adaptive-history...done
EMMS: All track information loaded.
No next track in playlist
C-c C-n is undefined
Quit


It shouldn't matter that I have my configuration in eval-after-load (or
rather with-eval-after-load macro), right?

Thanks for help by the way!

Reply | Threaded
Open this post in threaded view
|

Re: No next track in playlist

Yoni Rabkin-2
In reply to this post by arthur miller
Arthur Miller <[hidden email]> writes:

> This is making me crazy! :-)
>
> Emms played just fine 2 days ago, and then since yesterday I am getting
> "No next track in playlist" for any folder I try to play.
>
> I have re-build emacs (28.0.50) and I have updated packages yesterday,
> however Emms since to be same as of three days ago: emms-20201230.2142

I grabbed and built 28.0.50. Works well with emms-player-list being just
'emms-player-mpv and nothing else mpv related.



--
   "Cut your own wood and it will warm you twice"

Reply | Threaded
Open this post in threaded view
|

Re: No next track in playlist

Mike Kazantsev-2
In reply to this post by arthur miller
On Wed, 06 Jan 2021 23:21:10 +0100
Arthur Miller <[hidden email]> wrote:

> Mike Kazantsev <[hidden email]> writes:
>
> > Try setting (setq emms-player-mpv-debug t) and checking what it says in
> > the Messages buffer, maybe send it here, if it's unclear what's the
> > problem there.  

> I set emms-player-mpv-debug but I see nothing different in messages.
> Does debug info goes elsewhere?
...
> It plays fine; so I guess it is something to my emms mpv configuration.

No, should be checked in emms-player-mpv-debug-msg calls, so enabling it
anytime and doing anything mpv-related should produce some output there.

As it does not, guess player backend from emms-player-mpv never runs,
so guess it should be an issue elsewhere.


> > You can customize binary/path and other startup parameters in
> > emms-player-mpv customization group interactively, or via
> > custom-set-variables for emms-player-mpv-command-name,
> > emms-player-mpv-parameters, emms-player-mpv-environment, etc
> > (all should be listed under that group, and at the top of .el file too).  
>
> Ok, I have simplified the setup, removed all custom paths and
> unnecessary stuff; now there is just "mpv" part to it.
>
> Above start-process call plays fine, yet when I run setup
> below I still get no-next-track message.
>
...
>               (setq-default emms-player-list '(emms-player-mpv)
>                             emms-player-mpv-ipc-method t

emms-player-mpv-ipc-method should not be t, it is defined as:

  (defcustom emms-player-mpv-ipc-method nil
    "Switch for which IPC method to use with mpv.
  Possible symbols: detect, ipc-server, unix-socket, file.
  Defaults to nil value, which will cause `emms-player-mpv-ipc-detect'
  to pick one based on mpv --version output.
  Using JSON-IPC variants (ipc-server and unix-socket) enables
  support for various feedback and metadata options from mpv."
    :type '(choice
      (const :tag "Auto-detect from mpv --version" nil)
      (const :tag "Use --input-ipc-server JSON IPC (v0.17.0 2016-04-11)" ipc-server)
      (const :tag "Use --input-unix-socket JSON IPC (v0.7.0 2014-10-16)" unix-socket)
      (const :tag "Use --input-file FIFO (any mpv version)" file))
    :group 'emms-player-mpv)

And that's kinda why you might want to use custom-set-variables for
anything defcustom - pretty sure it should give you an error for such
invalid value.

And furthermore, using setq for something like
emms-player-mpv-update-metadata will not run the :set hooks there,
and won't do anything, so again, shouldn't use setq for these.


> Debug flag does not give me much: this is what I get from a freshly
> started Emacs in *Messages* after running emms on a directory:
...
> It shouldn't matter that I have my configuration in eval-after-load (or
> rather with-eval-after-load macro), right?

Yeah, don't think it should matter, and given that debug output is
missing, I'd suspect that for some reason backend is just not used -
maybe some issue with playlist and tracks there?

Not sure what it might be, and I'd probably open emms-player-mpv.el
at this point and try adding e.g. (error "is this working?") as first
line in emms-player-mpv-start function, eval it like that, make sure
it's not just an issue with debug logging, and maybe go check emms.el
in a similar fashion from there.

There probably are more efficient ways to debug code than such
printf-lines, and that's just my go-to with an arbitrary code.


--
Mike Kazantsev // fraggod.net

Reply | Threaded
Open this post in threaded view
|

Re: No next track in playlist

Yoni Rabkin-2
Mike Kazantsev <[hidden email]> writes:

> On Wed, 06 Jan 2021 23:21:10 +0100
> Arthur Miller <[hidden email]> wrote:
>
>> Mike Kazantsev <[hidden email]> writes:
>>
>> > Try setting (setq emms-player-mpv-debug t) and checking what it says in
>> > the Messages buffer, maybe send it here, if it's unclear what's the
>> > problem there.  
>
>> I set emms-player-mpv-debug but I see nothing different in messages.
>> Does debug info goes elsewhere?
> ...
>> It plays fine; so I guess it is something to my emms mpv configuration.
>
> No, should be checked in emms-player-mpv-debug-msg calls, so enabling it
> anytime and doing anything mpv-related should produce some output there.
>
> As it does not, guess player backend from emms-player-mpv never runs,
> so guess it should be an issue elsewhere.

We still didn't hear if other players work via Emms; that would be good
to know.



--
   "Cut your own wood and it will warm you twice"

Reply | Threaded
Open this post in threaded view
|

Re: No next track in playlist

arthur miller
In reply to this post by Mike Kazantsev-2
Mike Kazantsev <[hidden email]> writes:

> On Wed, 06 Jan 2021 23:21:10 +0100
> Arthur Miller <[hidden email]> wrote:
>
>> Mike Kazantsev <[hidden email]> writes:
>>
>> > Try setting (setq emms-player-mpv-debug t) and checking what it says in
>> > the Messages buffer, maybe send it here, if it's unclear what's the
>> > problem there.  
>
>> I set emms-player-mpv-debug but I see nothing different in messages.
>> Does debug info goes elsewhere?
> ...
>> It plays fine; so I guess it is something to my emms mpv configuration.
>
> No, should be checked in emms-player-mpv-debug-msg calls, so enabling it
> anytime and doing anything mpv-related should produce some output there.
>
> As it does not, guess player backend from emms-player-mpv never runs,
> so guess it should be an issue elsewhere.
>
>
>> > You can customize binary/path and other startup parameters in
>> > emms-player-mpv customization group interactively, or via
>> > custom-set-variables for emms-player-mpv-command-name,
>> > emms-player-mpv-parameters, emms-player-mpv-environment, etc
>> > (all should be listed under that group, and at the top of .el file too).  
>>
>> Ok, I have simplified the setup, removed all custom paths and
>> unnecessary stuff; now there is just "mpv" part to it.
>>
>> Above start-process call plays fine, yet when I run setup
>> below I still get no-next-track message.
>>
> ...
>>               (setq-default emms-player-list '(emms-player-mpv)
>>                             emms-player-mpv-ipc-method t
>
> emms-player-mpv-ipc-method should not be t, it is defined as:
>
>   (defcustom emms-player-mpv-ipc-method nil
>     "Switch for which IPC method to use with mpv.
>   Possible symbols: detect, ipc-server, unix-socket, file.
>   Defaults to nil value, which will cause `emms-player-mpv-ipc-detect'
>   to pick one based on mpv --version output.
>   Using JSON-IPC variants (ipc-server and unix-socket) enables
>   support for various feedback and metadata options from mpv."
>     :type '(choice
>       (const :tag "Auto-detect from mpv --version" nil)
>       (const :tag "Use --input-ipc-server JSON IPC (v0.17.0 2016-04-11)" ipc-server)
>       (const :tag "Use --input-unix-socket JSON IPC (v0.7.0 2014-10-16)" unix-socket)
>       (const :tag "Use --input-file FIFO (any mpv version)" file))
>     :group 'emms-player-mpv)
>
> And that's kinda why you might want to use custom-set-variables for
> anything defcustom - pretty sure it should give you an error for such
> invalid value.
>
> And furthermore, using setq for something like
> emms-player-mpv-update-metadata will not run the :set hooks there,
> and won't do anything, so again, shouldn't use setq for these.
>
>
>> Debug flag does not give me much: this is what I get from a freshly
>> started Emacs in *Messages* after running emms on a directory:
> ...
>> It shouldn't matter that I have my configuration in eval-after-load (or
>> rather with-eval-after-load macro), right?
>
> Yeah, don't think it should matter, and given that debug output is
> missing, I'd suspect that for some reason backend is just not used -
> maybe some issue with playlist and tracks there?
>
> Not sure what it might be, and I'd probably open emms-player-mpv.el
> at this point and try adding e.g. (error "is this working?") as first
> line in emms-player-mpv-start function, eval it like that, make sure
> it's not just an issue with debug logging, and maybe go check emms.el
> in a similar fashion from there.
>
> There probably are more efficient ways to debug code than such
> printf-lines, and that's just my go-to with an arbitrary code.

I have found the error; was elsewhere in my config.

Emms itsels work just fine with only:

              (setq-default emms-player-list '(emms-player-mpv))

I am generating some code for my init file, and I happened to stream one
extra funcall I shouldn't :-). That one was really annoying to find.

Anyway; thanks for the help!