Discussion:
playlist formats of MPD
zw g
2011-12-07 04:39:33 UTC
Permalink
Dear List,


Is MPD support other playlists rather than *.m3u?
Like, *.pls, *.xspf, *.asx, etc.

Or.., even RSS, XML? (xmms2 did this!)

I like MPD very much, it would be great to have those features.
So i was wondering is there any possibility to achieve this?



Gui
Max Kellermann
2011-12-07 13:51:09 UTC
Permalink
Post by zw g
Is MPD support other playlists rather than *.m3u?
Like, *.pls, *.xspf, *.asx, etc.
Yes. http://www.musicpd.org/doc/user/ch05s05.html
zw g
2011-12-08 02:05:39 UTC
Permalink
Thanks, Max.
I'll give it a look.

Gui
Post by Max Kellermann
Post by zw g
Is MPD support other playlists rather than *.m3u?
Like, *.pls, *.xspf, *.asx, etc.
Yes. http://www.musicpd.org/doc/user/ch05s05.html
richard lucassen
2011-12-11 15:50:53 UTC
Permalink
On Wed, 7 Dec 2011 14:51:09 +0100
Post by Max Kellermann
Post by zw g
Is MPD support other playlists rather than *.m3u?
Like, *.pls, *.xspf, *.asx, etc.
Yes. http://www.musicpd.org/doc/user/ch05s05.html
According to that page there's also an extm3u plugin, but I can't find
anything about it. If I enable the extm3u plugin in the mpd.conf,
there's nothing I can see in the logs. I see no difference between
loading and not loading the plugin. Is it a built-in plugin? Is it an
extension that I have to download?

Let me put it like this: I'd like to use the (obsolete?) #EXTM3U and
#EXTINF tags to display what stream is playing. For some URL's I only
see the URL displayed, not the name of the station.

Is that possible with the above mentioned extm3u plugin?

R.
--
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht |
| Public key and email address: |
| http://www.lucassen.org/mail-pubkey.html |
+------------------------------------------------------------------+
Max Kellermann
2011-12-13 18:15:14 UTC
Permalink
Post by richard lucassen
On Wed, 7 Dec 2011 14:51:09 +0100
Post by Max Kellermann
Post by zw g
Is MPD support other playlists rather than *.m3u?
Like, *.pls, *.xspf, *.asx, etc.
Yes. http://www.musicpd.org/doc/user/ch05s05.html
According to that page there's also an extm3u plugin, but I can't find
anything about it. If I enable the extm3u plugin in the mpd.conf,
there's nothing I can see in the logs. I see no difference between
loading and not loading the plugin. Is it a built-in plugin? Is it an
extension that I have to download?
There are no "downloadable" extensions in MPD. There are plugins
which may be enabled or disabled at compile time. The extm3u plugin
is always enabled.
Post by richard lucassen
Let me put it like this: I'd like to use the (obsolete?) #EXTM3U and
#EXTINF tags to display what stream is playing. For some URL's I only
see the URL displayed, not the name of the station.
Is that possible with the above mentioned extm3u plugin?
Without knowing your file, it's hard to tell why MPD won't load the
tags from your file.

Max
richard lucassen
2011-12-14 09:16:58 UTC
Permalink
On Tue, 13 Dec 2011 19:15:14 +0100
Post by Max Kellermann
Post by richard lucassen
According to that page there's also an extm3u plugin, but I can't
find anything about it. If I enable the extm3u plugin in the
mpd.conf, there's nothing I can see in the logs. I see no
difference between loading and not loading the plugin. Is it a
built-in plugin? Is it an extension that I have to download?
There are no "downloadable" extensions in MPD. There are plugins
which may be enabled or disabled at compile time. The extm3u plugin
is always enabled.
ok, but the only thing I can find about it is that it is there and that
I can enable it by adding a block in mpd.conf. What it does and how it
works is not mentioned....
Post by Max Kellermann
Post by richard lucassen
Let me put it like this: I'd like to use the (obsolete?) #EXTM3U and
#EXTINF tags to display what stream is playing. For some URL's I
#only
see the URL displayed, not the name of the station.
Is that possible with the above mentioned extm3u plugin?
Without knowing your file, it's hard to tell why MPD won't load the
tags from your file.
$ cat /var/lib/mpd/playlists/01-db-BBC3.m3u
#EXTM3U
#EXTINF:1,switching to BBC3
http://dreambox1.utr.xaq.nl/cgi-bin/zapTo?path=1:0:2:1a61:7dd:2:11a0000:0:0:0:
#EXTINF:0,BBC3
http://dreambox1.utr.xaq.nl:31343/151b

But OTOH: I thought about it, but isn't this a client issue? IOW: should
mpd care about the tags?

R.
--
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht |
| Public key and email address: |
| http://www.lucassen.org/mail-pubkey.html |
+------------------------------------------------------------------+
Max Kellermann
2011-12-14 09:24:22 UTC
Permalink
Post by richard lucassen
$ cat /var/lib/mpd/playlists/01-db-BBC3.m3u
#EXTM3U
#EXTINF:1,switching to BBC3
#EXTINF:0,BBC3
http://dreambox1.utr.xaq.nl:31343/151b
In the playlist directory, only plain M3U playlists are recognized (as
these files are meant to be written by MPD, and MPD cannot write
ExtM3U). Any playlist format may be present in the music directory
(read-only), and MPD will happily load the song names from your files.

You may find that difference playlist dir / music dir confusing, and
I'm sorry that it indeed is.

Max
richard lucassen
2011-12-14 09:55:07 UTC
Permalink
On Wed, 14 Dec 2011 10:24:22 +0100
Post by Max Kellermann
Post by richard lucassen
$ cat /var/lib/mpd/playlists/01-db-BBC3.m3u
#EXTM3U
#EXTINF:1,switching to BBC3
#EXTINF:0,BBC3
http://dreambox1.utr.xaq.nl:31343/151b
In the playlist directory, only plain M3U playlists are recognized (as
these files are meant to be written by MPD, and MPD cannot write
ExtM3U). Any playlist format may be present in the music directory
(read-only), and MPD will happily load the song names from your files.
Even if these playlists contain links to streaming servers? The tags
are in the playlist file, not in the links (or even mp3 or whatever
files)
Post by Max Kellermann
You may find that difference playlist dir / music dir confusing, and
I'm sorry that it indeed is.
<wishlist>
No, it isn't confusing, I think it might even be extended a bit by
having the possibility to use subdirectories :)
</wishlist>

R.
--
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.

+------------------------------------------------------------------+
| Richard Lucassen, Utrecht |
| Public key and email address: |
| http://www.lucassen.org/mail-pubkey.html |
+------------------------------------------------------------------+
Max Kellermann
2011-12-14 09:57:22 UTC
Permalink
Post by richard lucassen
Even if these playlists contain links to streaming servers? The tags
are in the playlist file, not in the links (or even mp3 or whatever
files)
In the playlist directory, MPD reads only the format that it can write
- and that's plain M3U, not ExtM3U. At that point, MPD does not care
if the link points to a stream or a local file.
Post by richard lucassen
<wishlist>
No, it isn't confusing, I think it might even be extended a bit by
having the possibility to use subdirectories :)
</wishlist>
You can have (read-only) playlist files in the music directory in any
subdirectory. The playlist directory is just for playlists that are
managed by MPD.

Max
zw g
2011-12-14 10:43:51 UTC
Permalink
Max,


Can i put a playlist file(not the plain M3U type) to the music directory
but
inside that playlist all songs point to some place other than music
directory?

What i mean is can i just play files not in the music directory, if i don't
make it a symbolic link?
Just by putting playlist files in the music directory not the real file.

Sorry for my English.


Gui
Post by Max Kellermann
Post by richard lucassen
Even if these playlists contain links to streaming servers? The tags
are in the playlist file, not in the links (or even mp3 or whatever
files)
In the playlist directory, MPD reads only the format that it can write
- and that's plain M3U, not ExtM3U. At that point, MPD does not care
if the link points to a stream or a local file.
Post by richard lucassen
<wishlist>
No, it isn't confusing, I think it might even be extended a bit by
having the possibility to use subdirectories :)
</wishlist>
You can have (read-only) playlist files in the music directory in any
subdirectory. The playlist directory is just for playlists that are
managed by MPD.
Max
------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits?
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
_______________________________________________
Musicpd-dev-team mailing list
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Max Kellermann
2011-12-14 13:51:27 UTC
Permalink
Post by zw g
What i mean is can i just play files not in the music directory, if i don't
make it a symbolic link?
Just by putting playlist files in the music directory not the real file.
Yes, but you can do that without a playlist file.

mpc add /absolute/path/to/file.mp3

(Only when you're on the same machine as the MPD server, connected
with a local socket)
Christof De Backere
2012-11-27 09:41:36 UTC
Permalink
Post by Max Kellermann
In the playlist directory, MPD reads only the format that it can write
- and that's plain M3U, not ExtM3U. At that point, MPD does not care
if the link points to a stream or a local file.
...
You can have (read-only) playlist files in the music directory in any
subdirectory. The playlist directory is just for playlists that are
managed by MPD.
Max
Hi Max,


What I'm still puzzled about is what the mpd server should do/does when it finds
a playlist in the music directory (in a readable format like m3u)?
1) Should it walk through the the playlist and add the individual 'songs' to the
database?
2) Also if the 'song' is a stream? However, with a stream, there is no such
thing as 'tags' for artist, album, .... (in best case a name tag in extm3u)

The reason I ask is I want to find a nice way to add streams for easy use by the
user: ideally, they put a m3u playlist file containing the radiostations he want
somewhere in the music directory which will be scanned by the mpd server. Then
user gets acces to them over any client (either through the mpd playlist or
through the 'song db')

Thanks,
C.
Max Kellermann
2012-11-28 13:42:16 UTC
Permalink
Post by Christof De Backere
What I'm still puzzled about is what the mpd server should do/does when it finds
a playlist in the music directory (in a readable format like m3u)?
1) Should it walk through the the playlist and add the individual 'songs' to the
database?
2) Also if the 'song' is a stream? However, with a stream, there is no such
thing as 'tags' for artist, album, .... (in best case a name tag in extm3u)
No, it just remembers that the playlist file exists (ignoring its
contents), and will tell that to the client via "lsinfo". The client
can then choose to issue a "load" command for this playlist file. Or
it can use "listplaylist[info]" to view the contents of the playlist
file.
christof De Backere
2012-11-28 15:03:32 UTC
Permalink
Post by Max Kellermann
No, it just remembers that the playlist file exists (ignoring its
contents), and will tell that to the client via "lsinfo". The client
can then choose to issue a "load" command for this playlist file. Or
it can use "listplaylist[info]" to view the contents of the playlist
file.
Thanks for the info. I now understand that the mpd will treat it as any other
file in the music directory. It simply keeps it in it's database because the
file exists. The only difference being that it will not have any tags (scope
identifiers) defined, except 'filename', right?

Client: now I'm trying to understand what a client should do.
So imagine the client retrieves the db at startup with listallinfo then it will
get that playlist as
'file: x/y/rasio/radio1_Stream.m3u'
without any further tags, because there are no tags defined on that file.
The client then should add the file to the db-cache just like the other files,
but without tags.

Then the user can only find the file from it's filename (using the db-cache or
'search'), which is fine I guess. He will issue a command as if that 'file:' is
a song: 'add x/y/radio/radio1_Stream.m3u' (or addid) and the command will fail.
Right?
So the client should see for himself that the song 'file:
x/y/radio/radio1_Stream.m3u' is actually a valid playlist format/extension and
issue 'load x/y/radio/radio1_Stream.m3u' So the 'playlist intelligence' must be
in the client, right? Isn't this strange? Shouldn't the mpd also respond to the
'add' command for transparancy, to avoid client side intelligence?

recursive:
Assuming the client does the above 'load' correct, then what will happen at
'load' if the playlist itself contains another playlist?

stream:
One final question:
The lsinfo or listallinfo will return 'file', 'directory', 'playlist' (for
internally stored playlists). But somewhere I seem to have seen 'stream:'
output. Does that exsist?

thanks,
Christof
Jonathan Neuschäfer
2012-11-28 16:22:10 UTC
Permalink
Post by christof De Backere
Post by Max Kellermann
No, it just remembers that the playlist file exists (ignoring its
contents), and will tell that to the client via "lsinfo". The client
can then choose to issue a "load" command for this playlist file. Or
it can use "listplaylist[info]" to view the contents of the playlist
file.
Thanks for the info. I now understand that the mpd will treat it as any other
file in the music directory. It simply keeps it in it's database because the
file exists. The only difference being that it will not have any tags (scope
identifiers) defined, except 'filename', right?
Client: now I'm trying to understand what a client should do.
So imagine the client retrieves the db at startup with listallinfo then it will
get that playlist as
'file: x/y/rasio/radio1_Stream.m3u'
On MPD 0.17.1 I get: "playlist: path/to/playlist.m3u"
(And I don't think it has changed in the last few years' releases.)

HTH,
Jonathan Neuschäfer
Christof De Backere
2012-11-30 08:34:42 UTC
Permalink
Post by Jonathan Neuschäfer
On MPD 0.17.1 I get: "playlist: path/to/playlist.m3u"
(And I don't think it has changed in the last few years' releases.)
HTH,
Jonathan Neuschäfer
OK, did some test by sending the commands directly from a prompt. Indeed, file
gets returned as you say. Thanks for that.

But then I tried a whole series of mpd client on win, droid (mpdroid, droidmpd)
and iOS (mpod, mpad).
1) Not a single one shows that playlist in the playlist section. Only the server
playlists are shown there. How come? How can a client see the difference?

Is this intended behaviour? (or do you argue 'intended' is a client issue, not a
server issue?)

2) Except for 1 client (gnome mpc on win), not a single other client showed the
m3u in the directory structure. So only from gnome I could 'add' the file, which
indeed correctly appended the 'tracks' in the playlist to the actual playlist.

Then with a direct 'save' command I could save the loaded tracks into a server
playlist, which then made the playlist available to all clients.

So I wonder: what am I missing as it is so hard to get some basic working? Is it
only a matter of having proper clients? I need one good one for every platform.
Loading...