This Christmas I had planned a very special project for myself. I was going to replace my Philips HD-recorder with something more elaborate and useful. A long time ago I read about Tivo in a computer-magazine. And it instantly hit me that this was the ultimate TV-recording device. At least as long there is no useful high quality video ondemand functionality available. And I was not alone and the last couple of years several open source projects have sprung up which offer a digital videorecorder running on Linux. And I was going to build one of them using: MythTV!!
The main requirements for building my own digital videorecorder was the lack of show management with my Philips videorecorder. The user interface of this recorder is so sparse that it is no more than a digital incarnations of my previous Sony VHS recorder. With the only benefit that it could store way more shows and you can instantly select the show you want to see. But programming is painfully slow. And to be honest is quite dumb. In contrast MythTV is refreshingly smart. Smart because it can:
- find and record shows based on their title and not a specific air time. So if the broadcaster decides to air the show a few minutes later or earlier MythTV will record it anyway.
- find and record shows based on their category (eg. movies), description or cast.
- give you complete control on when the show is recorded. It can record a show whenever it airs on a specific channel or across all channels.
- give you complete control on saving shows. You can determine how many shows are stored and automatically delete older shows.
- supports any number of TV tuners you can build into your system. If you want to record 3 shows at the same time, you can if you insert 3 TV tuners in your system.
- mix multiple types of TV capture cards. You can mix regular analog cable with digital formats like DVB-C, DVB-T or DVB-s — in order digital cable-TV, over-the-air or satellite.
- Program you videorecorder using your TV or via a webbrowser on the other side of the world if you want to. It even sports a nifty WAP interface for your mobile.
- Plug in different recording backends with different playback frontends. You can place a box in the US and watch your recordings on your laptop in The Netherlands.
And the list goes on and on. Just imagine that you can automatically convert your shows for your ipod with the commercial breaks automatically deleted and upload them to your ipod through Itunes.
This is the reason I chose MythTV. Because it can do just that and more. It makes my Philips digital videorecorder look pale in comparison and I have not found a commercial offering with this kind of feature set anywhere — with exception of the Tivo which is unavailable — and unusable I might add — outside the US.
It starts with the decision and purchasing of the necessary hardware. This is the list of components I selected to build my digital videorecorder:
- CPU: Intel Core 2 Duo E4600
- Memory: 1GB
- Harddrives: 2 * 80GB Western Digital (combined RAID-1 for the OS), 500GB Western Digital (for recordings)
- Motherboard: Intel Desktop Board D945GCNL
- Case: Coolermaster Centurion 5 (my current favorite case) with Coolermaster ExtermePower 380W PSU
- Capture cards: Hauppauge PVR-150 and Hauppauge PVR-500 (dual tuner capture card)
The decision for this list of hardware was a trade off between price & quality. I like the quality of the components from these manufacturers but it is not top of the line to keep the cost down. And it is simply not necessary to have more horsepower.
For some time now I make a habit out of running the Operating Systems under software RAID-1 for 100% reliability. And since harddisks come cheap nowadays and have more than ample room to hold the Operating System it is for me a no-brainer.
In general I run CentOS as my Operating System of choice. It is a 100% binary-compatible clone of Red Hat Enterprise Linux build from the source RPMs made available by Red Hat. But for this project CentOS would not be a good choice. MythTV needs bleeding edge packages like FFMPEG which are not available under CentOS. Though I could opt for adding external repositories to CentOS to take in these packages my experience is that hurts the stability and maintainability of the system since you are upgrading or moving away from set of core components of CentOS. In these circumstances I rather choose a Linux distribution which comes with the right set of packages including MythTV itself.
There are several dedicated MythTV distributions implemented as deratives of existing distributions like Mythdora (based on Fedora), KnoppMyth (based on Knoppix) or Mythbuntu (based on Ubuntu). But I decided to go for Ubuntu and to be specific Ubuntu Server 7.10.
It installed without problems on the aforementioned hardware and the installation was a breeze. It comes with the latest stable versions of MythTV and all kernel drivers for the Hauppauge capture cards. The only item I manually upgraded was the firmware for the Hauppauge cards. For some reason Ubuntu ships with old versions of the firmware though the firmware is already more than 1 year old.
The configuration of MythTV was quite straightforward. It takes some time and especially reading on setting the right options. The cards were immediately recognized but setting up the channels and TV guide was more work. At first the whole configuration process looks very overwhelming and most options are not very self explanatory. Moreover the documentation is not very good. Although all information is there it lacks describing the overall picture on what you are doing and why are doing it. But all in all it did take not much time to get to the stage I could record my first show.
Next to upgrading the firmware for the Hauppauge cards I also installed a new TV guide grabber for Dutch TV channels. The default delivered grabber for Dutch TV from XMLTV is rubbish. A few people on the internet developed a replacement called tv_grabber_nl_py which uses tvgids.nl to collect the TV guide information. It took me some effort to properly configure this grabber and have it run automatically overnight. This could have been better. Though I still think that all TV stations should make their programming available through RSS feeds. It is plain stupid that they see this as a money maker. It is like asking an entrance fee for a store. But hell these are the same people who want to avoid people skipping ads. I think in a decade TV stations will be as irrelevant as the music labels are becoming now if they do not realise that they have to keep up with modern technological capabilities available to the average consumer.
Frontend Xbox & laptop
To view the recordings I use two frontends. One frontend is running on my Xbox under XBMC and the other runs on my laptop.
Xbmcmythtv frontend is a Python-based plugin for the Xbox media centre. My Xbox (1st generation) is modified to be able to run unsigned applications and was in the same procedure outfitted with a larger 120GB harddrive. I use this xbox only for watching videos, playing my mp3s or showing my photos. Although the box is a bit too noisy to be the ultimate mediacentre device from a technical perspective it comes close. It has excellent TV out quality, digital optical audio output and a remote control. I modified the extension menu to have the Xbmcmythtv script as the first choice and default choice for easy selection. From Xbmcmythtv I can access all the recordings, view them and delete them after viewing. Although it can do more I only use it to view recordings. You could also program using the TV guide, see the upcoming recording schedule or watch Live TV.
My laptop — a Lenovo Thinkpad z60m — runs CentOS 5. And as stated earlier I did not see this distribution as the ideal candidate for the MythTV recorder it can run the frontend of MythTV with a limited amount of changes to the base distribution. I added ATRPMS repository which holds a complete MythTV installation including all upgrades and addons necessary to run MythTV. I limited myself to the installation of the MythTV frontend and modified the repository configuration file to only include those packages necessary to be able to install and run the MyhTV frontend. In total I needed 17 files added to my CentOS 5 installation. And now I can watch Live TV from my laptop or any recording made by the MythTV recorder anywhere in the house. Which is very refreshing.
Experiences so far
Overall this is the best videorecorder I ever had. I even watch more TV than before because I can finally set my own schedule and pace for watching TV.
Though all is not well in heaven First of all documentation on MythTV is lacking. Basic documentation can be found at the Myth project site and specific information on niche topics. But there is a definite gap between those two types of documentation.
There is a lot of documentation missing issues regarding XML-TV and the integration of TV Guide data. In case everything works out of the box or you need what is delivered by the standard distribution than it will work. But beyond that you will run issues.
The whole transcoding implementation is very basic and purely tailored for a specific niche which I have yet to discover. The transcoding to mpeg4 is lacking most quality options to ensure proper transcoding. I find the current implementation not useful. Any use case scenarios on how to create your own scripts to proper transcoding including integration into MythTV — so you can watch the transcoded files from your frontends — is unsatisfactory.
In general MythTV tries to hide the complexities from the user. To enable that goal it lacks the advanced options to extend the solution with your own functionalities. And don’t get me wrong it is definitely useful for everyday use for a lot of people. But it could better harvest the knowledge and creativity of the community by opening up or making available more parts of the solution more easily to accommodate such extensions.
But in all honesty it is still version 0.20 something at this moment which conveys the message that the developers are not done yet. Maybe in time all those issues will get addressed. I am happy to see that such quality projects are coming to maturity and make the whole Linux / Open Source / call-it-whatyou-want experience enjoyable.
Some companies may learn a few things or more from this project. Hey Sony are you reading this! Your product offerings suck big time in comparison to this. And it is not only Sony. And boy I cannot wait on Apple to kick some serious butt in this arena. The opportunity is definitely there! And meanwhile I while enjoy my MythTV setup.
- MythTV – http://www.mythtv.org
- tv_grab_nl_py – http://code.google.com/p/tvgrabnlpy/
- ATrpms – http://atrpms.net
- xbmcmythtv – http://sourceforge.net/projects/xbmcmythtv/