florianpfeil
Posts: 4
Joined: Mon Mar 06, 2017 5:58 pm

Re: Improved forked-daapd (iTunes server)

Thu Mar 09, 2017 1:10 pm

Hi ejurgensen,
thank you for the test version! I haven't tested it yet, because I did a complete reinstall off forked-daapd and all packages it depends on. The error stayed the same, but the log-file output changed slightly - now it even says "End of file":

Code: Select all

[2017-03-09 13:43:33] [DEBUG]   player: Input buffer has 180608 bytes
[2017-03-09 13:43:37] [ WARN]    xcode: Could not read frame: End of file
[2017-03-09 13:43:37] [DEBUG]    xcode: Could not read packet, will flush decoders
[2017-03-09 13:43:37] [DEBUG]   player: Playback loop stopped (break is 0)
[2017-03-09 13:43:39] [  LOG]   player: Source is not providing sufficient data, temporarily suspending playback

ejurgensen
Posts: 501
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Thu Mar 09, 2017 8:54 pm

Strange indeed. The test version has a bit more logging of the interesting return values, so hope you get a chance to test it. It should be easy to install, just run "dpkg -i [filename]".

mswhalley
Posts: 10
Joined: Tue Jan 05, 2016 4:40 pm

lastfm problem

Sat Mar 11, 2017 4:47 pm

I'm getting the following my log:

[2017-03-11 07:45:53] [ LOG] lastfm: lastfm credentials file OK, logging in with username xxxxxx
[2017-03-11 07:45:54] [ LOG] lastfm: Got session key from LastFM: xxxxxxxxx
[2017-03-11 07:45:54] [ LOG] scan: Could not lstat() '/srv/music/.temp.lastfm.swp': No such file or directory

It looks like lastFM is starting up OK but doesn't appear to be scrobbling. Is there an issue here with the lack of a .temp.lastfm.swp file?

ejurgensen
Posts: 501
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Sat Mar 11, 2017 7:32 pm

@mswhalley: I think the ".temp.lastfm.swp" is just your text editor making a temp file when you made temp.lastfm. Forked-daapd tried to scan it, but was gone before already. So nothing to worry about. Are you running 24.2.59 (the latest RPi version)? I made some fixes for LastFM which are in that version. I just checked scrobbling, and it does seem to work.

@SBob: I won't be able to get hold of a newer ApEx any time soon, unfortunately. The one I have is ancient. It would be interesting to know what kind of services is being announced by the ApEx. Could you run "avahi-browse -a -r" and find the services from the ApEx?

mswhalley
Posts: 10
Joined: Tue Jan 05, 2016 4:40 pm

Re: Improved forked-daapd (iTunes server)

Sat Mar 11, 2017 11:47 pm

I am running 59. I did scrobbling from Spotify to check the other end and it was working fine. I'll keep after it to see what I can figure out.

liminal
Posts: 9
Joined: Thu Mar 16, 2017 10:40 pm

Re: Improved forked-daapd (iTunes server)

Fri Mar 17, 2017 12:34 am

Hi guys,

Im wondering how to set up forked-daapd without a library. What im going for is just taking audio for the microphone in (from an Alexa) and then streaming that out to some Airplay devices?

Can I just remove all the library entries from the config, how can I start with this, I do know its something about named pipe?

liminal
Posts: 9
Joined: Thu Mar 16, 2017 10:40 pm

Re: Improved forked-daapd (iTunes server)

Fri Mar 17, 2017 2:59 am

@BrandonQuest

Can you please give me a look at a scrubbed version of your forked-daapd.conf so I can get an idea of how you set your system up.

Im trying to do the same thing, mic input, from alexa, to airplay devices.

Thanks!!

SBob
Posts: 4
Joined: Wed Dec 17, 2014 8:57 pm

Re: Improved forked-daapd (iTunes server)

Fri Mar 17, 2017 8:49 pm

@ejurgensen I am ashamed to admit it, but in my conviction that the problem lied with the iOS update I forgot to restart forked-daapd.... :oops:

When I did, Remote again finds the Airport Expresses.

(There is an update for the ApExs and I have updated one of them, will get back if it causes any problems)

Thanks for your help

liminal
Posts: 9
Joined: Thu Mar 16, 2017 10:40 pm

Re: Improved forked-daapd (iTunes server)

Thu Apr 06, 2017 4:59 am

Hi guys,

I am using forked-daapd to play music to Airplay Receivers from an Echo Dot

Dot>headphone out>USB DAC mic in (Pi Zero W)> named pipe (arecord -f cd -t raw > /your/library/Echo) and then controlling the Airplay connectivity by the Remote.

SO I can tell Alexa to play 80s music and it will play it all over the house. Works great!

The next step is to control the connectivity to the Airplay devices though HA-Bridge. So I can tell Alexa to connect/ disconnect to the various Airplay devices.

So far im stuck with trying to get a list of Airplay speakers using "MPC Outputs", but it gives me "Command not found"

Any help?

liminal
Posts: 9
Joined: Thu Mar 16, 2017 10:40 pm

Re: Improved forked-daapd (iTunes server)

Thu Apr 06, 2017 7:46 am

Hi guys,

Another thing, where is forked-daapd installed on the Pi. I'm looking for the remote script and actual library?

Thanks

Anyone looking for the scripts its;

/usr/share/doc/forked-daapd/scripts

:lol:

Worked all this out
Last edited by liminal on Thu Apr 06, 2017 11:37 am, edited 1 time in total.

ejurgensen
Posts: 501
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Thu Apr 06, 2017 11:10 am

> So far im stuck with trying to get a list of Airplay speakers using "MPC Outputs", but it gives me "Command not found"

Linux is case sensitive. I think "mpc" is installed by default, otherwise install it with apt-get.

liminal
Posts: 9
Joined: Thu Mar 16, 2017 10:40 pm

Re: Improved forked-daapd (iTunes server)

Thu Apr 06, 2017 12:43 pm

Yeah its not making a dif, ill try installing mpc in a bit

I had everything working as root, but wanted to get it working under the actual user, pi, so ive created another pipe in a folder under that user, but Linux permissions have stumped me again.

pi@device:~ $ arecord -f cd -t raw > /airplay/echo
-bash: /airplay/echo: Permission denied

Ive created the pipe there,

pi@device:~ $ cd airplay
pi@device:~/airplay $ ls
echo

Looks ok, I'm part of the audio group, I'm stumped? I had this working on Ubuntu without sudo.

ejurgensen
Posts: 501
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Fri Apr 14, 2017 8:57 pm

A word of warning to people airplaying to recent Apple TVs: Upgrading to tvOS 10.2 will break streaming from most 3rd party apps, including forked-daapd. Here is some info about it.

If you already upgraded it is, apparently, still possible to downgrade to 10.1.1.

I currently don't know if this can be fixed.

mswhalley
Posts: 10
Joined: Tue Jan 05, 2016 4:40 pm

mpc info during podcast playback broken?

Wed Apr 19, 2017 3:46 pm

I'm using mpc to gather playback information from forked-daapd for display. This works fine when playing locally stored music, internet radio, and spotify.

Unfortunately it appears to be broken for podcasts. mpc returns an error saying it cannot parse the response.

Thanks, Matt.

chme
Posts: 29
Joined: Tue May 06, 2014 7:53 pm

Re: Improved forked-daapd (iTunes server)

Sat Apr 22, 2017 4:59 am

Hi Matt, i tried to reproduce this error, but in my test mpc was able to show the information for the playing podcast. Can you give me a link to one of the podcasts that produce the error? Which mpc command do you use?

madejackson
Posts: 3
Joined: Tue May 14, 2013 1:51 pm

Improved Pairing-Process

Wed Apr 26, 2017 12:40 pm

Hi,

I'd like to setup a Server which automatically pairs with all the remote's who'd like to pair. Is there any possibility?

If not, plan B is to enter the Pin in the Server via gui. Is there a possible solution to this?

I googled me to death but didn't found anything like this!

ejurgensen
Posts: 501
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Wed Apr 26, 2017 1:45 pm

It’s been a while since I looked at the pairing flow, but I think it is unlikely that automatic pairing is possible.

Forked-daapd doesn’t have a GUI/web interface, so you would have to stich something together yourself for this. @chme has submitted an improvement that will provide a pretty simple command line way of pairing, so you would have to make a page (with php or something) that executes a command with the PIN as an argument. If you want something right now you will have to make the php script write the phone name and pin to a file in the library.

madejackson
Posts: 3
Joined: Tue May 14, 2013 1:51 pm

Re: Improved forked-daapd (iTunes server)

Thu Apr 27, 2017 1:39 pm

ejurgensen wrote:It’s been a while since I looked at the pairing flow, but I think it is unlikely that automatic pairing is possible.

Forked-daapd doesn’t have a GUI/web interface, so you would have to stich something together yourself for this. @chme has submitted an improvement that will provide a pretty simple command line way of pairing, so you would have to make a page (with php or something) that executes a command with the PIN as an argument. If you want something right now you will have to make the php script write the phone name and pin to a file in the library.
Thanks for the quick answer... I'm lookin a bit more into the php-based solution. Keep you updated.

cdlenfert
Posts: 25
Joined: Mon May 01, 2017 8:30 pm

Re: Improved forked-daapd (iTunes server)

Mon May 01, 2017 8:49 pm

Hi ejurgensen,

Thanks for this program. I'm currently running it on a Raspberry Pi Zero W and having the same issue as florianpfeil posted back in March. When I Airplay to any Airport Express it works for anywhere from 1 to ~5 songs, then the Airplay stops. If I check the remote app, playback seems to continue through additional songs, and I can resume Airplay by switching the speaker to "Computer" and back to "Kitchen" for example. The dropout then happens again in the same timeframe.

I was going to try the updated deb file you posted but the link is no longer valid. Should I re-install the latest release?

Code: Select all

[2017-05-01 13:29:25] [  LOG]   player: Source is not providing sufficient data, temporarily suspending playback
I've changed the log level to "debug" and will post the results of that after I get a chance to run another streaming test. Thanks for any suggestions.

cdlenfert
Posts: 25
Joined: Mon May 01, 2017 8:30 pm

Re: Improved forked-daapd (iTunes server)

Mon May 01, 2017 10:12 pm

I've added the output of the debug log to a pastebin https://pastebin.com/hDC0XygE but stripped most of the entries about the 2,534 files in my library.

cdlenfert
Posts: 25
Joined: Mon May 01, 2017 8:30 pm

Re: Improved forked-daapd (iTunes server)

Thu May 04, 2017 3:08 am

Hello again. Really sorry for the triple post :oops: but I found some interesting details that might be relevant. Seems like the issue could be related when the track ends, vs when the next track starts.

- I can resume playback on an airplay speaker (airport express, or receiver software on Fire TV) by simply scrubbing the
playback to the beginning of the song

- Connection almost never drops if I manually skip to the next track before the end of the current track

- Seems like if there is a few second delay at the end of a track (when watching the progress bar in the apple remote app) then the connection is dropped (again I don't have to reconnect if I move the progress bar back to the beginning of the track)

- When playing to multiple AEs, the stream seems to last longer and be slightly more consistent going to a 2nd Gen AE, vs a 3rd Gen AE. 3rd Gen drops the stream more frequently.[/list]

ejurgensen
Posts: 501
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Thu May 04, 2017 6:26 am

The cause of florianpfeil's issue was that there were multiple versions of libav/ffmpeg installed at the same time. This meant that forked-daapd got an error instead of an end-of-file message from these libraries. Previous versions of forked-daapd stopped playback on error, but the next one will continue to the next track, so that will in a way fix the problem.

cdlenfert
Posts: 25
Joined: Mon May 01, 2017 8:30 pm

Re: Improved forked-daapd (iTunes server)

Fri May 05, 2017 2:43 pm

Thanks again ejurgensen. Maybe my problem is different than florianpfeil's, as I have only installed forked-daapd and an SMB server on the Pi Zero W. I tried to do an updated, but found that I'm on the latest version. I ran a re-scan of my library, and though every song is found, I now have no artist or album info in the Apple Remote app. After a restart of forked-daapd, and a rescan of my library, streaming seems to hold a connection to my AEs better, at least for now. I'll keep testing and see if anything changes. Do you have any suggestions on why the connection could be dropping in my case, but playback continues, and the airplay speaker is still selected?

ejurgensen
Posts: 501
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Sat May 06, 2017 9:24 pm

I've released the latest and greatest forked-daapd, which is versioned 24.2.60.gitb20f372.

The improvements are:
  • Continue to next track instead of aborting playback on ffmpeg read error
    Fix for devices that change ip addresses (e.g. D-Link Home Music)
    Fix for broken PNG rescaling
    Easier Remote pairing with "mpc sendmessage pairing [PINCODE]" (credit @chme)
    Set speaker/output volume with mpd sendmessage command (credit @chme)
    Support for "Album by Artist" sort order in Remote
    Config option to exclude particular speakers from list
    Better playback handling of shuffled queues (credit @chme)
    Misc minor bug fixes
Note that tvOS 10.2 (Apple TV) is still broken.

@cdlenfert if you had the same issue as florianpfeil then this version should at least continue playback, even though errors will show in the log. If your issue is actually something else then one thing you should check is CPU load during playback. Decoding your files may be too much for a Zero.

liminal
Posts: 9
Joined: Thu Mar 16, 2017 10:40 pm

Re: Improved forked-daapd (iTunes server)

Sun May 07, 2017 4:25 am

Thanks so much

Easier Remote pairing with "mpc sendmessage pairing [PINCODE]" (credit @chme)
Set speaker/output volume with mpd sendmessage command (credit @chme)

These two things will come in really handy (just got a new phone for one ;)

Is there any info on how I can specify speakers with the mpd sendmessage?

Thanks again!

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 21 guests