日々の生活を好き勝手につづったブログ(My blog is written by inoshita.jp)
linuxのDLANサーバだとmediatombの実績が多いが、配信設定部分が気に入らないのでRygelを導入してみる
RygelはDMS(サーバ)だけでなくDMC(コントローラ)とDMR(レンダラ)も実装されているようで、ubuntuデスクトップ向けにも考えられている(例えばスマートフォンでコンテンツを選択してPCで再生ということもできるようだ)
Rygelのサイト(https://live.gnome.org/Rygel/)を参照しセットアップする
以下の説明のとおり実行すれば良いようだ
<< README.Ubuntu >>
Running Rygel as a system service with Ubuntu
=============================================
This guide has been tested with Ubuntu 12.04 LTS.
Dependencies
~~~~~~~~~~~~
Install Rygel and most of the GStreamer plug-ins:
sudo apt-get install rygel gstreamer0.10-plugins-good \
gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly \
gstreamer0.10-ffmpeg
You might want to skip gstreamer0.10-plugins-multiverse if you're using rygel
< 0.15.1, otherwise you'll run into troubles with transcoding.
Configuration
~~~~~~~~~~~~~
After that, you might want to create a dedicated user for the server:
sudo adduser --home /home/rygel --disabled-password --disabled-login \
--gecos 'Rygel media server' rygel
Then switch to that user, create ~/.config and copy /etc/rygel.conf there.
Modify it to fit your needs by disabling plugins and transcoders you don't need,
setting the device name and paths.
Then copy upstart/rygel.conf to /etc/init and call "sudo start rygel" to start
the service. It should get started at every boot from now on.
Generating Thumbnails
~~~~~~~~~~~~~~~~~~~~~
Rygel reuses thumbnails that were generated by external software such as
nautilus. However, it can also request creation of thumbnails by itself.
To enable this feature, you have to install tumbler:
sudo apt-get install tumbler
Since tumbler is a D-Bus service, rygel has to have access to a D-Bus session
bus. To accomplish this you need to copy the included D-Bus wrapper script
"wrap-dbus" somewhere and modify the upstart script to call a wrapped rygel:
exec /usr/local/bin/wrap-dbus rygel
wrap-dbus makes sure that a session bus is running and will re-use an existing
bus it spawned itself.
After (re-) starting rygel, it should start requesting thumbnail generation
for files that don't have thumbnails. If you don't see them in your client
right away, you might have to refresh the view.
Note: For Rygel versions below 0.15.1, you have to create ~/.thumbnails/normal
as well, otherwise Rygel thinks there are no thumbnails available as it is not
aware that tumbler will generate this directory.
①パッケージのインストール
$ sudo aptitude install rygel gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-ffmpeg
②サーバ用のUIDとしてrygelを追加 → 必ずしもrygelにする必要性はない
$ sudo adduser --home /srv/rygel --disabled-password --disabled-login --gecos 'Rygel media server' rygel
③設定ファイル(/etc/rygel.conf)の編集
urisにコンテンツディレクトリを記述
・・・
#uris=@MUSIC@;@VIDEOS@;@PICTURES@
uris=/srv/dlna/music;/srv/dlna/videos;/srv/dlna/picture
・・・
④コンテンツディレクトリ作成
設定ファイルに記述したディレクトリを作成してコンテンツを登録
⑤自動起動(upstart)の設定
<< /etc/init/rygel.conf >>
description "Rygel UPnP-AV/DLNA server"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]
respawn
respawn limit 10 5
umask 022
console log
setuid rygel
setgid rygel
env HOME="/home/rygel"
#exec /usr/bin/wrap-dbus /usr/bin/rygel
exec /usr/bin/rygel
⑥サムネイル用のラッパーの設定(なしでも問題なし)
「README.Ubuntu」のとおり