forked-daapd|forked-daapd with ReadyNAS

forked-daapd 第三方itunes媒体服务器,v28.0改名OwnTone,Github

OwnTone (previously forked-daapd)
OwnTone is a Linux/FreeBSD DAAP (iTunes), MPD (Music Player Daemon) and RSP (Roku) media server.
It supports AirPlay devices/speakers, Apple Remote (and compatibles), MPD clients, Chromecast, network streaming, internet radio, Spotify and LastFM.
It does not support streaming video by AirPlay nor Chromecast.
DAAP stands for Digital Audio Access Protocol which is the protocol used by iTunes and friends to share/stream media libraries over the network.
ReadyNAS 自带itunes服务,一直用电脑开itunes再airplay推到apple TV,倒也相安无事,就懒得折腾手机播放了,就算有次删cache之后专辑封面有点问题也忍了。但是最近ReadyNAS升到10.6之后,flac文件随机卡现象愈发严重,有点坐不住了,正赖在沙发上结果音乐停了还要跑到电脑前搞两下这怎么行。
想升级版本看看,结果apt了一下已经是最新版v24.2,v25才加上webinterface,遂放弃。搞源码编吧,结果俄罗斯套娃啊,按作者的安装指导一路装,缺一堆包,装的过程又缺一堆包,套娃套到最后干脆就装不了了。。。五年前的机器,不说啥了,去下一个deb包dpkg安装吧,这可好,直接挂了,服务都起不来。罢了罢了卸载干净再用apt下载回来,泪。
log分析吧。ReadyNAS的控制页面比较诡异,似乎通过web界面启动会修改conf文件,比较关键的是
db_path = "/apps/.forked-daapd/songs3.db"
自己改了也会被改回去,ReadyNAS默认的uid也是media,和网上的daapd不大一样。另外默认没加log地址,于是找了份样本,对照着加了一下。
logfile = "/var/log/forked-daapd.log"
封面的cache地址默认是
cache_path = "/var/cache/forked-daapd/cache.db"
touch新建还需要改一下用户,不然又是database无法写入问题,就算把itunes的cache清空也没辙。封面问题解决。
把log级别改成debug,开了一个flac list进行测试。等了半天终于停住了,如果是log级别的话其实就显示一直在transcode,不过转码的设置对airplay无效,然而空欢喜一场,debug模式下,第一次报的ffmpeg解码有问题,第二次又卡住的曲又没有这个报错,主要是取消airplay再打开airplay又播放正常,看log看不出区别。。。而且实际上看log实际上是卡在下一曲的,但是前端播放界面停在上一首曲尾。搜了issue list,确实也有报错apple TV/airplay随机断开的,不过看别人的错误信息,完全不同,sigh,不具有参考性。
怀疑是cpu太弱,播放时间长导致机器吃不消,蠢蠢欲动要不要再搞个2盘位nas或者搞个软路由吧。不过好贵,还是不甘心,再试试用手机连接吧。
24.2没有webinterface,不过在之前版本的readme里面也有
  1. Start forked-daapd
  2. Start Remote, go to Settings, Add Library
  3. Look in the log file for a message saying:
    "Discovered remote 'Foobar' (id 71624..."
    This tells you the name of your device (Foobar in this example).
    If you cannot find this message, it means that forked-daapd did not receive a mDNS announcement from your Remote. You have a network issue and mDNS doesn't work properly on your network.
  4. Prepare a text file with a filename ending with .remote; the filename doesn't matter, only the .remote ending does. This file must contain two lines: the first line is the name of your iPod/iPhone/iPad, the second is the 4-digit pairing code displayed by Remote.
    If your iPod/iPhone/iPad is named "Foobar" and Remote gives you the pairing code 5387, the file content must be:
    Foobar
    5387
  5. Move this file somewhere in your library
At this point, you should be done with the pairing process and Remote should display the name of your forked-daapd library. You should delete the .remote file once the pairing process is done.
remote成功配对,iphone airplay到atv继续测试flac列表,确实稳定多了,至少整个列表放完没有停。整个资料库随机播放,发生过一回显示airplay stop,有待继续测试。
所以最终发生了什么,天知道-_-|||尽管conf文件似乎还有点问题,每次重启都要冒点儿错,itunes服务不能自动开,remote需要重新配对,不过比起播放稳定这都不算事儿了,以后再折腾。
此外,ReadyNAS的itunes服务比较诡异,有时候开不起来,换命令行启动会显示conf文件错误,就算按模板文件改也会提示语法错误,罢了罢了,你说是啥就是啥吧。命令行stop也不管用,每次都要开一个新的进程,就会造成端口冲突,需要ps出来kill进程。重启不扫描database的命令不管用,读不出来db,现在文件多,重启个服务得扫描个20min,还不好连着播放器,不然database又只读了。。。忍。
【forked-daapd|forked-daapd with ReadyNAS】命令行备忘
dpkg-l | grep daapd
ii forked-daapd 24.2-0.netgear3 armel DAAP/DACP(iTunes) server, support for AirPlay and Roku devices
service forked-daapd
Usage:/etc/init.d/forked-daapd {start|stop|status|restart|force-reload}
ps-e | grep daapd
tail -f /var/log/forked-daapd.log

    推荐阅读