Category Archives: Computing

Hardware, software, computer science and the rest

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.

NetBSD TV: The Streaming Video Client

For quite some time I’ve been looking for a streaming video client that would allow me to watch the video files that are stored on my NetBSD server on the TV in the sitting room. I thought that my requirements for such a client were pretty basic:

  1. Decent analog video (preferably via a SCART connector) and digitial audio output.
  2. An HDMI connector for future use.
  3. Support for popular video file formats like DivX and MP4.
  4. Doesn’t require a proprietary server software.
  5. A good WAF.

But I was wrong. I couldn’t find any streaming video client that met these demands in over a year. When I recently learned that Sony’s Playstation 3 (PS3) supports DivX in newer versions of its firmware my interest was sparked. After a bit of research I found a number of facts in favour of the PS3:

  1. The PS3 supports UPnP AV and works fine with MediaTomb, an open source UPnP MediaServer.
  2. The PS3 has all the video and audio connectors that I wanted.
  3. As the PS3 can also play DVDs it could replace my DVD player. That would not only avoid an increase in the number of devices in the sitting room but also prevent a shortage of SCART ports on the TV.
  4. The case of the PS3 is well designed and shiny.
  5. In addition to all that the PS3 is also a powerful game console and a Blu-ray Disc player. And I was keen to play Assassin’s Creed anyway.

Based on the above evaluation I came up with a profound business case which was approved by the secretary of domestic affairs straight away (the WAF was even better than anticipated). I bought a Playstation 3 online the next day.

The Exorcism of my Mac

After I updated my Power Mac G5 to Mac OS X Leopard the system seemed to work fine at first. But over time I experienced an increasing number of kernel panics. They all looked like the kernel panic described in this thread on one of Apple’s mailing lists. Reading this e-mail exchange two causes of the problem seemed to be likely:

  1. A hardware problem
  2. A broken device driver

As running the Apple Hardware Test didn’t reveal any problem I decided to re-install Leopard from scratch to get rid of broken drivers. The virtual networking driver bundled with Microsoft’s Virtual PC was number one on my list of suspects.

Installing Leopard worked like a charm. Time Machine allowed me to restore all the applications and data that I wanted to keep from my external backup hard disk. And I didn’t experience a single kernel panic ever since.

Yesterday when it was time for the weekly backups of all our machines … well of most of them 🙂 … I wondered whether I managed to fix another problem of my Power Mac G5: the broken front FireWire port. Time Machine had never worked properly if the hard disk was connected to the front port. Accessing the hard disk resulted in a lot of input/output errors and the backup finally failed. I even brought my Mac to the local Apple shop for a repair which didn’t fix the problem unfortunately. Could the mysterious broken driver have interfered with the FireWire driver as well?

I connected the hard disk to the front FireWire port and started a job that tried to read all the files on the volume. The job completed after two hours without a single input/output error. Encouraged by this success I started a Time Machine backup run. To my delight it finished without problems too.

It seems that the time it took to re-install the machine was well invested and I managed to exorcise whatever was causing these problems.