Wednesday, August 13, 2008

Serving Neuros OSD Media Files With IIS

I recently got a Neuros OSD working on my home network. It's hooked up to my DVR box. I DVR programs (mostly for my kid), then use the DVR's "Copy to VCR" feature to dump them to the Neuros and out to my NAS server. The primary purpose is to archive shows somewhere other than the DVR. Of course, the handy benefit of being able to watch them on a laptop or make DVDs from them helps too.

The first problem I encountered was that using the Neuros' default settings for the "TV format" recording left it in a mostly unusable state on my PC. The video is encoded in MP4 while the audio is AAC. It is likely that I just don't have all the right CODECs on my windows machines to run it. Despite that, I soon discovered that I could change the audio format of the recording. Switching it to MP3 did the trick.

I recently came across some segments of a science show that I wanted to share with some friends. So I recorded them to the NAS. The NAS share that contains all my media hangs off my server at home so I figured it was fairly trivial to just point my friends at the MP4 file. This didn't work. IIS reported a 404 error.

At first I figured it was a problem with some URL encoding, because the directory and file names had some punctuation and such that I thought might mess it up. But after cleaning the names to letters only, it still failed. I then remembered something a co-worker told me about IIS. Apparently IIS is set up with a list of MIME types and this list determines what it will serve. MP4 isn't one of them. I had always assumed that IIS would just serve any file. Of course, in some cases the file types are mapped to ASAPI filters or application extensions for more advanced handling, such as for PHP or ASP.NET. But it was a surprise to find that certain types simply wouldn't be served.

So... I added the MIME type "video/mp4" with the .mp4 extension and I can now at least download the file from the site. However, it seems that I can't watch it until it's fully downloaded. Not a major problem, but it would be nice to be able to start watching right away. Downloading a 10 minute video took about 3.5 minutes, so I should be able to watch it in a streaming fashion. I imagine this is just an issue with the MP4 format.

No comments: