MPD (Music Player Daemon) is a light-weight server for streaming music. Because it's a server you'll also need a client to tell the server what to do, but this setup means you can run the server on one computer, and use a number of other devices to control it and play the audio from it. I believe you can set things up to have multiple streams even.
Just listing some GUI clients I might try at some point.
Notes on using MPD on a QNAP TS-231P. Setup to work on my local network only.
I used this package from a third-party repository (see: Install our repository, if needed).
NB: Qnapclub is basically dead now, but the MPD package on it's replacement is currently not available due to an error (https://www.myqnap.org/?s=mpd)
The files you need are in /opt/MPD/
, to start you'll want to get into the config. file at /opt/MPD/etc/mpd.conf
(It's also worth mentioning that the error log file is at /opt/MPD/var/log/mpd/mpd.log
)
A lot of the defaults of fine, but:
music_directory
and playlist_directory
user
bind_to_address
, as the default works.log_level
, gapless_mp3_playback
, restore_paused
, save_absolute_paths_in_playlists
, auto_update
.audio_output
depends on your usage. My NAS has no soundcard, so I disabled ALSA and enabled HTTPD. If you want to use it to host an Internet accessible stream look at Shout. You can have multiple, and select which are active with your client.format
was only mono! Change it to “44100:16:2”
“no”
auto_resample
, auto_channels
, and auto_format
When the config's ready you can start or restart MPD through the NAS's web interface, or through running ./mpd –kill
from /opt/MPD/bin
(it will restart itself).
You don't need to forward ports unless you want to access MPD from outside the local network.
Only option I have for output is HTTPD. This has a bit of lag when doing things like skipping songs and starting that is slightly annoying, so if you can use something else I recommend doing that.
Here's the contents of mine, for reference:
music_directory "/share/Multimedia/Music" playlist_directory "/share/Multimedia/Music/playlists/mpd" db_file "/opt/MPD/var/lib/mpd/tag_cache" log_file "/opt/MPD/var/log/mpd/mpd.log" pid_file "/opt/MPD/var/run/mpd/pid" state_file "/opt/MPD/var/lib/mpd/state" sticker_file "/opt/MPD/var/lib/mpd/sticker.sql" user "[...]" password "[...]" #default_permissions "[...]" #log_level "default" gapless_mp3_playback "no" #restore_paused "no" save_absolute_paths_in_playlists "no" auto_update "yes" audio_output { type "httpd" name "MPD QNAP HTTPD" port "8000" # quality "5.0" bitrate "320" format "44100:16:2" max_clients "0" always_on "yes" tags "yes" } #replaygain "album" #replaygain_preamp "0" #replaygain_missing_preamp "0" #replaygain_limit "yes" #volume_normalization "no" filesystem_charset "UTF-8"
Got stuck on this for a bit because it's weird.
The playlist_directory
you configure is meant for playlists made with MPD. Deceptively, it uses .m3u
files, but they're not standard (m3u is barely a standard…): They're a plain list of file paths relative to configured music_directory
, they work just fine with Unicode, they don't use the #EXTM3U
header, and if you create them outside of MPD and put them here they won't read the first line.
You can, however, load many kinds of playlists from other directories, but I've had mixed results with this. Typically the playlists are not shown in the regular playlist view, but can be loaded from the general file browser. Metadata in m3u playlists doesn't seem to show:
music_directory
, even in the file browser.
If you do want to manually make playlists by hand, or by exporting from your Music Player, give them an .m3u
extension, leave the first line blank, make the paths relative to the configured music_directory
, and don't add anything else.
So they should look something like this:
Bowie, David/[1974] Diamond Dogs (30th Anniversary Edition)/1,06 Rebel Rebel.mp3 Bowie, David/[1973] Aladdin Sane (30th Anniversary Edition)/2,11 John I'm Only Dancing (Sax Version).mp3 Bowie, David/[1973] Pin Ups/08 Sorrow.mp3 Bowie, David/[1975] Young Americans/08 Fame.mp3 Bowie, David/[1972] The Rise And Fall Of Ziggy Stardust And The Spiders From Mars/10 Suffragette City.mp3 Bowie, David/[1971] Hunky Dory/02 Oh! You Pretty Things.mp3 Bowie, David/[1971] Hunky Dory/12 Bombers (previously unreleased) [bonus].mp3 Bowie, David/[1983] Let's Dance/01 Modern Love.mp3 Bowie, David/[1975] Young Americans/01 Young Americans.mp3
If you load this in MPD, then resave it, it'll sort out that first line silliness.
MPD now supports cover art. It'll grab any image in the same directory as the file called cover.[png|jpg|tiff|bmp]
.
You can use mpd to host an Internet Radio stream using shout/ice cast.