NetBSD TV: The Media Server

As I mentioned recently I bought a Playstation 3 (PS3) to use as a streaming video client in conjunction with the MediaTomb UPnP media server. Here is my recipe for installing and configuring the server package under NetBSD. The instructions apply to version 0.11.0nb2 or newer of the package, older versions provide neither a startup script nor a dedicated user account.

  1. Use make install or pkg_add(1) to install the package.
  2. Start the MediaTomb server manually as user root with the following command:
    /usr/pkg/share/examples/rc.d/mediatomb start
    Wait about 5 seconds and stop the server with this command afterwards:
    /usr/pkg/share/examples/rc.d/mediatomb stop
    The server should have created a configuration file located under /var/mediatomb/config.xml. Please use your favourite editor to make the changes suggested below.
  3. Change <accounts enabled=”no” …> to <accounts enabled=”yes” …> and add a password to the account definition one line below. This will protect the web user interface by password and stop unauthorized users from browsing your file systems.
  4. You can define a name for your media server by changing the <name>MediaTomb</name> line.
  5. If you want to use a firewall to restrict access to MediaTomb you need to put a fixed port number above 49152 into the <ports>0</ports> line. MediaTomb will otherwise choose a port number dynamically.
  6. Change the <protocolInfo extend=”no”/> to <protocolInfo extend=”yes”/> to enable support for protocol extensions required by the Playstation 3.
  7. Further down in the mappings section you will find an entry to enable DivX support for the PS3. Uncommenting that line isn’t really necessary to watch DivX files. But it will enable shiny DivX icons for all .avi files in the PS3’s video menu.
  8. Start the server again and and look at the logfile /var/log/mediatomb.log. You should find two lines likes these at the end of the logfile:
    2008-11-11 01:02:03 INFO: MediaTomb Web UI can be reached by following this link:
    2008-11-11 01:02:03 INFO:

    Please visit this URL with a web browser and login into the web user interface using the account mediatomb and the password you defined previously.
  9. Use the Filesystem option of the web user interface to select directories with media content (audio or video) that should be exported to the PS3.
  10. Finally enable autostart of the server by copying /usr/pkg/share/examples/rc.d/mediatomb to /etc/rc.d and adding mediatomb=YES to /etc/rc.conf.

You should now be able to enjoy your audio and video files on your Playstation 3.

This entry was posted in NetBSD. Bookmark the permalink.