/etc/mediatomb.conf
(/etc/mediatomb/config.xml)
の二つのファイルで設定を
行います。
mediatomb.conf
を下の様に設定して、初めてmediatombを
起動すると/etcの下にmediatombと
いうディレクトリーが作
成されます。
$ cat /etc/mediatomb.conf
## This is a sambel configuration file for the MediaTomb daemon script
## used on Fedora Core
## By default the configuration will be created in /etc/mediatomb
## Network interface on which the server will run, you need to edit
this!
#MT_INTERFACE="NOT_SET"
MT_INTERFACE="eth0"
## User defined command line options that may be passed to the server
MT_OPTIONS=""
## MediaTomb will be started on port 50500
MT_PORT="50500"
## MediaTomb will run as nobody
MT_USER="nobody"
MT_GROUP="nobody"
## Location of the PID file
MT_PIDFILE="/var/run/mediatomb.pid"
## Location of the log file
MT_LOGFILE="/var/log/mediatomb"
## Location of the config file/database
MT_HOME="/etc"
MT_CFGDIR="mediatomb"
$ cat config.xml
<storage>
<sqlite3 enabled="yes">
↓
<sqlite3 enabled="no"> ←sqliteを無効化
<database-file>mediatomb.db</database-file>
</sqlite3>
<mysql enabled="no">
↓
<mysql enabled="yes"> ← mysqlを有効化
<host>localhost</host>
<username>mediatomb</username>
<database>mediatomb</database>
</mysql>
</storage>
<protocolInfo extend="no"/><!-- For PS3
support change to "yes" -->
↓
<protocolInfo extend="yes"/><!-- For PS3 support
change to "yes" --> ←PS3有効化
<import hidden-files="no">
<filesystem-charset>UTF-8</filesystem-charset> ←追加
<metadata-charset>CP932</metadata-charset> ←追加
<extension-mimetype ignore-unknown="no">
−−追加(ここから)−−
<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"/>
<map from="ts"
to="video/mpeg"/>
−−追加(ここまで)−−
<map from="mp3"
to="audio/mpeg"/>
<map from="ogg"
to="application/ogg"/>
<map from="asf"
to="video/x-ms-asf"/>
<map from="asx"
to="video/x-ms-asf"/>
<map from="wma"
to="audio/x-ms-wma"/>
<map from="wax"
to="audio/x-ms-wax"/>
<map from="wmv"
to="video/x-ms-wmv"/>
<map from="wvx"
to="video/x-ms-wvx"/>
<map from="wm"
to="video/x-ms-wm"/>
<map from="wmx"
to="video/x-ms-wmx"/>
<map from="m3u"
to="audio/x-mpegurl"/>
<map from="pls"
to="audio/x-scpls"/>
<map from="flv"
to="video/x-flv"/>
<!-- Uncomment the line
below for PS3 divx support -->
<!-- <map from="avi"
to="video/divx"/> -->
↓
<map from="avi"
to="video/divx"/> ←PS3によるdivx対応を有効化
<!-- Uncomment the line
below for D-Link DSM / ZyXEL DMA-1000 -->
<!-- <map from="avi"
to="video/avi"/> -->
</extension-mimetype>
mediatombデータベース初期設定
データベースとlocalhostからのみ接続できる"mediatomb"というパスワードなしの名前のユーザを作成します。
$ mysql -u root -p
Enter password: Welcome to the MySQL monitor.
Commands end with ; or ¥g
.Your MySQL connection id is 36 to server version:
5.0.22Type 'help;' or '¥h' for help. Type '¥c' to clear the buffer.
mysql> CREATE DATABASE mediatomb;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL ON mediatomb.* TO 'mediatomb'@'localhost';
Query OK, 0 rows affected (0.05 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit;
Bye
ここまで設定した後に再度サーバーを起動
# /ewtc/init.d/mediatomb restart
Applying multicast settings to eth0... Starting mediatomb: [
OK ]
設定用のHPにアクセスします。
http://サーバーのIPアドレス:50500/
この画面からFilesystemをクリックして再生したいファイルのあるディレクトリに左側の
ツリーで移動して再生リストに追加したいファイルの横の + をクリックする。
その後、Databaseをクリックして左側のツリーで先ほど選択した再生したいファイルがあるディレクトリーに移動して
選んだファイル名の横のNOTE+PENのアイコンをクリックすると再生リストにファイル名が追加されているはずです。

この画
面へ移動してScanMode Timed ScanLevel Full ScanInterval
適宜に設定する。こうすると/var/videoのディレクトリーを自動でスキャンしてくれてプレイリストが更新されるようになります。
■エラーが出て起動しないときは...
大抵の場合は何かインストールすべきものが足りない場合がほとんどです。
私の環境ではリビルド、インストール作業、動作には下のパッケージをインストールする事
が必要でした。
js-devel-1.60-1.el5.rf
js-1.60-1.el5.rf
taglib-devel-1.5-1.el5.rf
taglib-1.5-1.el5.rf
mysql-devel-5.0.45-7.el5
libexif-devel-0.6.13-4.0.2.el5_1.1
▲このページの
トッ
プへ戻る