You are not logged in.

#1 2016-06-21 07:54:28

dakota
Member
Registered: 2016-05-20
Posts: 417

[SOLVED] Can't stream .pls via mpd/ncmpcpp

I'm not at all sure I'm going about this the right way... so if someone can suggest a better direction, I'd be grateful.

My goal is to be able to stream audio from Internet radio stations and have the artist-song-album tag data display in my conky.

1. I have successfully setup mpd as a user. I modified the sample config file:

music_directory        "~/audioRips"
playlist_directory     "~/.config/mpd/playlists"
db_file                "~/.config/mpd/database"
log_file               "~/.config/mpd/log"
pid_file               "~/.config/mpd/pid"
sticker_file           "~/.config/mpd/sticker.sql"

playlist_plugin {
    name "m3u"
    enabled "true"
}

playlist_plugin {
    name "pls"
    enabled "true"
}

(I am starting mpd manually)

2. I have successfully setup ncmpcpp to control mpd. I modifiod the sample config file:

ncmpcpp_directory =      ~/.ncmpcpp
mpd_host =               localhost
mpd_port =               6600
mpd_music_dir =          ~/audioRips

3. I have successfully configured my conky to display mpd variables when ncmpcpp plays files locally.

conky.text = [[
${if_mpd_playing}  
    ${color dodgerblue}mpd:$color ${alignr}${mpd_status}  
    ${color dodgerblue}artist:$color ${alignr}${mpd_artist}
    ${color dodgerblue}title:$color ${alignr}${mpd_title}
    ${color dodgerblue}album:$color ${alignr}${mpd_album}
    ${color dodgerblue}date:$color ${alignr}${mpd_date}
    ${color dodgerblue}bitrate:$color ${alignr}${mpd_bitrate} kbps
    ${color dodgerblue}random:$color ${alignr}${mpd_random}
    ${color dodgerblue}repeat:$color ${alignr}${mpd_repeat}
    ${mpd_elapsed} / ${mpd_length}
    ${color dodgerblue3}${mpd_bar}$color  ${mpd_percent} %
${endif}
]]

4. I have created .m3u and .pls playlists for local files and mpd/ncmpcpp play them without any problem.

myPlaylist.m3u

01 - Stalia, Stalia.mp3
02 - Xekina Mia Psaroboulla.mp3
03 - Orea Pou Ine I Nifi Mas.mp3
04 - Moose CaCa.mp3

myPlaylist.pls

[playlist]
File1=01 - Stalia, Stalia.mp3
Title1=Stalia, Stalia
Length1=167
File2=02 - Xekina Mia Psaroboulla.mp3
Title2=Xekina Mia Psaroboulla
Length2=182
File3=03 - Orea Pou Ine I Nifi Mas.mp3
Title3=Orea Pou Ine I Nifi Mas
Length3=221
File4=04 - Moose CaCa.mp3
Title4=Moose CaCa
Length4=137
NumberOfEntries=4
Version=2

5. I have created .pls playlists with urls in them... and they play in a different player (mpv)... but they don't play in mpd/ncmpcpp. (To be fair, one of them plays - see below)

myInternetPlaylist.pls

[playlist]
File1=http://somafm.com/folkfwd.pls
Title1=Folk Forward
Length1=-1
File2=http://somafm.com/thistle.pls
Title2=Thistle Radio
Length2=-1
File3=http://somafm.com/defcon.pls
Title3=DEF CON Radio
Length3=-1
File4=http://somafm.com/suburbsofgoa.pls
Title4=Suburbs of Goa
Length4=-1
NumberOfEntries=4
Version=2

When I try to play the above playlist, I receive the following errors:

Jun 21 00:25 : player: played "http://somafm.com/folkfwd.pls"
Jun 21 00:25 : ffmpeg: No audio stream inside
Jun 21 00:25 : player: played "http://somafm.com/thistle.pls"
Jun 21 00:25 : ffmpeg: No audio stream inside
Jun 21 00:25 : player: played "http://somafm.com/defcon.pls"
Jun 21 00:25 : ffmpeg: No audio stream inside
Jun 21 00:25 : player: played "http://somafm.com/suburbsofgoa.pls"
Jun 21 00:25 : ffmpeg: No audio stream inside

I have also tried the url provided by the radio station for the .m3u stream and for the direct stream.

http://somafm.com/m3u/folkfwd.m3u
http://ice1.somafm.com/folkfwd-128-mp3

The .pls playlist that does work in mpd/ncmpcpp is:

[playlist]
numberofentries=1
File1=http://kcrw.ic.llnwd.net/stream/kcrw_live
Title1=Kcrw Simulcast
Length1=-1
Version=2

QUESTIONS

1. Is the problem simply that mpd needs a specific protocol which most of my links don't provide? Or do I have a configuration error?
2. Is there a better way to achieve my goals?

Cheers,

Last edited by dakota (2016-06-21 14:54:02)


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

#2 2016-06-21 13:05:45

qdqdq
Member
Registered: 2016-06-21
Posts: 7

Re: [SOLVED] Can't stream .pls via mpd/ncmpcpp

Does this pls file work for you?

[playlist]
numberofentries=4
File1=http://ice1.somafm.com/defcon-128-mp3
Title1=DEFCON Radio
Length1=-1
File2=http://ice1.somafm.com/folkfwd-128-mp3
Title2=Folk Forward
Length2=-1
File3=http://ice1.somafm.com/suburbsofgoa-128-mp3
Title3=Suburbs of Goa
Length3=-1
File4=http://ice1.somafm.com/thistle-128-mp3
Title4=Thistle Radio
Length4=-1
Version=2

An easy way may be to download the pls files from Soma FM and add them to a playlist from the ncmpcpp browser.

Offline

#3 2016-06-21 14:53:40

dakota
Member
Registered: 2016-05-20
Posts: 417

Re: [SOLVED] Can't stream .pls via mpd/ncmpcpp

@qdqdqd - You registered just so you could answer my question? How very kind!

qdqdq wrote:

Does this pls file work for you?

I feel like such an idiot. Yes, your file works beautifully; I would have sworn I tried that... but I obviously didn't.

qdqdq wrote:

An easy way may be to download the pls files from Soma FM and add them to a playlist from the ncmpcpp browser.

This is the first time I've worked with .m3u or .pls files and I was making it much too hard. Clicking the links on soma's 'Listen Now' web page, downloads the entire .pls file. For some reason I was thinking I needed to right-click and copy the url and then paste this into my own playlist file. Doh!

Anyway, thank you very much!


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

Board footer

Powered by FluxBB