MythTV assumes that the display device has 100 dots per inch of resolution, even though TVs do not. The Sony KDS-50A3000 is a 50″ set with a resolution of 1920×1080, or about 44 dots per inch. (Interestingly, this isn’t all that different from the 40-45 dots per inch of the small standard definition TV I had been using with MythTV.)

The nVidia graphics display drivers calculate dots per inch based on the EDID information. In the case of the KDS-50A3000, it calculated a value of 30 dpi. The resulting font was so tiny I could barely read it with my nose pressed up against the screen. The MythTV wiki describes using the DisplaySize directive to get to the magic 100 dpi. Once I put in the appropriate directive and restarted X, the fonts in the Myth front end were nicely readable.

I’ve been working with digital TV for almost four years now. I first started using it to feed my TiVo a digital signal to kill analog ghosts by downconverting a high-def signal to standard definition for my TiVo. A few months later, I built my built my first MythTV system to record the full high-definition signal. Even though I have been recording high-definition TV broadcasts for three years, I have only begun displaying the recordings in high-definition this week.

One of my holiday presents to myself was a Sony KDS-50A3000 HDTV. I love it. It’s vibrant, has wide viewing angles, and a ton of inputs. I anticipated being able to push a DVI signal to one of the three available HDMI inputs. After ordering an DVI-to-HDMI cable from Blue Jeans Cable, it was time to get everything going.

Displaying HDTV is remarkably easy with recent nVidia drivers under Linux. In the recent (8xxx) builds, there are predefined modes for HD: “1920x1080_60i” is 1080i, “1920x1080_60″ is 1080p, and so on. They go in the Display section of xorg.conf.

All is well and good. After running the cable from the DVI port to the HDMI input and restarting the X server, the TV reports that I’m giving it a 720p signal. I have HD, but not at the TV’s native resolution. A check of the log shows me why:

Something is wrong with the 1080p and 1080i modes. The MythTV system is still using the GeForce FX5200 card, which is perfectly competent to drive any SDTV display, but many posts indicate it has problems pushing 1080i out the DVI port.

So, it’s time to get down and dirty. Running Xorg -logverbose 10 -probeonly will cause the server to dump everything. It’s interesting reading.

First of all, I note that the card is detected correctly, and, though it’s a bit confusing, the FX5200 has a maximum pixel clock of 135 MHz. (As an aside, a 135 MHz is sufficient to do 1280×1024@75 Hz.)

A bit further down, the server probes the TV using the Extended Display Information Data (EDID) protocol. In the section it reports, I learn that it wasn’t made long before I bought it, and that it really, really wants to be fed a signal with a 60 Hz refresh rate.

By adding 120 Hz as a refresh rate and overriding the information from the display, I could push a 1080i signal to the TV. However, what I found is that a 720p signal on MythTV looked awful when converted by MythTV to 1080i. There is some loss of picture quality when displaying a 1080i signal as 720p, but it is much less noticeable. Therefore, I will stick with 720p until I can figure out how to switch video modes on the fly between 1080i and 720p.

One of the reasons why I’ve delayed buying a big-screen TV is trying to figure out how to store it. I’ve yet to find a way to store a big-screen TV that meets my requirements:

Material and construction. No metal-and-glass here in earthquake country! The furniture should be made of wood. I’d strongly prefer that it not be a particle-board veneer, but that’s because most veneers are cheap. A high-quality real wood veneer, as opposed to a “wood-esque” plastic coating might work. Wall-mount brackets are a strong plus near to the Pacific Subduction Zone, too.

Color. If we’re talking wood, I like dark colors. A deep red cherry stain is ideal, but that seems impossible unless I build the thing myself and pick out the stain color.

Doors. It’d be nice to be able to close the doors on the TV and hide it from the world. Even with the existing small (20 inch!) set, it feels like the room is built around it. That feeling is only going to be worse with a large set.

TV Size. I keep dancing around which TV to get, but I’m leaning towards the Sony SXRD line. I don’t need the ninja-rific space-savings of LCD or plasma, so I’d rather get an RPTV at half the price. In the Sony SXRD lineup, there are variety of TVs available in the 50″ to 60″ range. As much as I’d like to get an XBR-series TV, the only one in the current model lineup is a 70″ TV, set to come out next spring. I’m going to draw the line at a TV that has a diagonal that is almost my size. (I am 74 inches tall.) There’s a minor constraint here, in that the TV shelf needs to support about 80 pounds and have a shelf depth of about 16 inches, but most furniture easily accomodates that.

Home Theater and Audio/Visual component size. This seems to be the biggest problem I have. Two of my components require a very deep shelf of about twenty inches, and they’re both vital components. One is the Yamaha A/V receiver, and the other is a home theater PC running MythTV. If they were unimportant components, I’d let it go and consider using a small rack of components to the side of the TV. However, the receiver is the hub of the system, and it’s pretty rare to use the TV without pulling the signal from the MythTV machine (whether live TV, time-shifted HDTV recordings, or DVDs). Both of the problematic components need to be accomodated in my storage unit.

Reasonable ventilation. Stereo components hate heat. Computers hate it even worse. If the MythTV computer is getting stored in an enclosure, it’s going to have to stay ventilated to avoid disk failure. (Thankfully, I can use lm_sensors to monitor temperatures.)

Cost. Oh, and in addition to being demanding on what I want, I don’t want to pay a lot, either. Preferably, it doesn’t cost more than the TV that it’s holding. Between the changes in TV, and the changes in video technology, I can’t feel comfortable buying a really expensive piece of furniture that will hold today’s technology. Any TV furniture that’s more than a few years old is great for 4:3 aspect ratio TVs, but I find that nearly everything I watch these days is letterboxed to 16:9. I wouldn’t want to bet on technology staying the same, so I’d like to feel comfortable replacing it.

As a result of the Zap2It Labs shutdown, I recently had to upgrade my MythTV installation from 0.20.1 to 0.20.2.

Graciously, Zap2It Labs was scheduled to shut down on September 1, but they extended guide data past that date. For a few days after the shutdown, it was possible to fetch the full 14 days of upcoming data. Once the data service was deactivated, no more data was put into the database and the amount of remaining data dwindled. As I stared at the MythTV status screen, it was obvious that my schedule data would run out during an upcoming trip:

(Furthermore, the new TV season starts in late September, so I’d also miss all the season openers on the week of the September 24!)

I’d been delaying the upgrade because Gentoo’s Portage system wanted to upgrade from MySQL version 4 to MySQL version 5. The database upgrade seemed like it had high potential to go wrong, and would not add obvious functionality to MythTV. I’d already experienced one crash that took out the database, and it was painful enough to recover from that.

However, my hand was forced by the Zap2It shutdown. I was out of the country attending an IEEE ad hoc meeting, and I didn’t want to do the upgrade remotely. Fortunately, Zap2It extended listing data beyond their September 1 shutdown date, so I had a few days grace period after returning home.

MySQL upgrade. Thankfully, I heeded the advice to back up the database before starting. The upgrade process doesn’t convert over the data, and it turned out to be much simpler just to delete the existing database, install MySQL 5 from scratch, and have MythTV set up the new database.

When I attempted to restore the database, I received the following error message:ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes

That’s in part because the default character set needs to be configured on the database. What happened is that the table definition for the “people” table uses the name as a primary key, and it doesn’t allocate enough space for the table unless you restrict the character set that field is stored in.mysql> ALTER DATABASE mythconverg DEFAULT CHARACTER SET latin1;

However, when I attempted to restore the database from my backup snapshot, I received another error message:ERROR 1062 (23000) at line 24800: Duplicate entry ‘Monika Sanchez’ for key 2

The error was caused by having two entries with the same text value:mythtv@myth ~ $ cat mythtv_backup.sql | grep “Monika Sanchez”
INSERT INTO people (person, name) VALUES (2590,’Monika Sanchez’);
INSERT INTO people (person, name) VALUES (622,’MÃƒÂ³nika SÃƒÂ¡nchez’);

At first, I tried removing the name “Monika Sanchez” from the database, but as it turns out, there are lots of duplicate spelling. The easiest thing to do is to not restore the people table.mythtv@myth ~ $ cat mythtv_backup.sql | grep -v “INSERT INTO people” > mythtv_backup-nopeople.sql

According to the Gentoo wiki, that error message indicates that there is no support for MySQL in the QT library. So, I tried rebuilding QT, and and figured that I’d go all the way and upgrade MythTV, too.

At this point, I’m about six hours and fifteen minutes into the upgrade.

MythTV upgrade. This is one of the most uneventful builds I’ve ever watched. Interesting, the Gentoo system started by checking out the 0.20.2 source from the subversion repository, rather than downloading a compressed source code archive.

Myth plugins. Most of the plugins were uneventful, though the MythWeb plugin broke. To use it, I had to remove PHP4 and the older version of Apache that was installed, and then reinstall Apache and PHP5 from scratch. One small change was needed in php.ini to view pages. The “allow_url_fopen” parameter needs to be set to “on” instead of “off.”

MythTV reconfiguration. With MythTV running again, it seemed anticlimactic to switch over to Schedules Direct. Signing up for the service took a couple of minutes, and Bruce Markey’s Schedules Direct configuration procedure took another few. In about 8 minutes, it was over.

By running mythfilldatabase with the SQL debug command, I even noticed that the “people” table I’d been unable to restore was recreated without intervention.

Finally: THE END!

Finally, after about seven hours of work, only 15 minutes of which were related to signing up for and configuring SchedulesDirect, I once again had a two-week window of guide data:

Earlier this year, Zap2It Labs shut down and stopped giving free TV guide data to MythTV users. In response, the community set up SchedulesDirect, a non-profit organization to license the data for non-commercial uses.

Although I liked getting guide data for free (who doesn’t like free?), the initial SchedulesDirect plan seemed like a good price. SchedulesDirect asked $15 for three months of data. TiVo pricing is currently $16.95 for one month, or $299 for three years.

(Two notes on the TiVo plans: When I bought my current TiVo — now unplugged and retired — lifetime service for the device was $249. Today, their three-year plan advertises an “extra year for $20,” which is the yearly cost that SchedulesDirect hopes to get to if they can sign up enough subscribers.)

We have now passed our second milestone and are lowering the membership fee to $15 for 6 months, effective immediately. For existing members, you’ll notice that the expiration date of your account has been extended an additional three months.

I had given SchedulesDirect money on September 12. Frequently, when a company drops its price, you have to contact them to get the improved price plan. More importantly for the cynics out there who grumbled that SchedulesDirect was going to benefit its founders financially, they are showing a clear committment to act like the community service organization that they claim to be.

But, that’s not all. It wasn’t enough just to give existing subscribers the same deal that new subscribers are getting. There’s a bonus for existing paid subscribers:

To thank you all for getting us to this point, we’ve also added an extra day for each day you’ve had a paid membership. It’s our way of showing our appreciation for your confidence in our organization.

Darn! I was out of the country when SchedulesDirect launched, so I couldn’t upgrade MythTV until I returned home on September 8. After a couple of days worth of testing, I only converted to a paid membership on September 12. Had I been in the country, I would have signed up on the first day!

One of the biggest annoyances I’ve had with using nuvexport is that the latest version doesn’t work well with nohup. It used to be that I could run “nohup nuvexport” in one window and “tail -f nohup.out” in the other, and use the tail command to view the output of nuvexport and enter the right prompts. Then, when I was all done with the shell, I could just log out, and nohup would keep the export ticking along.

Well, the new nuvexport doesn’t work with nohup. Fortunately, Google led me to Rob Newcater’s BasicallyTech blog, where I learned about the magic of disown in bash. It’s much more convenient than using nohup because if I forget to start the job in the correct way, I can background it and disown it without restarting from square one.

After updating the time zone, I checked the recording schedule for the coming week, and noticed that everything was off by an hour. As an example, a repeat of House is airing on Monday at 8 pm. Immediately prior to the time zone update, everything was fine. When I checked on the recording schedule after the time zone update, everything had shifted one hour earlier. (House was “updated” to record at 7 pm, and when I clicked through to it in MythTV, it showed me what was actually airing at 7 pm.) To clear everything out, I had to reboot the system and run mythfilldatabase –refresh-all to reload all the data for the next two weeks. It appears that data was initially loaded into the database assuming the daylight time cutover of April 1 so that everything was off by an hour when the cutover data magically moved up to March 11. Fortunately, it was easy to fix by reloading all the data after the time zone rules were installed correctly.

About six months before I built the MythTV system, I started with a Hughes HTL-HD set-top box. Back then, I could tell that the tuner in the HTL-HD was significantly better than the pcHDTV card. When I was struggling to get the pcHDTV card to lock up on a signal, the HTL-HD would give significantly better picture quality. Now, the situation is reversed. In almost all cases, the Air2PC card tuner performs significantly better than the HTL-HD tuner. It’s common for the Myth to lock up on a channel and receive a perfect picture while the HTL-HD struggles.

MythTV has a function in LiveTV playback that is supposed to report signal strength and quality (hit F7), but the function doesn’t work with the Air2PC driver. As a result, I can’t really conclude in a quantitative way how much “better” the Air2PC card is. I haven’t tested the pcHDTV HD-5500, but I would assume it is comparable to the Air2PC card. I believe they both use the same late-model LG tuner, though it’s hard to tell from the data sheets.

As part of that process, I’m reminded how much I love package systems. When I first attempted to install it, Gentoo’s Portage system told me about all that I was missing. It told me that I needed to modify my transcode support:

!!! transcode needs mjpeg support
!!! If you need support, post the topmost build error, and the call stack if relevant.

Rebuilding transcode with USE=”mjpeg mpeg mp3 jpeg a52 xml” emerge transcode ook care of that problem, and I was on my way.

Next up, the old version of ffmpeg that I’d installed was no longer any good: * media-video/ffmpeg is missing necessary support. Please add
* ‘aac encode threads xvid’ to your USE flags, and re-emerge
* media-video/ffmpeg.

The new ffmpeg that emerge wanted to bring in was far newer, too. I’d had lots of problems with the existing version of mpeg, and had been using mencoder instead since installation. ffmpeg would run fine, but on anything greater than a half hour program, the mythtranscode process would grow until it had consumed 85% of the system memory and swapping would grind the system to a halt. That was too bad, since ffmpeg is much faster than mencoder. I’ve since upgraded MythTV, so I had hopes that I could use ffmpeg. To make emerge happy, I ran the command USE=”3dnow aac encode threads xvid flac” emerge ffmpeg.

With the previous version, there were a few points that I had to discover and work into my current practice (use mencoder instead of ffmpeg, don’t use the cutlist). With the new version, many of the bugs have been fixed. A few notes on the new version:

It’s possible to export even hour-long HDTV programs with ffmpeg. The bug in mythtranscode that resulted in its monster memory consumption has been fixed. That’s great, because ffmpeg is so much faster than mencoder. mencoder would require about six hours to export a 720p program to XviD; two-pass encoding with ffmpeg takes only three and a half.

ffmpeg also provides great file size benefits. The two-pass XviD encoding increases quality in addition to reducing file size. On my first try, a one-pass hour-long 720p program turned out as an 881 MB file. Two-pass encoding of the same video stream looks even better, and it’s only 485 MB to boot! (Video transcoding options were identical.)

Using the cutlist works. With the previous version, any time I tried to use the cutlist, the transcoding programs would bomb out right after starting. Now, when I use the MythTV cutlist, everything works fine. It saves time because I don’t need to compute heavily on the commercials, and the resulting file is a bit smaller. Once I enabled the cutlist, that 485 MB hour-long program became 347 MB.

When the power failed Wednesday, the house was quiet because I had to power down all my electronica. Individually, each piece is quiet, but added together, there’s a definite background noise. As I powered up each computer individually, it was easy to see what contribution it made to the overall noise level.

It turns out that my MythTV system is louder than I thought. The main problem is the 60 mm case fans, even though I have them undervolted. As part of a home-theater redesign, I’ve been thinking of re-spinning the hardware on the MythTV system to make it smaller, so I might as well try to quiet it further as well.

I’ve learned a couple of lessons on the case. Lesson One is that a full-size ATX case is big. The Silverstone is nice-looking, but it’s still big. It’s too deep for most home theater furniture, and it’s easily the biggest piece of equipment that I need to work with. Lesson Two is that the acoustics of the case aren’t that great, and that 60 mm fans should be banished from any HTPC case. (I purchased the case in early 2005, and 60 mm fans were hard to avoid then.)

I’ve been impressed with the reviews of the Antec NSK 2400 case, which isn’t surprising. Mike Chin of Silent PC Review was a consultant on the design. He recently worked with EndPCNoise.com to design off-the-shelf systems, and the SPCR-designed HTPC uses the NSK. I will probably go with the Antec Fusion, which has a VFD and covered drive bay, but is otherwise the same case.

The downside of using the NSK is that I’ll need to totally re-spin the hardware, since the NSK is designed for MicroATX motherboards. To pick out a new motherboard, I started with a wishlist:

Video chipset. mATX motherboards usually have limited slots, so I would like built-in graphics. I’ll be running MythTV, so nVidia is preferable because their drivers are more Linux-friendly than ATI. However, the chipset isn’t everything, because I have concerns about the…

…video connector. I do not want to take up a slot to get the right output form factor. Ideally, the board would have a standard-definition output (either composite or S-Video), and forward-compatible HD output. HDTVs all seem to want HDMI, but it is possible to buy a HDMI-to-DVI cable, since the electrical signaling is the same between the two. If HDMI or DVI is unavailable, then component outputs are acceptable.

Optical audio output (S/PDIF), to transport the 5.1 digital sound broadcast with HD 5.1 to my receiver. One cable is easier than six, and I already have the digital audio cable run in my current cabinet. In a pinch, I might be willing to settle for six analog outputs and a cable control solution, but that would be ugly.

I am staying agnostic on the CPU. In the past, AMD motherboards have been much cheaper, especially when you pair them with a low-power CPU. Intel has generally discouraged use of the ultra-low power Pentium M in a non-laptop setting, and the high prices of Pentium M-compatible motherboards reflect that. If I were to stay AMD, I would prefer to stay with the old socket 939 form factor because I could re-use my existing CPU, but that’s not really important.

My usual procedure is to head over to newegg.com and fire up their search engine to sort through the huge universe of motherboards. (They don’t carry AOpen motherboards any more, though.) In the Intel world, there is only one Socket479 mATX motherboard, the Asus N4L-VM DH, which doesn’t have DVI output.

As I expected, the AMD world has more choices, but all of them have a minor annoyance:

Asus M2NPV-VM. This is the motherboard used in the EndPCNoise Model Eleven designed in conjunction with SilentPCReview. The annoyance is that the on-board audio controller doesn’t have digital outputs. To add digital outputs, I would need to buy an add on PCI Express card because both PCI slots will be occupied by tuners. (Come on, Asus! Does this board really need a parallel port? Take that off and replace it with a S/PDIF optical port.)

Abit NF-M2. Abit has had some quality problems in the past, which is a small downside to this board. It’s almost completely “legacy-free.” Not only are there no parallel or serial ports, but the board doesn’t even have headers for them. I would need to buy a new remote control sensor to work with USB, instead of using my existing serial port remote sensor. My main problem with this board is one of backwards-compatibility, though. Right now, I am still using a standard definition TV, and the video solution on this board lacks a standard-definition output. Interestingly, this board has two S/PDIF ports, though I can’t see using the input port any time in the near future.

DFI Infinity C51PV-M2/G. This board has everything on my list, with the possible exception of the hard-to-verify audio switchability. However, it’s not really a mATX board. The maximum size of a mATX board is specified as 244 mm x 244 mm (roughly 9.6 inches square), and this board measures out at 244 x 264 mm. On one side, it’s 2 cm too long (or almost an inch). I am not sure if this would be a problem in the Antec case, and I’m not going to order it and find out.

One other notable mention is the DFI RS482 Infinity. Unlike the previously mentioned DFI board, it is 244 mm x 244 mm, and would fit in a mATX case without difficulty. SilentPCReview has praised its undervoltability and power saving capabilities. However, it is based on an ATI graphics chipset, which seems like a pretty big risk to take with MythTV.