marioscube
Posts: 52
Joined: Mon Dec 09, 2013 8:26 pm

Re: Improved forked-daapd (iTunes server)

Mon Jan 13, 2014 4:57 pm

On my Raspberry Pi forked-daapd works very nicely.

The result of dpkg --get-selections | grep libevent is:
libevent-2.0-5:armhf install
libevent-core-1.4-2 install
... and as I said before, forked-daapd works as expected :D

If I uninstall libevent-2.0.5 I will probably run into problems with the installed packages nfs and transmission as they will be removed as well :(

Before typing this post I updated my Raspberry Pi. One of the updates was forked-daapd and I am now listening to music streamed with forked-daapd to my mac mini.

So please do not change the .deb in such a way that it will not install (or update) if libevent-2.0.5 is present.

On a faster Linux Mint PC (5 Gb memory) I have the same setup with forked-daapd (compiled it myself) and libevent2. Also no problems. :D

I would say that forked-daapd needs libevent1 (libevent-core-1.4-2) installed to work properly. It will not work with only libevent2 installed. At least that is my experience based on 2 linux machines.

rrowe629
Posts: 5
Joined: Tue Jan 14, 2014 2:09 pm

Re: Improved forked-daapd (iTunes server)

Tue Jan 14, 2014 2:41 pm

Great job with forked-daapd and great support on this forum. I'm almost there - installed successfully, able to connect with Remote app, display album artwork, etc. However, like balchy posted on Wed Jan 08, 2014 at 5:29 am, I have no playback. It's essentially the same problem, but reinstall/reboot doesn't cure it like it did for balchy. I even tried installing on a second raspberry pi with a clean version of raspbian. Same thing. When I select a song, the Remote App on my iPhone briefly shows the playback screen, then reverts back to the song list. I have an Apple TV on my network. Here is the message in the log file:

Code: Select all

[2014-01-14 08:02:07]   player: Could not start playback: no output selected or couldn't start any output
[2014-01-14 08:02:07]     dacp: Could not start playback
Looking further up in the log, I see the following:

Code: Select all

[2014-01-14 08:01:59]     mdns: Avahi Resolver: resolved service '705681EC7348@Apple TV' type '_raop._tcp' proto 0
[2014-01-14 08:01:59]     mdns: Service 705681EC7348@Apple TV, hostname Apple-TV.local resolved to 10.0.1.104
[2014-01-14 08:01:59]   player: Event for AirTunes device 705681ec7348/Apple TV (5000)
[2014-01-14 08:01:59]   player: AirTunes 705681EC7348@Apple TV: no pw field in TXT record, assuming no password protection
[2014-01-14 08:01:59]   player: AirTunes device 705681EC7348@Apple TV: password: no, type AppleTV
So, forked-daapd seems to be able to "see" the Apple TV. Two other things I've observed: 1) the raspberry pi shows up in iTunes on my mac and I'm able to connect a play a song on the mac and 2) I can play a wav file on the raspberry pi with the command sudo aplay x.wav.

Help, please. Thank you.

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

Re: Improved forked-daapd (iTunes server)

Tue Jan 14, 2014 3:49 pm

When I select a song, the Remote App on my iPhone briefly shows the playback screen, then reverts back to the song list.
Using forked-daapd with Remote on a recent iPhone presents a catch 22, since you need to select your Apple TV to start playback, but you need to start playback to select your Apple TV. I don't have an iPhone myself, but I understand that this is in issue. Just yesterday I made a new version of forked-daapd which will autoselect AirPlay devices, solving this issue, but I need to test it a bit more before uploading it. So in the meantime you can solve the problem by either selecting output with another Remote than the iPhone's (if you have an iPad you can select speaker before starting playback), using another Remote (Android), by selecting output really fast (before the screen reverts back) or if you know your sql by doing sudo sqlite3 [database-file], and then setting selected to 1 in the speaker table for your Apple TV.

Your log output looks normal, and it is just saying that there is nowhere to send the audio stream. So I hope I am right in this diagnosis.

rrowe629
Posts: 5
Joined: Tue Jan 14, 2014 2:09 pm

Re: Improved forked-daapd (iTunes server)

Tue Jan 14, 2014 4:44 pm

Bingo! That worked! Thanks for the quick response.

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

Re: Improved forked-daapd (iTunes server)

Tue Jan 14, 2014 10:17 pm

Now I've uploaded version 22 (full name forked-daapd_0.19.22.gitae51922-1_armhf), which has AirPlay device autoselection (useful for iPhone Remote users) + some logging/documentation adjustments.

In principle forked-daapd now also has support for embedded artwork, but that requires building and running it with libav 9, and that is not currently available for Wheezy. So making such a package is on my todo list.

@marioscube: As you suggested, I didn't change the .deb settings, so it will still install even with libevent-2

raineroe
Posts: 9
Joined: Thu Dec 12, 2013 10:04 pm

Re: Improved forked-daapd (iTunes server)

Wed Jan 15, 2014 11:51 am

Just upgraded to 0.22 and however i cant connect to my remote anymore. I have Tried Retune and Hyperfine...

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

Re: Improved forked-daapd (iTunes server)

Wed Jan 15, 2014 12:09 pm

Sorry to hear that! Can you give some more detail about the problem? What info is there in the log file?

raineroe
Posts: 9
Joined: Thu Dec 12, 2013 10:04 pm

Re: Improved forked-daapd (iTunes server)

Wed Jan 15, 2014 12:18 pm

Thank you for the fast response. I think there is a problem with the database...

[2014-01-15 13:15:22] main: Forked Media Server Version 0.19 taking off
[2014-01-15 13:15:22] main: mDNS init
[2014-01-15 13:15:22] mdns: Avahi state change: Client running
[2014-01-15 13:15:22] db: Database schema outdated, schema upgrade needed v14 -> v15
[2014-01-15 13:15:22] db: Upgrading files table...
[2014-01-15 13:15:22] db: Dumping old files table...
[2014-01-15 13:15:23] db: Moving old files table out of the way...
[2014-01-15 13:15:23] db: Error making backup of old files table: there is already another table or index with this name: files_backup
[2014-01-15 13:15:23] db: Database version check errored out, incompatible database
[2014-01-15 13:15:23] main: Database init failed
[2014-01-15 13:15:23] main: mDNS deinit
[2014-01-15 13:15:23] main: Exiting.

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

Re: Improved forked-daapd (iTunes server)

Wed Jan 15, 2014 12:29 pm

Ok, thanks. This release upgrades the database to v15, but I didn't test the situation you have, where you still have a backup from when you upgraded to v14. Forked-daapd should have removed this backup, but I guess there is a bug.

You can remove it yourself, and then restart the server - then hopefully it will work. It is fairly simple, but make a backup of songs3.db file before you do it:

/etc/init.d/forked-daapd stop
sudo sqlite3 /var/cache/forked-daapd/songs3.db
drop table files_backup;
.quit
/etc/init.d/forked-daapd start

Hope it works. I'll fix the bug asap, and I suggest people don't upgrade in the meantime. Maybe I'll disable the repository until it is fixed.

raineroe
Posts: 9
Joined: Thu Dec 12, 2013 10:04 pm

Re: Improved forked-daapd (iTunes server)

Wed Jan 15, 2014 1:16 pm

Okay this helped. Thank you! But i got another bug, which i also had before the update :)
I use retune in combination with Airbubble on my Tablet. Forked-daapd finds the airbubble speaker and i can connect to it, but there is no sound and the volume bar has no influence. The Airbubble App shows a Volume of minus 144 db. Im not sure if its a retune problem or airbubble or forked-daapd. Can i provide you any information to adress that bug?

ude6
Posts: 5
Joined: Wed Jan 15, 2014 2:46 pm

Re: Improved forked-daapd (iTunes server)

Wed Jan 15, 2014 2:55 pm

Hi,
I wanted to say thank you for the great improved version of forked-daapd. I
have it running under Opensuse now.

One question on the db schema: If I wanted to disbale doublicate songs I have
in different folders, could I just set "disabled" to "1" for these, or would this brake
something else?
Thanks again
ude6

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

Re: Improved forked-daapd (iTunes server)

Wed Jan 15, 2014 3:37 pm

Do you see anything in the log that points to the cause? Does it say anything about not being able to connect to AirBubble?

raineroe
Posts: 9
Joined: Thu Dec 12, 2013 10:04 pm

Re: Improved forked-daapd (iTunes server)

Wed Jan 15, 2014 8:19 pm

[2014-01-15 21:11:26] player: AirTunes CF96A8C2E4E1@AirBubble: no md field in TXT record!
[2014-01-15 21:11:27] remote: Remote 'BN NookHD+' not known from mDNS, ignoring
[2014-01-15 21:11:28] daap: Missing revision-number in client update request
[2014-01-15 21:12:46] player: AirTunes device AirBubble stopped
[2014-01-15 21:13:09] scan: Bulk library scan complete

Thats all. I think the connection is not the problem, cause AirBubble sasy "streaming from 192.168.....". The thing is that it shows negative volume. At the moment minus 30,30 db. Maybe its a retune or airbubble problem...

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

Re: Improved forked-daapd (iTunes server)

Wed Jan 15, 2014 8:54 pm

I've uploaded release 23, correcting the problem that raineroe found.

@raineroe: My AirBubble says "Streaming from 192.168.1.227" and volume shows as -20,2 dB, and it's working. I think negativ volume may be normal. The log snippet does not show anything wrong, so I don't have any idea why it's not working. I mean, unless you forgot to turn up the volume on your tablet... :P

@ude6: Yes, setting disabled to 1 should be fine, but it will only work until you restart the server. The initial file scan will set disabled back to 0.

ude6
Posts: 5
Joined: Wed Jan 15, 2014 2:46 pm

Re: Improved forked-daapd (iTunes server)

Thu Jan 16, 2014 3:03 pm

Hi,
thanks. For the reply. I will try that then. Is there a way to make these changes persistent?


Regards
ude6

liquidiq
Posts: 5
Joined: Fri Dec 06, 2013 7:52 pm

Re: Improved forked-daapd (iTunes server)

Thu Jan 16, 2014 5:27 pm

I can't see if this has been mentioned anywhere, but is this capable of syncing multiple airplay devices? If not, we gotta work on that :)

My receiver is in the shop or else I'd try it myself. hahaha

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

Re: Improved forked-daapd (iTunes server)

Thu Jan 16, 2014 9:57 pm

@ude6: I can't think of any way - other than patching the source (look for db_file_ping in db.c) and compiling yourself.

@liquidiq: As far as I know forked-daapd doesn't support syncronization between Airplay devices.

ikke4
Posts: 27
Joined: Thu Jan 02, 2014 4:18 pm

Re: Improved forked-daapd (iTunes server)

Fri Jan 17, 2014 8:07 am

hi

small question, does forked-daapd support movie files on the appletv, i've my itunes liberary online and i get only the audio on my appletv if i want to play a movie...

thanks

keep up the great work.

ikke

ude6
Posts: 5
Joined: Wed Jan 15, 2014 2:46 pm

Re: Improved forked-daapd (iTunes server)

Sat Jan 18, 2014 1:50 pm

Hi, just to let you know. I ran the following query after line 1822 (#undef Q_TMPL):
#define Q_TMPL "UPDATE files SET disabled = 1 where id not in (select min(id) from files group by title COLLATE NOCASE, artist COLLATE NOCASE, album COLLATE NOCASE) and id = %d;"
That way a duplictae file should be disabled on startup. Takes some time to run though....
It would be better to run the query once like this:

update files set disabled=1 where id not in (select min(id) from files group by title COLLATE NOCASE, artist COLLATE NOCASE, album COLLATE NOCASE);

for each scan.
In which function is the intitial scan located?

Regards
ude6

ude6
Posts: 5
Joined: Wed Jan 15, 2014 2:46 pm

Re: Improved forked-daapd (iTunes server)

Sat Jan 18, 2014 3:37 pm

Hi,
ok found it in src/filescanner.c.

Moved my sql to its own fundtion and put the call in at the end of bulk_scan(void)...

Now this should be called only on full updates (start).

Duplicates should then only be new files since the last start....

Lets see
ude6

garagejob
Posts: 6
Joined: Sun Jan 12, 2014 4:51 am

Re: Improved forked-daapd (iTunes server)

Sat Jan 18, 2014 5:37 pm

raineroe wrote:<snip>I use retune in combination with Airbubble on my Tablet. </snip>
being new to this forked-daapd and remote itunes servers and such (i have no i-devices and do not use itunes) how do you use retune on your tablet and the forked-daapd on your rpi?

retune is asking me to input a 4 digit code to add the library. how do i do this? or did i misunderstand how you are using these apps in combination with forked-daapd?

I am using TunesRemote+ and other than the speed and constant need to forget and re-add library after any changes i love it.

thanks in advance
-Iz

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

Re: Improved forked-daapd (iTunes server)

Sat Jan 18, 2014 8:15 pm

@ikke4: I believe forked-daapd has some limited support for video, but I'm not sure what formats will work. I think freultwah might have some more insight on the subject?

@ude6: Good you got it working. I can't help but wonder why you have duplicates in your library?

@garagejob: You can control forked-daapd with Retune, and I think you will find that it's better than TunesRemote+. It does require pairing, which you can read about in the forked-daapd README.

ude6
Posts: 5
Joined: Wed Jan 15, 2014 2:46 pm

Re: Improved forked-daapd (iTunes server)

Sun Jan 19, 2014 12:09 am

Hi ejurgensen,
the problem arises as the server combines various libraries for playback.
This works fine, except for the problem described.

I actually have one more issue: multiple artists - i.e. artist 1 feat. artist 2 songs
The library I have combines these via ";" i.e. the artist becomes: artist 1; artist 2.
The problem now is that a new artist with name "artist 1; artist 2" is created with only 1 song. --bad.

Is there a way to extend the id3 parser to split the artist at ";" and add a song multiple times i.e.
for artist 1 and artist 2? Bonus would be if the split was only for the structure of the lib and
in the apple remote for example the artist displayed at playback would still be artist 1; artist 2....

I am willing to implement some stuff myself just need some pointers...

Especially the following 2 would be essential:
1: Where is the split implemented best so that the db-entries are not discarded at the next updates?
2: Is there such a split between shown artist and artist for sorting/searching?

Thanks for your great work!!!
ude6

garagejob
Posts: 6
Joined: Sun Jan 12, 2014 4:51 am

Re: Improved forked-daapd (iTunes server)

Sun Jan 19, 2014 7:29 am

I am a total n00b. I am trying to pair Retune with forked-dapd and i am having a (likely minor issue) ISSUE. i am unable to pair becuase the forked-daapd wants the name of the device and the name of my device is 'amazon kindle fire'...

so i have com to the conclusion that the only reason i cannot pair is because there are spaces in the name and i cannot for the life of me figure out how to change the name of the kindle to anything else.

Code: Select all

[2014-01-19 07:30:48]   remote: Discovered remote 'Amazon Kindle Fire' (id 00000000000000000000000027B1CA4F941A788B) at 10.10.2.105:9025, paircode 27B1CA4F941A788B
now before you respond with something along the lines of Blah>blah>bluetooth bear in mind that kindle fire (original 7 inch tablet) does not have blue tooth so i am not able to change the name there.

is there another way to change the name? something manually done? either in recovery or elsewhere?

sorry, i know this is not the topic, but I am taking the advice mentioned and trying retune. and i am unable to find anything anywhere online that says anything to the contrary of something something bluetooth.

Thanks in advance.

-Annoyed!

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

Re: Improved forked-daapd (iTunes server)

Sun Jan 19, 2014 10:48 am

Spaces in the name are fine, the problem is likely something else. Is there nothing else in the logs?

ude6, I'm not sure I understand completely, could you give an example? Like how you want artist to be shown.

Return to “Raspberry Pi OS”