emms-help
[Top][All Lists]
Advanced

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

Re: [emms-help] Disable mpv "--no-audio-display" while playing


From: Mike Kazantsev
Subject: Re: [emms-help] Disable mpv "--no-audio-display" while playing
Date: Thu, 27 Sep 2018 02:28:00 +0500

On Tue, 25 Sep 2018 19:19:07 +0100
Mohamed Aziz Knani <address@hidden> wrote:

> I apologize if my question isn't clear, but I want to be toggle
> "--no-audio-display" while the mpv process is running, i.e is there a
> command that lets me do that without having to restart mpv. If not a
> quick restart of the mpv process shouldn't be a a big of an issue.

Hey,

Yeah, you can generally change any mpv options via something like:

  (emms-player-mpv-cmd `(set_property options/ontop yes))

And they mostly available outside of "options/" namespace as properties
("property-list" returns full list of top-level ones).

Two useful properties for what I think you want to do might be "vid"
and "audio-display".

To disable displaying cover art for current and all future tracks,
hiding the window immediately (if any):

  (emms-player-mpv-cmd `(set_property vid 0))

(vid corresponds to --vid option, where cover art would be --vid=1)

To only disable "audio-display" option for future played tracks, you can
also set "audio-display" to "no" that way, but setting vid to 0 will
effectively do same thing too.

If you have --force-window=yes (or "immediate"), you'd probably also
need to do "(set_property force-window no)" to disable empty window
hanging around.

And if you want to have some logic to only disable window if it is an
album art, can probably check "albumart" on tracks:

  (emms-player-mpv-cmd-prog
    `(get_property track-list/1/albumart)
    (message "Album art present: %s" (if mpv-data "yes" "no")))

(though maybe checking track-list/count and iterating through these
might be more robust for more complicated media container files)

Note that it's all mpv features, and not really related to how emms
interacts with it, so more in-depth info should be available on mpv
site, docs, MLs, repo script examples, etc.

Cheers!


-- 
Mike Kazantsev // fraggod.net



reply via email to

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