樹莓派 配置DLNA客戶端(gmediarender)

首次知道可以使用DLNA,還是在網易雲音樂的設置選項裏面發現的,之前家裏有電視盒子,可以直接用,但是每次都要按開關感覺有點麻煩,正好有樹莓派,在網上查了一下,基本上都是DLNA服務器端的安裝,少有幾個客戶端配置的,結合了兩個博客的內容糅合出這篇文章,修復了一些有問題的命令:

dir=`mktemp -d`
cd $dir
wget wget http://www.chiark.greenend.org.uk/~christi/debian/[email protected]
apt-key add [email protected]
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接入我的網絡的,所以倒數第三行,取的是無線網卡的地址。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章