Wikia

Music Player Daemon Community Wiki

Playing radiostreams from a Dreambox

525pages on
this wiki
Talk0

I had problems playing radio streams from my Dreambox 500 Plus (PLI-Image) on 192.168.64.109 through mpd. I created a playlist called "dreambox.m3u" and entered:

http://192.168.64.109:31344/

This did not work. All I got were birdy sounds. Strange, because VLC works perfectly well using that link.

What appeared to work well was switching to a radio station using the web interface and then connect to the dreambox using the link in the "audio.pls", a file which can be downloaded from the dreambox using the "apid" link. This file is different for each radio station! Here is an example for BBC3:

$ cat audio.pls

[playlist]

File1=http://192.168.64.109:31343/151b

Title1=BBC R3

Length1=-1

NumberOfEntries=1

Version=2

Playing "http://192.168.64.109:31343/151b" did the trick. But this was quite user unfriendly. You have to switch from one to another radio station using the Dreambox' web interface and then switch to your favorite mpd client (in my case "ario") to press the "play" button. The solution for this is creating a playlist containing two links. The first link makes the Dreambox switch to the apropiate channel, the second link is the link that plays the stream:

$ cat /var/lib/mpd/playlists/BBC3.m3u

http://192.168.64.109/cgi-bin/zapTo?path=1:0:2:1a61:7dd:2:11a0000:0:0:0:
http://192.168.64.109:31343/151b

Well, how do we find out which link is used to switch to the apropiate channel? For this prupose I used "tcpflow", a small command line program that displays the contents of tcp sessions. Using Debian or Ubuntu you can simply add this program (as root):

# apt-get install tcpflow

Then run as root:

# tcpflow -c host 192.168.64.109 | grep zapTo

Now, switch to your radio channel using the Dreambox web interface. If everything works well, you will get these sorts of lines, e.g.:

192.168.064.104.51129-192.168.064.109.00080: GET /cgi-bin/zapTo?path=1:0:2:6f3d:445:1:c00000:0:0:0:&curBouquet=0&curChannel=35 HTTP/1.1

You just need a part of the grepped output. You can eventually test it by using "wget". Start VLC to play the radio streams:

$ cvlc http://192.168.64.109:31344/

(not port 31343!)

Then, the Dreambox will change channel by entering this in an xterm (use your own values here):

$ wget http://192.168.64.109/cgi-bin/zapTo?path=1:0:2:6f3d:445:1:c00000:0:0:0:


$ wget http://192.168.64.109/cgi-bin/zapTo?path=1:0:2:6f33:445:1:c00000:0:0:0:

Now, create some m3u files using the "zapTo" links and the hexadecimal number which is displayed in the web interface and the audio.pls. Here are some examples:

$ cat /var/lib/mpd/playlists/France-Musique.m3u

http://192.168.64.109/cgi-bin/zapTo?path=1:0:2:2147:400:1:c00000:0:0:0:
http://192.168.64.109:31343/76d

$ cat /var/lib/mpd/playlists/WDR3.m3u

http://192.168.64.109/cgi-bin/zapTo?path=1:0:2:6f3d:445:1:c00000:0:0:0:

http://192.168.64.109:31343/461

If the playlist is selected by the client, the two links are used, making the Dreambox switch to the apropiate channel and make mpd play the stream.

Enjoy!

Richard Lucassen

rl-$year$month$day@xaq.nl

(example: rl-20110502@xaq.nl)

Around Wikia's network

Random Wiki