Bewick Place
Posts: 18
Joined: Wed Jan 01, 2014 3:50 pm

Re: Improved forked-daapd (iTunes server)

Wed Jan 01, 2014 4:01 pm

Many thanks for your development efforts on this great piece of software.

I have now built a variety of Pi based wireless music servers using forked-daapd and Shairport. I've resolved most of my initial niggles but continue to suffer from one problem.

My library is 99% mp3 based and numerous of my files have been tagged with custom genre information (eg 90's Pop) using iTunes. This shows up fine in iTunes and in Windows, but when accessed using forked-daapd the genre returns to one of the default genre (eg Folk).

I assume this is a libav issue as I get the same result using avconv -I.

Can anyone confirm this is a libav issue and any idea if it has been solved - I've tried googling but get no direct reference to this issue. Should I try and upgrade to a newer version of libav (currently 0.8.6-6)?

Any other advise appreciated.

Regards,

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

Re: Improved forked-daapd (iTunes server)

Wed Jan 01, 2014 10:20 pm

Always good to hear it's working. The current version is both 19 and 20 at the same time, because the complete version numbering is 0.19.20.gitc8a6312. The 0.19 is the version that upstream (Julian Blache) left, and I've since then made 20 releases with modifications. Maybe I'll one day bump the major number.

I don't completely understand how genre tags are malfunctioning with those mp3's. I think mp3's have only one genre tag (there is no default genre tag), and you should be able to change that to whatever you want. I made a test and changed the genre of some of my music to "Test" in iTunes, and then moved the files to the Raspberry. That changed the genre to "Test" like expected. But maybe you are doing this in another way than me?

In all cases I don't think upgrading libav will help, because even if newer libav can read additional mp3 tags I don't know about, forked-daapd will still only use the normal mp3 genre tag. Also forked-daapd doesn't work well in general with newest libav (unless you want to try the experimental libav9 branch). Another approach, which I think has a higher chance of working, is enabling the "itunes_overrides" option and copying your itunes xml file to your Raspberry.

Bewick Place
Posts: 18
Joined: Wed Jan 01, 2014 3:50 pm

Re: Improved forked-daapd (iTunes server)

Wed Jan 01, 2014 11:42 pm

Thanks for the swift reply.

I've been working on my Genre problem and it appears to be a bug (feature?) of libav. Even building the latest version I get the same result.

It would appear that libav will not support a ID3v2 tag with an '. My "80's Rock" genre is translated to "Folk", and my "70's Rock" is translated to "Trailer". On inspection we find that the "genre number" for Folk is 80 and Trailer is 70. Thus the genre is being mis-interpretted when decoded in the library..

Not sure I can be bothered t wait for this to be fixed and for that to work it's way through the system. I may just have to tweak my genre settings.

Thanks for your help.

Bewick Place
Posts: 18
Joined: Wed Jan 01, 2014 3:50 pm

Re: Improved forked-daapd (iTunes server)

Thu Jan 02, 2014 12:16 pm

Just for completeness.....

Turns out it isn't the ' in the genre that is the problem. Any genre with a numeric start (eg 70abc) will be interpreted as the enumeration and be translated into the corresponding name.

As I said I'm not sure if this is a bug or a feature.

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

Re: Improved forked-daapd (iTunes server)

Thu Jan 02, 2014 1:32 pm

I just tried with libav 9.10, and I got the same result as you. So upgrading won't help. I guess they consider it a feature, even though it seems odd.

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

Re: Improved forked-daapd (iTunes server)

Thu Jan 02, 2014 4:31 pm

Hi,


i edit this post and remove the other entries i made, because my problem wil be no help to others and only confuse them.

ik didn't add the correct repository and ended up with a old forked-daapd

i like to thanks EJurgensen for the help...

greetingz jochem
Last edited by ikke4 on Sat Jan 04, 2014 12:00 pm, edited 1 time in total.

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

Re: Improved forked-daapd (iTunes server)

Thu Jan 02, 2014 11:11 pm

If it disappears from iTunes when you add music, it sounds like it may be crashing/stopping. Can you check if it is still running after you add music? You can use "ps ax | grep forked-daapd" for checking.

As long as it's running it should always show in iTunes, and you shouldn't need to do anything special for that to happen (except editing the config file: enabling db_path and setting directories to point to a valid path). I suggest you get this working and then look at Remote pairing afterwards.

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

Re: Improved forked-daapd (iTunes server)

Fri Jan 03, 2014 11:33 am

Hello

thanks for the swift reply! you were right, the server crashes when i put some files in de /srv/music/ directory . no daapd deamon on ps ax | grep forked-daapd after putting the files in the directory


i checked the rights of the files and chmod 777 them to rule out a right problem!

the db-path in the configfile is enabled and directories = { "/srv/music" } which is on my sd card... ( do i keep the { } )

i don't have a lot of linux experience, it's about a decade that i run freesco ( free router linux distro) and did some linux...

grt Jochem

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

Re: Improved forked-daapd (iTunes server)

Fri Jan 03, 2014 12:30 pm

Hi Jochem,

the only thing I needed to change in /etc/forked-daapd.conf to make it work was the line:


# Directories to index
directories = { "/srv/music" }

to

directories = { "/mnt/HDD/media/music" }

"All" my music (mp3's and flac) are in /mnt/HDD/media/music. But any directory will do.

If forked-daapd keeps crashing reinstall it or try one mp3 at a time.

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

Re: Improved forked-daapd (iTunes server)

Fri Jan 03, 2014 3:31 pm

hi mario,

thanks..

jochem
Last edited by ikke4 on Sat Jan 04, 2014 12:01 pm, edited 1 time in total.

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

Re: Improved forked-daapd (iTunes server)

Fri Jan 03, 2014 4:37 pm

/removed quote/


i purged forked-daapd and installed it again

sudo apt-get install forked-daapd
bla bla bla bla
insserv: warning: script 'mathkernel' missing LSB tags and overrides

should i be worried :|
Last edited by ikke4 on Fri Jan 03, 2014 9:24 pm, edited 1 time in total.

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

Re: Improved forked-daapd (iTunes server)

Fri Jan 03, 2014 4:40 pm

How do you "connect" with OSX finder to your Raspberry Pi? (smb://<ip> ?)

My "workflow" is (in essence):

Stop forked-daapd on RPI.
Copy files to your music directory (from OSX to RPI)
On RPI goto your music directory and remove all ._xxx files
Start forked-daapd on RPI
Connect with OSX iTunes
... and play the music

:)

I do not like that error, but ........ don't know how to fix it.

To reinstall forked-daapd:

apt-get install --reinstall forked-daapd

If you added the repository to the etc/apt/sources.list file.

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

Re: Improved forked-daapd (iTunes server)

Fri Jan 03, 2014 9:23 pm

ok back to the drawingboard !!!!!!

i start all over...

this is what i did the last time...
1. downloaded and installed noob 1.3.3 with Raspbian

!. add repostitory : Add this line to /etc/apt/sources.list: deb http://www.gyfgafguf.dk/raspbian armhf/

2. sudo apt-get update
3. sudo apt-get upgrade
4. sudo apt-get install netatalk (to act as a mac file server)
5. sudo apt-get install forked-daapd

grt jochem
Last edited by ikke4 on Sat Jan 04, 2014 12:03 pm, edited 1 time in total.

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

Re: Improved forked-daapd (iTunes server)

Fri Jan 03, 2014 9:31 pm

I assume you added my repository before apt-get update? You didn't write that step, so I just want to be sure. Otherwise you might be installing some old broken forked-daapd from the Debian repositories.

Also I sent you a PM and asked for some log info (since I gather other people won't be so interested in that).

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

Re: Improved forked-daapd (iTunes server)

Tue Jan 07, 2014 6:37 am

I needed to reinstall my pi, sd card corrupted.

Checked out the latest git. However on intial make.
Making all in src
make[2]: Entering directory `/root/forked-daapd/src'
antlr3 -depend DAAP2SQL.g > DAAP2SQL.u
antlr3 -depend DAAP.g > DAAP.u
antlr3 -depend RSP2SQL.g > RSP2SQL.u
antlr3 -depend RSP.g > RSP.u
make[2]: Leaving directory `/root/forked-daapd/src'
make[2]: Entering directory `/root/forked-daapd/src'
antlr3 DAAP.g
antlr3 RSP.g
warning(209): RSP.g:120:1: Multiple token rules can match input such as "'t'": TODAY, FIELD

As a result, token(s) FIELD were disabled for that input
warning(209): RSP.g:120:1: Multiple token rules can match input such as "'s'": STARTSW, FIELD

As a result, token(s) FIELD were disabled for that input
warning(209): RSP.g:125:1: Multiple token rules can match input such as "'1'..'9'": INT, DATE

As a result, token(s) DATE were disabled for that input
warning(209): RSP.g:120:1: Multiple token rules can match input such as "'i'": INCLUDES, FIELD

As a result, token(s) FIELD were disabled for that input
warning(209): RSP.g:120:1: Multiple token rules can match input such as "'d'": DAY, FIELD

As a result, token(s) FIELD were disabled for that input
warning(209): RSP.g:120:1: Multiple token rules can match input such as "'a'": AND, AFTER, FIELD

As a result, token(s) AFTER,FIELD were disabled for that input
warning(209): RSP.g:131:1: Multiple token rules can match input such as "'"'": QUOTE, STR

As a result, token(s) STR were disabled for that input
warning(209): RSP.g:104:1: Multiple token rules can match input such as "'>'": GREATER, GTE

As a result, token(s) GTE were disabled for that input
warning(209): RSP.g:120:1: Multiple token rules can match input such as "'e'": ENDSW, FIELD

As a result, token(s) FIELD were disabled for that input
warning(209): RSP.g:120:1: Multiple token rules can match input such as "'m'": MONTH, FIELD

As a result, token(s) FIELD were disabled for that input
warning(209): RSP.g:120:1: Multiple token rules can match input such as "'w'": WEEK, FIELD

As a result, token(s) FIELD were disabled for that input
warning(209): RSP.g:120:1: Multiple token rules can match input such as "'o'": OR, FIELD

As a result, token(s) FIELD were disabled for that input
warning(209): RSP.g:120:1: Multiple token rules can match input such as "'y'": YEAR, FIELD

As a result, token(s) FIELD were disabled for that input
warning(209): RSP.g:120:1: Multiple token rules can match input such as "'b'": BEFORE, FIELD

As a result, token(s) FIELD were disabled for that input
warning(209): RSP.g:105:1: Multiple token rules can match input such as "'<'": LESS, LTE

As a result, token(s) LTE were disabled for that input
error(208): RSP.g:131:1: The following token definitions can never be matched because prior tokens match the same input: GTE,LTE,AFTER,DATE,STR
if gperf daap_query.gperf > daap_query_hash.c.tmp; then \
mv daap_query_hash.c.tmp daap_query_hash.c; \
elif gperf --version >/dev/null 2>&1; then \
rm daap_query_hash.c.tmp; \
exit 1; \
else \
rm daap_query_hash.c.tmp; \
touch daap_query_hash.c; \
fi
if gperf rsp_query.gperf > rsp_query_hash.c.tmp; then \
mv rsp_query_hash.c.tmp rsp_query_hash.c; \
elif gperf --version >/dev/null 2>&1; then \
rm rsp_query_hash.c.tmp; \
exit 1; \
else \
rm rsp_query_hash.c.tmp; \
touch rsp_query_hash.c; \
fi
if gperf dacp_prop.gperf > dacp_prop_hash.c.tmp; then \
mv dacp_prop_hash.c.tmp dacp_prop_hash.c; \
elif gperf --version >/dev/null 2>&1; then \
rm dacp_prop_hash.c.tmp; \
exit 1; \
else \
rm dacp_prop_hash.c.tmp; \
touch dacp_prop_hash.c; \
fi
if gperf dmap_fields.gperf > dmap_fields_hash.c.tmp; then \
mv dmap_fields_hash.c.tmp dmap_fields_hash.c; \
elif gperf --version >/dev/null 2>&1; then \
rm dmap_fields_hash.c.tmp; \
exit 1; \
else \
rm dmap_fields_hash.c.tmp; \
touch dmap_fields_hash.c; \
fi
make[2]: Leaving directory `/root/forked-daapd/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/forked-daapd'
make: *** [all] Error 2


If hpwever I rerun make it completes. Is there a bug in the code or something I have installed/doing.

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

Re: Improved forked-daapd (iTunes server)

Tue Jan 07, 2014 8:23 am

@traxtopel: Yes, I've seen this error a few times. It only appears when I build deb's for the RPi, and it only shows up maybe 1 in 6 times. So what I do is almost the same as you: Delete everything and try again. I haven't had any problems with the resulting builds.

@marioscube: Just wanted to let you know that it turned out that ikke4 was in fact installing the original Debian package.

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

Re: Improved forked-daapd (iTunes server)

Tue Jan 07, 2014 8:09 pm

I've uploaded yet a release, this one is no. 21 (0.19.21.gitb4e1e38). It has no new features, but has a few bug fixes (+ some logging changes):
- better support for Retune update requests
- fix occasional faulty responses to Remote 4 when selecting a song

balchy
Posts: 3
Joined: Wed Jan 08, 2014 10:53 am

Re: Improved forked-daapd (iTunes server)

Wed Jan 08, 2014 11:29 am

Hi
EDIT - a full reinstall (purge) and reboot seems to have fixed this problem ...

I have a problem with audio output - forked-daapd seems to be unable to reach the default audio output.
Using IOS Remote on IOS7, if I am quick, I can select an airport express and all is fine - music plays to the express fine.
But clearly I have a problem with the Pi's internal sound card / output
I have uncommented the "card" line the the config file

[2014-01-08 11:21:30] player: Could not start playback: no output selected or couldn't start any output
[2014-01-08 11:21:30] dacp: Could not start playback

aplay -L produces this:
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device
sysdefault:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device

and I can play a wav file ok (I have forced output to be through the audio jack).

Any thoughts?

I do not have a daapd user, so cannot follow the adduser to audio group suggestion I have seen elsewhere - and I notice the config file configures the UID to be "root" not daapd

Any thoughts?

Thanks

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

Re: Improved forked-daapd (iTunes server)

Sun Jan 12, 2014 5:21 am

I have installed Raspbian 2014, the newest release available today. I followed the instructions in the first post. updated the repository, installed via apt-get. edited the config file and I have restarted the daapd service. however, I am having an issue.

upon executing the command sudo /etc/init.d/forked-daapd restart I get the following results.

Code: Select all

Restarting RSP and DAAP media server: .......................................... ................................................................................ ................................................................................ 
I get the dots for hours. I tried this on a sample minimalistic library of 5,300 songs as well as a very minimal library of 12 songs with the same result. The dots run across the screen filling the screen for literally hours. I let the dots run for 13 hours the first time and several hours in subsequent restarts of the pi as well as attempts to restart the forked-daapd.

what is happening here and why will the daapd server not work or 'broadcast' (for a complete lack of any better term atm).

I am going to try a complete purge of the program and reinstall for a comparison of results.

-Izzy

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

Re: Improved forked-daapd (iTunes server)

Sun Jan 12, 2014 7:20 am

UPDATE

A removal via apt-get and reinstall seems to have solved the problem with the dots...

however a new question / issue comes to the forefront.

I am using android and use TunesRemote+, when i connect to my music library, under the headings of Artists and Albums, all i get on my android screen is the stupid little spinning wheel. is this normal? and for how long?

-Izzy

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

Re: Improved forked-daapd (iTunes server)

Sun Jan 12, 2014 10:46 am

Your first problem sounds like you be mistake installed a wrong version of forked-daapd. My version does not contain the message "RSP and DAAP media server", and should not produce any dots. Also, the file scanning will not stop the server from starting - the server runs while it scans (scanning is done in its own thread).

It is not normal to just see a spinning wheel in these lists. Your second problem sounds like you may not have removed libevent2. Make sure you remove it completely, then install libevent1.

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

Re: Improved forked-daapd (iTunes server)

Sun Jan 12, 2014 6:16 pm

libevent2 and libevent1 are no installed.

Code: Select all

E: Unable to locate package libevent1

Code: Select all

E: Unable to locate package libevent2
I have just did a complete reinstall (or imaging of SD card) of Raspbian, and attempting the reinstall of daapd.

-Iz

::EDIT::

Upon install of forked-daapd, an error message is displayed in the last line of the install

Code: Select all

insserv: warning: script 'mathkernel' missing LSB tags and overrides
    main: Forked Media Server Version 0.19 taking off

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

Re: Improved forked-daapd (iTunes server)

Sun Jan 12, 2014 7:02 pm

I should have put the real package name of libevent2, it is currently "libevent-2.0-5". So "E: Unable to locate package libevent2" does not mean it is not still there.

You need to run "sudo apt-get remove libevent-2.0-5" before installing forked-daapd (which should automatically install libevent-1.4.2-core). You can see what is installed with "dpkg --get-selections | grep libevent".

The mathkernel error is a general one, you probably saw it while installing Raspbian too. It doesn't affect forked-daapd.

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

Re: Improved forked-daapd (iTunes server)

Mon Jan 13, 2014 4:15 am

Admittedly I have not read very closely, only scanned over each post here on this subject. there is a lot of great info and some info that seems to be either incorrect or just straight up missing. I have gotten forked-daapd WORKING. it is working and i love it. there are a few issues and oddities that i would like to address in time, one at a time until i can comprehend what is happening here. my linux kung-fu is very weak and old and out dated. so relearning linux and the oddities of raspbian is going to be slow at best (plus i am older than the average geek)...

first let me say that i didnt see it mentioned anywhere here on this thread and i only stumbled upon it out of curiosity.

the README file is located on the OP's server at http://www.gyfgafguf.dk/raspbian/forked-daapd.README I recommend some light reading, it was enlightening for me with respect to some of my questions.

the first real issue that i have noticed, that seems to have been the issue related to my original posts, also not mentioned that i have noticed. and that is:

X server MUST be running in order for tunesremote+ to display properly on my android phone. This could be related to my original issue, involving libevent. I have libevent-2.0-5 installed as i did not uninstall it per the instructions which came after the reinstall and testing, but things are working! YAY.

I am thinking that i have a list of improvement suggestions or add ons that would make this one of the best remote media servers of all times.

-Iz

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

Re: Improved forked-daapd (iTunes server)

Mon Jan 13, 2014 2:27 pm

I'm glad you got it working - and that you like it! Obviously, reading this entire thread should not be a requirement to reach that goal. I've updated my original post so the install instructions now say to remove libevent-2. Maybe I will also change the .deb, so it won't install if libevent-2 is present.

It's interesting that with the x server running it will work with libevent-2. The only way I can make sense of that, is that the server takes so many ressources that it slows down forked-daapd/libevent-2, and somehow that makes the libevent-2 problem go away. So that points to a timing problem. If this is the case, I would expect that even with the x server running you will encounter some instability. Try with libevent-1 if that happens.

Suggestions are always welcome, so please post any ideas for improvement you have. You can also post them as issues on github, which I would prefer.

Return to “Raspberry Pi OS”