树莓派 配置DLNA客户端(gmediarender)

首次知道可以使用DLNA,还是在网易云音乐的设置选项里面发现的,之前家里有电视盒子,可以直接用,但是每次都要按开关感觉有点麻烦,正好有树莓派,在网上查了一下,基本上都是DLNA服务器端的安装,少有几个客户端配置的,结合了两个博客的内容糅合出这篇文章,修复了一些有问题的命令:

dir=`mktemp -d`
cd $dir
wget wget http://www.chiark.greenend.org.uk/~christi/debian/christi@coraline.org.gpg.key
apt-key add christi@coraline.org.gpg.key
touch /etc/apt/sources.list.d/upnprender.list
echo "deb http://www.chiark.greenend.org.uk/~christi/debian/ wheezy main" > /etc/apt/sources.list.d/upnprender.list

apt-get install libupnp-dev libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-alsa -y

git clone https://github.com/hzeller/gmrender-resurrect.git
cd gmrender-resurrect
apt-get install autoconf -y
./autogen.sh
./configure
make install

echo "gmediarender -I \`ifconfig wlan0 | grep -P 'inet\s' | awk '{print \$2}'\` -f \"RaspberryPI\" &" > /etc/rc.local
#gmediarender -I `ifconfig wlan0 | grep -P 'inet\s' | awk '{print $2}'` -f "RaspberryPI"

cd /tmp
rm -rf $dir

注意:我的环境,是Pi使用wifi接入我的网络的,所以倒数第三行,取的是无线网卡的地址。

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值