playlists on raspberry pi

Need help with MPD?
Post Reply
newbie123
Posts: 5
Joined: November 3rd, 2018, 6:16 pm

playlists on raspberry pi

Post by newbie123 » November 3rd, 2018, 6:45 pm

Hi

I am having a few problems with adding playlists on a raspberry pi and any help would be appreciated.

The problems can be details as below:

(1) mpc add playlistname does not work but mpc load playlist does

ls -l /var/lib/mpd/music
total 47116

-rw-r--r-- 1 root root 127 Nov 3 17:58 test1.pls

(2) the playlist itself looks as follows

[playlist]
File1=http://streams.greenhost.nl:8080/gehoordestilte.m3u
Title1=Concertzender De Gehoorde Stilte
NumberOfEntries=1

I can strip out the actual stream and add that to mpc but when I attempt to play it, mpc says there is an error but there is nothing shown in the mpd log file

mpc add http://streams.greenhost.nl:8080/gehoordestilte.m3u
pi@raspberrypi:~/tarpi $ mpc play
http://streams.greenhost.nl:8080/gehoordestilte.m3u
[playing] #1/1 0:00/0:00 (0%)
volume: 95% repeat: off random: off single: off consume: off
pi@raspberrypi:~/tarpi $ mpc
volume: 95% repeat: off random: off single: off consume: off
ERROR: Failed to decode http://streams.greenhost.nl:8080/gehoordestilte.m3u

Essentially, I thought I could say something like
mpc add test1.pls # to add it to the play list

I have no idea why mpc thinks there is an error with that stream because the pls file works fine it I load it with itunes.

Any help would be appreciated.

thx

max
Forum team
Posts: 781
Joined: January 15th, 2013, 3:43 pm

Re: playlists on raspberry pi

Post by max » November 4th, 2018, 8:25 am

You can't "add" playlists, you always need to use "load" for playlists as you already found out. That's not only true for local PLS files, but also for remote M3U playlist files.

newbie123
Posts: 5
Joined: November 3rd, 2018, 6:16 pm

Re: playlists on raspberry pi

Post by newbie123 » November 6th, 2018, 11:34 am

Hi

Thank you for the answer.

I will change my code to take account of this.

Does anyone have an idea why mpc has a problem with the playlist when other programs do not.

Thank you.

max
Forum team
Posts: 781
Joined: January 15th, 2013, 3:43 pm

Re: playlists on raspberry pi

Post by max » November 6th, 2018, 4:07 pm


newbie123
Posts: 5
Joined: November 3rd, 2018, 6:16 pm

Re: playlists on raspberry pi

Post by newbie123 » November 6th, 2018, 4:42 pm

Hi, mpc says it cannot decode the stream but there is nothing in the mpd log, see my output above.
Thanks

max
Forum team
Posts: 781
Joined: January 15th, 2013, 3:43 pm

Re: playlists on raspberry pi

Post by max » November 6th, 2018, 4:53 pm

I told you that already. http://streams.greenhost.nl:8080/gehoordestilte.m3u is not a stream, it's a playlist.

newbie123
Posts: 5
Joined: November 3rd, 2018, 6:16 pm

Re: playlists on raspberry pi

Post by newbie123 » November 8th, 2018, 12:38 pm

Hi

Thanks for the help. Clearly my difficulty s distinguishing between a steam and a playlist. Is there any rule I can apply programatically to determine which is which.

For example:

see the results below where I load the pls file into mpc but mpc displays an error because the File1 line in the pls file is not a stream but a playlist.

Is the pls file incorrect or should I be looking at something else.

Many Thx

cat /var/lib/mpd/music/test1.pls
[playlist]
File1=http://streams.greenhost.nl:8080/gehoordestilte.m3u
Title1=Concertzender De Gehoorde Stilte
NumberOfEntries=1
pi@raspberrypi:~/tarpi $ mpc load test1.pls
loading: test1.pls
pi@raspberrypi:~/tarpi $ mpc play
Concertzender De Gehoorde Stilte
[playing] #1/1 0:00/0:00 (0%)
volume: 88% repeat: off random: off single: off consume: off
pi@raspberrypi:~/tarpi $ mpc
volume: 88% repeat: off random: off single: off consume: off
ERROR: Failed to decode http://streams.greenhost.nl:8080/gehoordestilte.m3u

max
Forum team
Posts: 781
Joined: January 15th, 2013, 3:43 pm

Re: playlists on raspberry pi

Post by max » November 8th, 2018, 5:43 pm

Your test1.pls is a playlist referring to another playlist, which in turn refers to a song. That doesn't appear to make a lot of sense.

newbie123
Posts: 5
Joined: November 3rd, 2018, 6:16 pm

Re: playlists on raspberry pi

Post by newbie123 » November 9th, 2018, 10:03 am

Hi Max

Thank you for your persistence in helping me.

The test1,pls came from a piece of software I wrote to scrape a list of classical music stations from a website and I see now that that code is wrong.

I have created a new playlist called test2.pls which looks as follows:

[playlist]
File1=http://streams.greenhost.nl:8080/gehoordestilte
Title1=Concertzender De Gehoorde Stilte
NumberOfEntries=1

I believe this is the playlist (test2.pls) which uses the File1 entry to point to the actual stream.

If i use mpc load, this works as expected. I need to do more work to make sure each of my pls files points to a stream and not another playlist.

Many Thanks - newbie123

Post Reply