Page 62 of 62

Re: Improved forked-daapd (iTunes server)

Posted: Mon Dec 09, 2019 9:40 am
by ejurgensen
How did you install? The link you posted in the previous post doesn't actually point to installation instructions.

Re: Improved forked-daapd (iTunes server)

Posted: Mon Dec 09, 2019 3:05 pm
by u_newman
Actually I followed the installation instructions on page 1 of this thread.

Re: Improved forked-daapd (iTunes server)

Posted: Tue Dec 10, 2019 11:08 am
by Bella Gorden
If you want to improve your iTunes, you could make use of a third-party tool like Audio Capture. With its help, you can record audio from iTunes music, movies, TV show or other media resources. Then you could apply your iTunes audio to all your devices even though iTunes is not installed on them.

Re: Improved forked-daapd (iTunes server)

Posted: Tue Dec 10, 2019 7:16 pm
by u_newman
u_newman wrote:
Mon Dec 09, 2019 3:05 pm
Actually I followed the installation instructions on page 1 of this thread.
Hm, I don't know how to tell - but with deinstallation and re-installation I got a running forked-daapd instance.

By using "which forked-daapd" I could see that only the instance

Code: Select all

was installed.
I removed that file ("sudo rm...") and deinstalled forked-daapd by using

Code: Select all

sudo apt-get --purge remove forked-daapd

After that, I followed steps 1 and 3 from the guide below (taken from the first entry of this thread on page 1):

How to install
  1. Add repository key
    wget -q -O - | sudo apt-key add -
  2. Add either of these lines to /etc/apt/sources.list:
    (for buster) deb buster contrib
  3. Run sudo apt update and then sudo apt install forked-daapd
And - voila - forked could be started successfully (following the guide) even without changing the config file.

But honestly I could not reproduce this: I have a second installation (with FHEM, Mosquitto, Samba installed) where I wanted to run forked-daapd, too. On that SD-card system I am still not achieving the same result and forked-daapd can not startup...

I'll try my very best, thanks so far... Eventually I'll come back with a new request for support ;)

Re: Improved forked-daapd (iTunes server)

Posted: Tue Dec 10, 2019 8:02 pm
by ejurgensen
Is it possible that you have an error in the config file? I think that might show the symptoms you describe. To find out, you can run "sudo /usr/sbin/forked-daapd -f"

Then you should get the reason forked-daapd can't start. It seems config file errors don't get written to the log file, which isn't particularly user friendly. Maybe it is because in some cases it wouldn't possible (i.e. if the uid is invalid, or the log file location).

Re: Improved forked-daapd (iTunes server)

Posted: Wed Dec 18, 2019 3:58 pm
by marioscube
I have a Raspberry Pi 3B with updated raspbian (10) Buster on it and forked-daapd version 27.0.

Recently I bought an AnyCast/MiraCast device, The specs said “airplay” so I thought it could/would work with forked-daapd.

Well, it does work with:
1. iOS devices: I can mirror the screen an play videos (with sound) on a monitor with the AnyCast device attached.
2. iTunes: I can play music on the device via iTunes (macOS Mojave) that is actually served from forked-daapd.

In forked-daapd (web and remote (iOS) the device is found, but I am not able to play my music through it.
I have checked the logs but there is no consistent error message (as far as I can see with log-level on debug).

Any thoughts?
Or pointers on what to look for in the log file?

It would be nice to have an affordable airport replacement. ;-)

Re: Improved forked-daapd (iTunes server)

Posted: Wed Dec 18, 2019 8:42 pm
by ejurgensen
Maybe it's the same device as in this github issue? If so, you can see my attempt to make it work didn't succeed.

If you can set the log to debug you are welcome to add the failure part of the log to the issue. Maybe it has some clues?

Btw, those cheap commercial airplay devices don't always support sync, and depending on manufacturer you could also argue that they are security hazards on your local network. I can't say whether that applies to the device you have, but if so, it might be a better (and still cheap) option to use a RPi (Zero?) with shairport-sync.

Re: Improved forked-daapd (iTunes server)

Posted: Thu Dec 19, 2019 6:40 pm
by marioscube
I think that what I have is “more-or-less” the same device, only newer (firmware is actively developed as I could download a new firmware recently).

A relevant part of the log (at DEBUG) is shown below. I compared it to a log file from an Apple TV 3 (that worked!).

Code: Select all

[2019-12-19 17:47:59] [DEBUG]   player: Subscription request for quality 44100/16/2 (now 1 subscribers)
[2019-12-19 17:47:59] [DEBUG]     raop: device_start: Sending OPTIONS to 'AnyCastXXXXXXXX’
[2019-12-19 17:47:59] [ INFO]   player: Using selected AirPlay device 'AnyCastXXXXXXXX’
[2019-12-19 17:47:59] [DEBUG]     raop: startup_options: Sending ANNOUNCE to 'AnyCastXXXXXXXX’
[2019-12-19 17:47:59] [DEBUG]     raop: Local address: (LL: no) port 54796
[2019-12-19 17:47:59] [ INFO]     raop: Setting up AirPlay session 3665372464 ( -> 192.168.1.yyy)
[2019-12-19 17:47:59] [DEBUG]      web: notify callback reason: 11
[2019-12-19 17:48:19] [  LOG]     raop: ANNOUNCE request failed in session startup: 0 (null)
[2019-12-19 17:48:19] [DEBUG]   player: Callback request received, id is 0
[2019-12-19 17:48:19] [DEBUG]   player: Unsubscription request for quality 44100/16/2 (now 0 subscribers)
[2019-12-19 17:48:19] [DEBUG]   player: Making deferred callback to device_restart_cb, id was 0
[2019-12-19 17:48:19] [DEBUG]   player: Callback from AirPlay to device_restart_cb (status -1)
avahi-browse -r -k _raop._tcp gave:+ enp3s0 IPv4 [email protected] _raop._tcp local

Code: Select all

= enp3s0 IPv4 [email protected]                  _raop._tcp           local
   hostname = [AnyCastXXXXXXXX.local]
   address = []
   port = [7000]
   txt = ["pk=cea512f6c13091ed90f72d4a108b1cae927b781d808b46b52e506378335088cf" "sf=0x4" "vv=2" "am=AppleTV3,2" "rmodel=EZAir1,1" "vs=220.68" "vn=65537" "tp=UDP" "md=0,1,2" "ft=0x0A7FEFF7,0x8" "et=0,3,5" "da=true" "cn=0,1,3"]
RE your BTW:
I think my device has an "official" firmware from a respectable company. So far I'm not to worried for a paranoid person ;-) .

My main goal is to get it working. That's 99% of the fun of these devices.
When I want something in a "production" environment I use my Apple TV and/o my ancient Airport Express. Then I do not even trust a "chromecast" or anything form Amazon.

Re: Improved forked-daapd (iTunes server)

Posted: Thu Dec 19, 2019 9:57 pm
by ejurgensen
This line means that the device did not reply to the announce request made by forked-daapd:

[2019-12-19 17:48:19] [ LOG] raop: ANNOUNCE request failed in session startup: 0 (null)

If you don't mind tinkering with this, then you can try some modifications to raop.c in the source code of forked-daapd. You can either try skipping the announce request (change line 3993 to raop_send_req_setup(rs, raop_cb_startup_setup, "startup_options")) or try with wireshark to catch the announce request sent by iTunes and then modify forked-daapd's (see raop_send_req_announce) to find what it is that the device doesn't accept.

Re: Improved forked-daapd (iTunes server)

Posted: Fri Dec 20, 2019 2:10 pm
by marioscube
Regrettably changing the line 3993 in raop.c (and recompiling etc.) did not give me sound on the cast device. :-(

Some more rigorous testing revealed that casting audio only dos not work with this device (or just for a very short time). Video (with or without sound) works just fine.

Strangely enough audio works if I enable screen mirroring (from iOS device) and then only stream an audio file, but not if I turn off mirroring and try to play that same audio file with an airplay capable app.

iTunes also is not able to stream to the device, however if I select the device in (macOS) sound preferences it just works (even with iTunes) :shock:

Maybe if I have a lot of time to waste I will try Wireshark.

For now thank you for your help and thank you for forked-daapd!

Re: Improved forked-daapd (iTunes server)

Posted: Tue Jan 14, 2020 11:22 am
by joris-77
Can't believe that I missed out on forked-daapd for so long. Probably because I don't use any Apple products and iTunes server didn't sound as something I needed... Glad I found it. Have two chromecasts audios, they work nice from my phone, but streaming from my ubuntu desktop was never really good. With forked-daapd streaming music now starts faster then on my phone.. Amazing! Can start music from my desktop and turn it off from my phone... Perfect!

Is there a way to install these raspberry pi packages on a headless ubuntu server with apt-get (ppa) or another package manager. (snap/flatpack whatever) There is a forked-daapd package on ubuntu, but that doesn't include the webinterface. And the webinterface is actually a real nice thing to have..

Re: Improved forked-daapd (iTunes server)

Posted: Tue Jan 14, 2020 7:01 pm
by ejurgensen
Thanks for the kind words! I'm not aware of package-based way of installing a newer forked-daapd on Ubuntu, unfortunately. I did consider setting up a ppa, and I think @chme considered making a snap, but I think neither of us got around to it.

Re: Improved forked-daapd (iTunes server)

Posted: Thu Jan 16, 2020 8:02 pm
by ejurgensen
I've uploaded release 27.0.101 of forked-daapd to the repository. It mainly has bug fixes, e.g.:
- an issue with shairport-sync causing too many open files
- log limitation to avoid repeated messages creating huge logs
- error if a genre had a single quote in its name
- incorrect update of time_added

On the feature side there are support for some more dacp commands plus support for multiple alsa devices.

Re: Improved forked-daapd (iTunes server)

Posted: Fri Jan 31, 2020 6:26 pm
by ejurgensen
I have made another release (27.1.102). It is mostly to bring the version up to 27.1, so compared to the last release it just has some improvements to the web ui.