emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'emms-player-mpv ipc-error: error running command' on FLAC files


From: Maxim Cournoyer
Subject: Re: 'emms-player-mpv ipc-error: error running command' on FLAC files
Date: Tue, 14 Dec 2021 14:35:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hello Mike!

Mike Kazantsev <mk.fraggod@gmail.com> writes:

> On Tue, 14 Dec 2021 11:01:26 -0500
> Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>
>> Hello!
>> 
>> Following a potent upgrade on my Guix System, EMMS can no longer play
>> FLAC files and throws the error every time I try to play a FLAC track:
> ...
>> 
>> I tried debugging the problem and this about where it occurs:
> ...
>>   emms-player-mpv-start((*track* (type . playlist) (name
>> . "/home/maxim/Music/Thrice/Thrice - Palms/Thrice - P...")
>> (info-albumartist . "Thrice") (info-tracknumber . "2") (info-album
>> . "Palms") (info-date . "2018") (info-artist . "Thrice") (info-title
>> . "The Grey")))
>>   funcall(emms-player-mpv-start (*track* (type . playlist) (name
>> . "/home/maxim/Music/Thrice/Thrice - Palms/Thrice - P...")
>> (info-albumartist . "Thrice") (info-tracknumber . "2") (info-album
>> . "Palms") (info-date . "2018") (info-artist . "Thrice") (info-title
>> . "The Grey")))
>
> I think this line shows the issue - track got mis-classified as a
> playlist, so emms-player-mpv passed it as a playlist to an mpv.
> While it's not actually a playlist ofc, so mpv rejected it.
>
> Iirc similar issue was reported before on this ML, but I don't remember
> why track got mis-identified as a playlist there.
>
> Maybe you've added it via emms-add-playlist-file by accident, or it was
> mis-identified based on filename as such somewhere?
> (long-ish filename is cut in strings above, but maybe it's something
> trivial like uppercase .FLAC or .Flac not handled correctly somewhere)

Ah!  Thank you for spotting this!  It looks obvious in retrospect, does
it not? :-).  The tracks were even prefixed by 'playlist' in the *emms*
buffer.  Hmmph.

> You might want to look at how such tracks get added to emms playlist,
> until running e.g.:
>
>   (emms-track-get (emms-playlist-current-selected-track) 'type)
>
> ...returns proper 'file instead of 'playlist.

After re-adding the tracks with 'add-directory', they play fine.  I
don't know how I got into that situation, but human error seems a likely
suspect.  It started failing after upgrading my system though, so the
next likely suspect would be perhaps some metadata format change between
emms releases; I recently moved from 7.6 to 7.7, then to 7.8 and didn't
rebuild my cached main playlist.

> Also, when testing adding these tracks, might be a good idea to disable
> emms metadata cache via e.g. "M-x emms-cache-toggle", so that it won't
> mask the results, though not sure if it applies here.
>
> Which function are you using to add these tracks to emms playlist buffer?
>
>
>> I'm not sure how to debug this further.  Help welcome :-).
>
> In general you can do something like this (at any time):
>
>   (setq emms-player-mpv-debug t)
>
> And check for full log of messages between mpv and emms backend in
> *Messages* buffer, where it should be easy to see what command gets
> sent and exact error mpv returns, along with any other events from it.
> Set that variable back to nil later to disable that logging.

This is very useful information!  I looked in 'info emms' for debugging
tips, but there were none; I think a debug section would be a useful
addition to it!

> Don't think it's needed here, as there seem to be pretty clear issue
> indicated above already, which would cause mpv error.
>
> Should be possible to fallback from "loadlist" to "loadfile" in mpv,
> so that errors like this won't happen, but I think it's a bad idea,
> as it'd mask the actual problem where tracks get added with the wrong
> type in the first place.

I agree.

Thanks a lot for your useful reply (and allowing me to enjoy my music
library once again :-)).

Cheers,

Maxim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]