Saturday, August 15, 2009

DAMN YOU MPEG-2!

So, it turns out that the main reason that I can not find a DVD Decoder is because the algorithm for the MPEG-2 decoding is licensed. According to this Wikipedia article:
Approximately 640 patents worldwide make up the "essential" patents surrounding MPEG-2. These are held by over 20 corporations and one university. Where software patentability is upheld, the use of MPEG-2 requires the payment of licensing fees to the patent holders. The patent pool is managed and administered by MPEG Licensing Authority, a private organization. Other patents are licensed by Audio MPEG, Inc. The development of the standard itself took less time than the patent negotiations.

This essentially means that no one is allowed to create a free MPEG-2 decoder. You will find on the web that there are a lot of CODEC packs out there that say that they handle most of the DVD formats. What they neglect to tell you is that they don't handle the most important one: MPEG-2.

There is a utility that one can download from Microsoft called DECCHECK, that allows you to see what MPEG-2 are installed on a machine. It claims to be for XP, but it also appears to work on Vista. When I look on my HTPC, I see several MPEG-2 decoders on the machine already, including one for Sage. I think that the reason that these aren't working is that they are either 32-bit decoders, or they were designed for XP, because Vista changed how all of this works (of course).

What I think irritates me the most about all of this is that I've already have a very power MPEG-2 decoder built into the 780G graphics chip. All that is needed is a DirectShow decoder filter. This filter does not actually do any work, thus it doesn't need to be licensed. It just passes the stream to the 780G to do the heavy lifting. There is such a decoder filter at SourceForge. Of course, it doesn't work on my machine, probably because of the Vista 64-bit issue.

In some ways, I accidentally shot myself in the foot here because the Home and Ultimate editions of Vista already have a DVD Decoder that ships with them. I, of course, had to buy Business. I have also read that Windows 7 is going to ship with a DVD Decoder in all editions, but I was not willing to wait for that.

There are a lot of Windows Media Player add-ons out there that you can buy that support the MPEG-2 format, but they can only be used by Windows Media Player and many don't support Vista. I purchased and installed the one from Cyberlink because it had a Vista version, and I was hoping that it would be installed as a common CODEC for all media players but, sadly, it wasn't. However, I discovered that SageTV has a setup option for DVD Decoder Filter where I could change it to Microsoft MPEG-2 Video Decoder. This almost works perfectly except that the DVD menus don't work with the remote's arrow keys and the hot spots don't light up when they are hovered over with the mouse cursor. However, hover over a hot spot with the mouse cursor, click and, presto, the menu option is selected and the movie, she plays! Whew! The good news is that Windows Media Player is also able to play DVD's now, although the upscaling is not very good.

So, I'm thinking that I can put this one in the bag, although the lack of the arrow keys working on DVD's is going to make finding Easter eggs harder. Perhaps getting PowerDVD was the right answer after all. Perhaps I shouldn't have went with 64-bit Vista. I've heard good things about Windows 7 and 64-bit CPU's are becoming common place. As consumers, we need to keep pressure on the software vendors to move their applications over to 64-bit CPUs. The conversion is not nearly as painful as the conversion from 16-bits to 32-bits. (For the sake of full disclosure, my own company's software hasn't been converted to 64-bits, and the customers are starting to get really angry.)

So, what's next for my HTPC? I'd like to be able to burn DVD's on it, so I guess that I'll tackle that next. How hard can it be? (HAH!)

On Display Drivers

Before I launched into finally trying to solve the DVD Decoder issue, I wanted to clear up an annoying message that appeared whenever I rebooted the machine. It was a message indicating the Windows Defender failed to start. This started happening around the time I installed McAfee, and I believe that McAfee disabled the Windows Defender service, but failed to disable its Notification Area icon. (Or perhaps I did it. I can't remember.) There was nothing in the Startup folder on the Start menu that started this icon's program, so I ran a program called msconfig, found the Windows Defender program and disabled it. Windows Defender is a Spyware detection program and McAfee already does that, so there's no sense in having two of these running.

After I did this, I opened the ATI Catalyst Control Center and selected, Check For Driver Updates. I had noticed earlier in the week that there looked like there were some recent updates for the graphics chip, and I was hoping that perhaps there might be a DVD Decoder hiding in there was well. Clicking on Check For Driver Updates took me to the ATI website where I had to figure out where they had hidden the display drivers for my system. First I had to tell it that I was running 64-bit Vista, then I had to tell it that I my product line was Integrated/Motherboard, and then I could select Radeon HD 3200. (The Integrated/Motherboard thing really confused me. I think that during the initial installation of software I tried to upgrade the drivers and gave up when I couldn't find Radeon HD 3200 in the Radeon product line.) Once I got to the right download page, I discovered that not only did they have updated display drivers, but they had an update to the south bridge chip set too. Plus they had a download for something called HydraVision. (Much Excitement!)

So, I downloaded and installed everything. The installation of the south bridge drivers caused a hiccup in the Gyration USB transmitter, but unplugging it and plugging it back in fixed that. Then I tried playing a DVD using SageTV and, sadly, got the same results. HyrdaVision looks like something that lets you divide the screen into multiple display regions. This is something more than just a new way to create windows, for it looks like you can have multiple desktops and can switch quickly between each of them. Interesting, but not very helpful, so I disabled it.

So, I'm back to looking for a DVD Decoder. It looks like Nvidia supplies one, so I was hoping that ATI did as well.

Remote disappointments

One more blog entry on remotes and then I'll move on.

My friend Steve took the Hauppauge remote that Judy gave me to his place and tried it out with a learning remote. He was able to report that the remote was generating a signal, so I'm assuming that it is functioning properly. He also took home the sensor that Judy gave me, but didn't have a equivalent system to try it in, so we don't know if that is working properly or not. My guess is that it is fine. It is my educated guess that the reason that I couldn't get the Hauppauge remote to function with the HTPC is that the Hauppauge software doesn't work properly with Vista or 64-bits or both. Whenever I opened the Hauppauge IR notification icon in the Windows Notification Area, I got a large mostly empty dialog box with one button. (I think that it said Close.) Anyway, I've uninstalled the Hauppauge IR program and moved on.

I went through the process of trying to program my new Air Remote to replace my TV's remote and that was pretty discouraging. There are quite a few remote codes for my TV and I tried them all, several times. I found a few that sort of worked, but of those, all of them could turn the TV off, but none of them could turn the set back on? (Huh?) I then tried to program the remote to learn the power button, but the Air Remote kept reporting that the learn mode timed out. I spent enough time on this to verify that I hadn't made any mistakes, and then I gave up. (I've never seen a universal remote that worked, and I guess I'm not terribly surprised by this one. Perhaps it will do a better job on my stereo or cable box.)

I agree with Steve on this subject: Bluetooth should be established as the common communication mechanism for all remotes, and a standard Bluetooth service should be established for remote controls. (There may be one already. I went to www.bluetooth.com, but that website is long on fluff and short on content. However, there is a promising article at www.bluetomorrow.com.

Wednesday, August 12, 2009

Remote Options

I'm closing in on the solution to the DVD CODEC solution, but today a solution to the remote keyboard and mouse presented itself, and I decided to solve that issue instead.

After weeks of operating the machine using a keyboard and mouse connected to it, and sitting way too close to a HDTV, I decided that I really needed wireless keyboard and mouse, was well as an infrared remote. I could have had this already, and pretty cheaply, except that I didn't really want a mouse. I wanted a trackball or touchpad built into the keyboard. I could find a few of those, but they were all very expensive. So, I saw today that my local electronics store (OK, OK, it's Fry's) had an Air Mouse and keyboard combo on sale for around $60 (after mail-in rebate). So, I stopped by after work and found that, not only did they have an Air Mouse and keyboard combination available, but they had an Air Remote and keyboard combination as well, although it wasn't marked as having a mail-in rebate.

I toyed with getting this really cute keyboard and mousepad combination that was about $130. It had a small QWERTY keyboard in a clam shell case. (Sorry, but I don't remember the name of the manufacturer.) It used Blue Tooth to communicate with the computer and it had built-in rechargeable batteries. I really liked it, but it was just not practical to do any touch typing on it, so I set it aside. Then, I had to choose between the two Air products.

So, what are these Air products? They have a sensor (perhaps a gyroscope) in them and, as you move device through the air, they sense the movement, wirelessly communicate it to the computer, and the mouse cursor moves on the screen. Judy told me about them when I was trying pick components for the HTPC. I decided against it at that time because of the expense, but sitting too close to the screen for a month has changed my mind about that.

So, after some dithering, I decided to pay extra for the Air Remote and keyboard combo, because I was tired of not having a working remote and the Air Remote also has infrared transmitter in it. Its box says that it can control many different devices. After years of having to stop and think before I pick up a remote, that sounded very attractive. When I got up to the register, surprise, the $50 mail-in rebate applied to the Air Remote keyboard combo as well.

Installing the mouse and keyboard was a cinch and, except for having to reach for the remote when I want to move the mouse, it is all pretty natural. My biggest problem now is that the text in the multi-line edit box for this blog is hard to read across the room. (I'll play some more with the font size later.)

Anyway, the Air Remote controls SageTV very well, although I haven't tried any other devices. The keyboard gets hung up some times and the typed characters don't appear on the screen, although it looks like they are being transmitted (according to the status light). Usually moving the mouse with the Air Remote fixes it.

So, now I just have to solve the DVD CODEC problem.

Saturday, August 8, 2009

More CODEC follies

The guy from SageTV seemed rather incredulous that the DVD drive didn't come with a DVD codec. I believe that his words were "I've never heard of such a thing." Then he suggested that I go to the Optical Drive's manufacturer's website and see if there wasn't a download for it.

So, I went to the LG site and didn't find a codec, but I did find a knowledge base article that said:

First, make sure you have proper software installed to view a DVD movie. DVDs require DVD software in order to play DVD Movies. LG bundles PowerDVD by Cyberlink with its drives. We do not offer it for download. A full version of the software can be found at www.gocyberlink.com (Also available in stores)


I wrote LG and explained that I was having the same problem and that PowerDVD is not installed with the LG DVD-RW drive that I bought from them, only PowerProducer and CyberLink DVD Suite.

So, I went in search of a DVD codec. It is not that I dislike PowerDVD, I just don't think that I want to pay for two DVD players, when SageTV will do the job.

The first thing that I did was to install McAfee on the HTPC. You never know where some software has been.

I then searched for DVD codec in Google, but I didn't find anything that excited me. I wound up at one site called freewarecentral.net and tried to download xVid, but McAfee started complaining about detecting a potentially unwanted program named Artemis!06EBEBB5771B and Firefox said that I was opening a file from prompt.zangocash.com. I told McAfee to remove the Artemis program and Firefox to cancel the opening the file from the suspiciously named website. (As I said, you've never know where some software has been.)

Finally, I ended up at Uberdownloads.com and I downloaded and installed VLC Media Player. It is an open source player that Uwe mentioned as being versatile. I was able to play some media files that he had given me last week. But, I still can't play a DVD. SIGH.

I went ahead and purchased SageTV, but I still don't have a DVD codec. SIGH.

Wednesday, August 5, 2009

An Answer From SageTV about the DVD CODEC

So, I wrote SageTV about not being able to play a DVD, and here is what they wrote back:

Sage doesn't install a DVD decoder. Usually if you have a DVD drive, you typically get the software to play DVD's (like PowerDVD that includes the Cyberlink decoder).


They then told me how to get the Nvidia decoder for DVD.

Well, that's just ducky. My DVD drive came with Cyberlink software for creating DVD's but not playing them. It is true that I didn't install the Nero software that came with the drive, but when I installed it, I got the same result.

I guess I can see why SageTV assumes that the DVD drive would install the DVD CODEC, so I'm not sure who to be annoyed with at the moment. I just wish that, if they are going to have a Media Center option that has a Play a DVD suboption, that they would supply the important pieces of software necessary to make that happen.

So, I'm still meditating on how I want to fix this.

Sunday, August 2, 2009

DVD Woes

Now that I have this nifty HTPC set up as a DVR, there's almost nothing on TV worth recording. So I decided to pull out a DVD and tried to watch it. First I tried using SageTV, but it gave me a strange message: "There was a DVD Error in playback. Details: sage.PlaybackException: ERROR (-8, 0x2): There is a problem playing the DVD content due to Macrovision or CSS." (An error message only a programmer could love.)

Then I tried with Windows Media Player, but it gave me a message on the opposite end of details, but not any more helpful: "Windows Media Player cannot play DVD video. You might need to adjust your Windows display settings. Open display settings in Control Panel, and then try lowering your screen resolution and color quality settings." I tried that and it didn't help.

Finally, I tried to play it with WinTV, which gamely gave it a try. The audio was great, but the video was a mess.

I talked with my friend Uwe about this. He had already given me a set of video files to try watching on a DVD and I didn't have any luck with them either, but they were in some fancy formats and we were doubtful I had the right software from the start. However, I really thought that a standard DVD would play. So Uwe suggested that I download the trial version of Cyberlink's PowerDVD and try that. I did and it was able to play the DVD. The funny thing was that, magically, so was SageTV. (However, Media Player was still complaining about the screen resolution.) SageTV working told me that the machine was missing a CODEC for DVD.

CODEC is merely a combination of the two words COmpression and DECompression, as MODEM is MOdulate and DEModulate. Where as a MODEM takes a digital signal, converts it to analog for transmission over a phone line, and then converts it back to digital, a CODEC takes an analog source, converts compresses it for transmission (or storage), and then decompresses it for playback. Originally, a CODEC was a piece of hardware like a MODEM, but these days it also can be a piece of software that is used for decompression of various audio and video formats. This functionality must be built into Windows at some level, since SageTV was able to make use of the CODEC that was installed by PowerDVD.

My guess is that SageTV did not install the CODEC either because I installed a trial version, or they want me to purchase a more expensive version with more media format support (CODECs). Either way, I'm not sure that I want to have both PowerDVD and SageTV installed, so I uninstalled PowerDVD and, as I hoped, SageTV stopped being able to play DVDs.

I will have to meditate on what is the best solution for this problem, but at least I know what the problem is. (As oppose to the remote control issue, where I'm still clueless.)

Saturday, August 1, 2009

Hard Drive Maximize!

One of the things that SageTV suggested during installation was storing its video files on a hard drive partition with a 64K block size. The block size is essentially the amount of data that is transferred between the hard drive and the memory in one I/O operation. The hard drive is formatted into individual blocks of the specified size and thus the size of files on the hard drive are all multiple of the block size. (No matter what Windows Explorer says a file's size is, the space that a file actually uses on the hard drive is a multiple of its block size.)

Having a large block size is good for speed. The CPU gives an instruction to the hard drive controller to start a transfer and can then ignore it until the transfer is complete. It can be an inefficient use of disk space, since a 4K file wastes 60K on a hard drive partition with a 64K block size. Fortunately, we're talking about files in the gigabyte size range, so the loss of a kilobytes at the end of a video file is not a big deal. A large block size also requires a lot of memory to buffer the block during the transfer. It's good thing we've got 4 gigabytes of memory!

You may recall when I installed Vista, I only formatted 100 GB of the hard drive for the operating system, because Judy had warned me that Sage would recommend having a 64K block size. However, I wanted to see this requirement for myself, just to make sure that 64K was the right number before I formatted the partition. (OK, OK, I forgot to format it in advance.) When I saw the recommendation during the installation, I could have just formatted the partition at that moment, but I was so use to XP that I expected that this would require a reboot and the drive letter of the optical drive would change, so I let Sage put the video files on the system drive for the moment. What I didn't realize is that Vista would let me assign any drive that I wanted, so I could have formatted the partition during the installation. Fortunately Sage would let me change the directory after installation.

What a lot of the non-techie types don't realize is that hard drives, for a long time, have had the ability to be "partitioned". That is sliced up into individual pieces and treated as separate hard drives. This is very useful if you want a computer to be able to run two operating systems, such as Windows and Linux. There was also a time when the size of hard drives were getting bigger than Windows could use. So partitioning them was a necessity to be able to use all of the space. However, we're going to use that ability here to let Vista have a partition with what it believes to be the optimum block size for it, and we're going to create a second partition with what SageTV believes is the optimum block size for video files.

To do this, follow these steps:

  1. Find the Computer icon, right click and then select Manage from the pop-up menu. Or you can open the Control Panel, open Administrative Tools, and then open Computer Management. (Your computer may be slightly different, as I've set my Vista desktop into Classic mode.)
  2. In Computer Management, in the left hand pane, expand Storage if necessary and select Disk Management.
  3. In the center bottom pane, locate the disk on which you want to create the new partition, right-click in the unallocated space rectangle that you want to create the new partition with, and select New Simple Volume... from the pop-up menu.
  4. In the Welcome page of the New Simple Volume Wizard, click Next.
  5. In the Specify Volume Size page, select the size of the new partition (which Vista is calling a Volume). The maximum is already entered in the field, and that's what I went with. Press Next.
  6. In the Assign Drive Letter or Path page, you can assign a drive letter to the partition, but I'm going to just say "No" to drive letters. I selected Mount in the following empty NTFS folder radio button and pressed the Browse button. Then I created a directory named C:\Volumes\Media, selected it and pressed the OK button. Then I pressed the Next button. (You, of course, may assign a drive letter, if you wish.)
  7. In the Format Partition page, select the Format this volume with the following settings radio button, if necessary. For Allocation unit size, select 64K from the drop down list and in Volume label, I entered Media. Make sure that the Perform a quick format check box is not checked and press the Next button.
  8. In the Completing the New Simple Volume Wizard page, press the Finish button.
  9. Go find something interesting to do, as the formatting going to take a while. I chose the complete format to allow the OS to find bad sectors on the disk. Better to find them now rather than later. On my system, it took a little over 2 hours to format almost 500 GB. Your mileage may vary.
  10. After the format was complete, I created a directory named C:\Volumes\Media\SageTV and then I created C:\Volumes\Media\SageTV\Videos.
  11. Bring up SageTV and open Setup.
  12. Open Detailed Setup.
  13. Locate Video Recording Directories and click the Modify button next to it.
  14. Click on Add New Directory.
  15. Click on Specify.
  16. Enter the name of your Media directory for SageTV on the new partition. For example C:\Volumes\Media\SageTV\Videos. Click the OK button.
  17. Click the Select Current button.
  18. SageTV will ask about the space rule for the directory. I took the defaults with a Disk Space Rule of Use All which requires a Disk Space Size of All Available Space. If you wish, you can also select Disk Space Rules of Use Only or Leave Free, which will allow you to put bounds on the amount of space used. For now, I'm going to let it have the entire disk. Click on Accept this Rule.
  19. Assuming that you've watched everything already recorded, select the current Video directory, C:\Program Files\SageTV\SageTV\Video. Click on Remove this Directory.
  20. Click on Continue.


The great thing about having a separate partition for the Videos is that, when you fill it up, the OS will still be able to operate. It's not a lot of fun to try and free up space on a hard drive when the operating system being non-responsive.

So, at this point, you might think that I'm just about done, but there are a few things still hanging out. I still haven't gotten the remote to work and when I tried to play a DVD, none of the programs could do it. They either didn't recognize the format of the DVD, or they complained that the video resolution was too big. So, I guess I'll tackle one of those two next.