- Connect to the server using ssh or PuTTY
- Use apt-get to install the service:
sudo apt-get install mt-daapd
- Start the service:
sudo /etc/init.d/mt-daapd start
- Make sure that the service starts when the server boots:
sudo update-rc.d mt-daapd defaults
- Create a user to own your media files:
sudo adduser media
- Move your local media files and transfer their ownership:
for EXTN in mp3 m4a m4p ogg flac mpc
do
sudo mv *.$EXTN /home/media/music
done
sudo chown media:media /home/media/music/* - Point a browser to port 3689 on the server and update the Configuration page so that the files in the media user's home directory are served.
I found that setting the Scan Type to Normal and the interval to 120 (2 minutes) helped pick up the songs on the Samba share (more about them later) - Tell Firefly to perform a full scan.
- Tell your radio to look for a server - on the Soundbridge, this just involves choosing "Library" from the menu.
- Make a nice cup of tea and enjoy the music.
(coffee is also acceptable)
Under /home/media/music I have created two directories - radio and share. All my locally held podcasts are in radio.
|
To make sure that the NAS is mounted automatically, edit the /etc/fstab file to include the drive (note that this is one line):
//192.168.1.252/dreambox/Music /home/media/music/share cifs nounix,iocharset=utf8,uid=media,gid=media,file_mode=0644,dir_mode=0755,guest 0 0
Here we hit a problem - upon performing a scan, the local files are the only ones discovered.
If we try to update the config via the Configuration web page, the message Error: 500 general:mp3_dir is displayed, and the change won't stick.
The Solution
In order to get Firefly to see the drive, it needs to be added manually to the configuration file whilst the server is not running.
I've noticed on several occasions that the service is still running after stopping it via the web page, so the easiest way of stopping the server is to kill its process:
- Find the process:
ps -ef | grep daap
mt-daapd 7230 1 0 14:06 pts/0 00:01:04 /usr/sbin/mt-daapd
ed 12072 6292 0 20:07 pts/0 00:00:00 grep daap
- Kill it:
sudo kill -9 7230
- Check that it is no longer running:
ps -ef | grep daap
ed 12075 6292 0 20:07 pts/0 00:00:00 grep daap
Now that the process has been stopped, edit the /etc/mt-daapd.conf file after making a backup:
|
Useful vi commands:
Key | Command | Example |
---|---|---|
/ | Search | /mp3_dir |
A | Append at end of line | A,/sharedirectory |
x | Delete character | |
dd | Delete line | Useful if you hit the arrow keys whilst appending |
J | Join lines | |
Esc | Finish editing | |
:wq | Write file and quit | |
:q! | Quit without writing file |
The mp3_dir key holds a comma separated list of directories to search for audio files, so the offending share may be added as an extra directory:
mp3_dir = /home/media/music,/home/media/music/share
Write the file and quit (using the command :wq), then restart the service:
|
Bingo! Where's that cup of tea ?
Building a home entertainment network:
- Designing a Network with Linux
- Installing Firefly Media Server
- Turning a PC into a Wireless Access Point pt I
- Turning a PC into a Wireless Access Point pt II
- Serving Video on Demand to a Dreambox
No comments:
Post a Comment