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

Re: Improved forked-daapd (iTunes server)

Thu Nov 28, 2013 8:18 pm

I assume you tried the pairing process (see the README), so can you give a bit more information about how it went? Does avahi-browse see your Remote? Which log messages about the pairing did you get?

traxtopel
Posts: 10
Joined: Tue Nov 05, 2013 11:22 am

Re: Improved forked-daapd (iTunes server)

Mon Dec 02, 2013 7:05 am

Does anyone know of a remote to control forked-daapd that runs on linux?

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

Re: Improved forked-daapd (iTunes server)

Mon Dec 02, 2013 1:48 pm

I don't have any personal experience with it, but maybe this works:

https://code.google.com/p/tunesremote-se/

Another option might be running Android in Virtual Box and installing one of the Android remotes.

This is if you really mean a Remote - if you just want to stream, you can use Rhytmbox, I think.

traxtopel
Posts: 10
Joined: Tue Nov 05, 2013 11:22 am

Re: Improved forked-daapd (iTunes server)

Mon Dec 02, 2013 5:42 pm

Tried that, it pairs with forked-daapd but then forked-daapd crashes.

traxtopel
Posts: 10
Joined: Tue Nov 05, 2013 11:22 am

Re: Improved forked-daapd (iTunes server)

Mon Dec 02, 2013 5:45 pm

Maybe handy to post.
[2013-12-02 18:43:32] main: Forked Media Server Version 0.19 taking off
[2013-12-02 18:43:32] main: mDNS init
[2013-12-02 18:43:32] mdns: Avahi state change: Client running
[2013-12-02 18:43:41] player: AirTunes [email protected]: no md field in TXT record!

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

Re: Improved forked-daapd (iTunes server)

Mon Dec 02, 2013 8:02 pm

Yes, you are right, there was a bug in forked-daapd. I've fixed the crash here, but I haven't made a new .deb yet.

I didn't test a lot, but it did seem to be working with TunesRemote SE after this fix.

traxtopel
Posts: 10
Joined: Tue Nov 05, 2013 11:22 am

Re: Improved forked-daapd (iTunes server)

Tue Dec 03, 2013 10:44 am

Excellent, it works.

samighi11
Posts: 46
Joined: Wed Apr 17, 2013 8:27 pm

Re: Improved forked-daapd (iTunes server)

Wed Dec 04, 2013 3:27 pm

I have created a Raspi dedicated to this and have literally copied my iTunes Library from my Mac to the USB Drive, plugged it in. And pointed forked-daapd to /music/Music/iTunes Library/iTunes Music ...

the result is that the iPad Remote app correctly sees the library entry, but all the movies, music data is corrupt. Only 3-5 songs show up with garbage names and no movies.

Am I mistaken in "I can just copy my whole library over"? or do I need to convert this with a tool somehow.

I finally got ExFAT formatted drive to be Read/Write from the Mac to the Pi (see other post) and am working on a dedicated Pi for iTunes library.

What can I provide for debug information? to start?

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

Re: Improved forked-daapd (iTunes server)

Wed Dec 04, 2013 3:44 pm

Yes, you should be able to do that. Since the library contains garbage it may be libav that is somehow not working. Could you run "avconv -version" and post the result?

I also suggest you set the log level to "debug" and check the log files to see what is happening. From the log files you should be able to see what files are detected, what metadata ffmpeg (libav) reads, and what gets inserted in the database. You can also see if certain files cause problems.

Another suggestion would be to try scanning a smaller subset of your library. To start of maybe just a single album. If that screws up it is likely that the problem is related to libav (or some other dependency), but if it works it points to some special feature of your library being the culprit.

samighi11
Posts: 46
Joined: Wed Apr 17, 2013 8:27 pm

Re: Improved forked-daapd (iTunes server)

Wed Dec 04, 2013 4:29 pm

ejurgensen wrote:Yes, you should be able to do that. Since the library contains garbage it may be libav that is somehow not working. Could you run "avconv -version" and post the result?

I also suggest you set the log level to "debug" and check the log files to see what is happening. From the log files you should be able to see what files are detected, what metadata ffmpeg (libav) reads, and what gets inserted in the database. You can also see if certain files cause problems.

Another suggestion would be to try scanning a smaller subset of your library. To start of maybe just a single album. If that screws up it is likely that the problem is related to libav (or some other dependency), but if it works it points to some special feature of your library being the culprit.
I am not able to find "avcon*" anywhere on the system. i have the latest forked-daapd installed.

I have started to debug and it seems to file and inventory is extermley slow (1-2 to items every few seconds). i will give it a few hours to inventory and see how it goes. I will see if "DR Who" shows up on iPad Remote App.

[2013-12-04 16:27:51] db: Running query 'INSERT INTO files (id, path, fname, title, artist, album, genre, comment, type, composer, orchestra, conductor, grouping, url, bitrate, samplerate, song_length, file_size, year, track, total_tracks, disc, total_discs, bpm, compilation, rating, play_count, data_kind, item_kind, description, time_added, time_modified, time_played, db_timestamp, disabled, sample_count, codectype, idx, has_video, contentrating, bits_per_sample, album_artist, media_kind, tv_series_name, tv_episode_num_str, tv_network_name, tv_episode_sort, tv_season_num, songalbumid, title_sort, artist_sort, album_sort, composer_sort, album_artist_sort ) VALUES (NULL, '/music/Music/iTunes/iTunes Media/TV Shows/Doctor Who/102

UPDATE: TV Shows are appearing. No Art work yet, but I am sure they will eventually come. I will wait a few more hours till the SQL is done and the items are inventoried. and report back. For now, this can be marked answered. thank you.

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

Re: Improved forked-daapd (iTunes server)

Wed Dec 04, 2013 5:32 pm

You should check that you have libav installed, it should provide avconv. Maybe the package is called libav-tools.

fabibo
Posts: 12
Joined: Thu Nov 14, 2013 9:26 pm

Re: Improved forked-daapd (iTunes server)

Thu Dec 05, 2013 2:36 pm

Have you ever thought about adding audiobook support to the server? I would be really happy about such an extension!

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

Re: Improved forked-daapd (iTunes server)

Thu Dec 05, 2013 10:16 pm

About audiobooks: I could add some support for them, they work pretty much the same as Podcasts. However, audiobooks from iTunes are DRM-protected AAC-files, so even though I could make them show up in the "Audiobooks" menu, forked-daapd wouldn't be able to play them. So I don't know how much use that would be?

fabibo
Posts: 12
Joined: Thu Nov 14, 2013 9:26 pm

Re: Improved forked-daapd (iTunes server)

Fri Dec 06, 2013 9:03 am

My audiobooks are just mp3 files from discs. DRM should be a problem then. So if you could add this support, that would be a lot use for me!

I really would like to jump into the code, to make such little improvements on my own some time. Are you writing and debugging the Code on the raspberry or on an other machine? What program are you using?

Thank you!

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

Re: Improved forked-daapd (iTunes server)

Fri Dec 06, 2013 9:49 am

Compiling on the Pi is very slow, so I code, compile and test in Ubuntu (running in VMware player). When it's working in Ubuntu I build the deb for armhf (the Pi) using qemu, so a VM in a VM. Forked-daapd will run fine in Ubuntu, just remember to get the dependencies in place (remember to remove libevent2 and install libevent1).

You can edit the code using the built-in text editor (gedit), or you can use Eclipse if you want something more fancy.

If you make some improvements please share them!

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

Re: Improved forked-daapd (iTunes server)

Fri Dec 06, 2013 6:26 pm

Update 18 is out, it has the following improvements:
- configurable library names (idea from freultwah)
- force rescan of library by adding a file with the extension .force-rescan (see readme)
- don't purge database items if root dir is missing/unmounted (idea from jmp909)
- fix for TunesRemote SE
- some sorting changes (ignore The and A/An when sorting - requires rescan)

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

Re: Improved forked-daapd (iTunes server)

Fri Dec 06, 2013 7:56 pm

Should get a Raspberry Pi for the holidays, patiently waiting for it ;) I am getting the Pi JUST for this project, I plan on using it for my future whole-house audio system.

Just in case anyone is interested, if you have a Windows Phone 7/8 device, this app has been updated with experimental forked-daapd support.

http://wp7remoteapp.com/

I've been chatting back and forth with this team, and I sent them to this thread. Just another controller option!

fabibo
Posts: 12
Joined: Thu Nov 14, 2013 9:26 pm

Re: Improved forked-daapd (iTunes server)

Sun Dec 08, 2013 3:43 pm

OK, cool. So adding audiobook support wouldn't be a problem for you?

Compiling the code sounds a bit tricky. At the moment I'm working on an extension shield with HDD, sound card, ir some control buttons to get rid of all the cables and the write some code to talk to forked-daapt and get the shield working. maybe i'll find some time in the xmas holidays to have a look at this.

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

Re: Improved forked-daapd (iTunes server)

Sun Dec 08, 2013 10:12 pm

@liquidiq: Thanks for the heads up. I don't have a Windows phone, but please let me know if it's working. Also let me know if your talk with the guys at wp7remoteapp reveals anything that should be fixed in forked-daapd.

@fabibo: Yes, it's simple adding basic support for audiobooks. This patch should do it. However, for audiobooks I would think that it is very important that the server remembers play position. Even if you restart the server, or listen to other music or other books, it should continue from where you left. Forked-daapd won't do that now, and I'm not sure what would be required for this. I'll look into that at some point.

samighi11
Posts: 46
Joined: Wed Apr 17, 2013 8:27 pm

Re: Improved forked-daapd (iTunes server)

Mon Dec 09, 2013 2:04 am

- force library rescan with .force-rescan (release 18)
I tried to force a rebuild, but i don't see the evidence. What should I look for in the logs?

-rwxr-xr-x 1 root root 5 Dec 9 01:59 x.force-rescan
[email protected] /music/Music/iTunes/iTunes Media $ dpkg -l | grep daapd
ii forked-daapd 0.19.18.git2765a12-1 armhf media server with support for RSP, DAAP, DACP and AirTunes
[email protected] /music/Music/iTunes/iTunes Media $ ls -l *force*
-rwxr-xr-x 1 root root 5 Dec 9 01:59 x.force-rescan

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

Re: Improved forked-daapd (iTunes server)

Mon Dec 09, 2013 8:15 am

You should find this in the logs (probably followed by a lot of ffmpeg messages):
Forcing full rescan, found force-rescan file: [name if rescan file]

You must add the file while the server is running, and it must be after it has completed its normal start-up scan. Otherwise it will just be ignored, and the above message will not appear. The start-up scan is completed when the message "Bulk library scan complete" appears in the log.

You can use "touch x.force-rescan" to "reactivate" the forced rescan.

samighi11
Posts: 46
Joined: Wed Apr 17, 2013 8:27 pm

Re: Improved forked-daapd (iTunes server)

Mon Dec 09, 2013 11:38 am

ejurgensen wrote:You should find this in the logs (probably followed by a lot of ffmpeg messages):
Forcing full rescan, found force-rescan file: [name if rescan file]

You must add the file while the server is running, and it must be after it has completed its normal start-up scan. Otherwise it will just be ignored, and the above message will not appear. The start-up scan is completed when the message "Bulk library scan complete" appears in the log.

You can use "touch x.force-rescan" to "reactivate" the forced rescan.
thanks, that started the rescan.

fabibo
Posts: 12
Joined: Thu Nov 14, 2013 9:26 pm

Re: Improved forked-daapd (iTunes server)

Mon Dec 09, 2013 6:49 pm

Thankfull you very much! That was really quick!

samighi11
Posts: 46
Joined: Wed Apr 17, 2013 8:27 pm

Re: Improved forked-daapd (iTunes server)

Mon Dec 09, 2013 7:05 pm

samighi11 wrote:
ejurgensen wrote:You should find this in the logs (probably followed by a lot of ffmpeg messages):
Forcing full rescan, found force-rescan file: [name if rescan file]

You must add the file while the server is running, and it must be after it has completed its normal start-up scan. Otherwise it will just be ignored, and the above message will not appear. The start-up scan is completed when the message "Bulk library scan complete" appears in the log.

You can use "touch x.force-rescan" to "reactivate" the forced rescan.
thanks, that started the rescan.
After rebulding everything, my iOS 7 remote app reports "an unknown error occured. Please check your library and try again". this happens when I touch a movie. If I touch a song, the "play screen" comes on and goes back to list in 2 seconds. What steps may I use to debug what is going on. I looked at the logs after library rebuild and then pefromed the above and found nothing that looks like an error. I am not able to paste the logs (it contains private information), but if I know what to look for, I will paste all that I can.

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

Re: Improved forked-daapd (iTunes server)

Mon Dec 09, 2013 7:31 pm

I don't know about the Movies-issue, but the other thing might be because you start playback without valid audio output. I don't have local audio, so I get the same if I haven't selected my AirPlay speaker beforehand. You can select speakers before playback by selecting the icon with the parallel lines.

Return to “Raspbian”