DIY Video On Demand - Part 1
![](http://photos1.blogger.com/blogger/4106/1631/320/VOD.2.jpg)
I have recently set up a Video On Demand (VOD) system in my house.
The core is a terabyte-capacity fileserver based on Fedora Core 4. It has five 320GB USB2 drives configured as a RAID5 volume. An LVM2 volume is built on top of that, allowing future expansion of the volume. The filesystem is Ext3 with an external ordered-data journal and ACLs enabled. Files are served using Samba and the Eyehome software (which is just Tomcat, really; it turns out the Eyehome is mostly a web browser). USB raid array?!? Yeah. It works! I get about 15-20 MB/sec to the array over the network, and up to 24 MB/sec off the array, also over the network. All the Fast Ethernet network can handle is around 9-10MB/sec before it saturates. That's still more than plenty to play any video file on the array. Even straight DVD video fits down that pipe.
The fileserver and my Powerbook (which transcodes all of the video) are connected via Gigabit ethernet. I want the better transfer rates when transcoding and copying multi-gigabyte files.
Until recently I had a ReplayTV in the mix, recording shows from DirecTV and/or cable. The MPEGs were transferred to the storage array using mReplay and DVArchive.
The Eyehome uses 10/100 ethernet, S-Video and Component video outputand RCA and optical audio outputs. I have it connected to my Samsung DLP HDTV via component video, operating at 480p. The Eyehome supports higher resolution output, but its native resolution is 480p. Rather than have it scale video down to 480p and then back up to 720p, I just stick with 480p and let the HDTV monitor do the scaling. If your video file has AC3 audio, it can be played back using only the optical output, as the Eyehome does not have any AC3 decoder capability, and just passes it through. Since none of my equipment has optical in, I transcode the audio to MP3 or AAC for this reason. Silent movies were great in ther day and all... but I want noise. The Eyehome decodes DivX, MPEG4, MPEG2, MP3, AAC and MP2.
For the archiving and transcoding, I use four programs.
![mtr](http://www.maconlysource.com/wp-content/MacTheRipper.png)
![YadeX](http://merle.chris.free.fr/Logo/YadeX.jpg)
![HB](http://download.m0k.org/handbrake/images/HandBrakeIcon48.gif)
![vx](http://www.kaisakura.com/fortytwovx/icon32.png)
These tools produce AVI files (DVD42) or MP4 files (Handbrake). I think that the MP4 files are the best, in terms of video quality and file size. However, Handbrake has a problem with audio sync on some DVDs (such as Stargate discs). I use Handbrake or DVD42 as appropriate. Handbrake will de-interlace the video and does H.264 encoding, so I prefer to use it, barring any sync problems.
The end result is that we can sit on the couch and select movies and TV shows to watch using a regular remote control.
There needs to be a better toolchain for doing this work, and Sal and Keith and I have started working on one. It, too, will be mencoder-based. But we'll use recent source, build it ourselves, and add the features that we want to use.
Stay tuned!
In Part 2, I will detail the specifics of the setup. Drive enclosures, kernel parameters, samba config, the eyehome software, etc.
<< Home