Monthly Archives: May 2005

HDTV Working with MythTV!

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 /include/linux, rebuild mythtv, restore /usr/include/linux, and install new mythtv and libmyth debs.

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!

The State Park We Didn’t Visit

Near the beautiful Kanpolis State Park, which we did visit, is Mushroom Rock State Park, which we did not visit.

According to my maps, Mushroom Rock State Park consists of the following things:

  1. A rock
  2. A toilet

It’s the smallest state park in Kansas, spanning all of 5 acres. On the official KDWP photo gallery for this state park, we see the following amazing features (titles are quoted word-for-word from the gallery):

  1. Two scans of maps
  2. “One of the Mushroom Rocks”
  3. “Another Mushroom Rock”
  4. “The Mushroom Rock State Park Sign”

And let me tell you, those two maps for the 5-acre area and the photo of the sign really have me excited about this park.

Though it’s sad they didn’t photograph the toilet.

New Debian From Scratch Image

I’ve just released DFS 0.6.19 at the DFS page. For people that aren’t familiar with DFS, it’s several things:

  • A full “manual” installer for Debian similar to Gentoo’s — you manually run fdisk, mkfs, etc. and then use cdebootstrap to install the base system. The DFS CD contains the information to install either testing or unstable directly.
  • A full text-only rescue environment on the live CD, including tools such as emacs, gcc, kernel source (you can compile a new kernel using only this CD and some disk space somewhere), development environments for multiple languages, filesystem and partitioning tools for just about every filesystem out there, etc.
  • A system for easily building custom live CD environments from Debian packages. Great for building customized rescue CDs or demo CDs.

DFS 0.6.19 has fixes mainly for i386 and amd64. The i386 image contains both i386 and amd64 kernels (the CD boots to Grub and you can choose which one you want at that time). It has newer kernels than the previous release to support some newer hardware, as well as an updated userland.

The dfsbuild package, in sid, is used to generate these images.

Daylight Saving Time

So it looks like Indiana has finally decided to adopt Daylight Saving Time (DST) like most of the rest of the country, and hopefully reform its muddled mess of timezones at the same time. (Some counties in Indiana change their clocks in violation of state law). I’m sure Marty is pleased.

I think it is a little odd that the legislators that voted to go with the rest of the country are written about as genuine “heroes” in some newspapers. But I do think it’s good that Indiana is doing what everyone else is.

Now I hear talk of extending DST for a total of two more months. That is, more of the year will be spent on DST instead of Standard Time. That’s silly. Why don’t we all just move our schedules for everything one hour earlier and be done with the time changing, forever?

That would please my great-grandfather. He always kept at least one clock in his house on standard time, because “this is God’s time.” I haven’t ever quite figured out why Central Standard Time was the divinely favored time zone.