You want to use your Dream­box as Juke­box? Me too! I use a DM800 with the lat­est Newnigma2 image (v3.0) — but this should prob­a­bly work on other dis­tros as well. I use MPD as media player.

First, add the unsta­ble feed:

1
2
3
root@dm800:/tmp/mpd# cat /etc/opkg/official-feed.conf
src/gz offi­cial http://feed.newnigma2.to/unstable/dm800
#src/gz offi­cial http://feed.newnigma2.to/stable/dm800/3.0

Then update the local opkg cache:

1
2
3
4
5
root@dm800:/tmp/mpd# opkg update
Down­load­ing http://feed.newnigma2.to/unstable/dm800/Packages.gz
Inflat­ing http://feed.newnigma2.to/unstable/dm800/Packages.gz
Updated list of avail­able pack­ages in /var/lib/opkg/official


Now install the MPD package:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
root@dm800:/tmp/mpd# opkg install mpd
Installing mpd (0.15.9-r0) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/mpd_0.15.9-r0_mipsel.ipk
libavutil49: unsat­is­fied rec­om­men­da­tion for mplayer
libavcodec52: unsat­is­fied rec­om­men­da­tion for mplayer
libavformat52: unsat­is­fied rec­om­men­da­tion for mplayer
Installing libavahi-glib1 (0.6.25-r1) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/libavahi-glib1_0.6.25-r1_mipsel.ipk
Installing libfaad0 (2.0-r2) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/libfaad0_2.0-r2_mipsel.ipk
Installing libsqlite3-0 (3.6.20-r0) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/libsqlite3-0_3.6.20-r0_mipsel.ipk
Installing libavformat52 (1:0.5-r5) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/libavformat52_0.5-r5_mipsel.ipk
Installing libavcodec52 (1:0.5-r5) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/libavcodec52_0.5-r5_mipsel.ipk
Installing libavutil49 (1:0.5-r5) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/libavutil49_0.5-r5_mipsel.ipk
Installing libfaac0 (1.24-r0) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/libfaac0_1.24-r0_mipsel.ipk
Installing libgsm1 (1.0.12-r1) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/libgsm1_1.0.12-r1_mipsel.ipk
Installing libmp3lame0 (3.98.2-r0) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/libmp3lame0_3.98.2-r0_mipsel.ipk
Installing libschroedinger-1.0–0 (1.0.5-r3) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/libschroedinger-1.0-0_1.0.5-r3_mipsel.ipk
Installing libtheora0 (1.1.1-r3.0) to flash…
Down­load­ing http://feed.newnigma2.to/unstable/dm800/libtheora0_1.1.1-r3.0_mipsel.ipk
Con­fig­ur­ing libtheora0
Con­fig­ur­ing libavformat52
Con­fig­ur­ing libmp3lame0
Con­fig­ur­ing libavutil49
Con­fig­ur­ing libgsm1
Con­fig­ur­ing mpd
 Adding sys­tem startup for /etc/init.d/mpd.
Start­ing music player dae­mon: mpdlog: prob­lem open­ing log file “/var/lib/mpd/mpd.log” (con­fig line 33) for writ­ing
Aborted
.
Con­fig­ur­ing libsqlite3-0
Con­fig­ur­ing libavcodec52
Con­fig­ur­ing libavahi-glib1
Con­fig­ur­ing libschroedinger-1.0–0
Con­fig­ur­ing libfaac0
Con­fig­ur­ing libfaad0
root@dm800:/tmp/mpd#

Now fix some miss­ing directories:

1
2
root@dm800:/tmp/mpd# mkdir /var/lib/mpd
root@dm800:/tmp/mpd# mkdir /var/lib/mpd/playlists

This is my mpd.conf:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
root@dm800:/tmp/mpd# cat /etc/mpd.conf
# Required files and direc­to­ries ##############################################
music_directory                 “/hdd/mp3/“
playlist_directory      ”/var/lib/mpd/playlists“
db_file                 “/var/lib/mpd/mpd.db“
log_file                ”/var/lib/mpd/mpd.log“
error_file              ”/var/lib/mpd/mpd.error“

# Optional files ##############################################################
pid_file                ”/var/lib/mpd/mpd.pid“
state_file              ”/var/lib/mpd/mpdstate“

# Gen­eral music dae­mon options ################################################
bind_to_address         “any“
port                            “6600”

# Zero­conf / Avahi Ser­vice Dis­cov­ery ##########################################
zeroconf_enabled                “yes“
zeroconf_name                   “Music Player“

# Audio Out­put ################################################################
audio_output {
    type            “alsa“
    name        “alsa“
}

# Char­ac­ter Encod­ing ##########################################################
filesystem_charset              “UTF-8

Edit /etc/init.d/mpd and fix the restart option:

1
2
3
4
5
6
7
8

  restart|force-reload)
    echo –n “Restart­ing music player dae­mon: mpd“
    start-stop-daemon –stop –quiet –exec /usr/bin/mpd
    sleep 2
    start-stop-daemon –start –quiet –exec /usr/bin/mpd
    echo “.“

Restart MPD now:

1
2
3
4
5
6
7
8
9
10
root@dm800:~# /etc/init.d/mpd restart
Restart­ing music player dae­mon: mpdlis­ten: bind­ing to any address
lis­ten: bind­ing to socket address [::]:6600
lis­ten: bind­ing to socket address 0.0.0.0:6600
path: path_set_fs_charset: fs charset is: UTF-8
data­base: read­ing DB
dae­mon: open­ing pid file
dae­mon: dae­mo­nized!
dae­mon: writ­ing pid file
.

If you run into some trou­bles, you may start MPD in debug mode:

1
2
3
4
5
root@dm800:/tmp/mpd# mpd –no-daemon –v –create-db
con­fig: load­ing file /etc/mpd.conf
lis­ten: bind­ing to any address
lis­ten: bind­ing to socket address [::]:6600

Now you need to use an MPD client to con­nect to your MPD server, for exam­ple Theremin for MacOS or MPoD for iPhone. Check out the MPD client wiki for more clients. Add some songs to your playlist and press play!

Now the unsolved problems:

  • If the dream­box is pow­ered off (Stby) — no sound is played
  • If the dream­box is pow­ered on, the sound is mixed with cur­rent channel
  • No mpc client on the dreambox

Dr. Best wrote a sim­ple plu­gin called Web­Start­StopSer­vice to stop the cur­rent tv out­put. But this didn’t work very good on my dreambox.

I’m open to suggestions…