Sunday, September 14, 2008

Vista Media Center TV Pack: Pros and Cons

Not too long ago, Microsoft leaked an upgrade to Media Center which they released to OEMs. This upgrade contained some "well duh" features: features that should have been in Media Center all along. It also contained a number of "WTF" featuers: features that were not added in the interest of end users; features designed to please television stations and content producers. Features that annoy me. Nevertheless, I have installed the TV Pack upgrade (codenamed Fiji), and continue to run with it. The good:
  • Tuners with different feature sets can be used (and it won't reduce them to the lowest common denominator): analog, digital, HDTV.
  • Multiple tuners can be hooked up to different sources (cable, over-the-air).
  • Clear QAM support: Media Center now supports HDTV over cable. Unfortunately, I can't seem to be able to get it to recognize my Hauppauge 1250 tuner as a digital tuner when connected to cable, so I can't receive the QAM channels.
The bad:
  • DRM: every recording is "protected" (from me accessing it) by DRM. There is no law or FTC policy that requires this to be done.
  • WTV container format (replacing the DVR-MS format). This format is currently incompatible with commercial skipping and/or removal programs such as Lifextender or DVRMSToolbox.
  • DVD burning of recorded content no longer works. At all.
  • If I go back to the pre-TV Pack configuration (which requires re-installing the operating system), I won't be able to access any of the content that I've recorded since the upgrade.
  • There is no WTV playing support on any non-[Vista-with-TV Pack] system, or Linux. The format is a complete black box that only Media Center knows how to decipher.
It went like this: I have two tuners: an analog USB tuner (Dell branded, Angel manufactured), and a digital HDTV tuner (Hauppuage 1250). Before the TV pack, I had both tuners hooked up to the cable. The other option was to have just the digital tuner hooked up to the over-the-air antenna, which would then receive HDTV channels, but no cable. Media Center allows you to browse through the next two weeks of movies that will be on TV and pick which ones to record. Cable (aside from having shows like Battlestar Galactica) has orders of magnitude more in terms of movie selection, so without the TV Pack, I would have to choose between quality (HDTV for broadcast, but only getting broadcast channels) and quantity (all the shows and movies on cable, but no HDTV channels). The Hauppauge customer support folks claim that since Microsoft hasn't officially released the TV Pack, and since the OEMs haven't yet released PCs with the TV Pack update yet, they aren't supporting Clear QAM in media center on my hybrid card. Clearly, it's a driver issue, and they haven't released one that deals with the problem, at least not officially. So, for now, I'm waiting: waiting for OEMs to start releasing TV Pack systems, which will in turn (hopefully) lead to driver support by the manufacturers; waiting for the Media Center user community to produce software that will decrypt, de-commercialize, transcode, and otherwise access the WTV format. This is already starting to happen, but more progress needs to be made for there to be a true solution. I don't like having my recorded TV locked in a proprietary DRM-restricted format, especially one that doesn't use much compression (I would prefer to be able to transcode to H.264), but for now, it 'works.'

Wednesday, August 27, 2008

Vista: Partitioning and Formatting a New Disk

I just got a new Terabyte hard drive, and I popped it into my Vista Media Center machine (Elrond). When I booted up, it said it recognized the new hardware, and it installed the disk. However, no drive showed up in the Computer folder, so I poked around in the Device Manager. The drive was indeed there, installed and working. I tried rebooting. No effect. Finally, I remembered that last time I had to manually format the drive (I guess the drives don't come pre-formatted to NTFS like they used to), and so (after refreshing my memory with Google) I Opened up Computer Management, went to Storage -> Disk Management, and there was my drive, sitting there labelled "Unallocated". Excellent: all I have to do now is format it, and I'll be on my way. So, I right-clicked on the drive, selected format, and went through the wizard. Then I got this message:
"The operation cannot be completed because the disk is not initialized."
What? Isn't that what I'm trying to do here? Do I have to pull out my Knoppix or GPartEd LiveCD just to get a drive formatted to NTFS for Vista? This is not looking good. Windows Help was worthless when I searched for 'initialize disk'. Back to Google, where I typed in 'vista' plus the error message in quotes, and got a page with a grand total of three (hopefully now with this post it will be four) pages. The first was no help: the guy formatted the drive in XP. The second and third results both contained the solution to the problem. Apparently, we're supposed to all recognize that space to the left of the disk space illustration as right-clickable. Yep, to get a disk initialized, you need to right-click that space and select "Initialize disk" (which writes the partition table, by the way):
After that, it was a simple matter of re-running the format wizard on the drive. Why wasn't there a wizard that said, "You just installed an un-initialized, un-partitioned, un-formatted hard drive, what do you want to do next?" Even a button on the notification that my new hard drive was installed to further configure it would do. There could be appropriate warnings for such possibilities as other operating systems being installed on that disk, or unrecognized filesystems, or other installations.

Monday, August 25, 2008

Shell access to Vista from Linux

Yep, you read that right, I'm going to ssh into a Windows command prompt from Linux box. The first question to answer is, "why on earth would anyone want to do that?" to which my reply is that I wanted to be able to be able to remotely access Elrond, my media box, since it's an always-on machine. I might want to download something directly from it, check what files are there, move them around, etc. My initial thought was to do all of this from Linux, and then just use the default shares (e.g., \\elrond\c$, etc.) to move files, but I ran into trouble accessing default shares from Linux, and it's much more powerful to have command-line access, especially since I've been learning some VBScript lately. Not content with (and not too familiar with) using only the native Windows Shell command-line utilities, I of course installed Cygwin first, and added "c:\cygwin\bin;" to the Path environment variable (put it right after "%systemroot%\system32;"--not before!). Presto! Instant access to all of the Linux utilities and programs that I'm used to. See? This is much better than just Samba/CIFS mounts. The next task was to get an SSH server. My requirements were:
  1. Free
  2. Runs on Vista as a daemon (I don't have to be logged in).
  3. Easy to configure
(Open source would be nice, but it's not a must on Windows.) This article was helpful in rounding up the canidates. My choice was freeSSHd. I tested the server by logging in from my laptop using PuTTY. It worked great, but when I tried to ssh from a Linux box, I got:
$ ssh elrond ssh: elrond: Name or service not known
Oh, yeah, that's right. I use DHCP for my windows boxes, so they're not in the hosts file, and DNS doesn't resolve Windows names not in a domain. Sure, it works if I use the IP address, but using that over time would work havoc on my known_hosts file, and given the nature of DHCP, it's bound to bite me in the butt sooner or later. But Samba can find them, so there must be a way. It took me about a minute (and some bash-completion) to remember the proper command:
$ nmblookup elrond querying elrond on 192.168.5.255 192.168.5.143 elrond<00>
I thought about setting up a script that would parse out the IP address with egrep and then pass it along to the ssh command, but I like a nice clean known_hosts file. There had to be a way to log on to the host by name, so I turned to the Internet. It turns out that the solution is called WINS. Using it requires that "wins" be in the hosts line of nsswitch.conf, like this:
hosts: files dns wins
It also (at least on Gentoo) requires that Samba be compiled with WINBIND support (which is not WINS). This was a rather non-intuitive step, and I have my ignorance to thank for trying WINBIND support in the first place. Okay, at this point I have it all up-and-running!
tim@athena ~ $ ssh elrond tim@elrond's password: Permission denied, please try again. tim@elrond's password: Permission denied, please try again. tim@elrond's password: Received disconnect from 192.168.5.143: 2: Too many attempts.
Wait, what? This worked before! "ssh Tim@elrond" didn't work, and neither did "ssh 192.168.5.142". The server is up and responding. I was using the right password, but something else was wrong. After a little bit of poking around on freeSSHd's website (the forums are, thankfully, rather sparse) I was able to find this, which it turns out is also linked directly from their homepage. Apparently it's a common problem. When running freeSSHd as a service, you have to configure it in "elevated mode"--even if your account is an administrator, that is, you have to explicitly launch the configuration program with elevated privileges, or else you won't be altering the settings for the system, just for the logged-on user. That's why it worked when I had tested it before (my first clue should have been that when I launched the configuration program, I had to stop the service to keep it from saying it was already running. Another problem I ran into was this:
$ ssh elrond Tim@elrond's password: No console window found! Unable to emulate VT100 terminal. Unable to execute command or shell on remote system: Failed to Execute process. Connection to elrond closed.
Basically, I can log in, but it won't give me a terminal. It fails, and kicks me out. The solution was on the forums:
Problem already reported. Disable "use new console engine" until we find a solution.
So I did that, and now it finally works. Update: see comment(s).

Thursday, May 08, 2008

Baidu MP3

Lately, it seems that Baidu MP3 has indexed my server, and is pointing Chinese searchers to various Bible talks and sermons which I have hosted there. I recently (well, it was probably late last year) relaxed restrictions on my robots.txt file to allow most of the content (not the pictures) to be indexed by search engines. Since then, I've been hit from all over the world, but this is pretty recent. What's different is the volume and frequency of the hits. Of course, they're welcome to the content (as long as my server isn't getting hammered). I'm a bit curious as to what's being done with them: do people listen to them in order to learn English? Are they really trying to find music and stumbled on my files by mistake? Are they interested in biblical teaching? Maybe someday I'll find out.

Sunday, May 04, 2008

Elrond: Blu-ray, Windows Media Center, Etc.

So I bought another computer: Elrond. Elrond will be the living room media PC.
I believe that makes a total of 6 computers. Obviously not all of them are this nice. Some of them are scratch boxes. I'm thinking of installing Ubuntu 8.04 (Hardy Heron) on one of them in the near future. When I have time (HA!)
Elrond is a Dell Inspiron 530 with Blu-ray and an HDTV tuner. It has Windows Vista Home Premium, which comes with Windows Media Center. Media Center This is the first time I've messed with Media Center, and I'm mostly impressed. It was very easy to set up. The only really annoying thing is that if you have two tuners, they can't be hooked up to two different sources: I wanted to have the HD tuner record over-the-air broadcasts (which it can do in HD) and have a second USB tuner (that I had bought with my laptop) handle the SD signal from cable. No dice. It only supports managing one guide, and assumes that all tuners have access to it that guide and nothing else. Lame. Currently, I have it set up with just the HDTV tuner hooked up to cable. It can't record any of the cable HDTV channels, unfortunately, because it doesn't have a QAM tuner (HDTV signals are in a different format on cable than over the air). I think Athena's tuner supports QAM (and it ignores the broadcast flag too), but I haven't set up MythTV yet (which is ironic, since MythTV was one of my primary reasons behind putting Athena together in the first place). The reason I decided to go with SD cable is because it has the most content by far. If I want to record some over-the-air HDTV, I can switch it over to that temporarily. If I get MythTV running on Athena, I should be able to record anything I want. [Edit: According to the manufacturer's page, my tuner can indeed receive QAM HDTV signals, but they apparently have to be clear QAM (i.e., not encrypted or "scrambled"). My TV is able to tune to the HD stations without the cable box, which means it might be simply a matter of configuration: downloading the right listings that tell my computer it can tune to HDTV channels. Whether Comcast provides listings including HD channels is another matter.] [Edit: Apparently, it's not Comcast, it's Microsoft. Windows Media Center doesn't support QAM, unless you buy a special computer designed specifically for it. This seems stupid to me, because these channels are being sent over the wire in the clear. Back to square one. Time to get MythTV up and running.] [Edit: There appear to be ways around WMC's artificial restriction (by getting tuner hardware and drivers that lie about where the video comes from). Interesting. I'm still going to explore my MythTV solution. Currently, I have MythTV up and running, but nothing shows up on a channel scan.] Blu-ray So, I've finally bought myself a Blu-ray drive. I was hoping to wait until full-featured stand-alone players went down in price to the $200 mark. It doesn't look like this is going to happen anytime soon. Blu-ray players actually went up in price after the end of the format war with HD DVD (surprise, surprise), and they don't show any signs of going down any time soon. The best "value" on a Blu-ray player was still the PS3, and I'm not that interested in the PS3 for gaming (and I already have as many Linux boxes than I need) so that wasn't looking like a good deal either. I was looking at the Dell website for a PC for the living room, and I saw that they had a special deal on a Blu-ray player, in addition to a big chunk of money off the computer, and my employee discount program percentage off, so I bit. I was hoping that I could have the option of hooking up my HD DVD drive (Xbox 360 attachment) to the PC and have it play both, but it only came with PowerDVD DX version 7, which supports Blu-ray and not HD DVD. Not a big deal, of course, since I have a stand-alone player (HD-A3). The only problem I ran into as far as Blu-ray playback is concerned is that I wanted to output Surround Sound to my receiver digitally. For this, I had to buy a sound card, and since the two digital optical input ports were already occupied (by the HD DVD player and the TV), I needed a coaxial digital S/PDIF out. I found one at Fry's (Diamond XtremeSound 7.1 for $30 with a $10 rebate), hooked it up, and told Windows to use that card's digital out. In order to get it to output Dolby Digital 5.1 during movie playback, I had to configure the settings of the PowerDVD program to output to "SPDIF"; before that, it was still sending stereo.