Yoni Rabkin <y...@rabkins.net> writes:

> Getting info from a stream is a different thing than getting it from a
> file, so the info functions don't apply. The streaming info backend is
> determined by the variable `*emms-stream-info-backend*', which is set to
> mplayer in my case.

I also have *emms-stream-info-backend* set to mplayer. But I finally
noticed the difference: I was using one of the .pls playlist link given
in emms-stream-default-list. And playlist parsing is disabled in mplayer
by default. You have to allow it with for instance:

--8<---------------cut here---------------start------------->8---
mplayer -ao null -vo null -endpos 0 -nocache -playlist 
--8<---------------cut here---------------end--------------->8---

Also, in this case of a stream being played, mplayer returns the name of
the stream and not the name of song currently playing, because there
isn't any "ICY Info: StreamTitle" in the output with these options. You
can however get this field if you enable a minimum cache (150Ko is not
enough) with for instance:

--8<---------------cut here---------------start------------->8---
mplayer -ao null -vo null -endpos 0 -cache 180 -playlist 
--8<---------------cut here---------------end--------------->8---

It's fine when you run mplayer in a terminal but the temp buffer used
by emms-stream-info-mplayer-backend gets filled by several Mo of
"Cache fill:  0.00% (0 bytes)" messages. You can get rid of these
messages, and some other, with the following cmdline options:

--8<---------------cut here---------------start------------->8---
-msglevel decaudio=-1:cache=-1:statusline=-1:cplayer=-1
--8<---------------cut here---------------end--------------->8---

The clean thing would be to remove all messages (with all=-1) and then
only enable the right modules but I couldn't find the module responsible
for the ICY info message.

We can add these options to emms-stream-info-mplayer-backend but maybe
the -playlist one should only be used when the url is indeed a playlist.

> I also note that while setting `*emms-stream-info-backend*' is mentioned
> in emms-stream-info.el, it isn't mentioned in the manual. I'll add it to
> the manual so people can do that in future.

> (unless you feel like sending in a patch against the manual adding
> that...)

Would the attached patch do ?


>From 3b25d49d2cf0d971c4d6d9505d5de0e6f2f8cd5b Mon Sep 17 00:00:00 2001
From: Julien Cubizolles <j.cubizol...@free.fr>
Date: Fri, 14 Oct 2016 06:47:29 +0200
Subject: [PATCH] info for *emms-stream-info-backend*

 doc/emms.texinfo | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/doc/emms.texinfo b/doc/emms.texinfo
index 457a2d3..0f5076d 100644
--- a/doc/emms.texinfo
+++ b/doc/emms.texinfo
@@ -2301,6 +2301,17 @@ own.@footnote{If you enjoy a particular streaming audio station on the
 Web and think that it belongs in the default list, please send us a
 link and we will gladly add it!}
+@defopt *emms-stream-info-backend*
+Set `*emms-stream-info-backend*' to either 'vlc or 'mplayer, which are
+the two currently supported backends for retrieving stream information.
+You can then either call `emms-stream-info-message' directly or hit @kbd{i}
+in the `emms-streams' buffer over stream you want to investigate.
+Note that you do not have to be playing the stream in question in order
+to find out what is playing on it since this library will open its own
+connection to the streaming server.
+@end defopt
 The following is a list of the key-bindings for the emms-streams

Emms-help mailing list

Reply via email to