I would highly recommend that users unfamiliar with the linux shell install the QPKG instead. You can find the X86 and ARM packages here:
viewtopic.php?f=128&t=47748&p=221661#p221658
Again, kudos to internaut19 for getting this all setup and running.
-----------------------------
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You, as the
* user of this package, assume all liability for and damage to
* or loss of data that may result from using this package.
*
* THIS PACKAGE MODIFIES THE SOFTWARE ON YOUR QNAP DEVICE. It
* replaces serveral pre-installed services with new services that
* are part of this package. You, as the package installer, accept
* all liability for any damage that may occur from the installation
* of ths package.
*
SUMMARY:
This package installs forked-daapd (iTunes daemon) and the avahi-daemon (FOSS implementation of Apple's Bonjour protocol) on your QNAP NAS. All binaries, libraries and headers are installed in /opt/unstable. The libraries and binaries are linked in such a manner as to only need to use libraries in /opt/unstable/lib. Several new scripts are installed in /opt/etc/init.d to start and stop the new daemons. There are also shim scripts that are installed in /etc/init.d that provide seamless integration with the web UI for these new daemons. There has also been an attempt to allow these changes to persist between reboots, and this seems to be working.
PREREQUISITES:
1. A linux kernel version 2.6.16 or higher. (Currently the TS109 and TS209 do not meet this requirement.)
2. The user must have enabled either telnet or ssh access to the QNAP.
3. The user must have installed and enabled the Optware/ipkg QPKG.
4. The user must have installed dbus ipkg. (As simple as typing: ipkg install dbus at the shell prompt.)
The current build of forked-daapd DOES NOT require IPv6 to be enabled on the QNAP. If you turned on IPv6 for an older version of forked-daapd (compiled prior to 2011-03-18) you can now disable IPv6 after upgrading.
STOP!!! READ THE SETUP INSTRUCTIONS PRIOR TO TRYING THEM!
If you are uncomfortable with installing binaries compiled by some random human being on the internet then please go here to learn how to compile your own:
http://wiki.qnap.com/wiki/User:AnthonyDoko
This page has all the information you will need to compile these binaries for yourself on an Ubuntu 10.10 linux machine.
I encourage you to read through all the scripts that are part of the install and part of the operation/configuration of these new daemons. I have not done anything malicious, but I may have made errors. These scripts have worked for me on my TS-419P BUT THAT IS NOT A GUARANTEE THAT THEY WILL WORK ON YOUR QNAP DEVICE. I should note that my TS-419P is configured for RAID5 across four disks. I am most concerned about the Optware.sh script. It is replaced with the version that was on my TS-419P, but I'm not clear if different QNAP models have different Optware.sh scripts. If they do then this install will not work.
About bugs:
This software probably has bugs that are beyond my control. It relies on no less than 20 libraries. Each with its own quirks and problems. The forked-daapd is also in active development so there is a high probability that it will have bugs and be evolving rapidly. I will try to keep it up to date when I see major improvements or milestone releases. Users of this package can feel free to PM me in the forums or add a post to this thread if they feel there is some outstanding issue that can be fixed by a new build.
I can only vouch for the ARM version of this package as I have tested it on my TS-419P.
Regarding the X86-based QNAP NAS: If you have an X86-based QNAP I've built a binary package for it. It runs on my Ubuntu VM install just fine. However, I haven't run it or its install script on an X86-based QNAP. If you follow this thread you will see that it has been successfully installed and run by someone other than me. Hopefully there are a few more adventurous individuals that will try it on their X86 QNAPs.
How do you know which architecture you're on?
In a shell issue this command:
- Code: Select all
uname -a
If you're on ARM you'll see something like this:
- Code: Select all
Linux NAS-NAME 2.6.33.2 #1 Tue Nov 9 14:05:13 CST 2010 armv5tel unknown
If you're on X86 you'll see something like this:
- Code: Select all
Linux NAS-NAME 2.6.33.2 #1 SMP Tue Nov 9 23:40:50 CST 2010 i686 unknown
armv5tel is ARM and i686 is X86 Choose your forked-daapd-install.tar.gz file accordingly!
SETUP VIA INSTALL SCRIPT: (Do all of this while logged in as admin.)
1. Download the following compressed archive and place it in your
/share/Public directory:
Latest builds:
(Includes: forked-daapd v0.18, libav HEAD + ATV patches, Avahi 0.6.30, eglibc 2.14, and RAOP autoselect)
ARM http://ubuntuone.com/p/1BPP/
X86 http://ubuntuone.com/p/1BPQ/
Older builds:
(Includes: forked-daapd v0.16, ffmpeg 0.7.x + ATV patches, Avahi 0.6.30, eglibc 2.12 and RAOP autoselect)
ARM: http://ubuntuone.com/p/qY3/
X86: http://ubuntuone.com/p/qY7/
(Includes: forked-daapd v0.15, ffmpeg 0.6.1 + ATV patches, Avahi 0.6.30, eglibc 2.12 and RAOP autoselect)
ARM: http://ubuntuone.com/p/n23/
X86: http://ubuntuone.com/p/n25/
The examples below use the YYYY-MM-DD-ARM-forked-daapd-install.tar.gz. If you're on an X86 QNAP then just substitute "X86-" for "ARM-" in all the examples below.
2. Uncompress the archive and un-tar it:
- Code: Select all
gunzip -c 2011-05-02-ARM-forked-daapd-install.tar.gz | tar xf -
3. Stop the iTunes, timemachine and bonjour services
- Code: Select all
/opt/etc/init.d/S20dbus stop
/etc/init.d/init_iTune.sh stop
/etc/init.d/timemachine.sh stop
/etc/init.d/bonjour.sh stop
4. Run the package install script:
- Code: Select all
cd ./2011-05-02-ARM-forked-daapd-install
./package install nodebug
5a. Reboot
- Code: Select all
reboot -d1
OR 5b. Start the new services manually:
- Code: Select all
/opt/etc/init.d/S15replace
/opt/etc/init.d/S20dbus start
/opt/etc/init.d/S30bonjour start
/opt/etc/init.d/S35timemachine start
/opt/etc/init.d/S50iTunes start
HOW TO UNINSTALL: WARNING: You'll remove /opt/unstable and this holds your songs3.db file. Move it somewhere safe before uninstalling if you don't want to loose it.
- Code: Select all
/opt/etc/init.d/S20dbus stop
/opt/etc/init.d/S30bonjour stop
/opt/etc/init.d/S35timemachine stop
/opt/etc/init.d/S50iTunes stop
cd /share/Public/forked-daapd-install
./package uninstall nodebug
TO DO A DRY RUN
- Code: Select all
./package install
- Code: Select all
./package uninstall
I require the nodebug keyword to do the real install in order to prevent accidents. I'm not the best shell script writer and I was concerned that I'd blow away my install while testing the install script.
NOTES/THEORY:
You can always run the ./package script without the "nodebug" at the end to see what the script will do. If you want to manually install the the package then the first place to start reading is the ./package script. It's a very simple script. The install() method just issues the set of shell commands that I initially used to set up the avahi-daemon and forked-daapd.
There are two directories in the forked-daapd-install directory that have the scripts that will be installed on your system. The directories are named after their destinations. You can and should inspect the scripts before installing.
The S15replace and Optware.sh scripts are what I use to survive the reboot process. The modified Optware.sh will run all the scripts in /opt/etc/init.d on reboot. One of these is the S15replace script. It will replace the init_iTune.sh, bonjour.sh and timemachine.sh scripts in /etc/init.d during the reboot process. The replacement scripts are shims that call through to /opt/etc/init.d counterparts given the right conditions. This allows the Web UI to continue to function. I'm not terribly fond of this method as it is a bit of a hack, but it does provide survivability between reboots.
Frequently Asked Questions
Please read the forked-daapd README first. You can find it here: https://github.com/jasonmc/forked-daapd/ (Scroll down the page.) The read the FAQ. You question might be answered here.
Q. I just installed forked-daapd according to the steps above and I can't see it with iTunes. What's wrong?
A. Maybe nothing. forked-daapd needs to build a database of all your music. This can take a substantial amount of time on embedded processors like the ARM. It's really a function of processor and disk speed. You should expect that forked-daapd can process about 10 gigabytes of music per hour. It won't be very responsive during this time. If you're in a hurry to see it work then there options for pointing it at a smaller directory of music. I'll describe that below.
Q. How can I be sure that forked-daapd is really running?
A. You can issue the following commands in a shell:
- Code: Select all
pidof dbus-daemon
pidof avahi-daemon
pidof forked-daapd
These are the three daemons that are required for forked-daapd to run. You should get back three process ID numbers. (One for each pidof command.) If you don't then something is wrong.
Q. How do I make forked-daapd look at a directory other than /Qmultimedia?
A. The S50iTunes script in /opt/etc/init.d contains the path for where forked-daapd will look for music. You can change this line in the file:
- Code: Select all
directories = { "$SHARE_PATH" }
You can change this to point to wherever your library of music resides on your QNAP. eg:
- Code: Select all
directories = { "/share/foobar/my_music" }
A restart of forked-daapd is required after changing this.
- Code: Select all
/opt/etc/init.d/forked-daapd restart
Q. Where is the forked-daapd log?
A. /opt/unstable/var/log/forked-daapd.log
Q. How do I increase/decrease the amount of logging that forked-daapd outputs?
A. The S50iTunes script in /opt/etc/init.d contains the loglevel parameter. The available levels are: fatal, log, warning, info, debug, spam. Spam will give you the most output but it will slow down forked-daapd considerably. It will be especially slow at scanning your media. A restart of forked-daapd is required after changing this.
- Code: Select all
/opt/etc/init.d/forked-daapd restart
Q. I see a lot of ffmpeg output in the forked-daapd.log file. Is this okay?
A. Yes, usually it is. ffmpeg is pretty spammy. You can disable the ffmpeg domain or any other domain output by editing the following line in /opt/etc/init.d/S50iTunes:
- Code: Select all
LOG_DOMAINS=config,daap,db,httpd,main,mdns,misc,rsp,scan,xcode,event,remote,dacp,ffmpeg,artwork,player,raop,laudio
A restart of forked-daapd is required after changing this.
- Code: Select all
/opt/etc/init.d/forked-daapd restart
Q. My .wma and .ogg file playback stutters or is choppy. Why?
A. If you're on an ARM processor you don't have the necessary floating-point unit required by ffmpeg to decode .wma and .ogg files. All this has to be done in software and the ARM cpu isn't fast enough to play these files in realtime. Sorry, but there's no fix other than to asked the ffmpeg guys to provied fixed-point decoders for .wma and .ogg files. However, .mp3 and .flac do have fixed-point decoders in ffmpeg and should playback just fine on ARM processors. x86 QNAPs should not have this problem.
Q. How do I pair my iPhone with forked-daapd?
A. Did you read the README? It's in there. However, it's also tricky. Here's a reply where I try to give some insight into how to make pairing work more easily:
http://forum.qnap.com/viewtopic.php?f=177&t=37472&start=180#p187324
Q. When will you support Home Sharing and Air Video?
A. Whenever Julien decides it's a priority. (I'm not the author of forked-daapd.) This is a personal project that Julien does for his own enjoyment. Feature requested should be directed to Julien. His email is in the source code. If you want to add a feature please contact him and discuss it. He's definitely willing to take patches.
Q. Forked-daapd re-scans my music every time I restart it. Why?
A. It's a known issue that Julien will address in a later version of forked-daapd.


News