mediatombはフリーのDLNAサーバ。
参考:Mac の無料 DLNA サーバ『MediaTomb』のインストールと使い方|mattintosh note (跡地)
https://github.com/mxcl/homebrew/blob/master/Library/Formula/mediatomb.rb
があるので、homebrewでもmediatombが入れれると踏んでいた。
確認。
mini:~ admin$ brew info mediatomb mediatomb 0.12.1 http://mediatomb.cc Not installed https://github.com/mxcl/homebrew/commits/master/Library/Formula/mediatomb.rb
インストール。
mini:~ admin$ brew install mediatomb Warning: Formula will not build with Clang, trying LLVM ==> Downloading http://downloads.sourceforge.net/mediatomb/mediatomb-0.12.1.tar. ######################################################################## 100.0% ==> Downloading patches ######################################################################## 100.0% ==> Patching patching file src/metadata/ffmpeg_handler.cc ==> ./configure --prefix=/usr/local/Cellar/mediatomb/0.12.1 ==> make install /usr/local/Cellar/mediatomb/0.12.1: 94 files, 2.6M, built in 63 seconds
~/.mediatomb/config.xmlの
<ip>192.168.xxx.yy</ip> ←Lion ServerのIPアドレスに変更 <name>mini DLNA</name> ←デフォルトのMediaTombは分かりづらいので
config.xmlの設定はhttp://mediatomb.cc/pages/documentation#id2856319を参照。
起動させる。
mini:~ admin$ mediatomb MediaTomb UPnP Server version 0.12.1 - http://mediatomb.cc/ =============================================================================== Copyright 2005-2010 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer. MediaTomb is free software, covered by the GNU General Public License version 2 2012-05-30 18:01:07 INFO: MediaTomb configuration was created in: /Users/admin/.mediatomb/config.xml 2012-05-30 18:01:07 INFO: Loading configuration from: /Users/admin/.mediatomb/config.xml 2012-05-30 18:01:07 INFO: UUID generated: 7d632f65-f9be-xxxx-yyyy-b1469218401d 2012-05-30 18:01:07 INFO: Checking configuration... 2012-05-30 18:01:07 INFO: Setting filesystem import charset to UTF-8 2012-05-30 18:01:07 INFO: Setting metadata import charset to UTF-8 2012-05-30 18:01:07 INFO: Setting playlist charset to UTF-8 2012-05-30 18:01:07 WARNING: You enabled the YouTube feature, which allows you to watch YouTube videos on your UPnP device! Please check http://www.youtube.com/t/terms By using this feature you may be violating YouTube service terms and conditions! 2012-05-30 18:01:07 INFO: Configuration check succeeded. 2012-05-30 18:01:07 WARNING: Sqlite3 database seems to be corrupt or doesn't exist yet. 2012-05-30 18:01:07 INFO: no sqlite3 backup is available or backup is corrupt. automatically creating database... 2012-05-30 18:01:07 INFO: database created successfully. 2012-05-30 18:01:07 INFO: Initialized port: 49152 2012-05-30 18:01:07 INFO: Server bound to: 192.168.xxx.yy 2012-05-30 18:01:08 INFO: MediaTomb Web UI can be reached by following this link: 2012-05-30 18:01:08 INFO: http://192.168.xxx.yy:49152/
通信許可のダイアログが表示されるので、許可を選択。
なお、デーモンでの起動も可能。
mini:~ admin$ mediatomb --daemon 2012-05-30 19:54:12 INFO: Loading configuration from: /Users/admin/.mediatomb/config.xml 2012-05-30 19:54:12 INFO: Checking configuration... 2012-05-30 19:54:12 INFO: Setting filesystem import charset to UTF-8 2012-05-30 19:54:12 INFO: Setting metadata import charset to UTF-8 2012-05-30 19:54:12 INFO: Setting playlist charset to UTF-8 2012-05-30 19:54:12 WARNING: You enabled the YouTube feature, which allows you to watch YouTube videos on your UPnP device! Please check http://www.youtube.com/t/terms By using this feature you may be violating YouTube service terms and conditions! 2012-05-30 19:54:12 INFO: Configuration check succeeded.
写真を表示させるために~/.mediatomb/config.xmlの
(参考:DLNAサーバー構築(MediaTomb) - CentOSで自宅サーバー構築)
<map from="jpg" to="image/jpeg"/> <map from="jpeg" to="image/jpeg"/> <map from="gif" to="image/gif"/> <map from="png" to="image/png"/> <map from="m4v" to="video/mp4"/> <map from="mp4" to="video/mp4"/> <map from="mpg" to="video/mpeg"/> <map from="mpeg" to="video/mpeg"/>
http://192.168.xxx.yy:49152/にアクセスして、メディアのあるディレクトリを指定する。自動更新も設定しておく。
なお…結局はiOSからしかアクセスしないし、SMBまたはAFPクライアントでアクセスさせることにしたので、mediatombは削除しました。なので詳細までは確認してません。