MythTV is an exceptional linux based PVR. It has an interesting and very configurable split frontend/backend architecture.
One traditional use for this split architecture is to put all the mass storage and recording hardware in a box under the stairs and then have a lightweight (and silent) machine plugged into the TV. Encoding video in realtime requires either some pretty powerful CPUs or alternatively dedicated hardware.
Enter DVB-T and a USB dongle to capture DVB mpeg streams.
DVB-T is digital TV transmitted over the air and various tuner devices exist that are supported by MythTV. The most interesting fact about these tuners is that they can grab the MPEG2 stream that is transmitted for DVB-T, which can then be easily streamed to disk. With very low CPU usage.
The low CPU usage is an interesting point and leads on to the possibility of building a very low power MythTV backend using a Network-attached storage (NAS) box.
My NAS of choice for this project was a Kurobox HG WR, mainly because it was designed to be hackable from the outset and most importantly could run a 2.6.x Linux kernel. Using the excellent forums and wiki I have a U-Boot based Gentoo system up and running a very up to date kernel (2.6.28 at the time of writing).
The Kurobox only has USB ports for connectivity, so I settled upon a WinTV Nova-T (usb device ID 2040:7070).
This was very easy to get up and running, just a couple of kernel options and getting the firmware file into the correct location. The only awkward step was finding the firmware file – you will get a kernel message about the file it is expecting to find. Google for it and place it in /lib/firmware.
Once the kernel was built with the appropriate modules MythTV picked up the tuner and the rest of the installation was as for only other backend based system.
The CPU usage when recording a single channel peaks at around 30%, making the Kurobox more than capable as a MyhtTV backend system for SD. I imagine the system wouldn’t cope so well for HD, but it’s a while before any HD DVB transmissions are going to take place.
The Kurobox has a lot of drift on it’s internal clock, which plays havoc with recording schedules.
One solution would be to use NTP, but that requires internet access, something which this box may not have for a days at a time. The clock drift is something in the region of minutes a day, which is already enough to mess up recordings.
Luckily it is possible to set the clock from the DVB-T data stream, using a utility called dvbdate.
dvbdate - query the current time from the DVB adapter dvbdate -s - set the system time from the current time retrieved from the DVB adapter