Some time back, I bought a pcHDTV HD-3000 card to use with MythTV. For various reasons, I never got around to getting it set up. Until now.
First, a quick background. HDTV is a means to transmit television signals digitally. In the USA, a standard called ATSC is used for over-the-air transmissions. ATSC transmissions can come in several different resolutions, ranging from no better than a basic analog signal to 1080i (1920×1080, interlaced).
To get HDTV to work with MythTV, there are several components that must be working first: HDTV playback in the frontend, HDTV kernel driver support, and HDTV tuner setup in the MythTV backend. I’ll talk about each of these in turn.
Click here to read more…
HDTV Playback
I was initially surprised at how much of an issue this is, when when you pause to think about it, it makes sense. HDTV pictures can be at up to 1920×1080 (1080i) or 1280×720 (720p) or 960×540 (540p). DVD pictures are typically 720×480. That means that a HDTV frame can have up to 6 times the number of pixels as a DVD frame. Bitrates for HDTV broadcasts are far higher than for DVD broadcasts as well.
This all combines to make a situation that can be extremely challenging even for systems with powerful CPUs and video cards.
In my own case, the frontend I was trying to configure is an Athlon64 system with a Radeon 9600 video card. Yet it still couldn’t keep up with even a 720p HDTV signal. I tried both the standard XFree86 radeon drivers, as well as the ATI proprietary fglrx ones, and none worked.
However, X.org CVS (NOT the latest release, I tried it!) has an extension to the radeon driver that permits DMA transfers for Xv. I grabbed this release, and with Steve’s intstructions and the wiki instructions, got it installed. (Note: I would advise against the lndir approach, and also make sure you put the #defines at the *TOP* of the file.) My custom lines were:
#define ProjectRoot /usr/local/X11R6.8
#define NothingOutsideProjectRoot YES
#define HasFreetype2 YES
#define HasFontconfig YES
#define DefaultGcc2i386Opt -O2 -march=athlon-xp -mmmx -mfpmath=sse -msse -msse2 -m3dnow
Restart kdm and test out a few things and… SUCCESS! HDTV playback works.
Now, on to:
HDTV Kernel Driver Support
For a pcHDTV card, there are two different kernel drivers you can use. One set uses the Video4Linux system for everything. The other uses the Linux Digital Video Broadcasting (DVB) infrastructure. This latter one is generally considered to be better and the way of the future, but it’s not very well documented.
The support for the pcHDTV card is in the mainline kernel as of 2.6.12-rc2. I downloaded and built 2.6.12-rc4.
There are a few surprises. First, in the video4linux config area (NOT the DVB area!), you must enable CONFIG_VIDEO_CX88 and CONFIG_VIDEO_CX88_DVB. I also enabled CONFIG_VIDEO_BT848 because some online resources said to, but I believe that is for the HD-2000, not the HD-3000.
Then, in the DVB area, you must enable CONFIG_DVB and CONFIG_DVB_CORE. HD-2000 owners, I think you want CONFIG_DVB_BT8XX. For the HD-3000, I set CONFIG_DVB_OR51132. HD-2000 owners will want CONFIG_DVB_OR51211. If you’re not using IVTV, you’ll also want to enable CONFIG_VIDEO_{TUNER,TVEEPROM}.
Also, you’ll want to follow the firmware download instructions. On a Debian system, you’ll want to put this into /usr/lib/hotplug/firmware.
Boot into your kernel. Now, you’re ready for:
HDTV Tuner Setup in MythTV Backend
This step configures MythTV to record from the HDTV tuner. I am using MythTV 0.18.
But before you begin, you’ll need to recompile MythTV. I’m using Matt’s debs, so it’s a simple matter of rebuilding from source.
The problem is that the files in /usr/include/linux on a default Debian install don’t include the latest DVB api. Workaround: move /usr/include/linux out of the way, symlink it to
Next, go to labs.zap2it.com and make sure you have the digital channels selected and analog ones deselected.
Now, you are ready to run mythtv-setup. Make sure you kill the backend before you do this. You’ll want to add a new input source, DVB type, card 0. In input connections, connect your zap2it broadcast setup to this card. Then do a channel scan in the channel setup. Exit, run mythtv-filldatabase, then go back in. You’ll see duplicates for each channel. Note the XML id in the newly-created ones, copy it to the ones you created with the auto scan, then delete the new ones with mythweb. Finally, run mythtv-filldatabase again. The DVB setup HOWTO helped me with this.
Now you’re ready to enjoy HDTV!