SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.04k stars 1.24k forks source link

[Package Request] Improved Forked-DAAPd #1160

Open Wawsax opened 10 years ago

Wawsax commented 10 years ago

Improved Forked-DAAPd is based on the mt-daapd / Firefly Media Server code only rewritten and updated to support the newest protocols and whims of Apple. The official forum thread for this can be found on the Raspberri Pi boards here.

The official Synology iTunes Server package isn't very good, doesn't support artwork etc. Improved Forked-DAAPd works with the iOS Remote apps, supports artwork, is much more reliable and is still actively being developed and supported by the author.

Edit: Updated URLs, cleaned up, removed waffle.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Wawsax commented 10 years ago

I tried compiling it with spksrc, but I am no coder so it was beyond me. Used the Debian Chroot package instead and have forked-daapd running via Debian. Works great, just need to add mounts in the chroot startup script and add some repositories to apt-get sources.

Closing as nobody else seems interested.

mcmaxl commented 10 years ago

could you guide me through the main steps of getting forked-daapd running? I recently installed the chroot package because i wanted to get plexwatch running, however, i'm certainly even less of a coder than you are ;) and don't really understand chroot. So help appreciated!

Wawsax commented 10 years ago

Well, if you've got the Debian chroot up and running then getting Improved Forked-daapd installed and setup is pretty simple. Just follow the directions in the author's first post here. And if the chroot package help file still doesn't link, as it didn't when I was setting it up, the raw html file is here. This will tell you how to SSH into the chroot etc. You can save it as a file and open it in a browser if it's difficult to read. The script you want to edit if you need to add mounts is, from memory, this one: /var/packages/debian-chroot/scripts/start-stop-status.

Otherwise, if you're not confident on the basics of using the command line, logging in via SSH, using VI, then I suggest you download real Debian (or any linux distro, really) and install it as a VM using VirtualBox. Follow some tutorials, play around, look things up when you don't know or understand what to do.

throatwobbler commented 10 years ago

I just found this package request and would like to join in. A synology package for forked-daapd would be great. But I guess it's too late since you already closed this issue...

Wawsax commented 10 years ago

Okay, seeing as there's some interest here I'll reopen the issue/request.

piejanssens commented 10 years ago

I'd love to see this in a pkg!

Max-T commented 9 years ago

would love to see it too!

GPDawes commented 9 years ago

Recently transcoded all my flac files to apple loss less. Went Itunes big time only to realise the existing Syno itunes server can only be accessed from PC clients running itunes. (The files can not be accessed with an apple device and a native apple client, you need to use a syno app on an apple device)

Ipads and Iphone, Apple TV need home sharing - which I believe this supports/emulates. I am aware Itunes will work, but I want to access my syno collection on my apple TV using the apple tv as the interface and file chooser. I don't want to steal an ipad of my kids just to choose an album to listen to on my apple tv.

Please syno update your itunes server or can the community please get this version packaged and working.

I have an older DS409 ( Marvell Kirkwood mv6281 ARM ) and a newer 112+ DS112+ (Marvell Kirkwood mv6282 2.0Ghz ARM (Marvell ARMADA 300)

i don't mind if its a command line and config files that are needed to start it/amend it. Can live without a GUI.

brimur commented 9 years ago

@GPDawes Not sure what you mean. I have no problem accessing the Syno iTunes server from Yosemite. Just open iTunes and click the dropdown and select your NAS. My only issue is that the thumbnails only get generated as I scroll through the collection, initially at least, after that they all show up every time

jhuebsch commented 9 years ago

this sounds great! The apple remote support is a fantastic feature

brimur commented 9 years ago

Just want to add that I have both the Synology iTunes server running on my NAS and the latest forked-daap (v23) on a ubuntu box. At the moment the Syno iTunes is better as anything below v23 in forked-daap will not show any music in iTunes v12+. I had to compile from source to get it working whereas Syno iTunes just works bar my comment above but that is because I have a low end Synology with a low power single core cpu.

Both work the same with Retune, the android iTunes remote. I dont have an Apple phone so cannot comment on iOS

GPDawes commented 9 years ago

I love forked-daapd. I am a synology fan boy. But I now run a PI and forked-daapd as my itunes server. I have NFS shares on the synology mounted on my PI. All my kids Ipods,ipads and phones pickup the files as does itunes on my mac and pc's. The Syno solution only works with Itunes. this works with everything else except apple TV. Another advantage of forked-daapd is that it transcodes flac and present apple lossless to the devices.

I would love an official syno build of this.

mcmaxl commented 8 years ago

+1 syno build :)

mhitchens commented 7 years ago

I'm working on this now. Adding some missing dependencies. Might be a few more days, time permitting.

throatwobbler commented 7 years ago

@mhitchens Just curious, is there any progress on the syno package?

jdemeule commented 6 years ago

As I have a good interest on this package, I manage to compile it with all its dependencies.

/spksrc/cross/forked-daapd$ make dependency-tree
+ forked-daapd 26.1
    + libantlr3c 3.4
    + sqlite-autoconf 3160200
        + zlib 1.2.11
        + speex 1.2.0
            + libogg 1.3.3
    + confuse 3.2.1
    + ffmpeg 3.4.1
        + fdk-aac 0.1.5
        + flac 1.3.2
            + libogg 1.3.3
        + freetype 2.9
            + zlib 1.2.11
            + libpng 1.6.34
                + zlib 1.2.11
        + fribidi 0.19.7
        + lame 3.100
            + nasm 2.13.02
        + libass 0.14.0
            + freetype 2.9
                + zlib 1.2.11
                + libpng 1.6.34
                    + zlib 1.2.11
            + fribidi 0.19.7
            + fontconfig 2.12.6
                + expat 2.2.5
                + freetype 2.9
                    + zlib 1.2.11
                    + libpng 1.6.34
                        + zlib 1.2.11
        + libbluray 1.0.2
            + libxml2 2.9.7
                + zlib 1.2.11
            + freetype 2.9
                + zlib 1.2.11
                + libpng 1.6.34
                    + zlib 1.2.11
            + fontconfig 2.12.6
                + expat 2.2.5
                + freetype 2.9
                    + zlib 1.2.11
                    + libpng 1.6.34
                        + zlib 1.2.11
        + libtheora 1.1.1
            + libogg 1.3.3
            + libvorbis 1.3.5
                + libogg 1.3.3
        + libvorbis 1.3.5
            + libogg 1.3.3
        + libvpx 1.6.1
            + yasm 1.3.0
            + yasm 1.3.0
        + opencore-amr 0.1.3
        + openjpeg 2.3.0
            + libpng 1.6.34
                + zlib 1.2.11
            + tiff 4.0.6
        + openssl 1.0.2n
            + zlib 1.2.11
        + opus 1.2.1
        + rtmpdump
            + openssl 1.0.2n
                + zlib 1.2.11
        + soxr 0.1.2
        + speex 1.2.0
            + libogg 1.3.3
        + vo-amrwbenc 0.1.3
        + x264 20180119-2245-stable
            + nasm 2.13.02
            + nasm 2.13.02
        + yasm 1.3.0
        + yasm 1.3.0
        + yasm 1.3.0
        + x265 2.1
            + yasm 1.3.0
            + libnuma 2.0.11
            + yasm 1.3.0
            + libnuma 2.0.11
    + libevent 2.0.22-stable
        + openssl 1.0.2n
            + zlib 1.2.11
    + mxml 2.11
    + libgcrypt 1.7.3
        + libgpg-error 1.25
    + zlib 1.2.11
    + libunistring 0.9.3
    + json-c 0.13.1
    + avahi 0.7
        + expat 2.2.5
        + dbus 1.12.8
            + expat 2.2.5
    + libwebsockets 2.4.1
        + openssl 1.0.2n
            + zlib 1.2.11

However, when I tried to run it on my NAS (an armada375 version), I faced some issues. The first one is a dependencies on libssp.so (a library provide with gcc, but I did not found it on Synology) which is not bundled during package (I guess I made something wrong somewhere).

/spksrc/cross/forked-daapd/work-armada375-6.1/install/var/packages/target/sbin$ /spksrc/toolchains/syno-armada375-6.1/work/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ldd --root=.. forked-daapd
        libavformat.so.57 => /lib/libavformat.so.57 (0xdeadbeef)
        libavcodec.so.57 => /lib/libavcodec.so.57 (0xdeadbeef)
        libswresample.so.2 => /lib/libswresample.so.2 (0xdeadbeef)
        libavutil.so.55 => /lib/libavutil.so.55 (0xdeadbeef)
        libm.so.6 => /lib/libm.so.6 (0x8badf00d)
        libc.so.6 => /lib/libc.so.6 (0x8badf00d)
        ld-linux-armhf.so.3 => /lib/ld-linux-armhf.so.3 (0x8badf00d)
        libpthread.so.0 => /lib/libpthread.so.0 (0x8badf00d)
        libsoxr.so.0 => /lib/libsoxr.so.0 (0xdeadbeef)
        libz.so => /lib/libz.so (0xdeadbeef)
        libx265.so.146 => /lib/libx265.so.146 (0xdeadbeef)
        libdl.so.2 => /lib/libdl.so.2 (0x8badf00d)
        libstdc++.so.6 => /lib/libstdc++.so.6 (0x8badf00d)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x8badf00d)
        libx264.so.152 => /lib/libx264.so.152 (0xdeadbeef)
        libvpx.so.4 => /lib/libvpx.so.4 (0xdeadbeef)
        libvorbisenc.so.2 => /lib/libvorbisenc.so.2 (0xdeadbeef)
        libvorbis.so.0 => /lib/libvorbis.so.0 (0xdeadbeef)
        libogg.so.0 => /lib/libogg.so.0 (0xdeadbeef)
        libvo-amrwbenc.so.0 => /lib/libvo-amrwbenc.so.0 (0xdeadbeef)
        libtheoraenc.so.1 => /lib/libtheoraenc.so.1 (0xdeadbeef)
        libtheoradec.so.1 => /lib/libtheoradec.so.1 (0xdeadbeef)
        libspeex.so.1 => /lib/libspeex.so.1 (0xdeadbeef)
        libopus.so.0 => /lib/libopus.so.0 (0xdeadbeef)
        libopenjp2.so.7 => /lib/libopenjp2.so.7 (0xdeadbeef)
        libopencore-amrwb.so.0 => /lib/libopencore-amrwb.so.0 (0xdeadbeef)
        libopencore-amrnb.so.0 => /lib/libopencore-amrnb.so.0 (0xdeadbeef)
        libmp3lame.so.0 => /lib/libmp3lame.so.0 (0xdeadbeef)
        libfdk-aac.so.1 => /lib/libfdk-aac.so.1 (0xdeadbeef)
        librtmp.so.1 => /lib/librtmp.so.1 (0xdeadbeef)
        libssl.so.1.0.0 => /lib/libssl.so.1.0.0 (0xdeadbeef)
        libcrypto.so.1.0.0 => /lib/libcrypto.so.1.0.0 (0xdeadbeef)
        libbluray.so.2 => /lib/libbluray.so.2 (0xdeadbeef)
        libxml2.so.2 => /lib/libxml2.so.2 (0xdeadbeef)
        libfontconfig.so.1 => /lib/libfontconfig.so.1 (0xdeadbeef)
        libfreetype.so.6 => /lib/libfreetype.so.6 (0xdeadbeef)
        libpng16.so.16 => /lib/libpng16.so.16 (0xdeadbeef)
        libexpat.so.1 => /lib/libexpat.so.1 (0xdeadbeef)
        libswscale.so.4 => /lib/libswscale.so.4 (0xdeadbeef)
        libavfilter.so.6 => /lib/libavfilter.so.6 (0xdeadbeef)
        libavresample.so.3 => /lib/libavresample.so.3 (0xdeadbeef)
        libpostproc.so.54 => /lib/libpostproc.so.54 (0xdeadbeef)
        libass.so.9 => /lib/libass.so.9 (0xdeadbeef)
        libfribidi.so.0 => /lib/libfribidi.so.0 (0xdeadbeef)
        libgpg-error.so.0 => /lib/libgpg-error.so.0 (0xdeadbeef)
        libgcrypt.so.20 => /lib/libgcrypt.so.20 (0xdeadbeef)
        libantlr3c.so => /lib/libantlr3c.so (0xdeadbeef)
        libjson-c.so.4 => /lib/libjson-c.so.4 (0xdeadbeef)
        libmxml.so.1 => /lib/libmxml.so.1 (0xdeadbeef)
        libconfuse.so.2 => /lib/libconfuse.so.2 (0xdeadbeef)
        libavahi-common.so.3 => /lib/libavahi-common.so.3 (0xdeadbeef)
        libssp.so.0 => /lib/libssp.so.0 (0x8badf00d)
        libavahi-client.so.3 => /lib/libavahi-client.so.3 (0xdeadbeef)
        libdbus-1.so.3 => /lib/libdbus-1.so.3 (0xdeadbeef)
        libevent_pthreads-2.0.so.5 => /lib/libevent_pthreads-2.0.so.5 (0xdeadbeef)
        libevent-2.0.so.5 => /lib/libevent-2.0.so.5 (0xdeadbeef)
        libwebsockets.so.12 => /lib/libwebsockets.so.12 (0xdeadbeef)
        libsqlite3.so.0 => /lib/libsqlite3.so.0 (0xdeadbeef)
        libunistring.so.0 => /lib/libunistring.so.0 (0xdeadbeef)
        librt.so.1 => /lib/librt.so.1 (0x8badf00d)

The biggest issue I face is about avahi. When forked-daapd start, it failed during 'mDNS init' step (LD_LIBRARY_PATH is correctly set to use the correct bundled dependencies):

$ ./forked-daapd -c ../etc/forked-daapd.conf -f
[  LOG]     main: Forked Media Server Version 26.1 taking off
[  LOG]     main: Built with:
[  LOG]     main: - ffmpeg
[  LOG]     main: - MPD
[  LOG]     main: - Websockets
[  LOG]     main: - Webinterface
[  LOG]     main: mDNS init
forked-daapd: client.c:791: avahi_client_errno: Assertion `client' failed

Going further on my investigation lead me to test avahi-brower directly. Using the one provided on the machine, everything went well (i.e. no crash and correct discovery). However, with the one compiled with forked-daapd, it does not seems able to contact anything (the daemon it up and answering external request correctly).

./avahi-browse -a                                                                                
Failed to create client object: Daemon not running

Did you face the same issue or have you an idea to manage avahi dependency correctly (using the same version Synology provide or starting another daemon)?

lindien954 commented 4 years ago

Up for this !

lindien954 commented 4 years ago

I can't compile avahi ! help ..For Makefile for this . Please.

lindien954 commented 4 years ago

Same error for me.

./forked-daapd -c ../etc/forked-daapd.conf -f [ LOG] main: Forked Media Server Version 27.0 taking off [ LOG] main: Built with: [ LOG] main: - ffmpeg [ LOG] main: - iTunes XML [ LOG] main: - MPD [ LOG] main: - Device verification [ LOG] main: - Websockets [ LOG] main: - Webinterface [ LOG] main: mDNS init forked-daapd: client.c:791: avahi_client_errno: Assertion `client' failed.

hgy59 commented 2 years ago

Still the same error with owntone 28.1 (working on #4337) plus Aborted (core dumped)

# ./owntone -f -c ../var/owntone.conf
[2021-12-09 13:16:45] [  LOG]     main: OwnTone version 28.1 taking off
[2021-12-09 13:16:45] [  LOG]     main: Built with:
[2021-12-09 13:16:45] [  LOG]     main: - ffmpeg
[2021-12-09 13:16:45] [  LOG]     main: - Without Spotify
[2021-12-09 13:16:45] [  LOG]     main: - LastFM
[2021-12-09 13:16:45] [  LOG]     main: - Without Chromecast
[2021-12-09 13:16:45] [  LOG]     main: - MPD
[2021-12-09 13:16:45] [  LOG]     main: - Websockets
[2021-12-09 13:16:45] [  LOG]     main: - ALSA
[2021-12-09 13:16:45] [  LOG]     main: - Webinterface
[2021-12-09 13:16:45] [  LOG]     main: - Regex
[2021-12-09 13:16:45] [ INFO]     main: Initialized with ffmpeg 4.3.3
[2021-12-09 13:16:45] [DEBUG]     main: Initialized with gcrypt 1.8.8
[2021-12-09 13:16:45] [  LOG]     main: mDNS init
[2021-12-09 13:16:45] [DEBUG]     mdns: Initializing Avahi mDNS
owntone: client.c:791: avahi_client_errno: Assertion `client' failed.
Aborted (core dumped)

EDIT: updated with loglevel: debug