How-To Disable DXVA for ATI Cards to Fix Pixilation and Corruption in High Bitrate h264 Files

I originally posted this as a reply on The Green Button:

http://thegreenbutton.com/forums/p/77948/387265.aspx

And now I’m posting it here for mostly personal reference.

I have problems with at least four 1080p and three 720p h264 files. The problem is basically what netscan02 said: ATI cards have issues with some higher bitrate files. I'm using the default video driver that comes on the Windows 7 DVD (which is apparently the same as the driver in the "Catalyst 9.5" package). I have not tried any of the newer Catalyst releases as I would rather let Windows Update handle driver updates instead of chasing new Catalyst releases.

My "solution" ended up being to disable DXVA for h264 using "DXVA Checker": http://bluesky23.hp.infoseek.co.jp/en/

All you have to do is download DXVA Checker, extract it somewhere, run it, hit the little button in the upper right corner under the close button (X), hit Video Acceleration Settings (or CTRL-V) and toggle "HWUVD_DisableH264". There should be a check mark in the checkbox to the left and a "1" in the Value column if you clicked in the right place.

Keep in mind that this disables DXVA for h264 streams so you're going to see quite a bit of CPU usage when playing ANY h264 files from now on. This may not be an issue as DXVA gets disabled if your files have subtitle streams anyway.

There may be other solutions but this one gets your stuff working without mucking about with 3rd party nonsense. (Well other than our favorite trilogy of Haali (for MKV's), AC3Filter (for DTS) and VSFilter (for subtitles).)

How-To Set Up a Build Machine to Compile Media Center Projects

  1. Depending on the requirements of the project, install the appropriate version of .NET Framework.
  2. Install Media Center SDK. Either the Vista or 7 version should work.
  3. If your build machine is Windows Server 2008, find an already running Windows Vista installation and copy Microsoft.MediaCenter.dll, Microsoft.MediaCenter.UI.dll and ehres.dll from “C:\Windows\eHome” to a folder on the server. (Note that additional assemblies may be required depending on what is referenced in the project.) If the build machine is Windows Server 7, copy the same assemblies from a running Windows 7 installation instead.
  4. Use GacUtil.exe to register Microsoft.MediaCenter.dll and Microsoft.MediaCenter.UI.dll into the Global Assembly Cache. GacUtil.exe ships with several Microsoft products and each one installs it into a different location. The .NET Framework SDK registry entry claims the SDK installs to “C:\Program Files\Microsoft SDKs\Windows\v6.0A” but that isn’t always true. If the SDK is installed as part of Visual Studio, the SDK will be at that path, but if it is installed as part of Windows SDK for Windows Server 2008 and .NET Framework 3.5, the SDK will be at “C:\Program Files\Microsoft SDKs\Windows\v6.0”. (Note the lack of an “A” at the end of the path.) If the SDK is installed as part of Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1, the SDK will be installed to “C:\Program Files\Microsoft SDKs\Windows\v7.0”. GacUtil.exe will be in the “bin” folder in the root of the SDK folder.
  5. Copy Microsoft.MediaCenter.UI.dll to “C:\Program Files\Microsoft SDKs\Windows Media Center\v6.0\Tools” so McmlVerifier.exe can find the assembly. If the project uses resources from ehres.dll, copy it to the same location.

Note that depending on how the project handles the McmlVerifier task, you may need to write a custom BuildTask to handle multiple build environments.

At this point you should be able to compile Media Center projects from the command line on the server using MSBuild. If your command line build works properly it should also work properly from a Continuous Integration server.

Space Travel

"When a place gets crowded enough to require ID's, social collapse is not far away. It is time to go elsewhere. The best thing about space travel is that it made it possible to go elsewhere." - Robert A. Heinlein

Are you flowin?

"It's very addictive to be in (as Brad calls it) the flow of programming. You can't type fast enough and everything is just pouring out in a stream of emotion disguised as code. You are no longer looking in at the code, but you are inside it, and rather then pushing it to where you want it to go, it just flows around you. I'm sure it's exactly what a writer experiences as a novel comes gushing out, or a powerful wizard as he wreaks havoc on the village peasants." -

First Post!

First post from Windows Live Writer: http://windowslivewriter.spaces.live.com/

Although it was designed to work with Windows Live Spaces, Live Writer supports several other blogging services and packages including Community Server (the blogging package I use). Live Writer is basically a compact word processor for blog posts. Some of the features include: previewing posts before they go live, editing entries that have already been posted, support for inserting pictures and maps, spellchecking and an SDK for developing plugins. The only missing feature I would like to see at this point is the ability to edit categories or "tags", however I believe this may appear in a future build.

One of the biggest barriers to frequent blogging, for me, seems to be the hassle of having to login to the blog's website, create a new entry, wait for pages to load, etc. With Live Writer I can casually write my entries without having to suffer through the annoyance of a "web application". So now I have no excuse for not blogging!

SQL Server 2005 SP1 coexistence with SQLExpress SP1

The issue I had with trying to get SQL Server 2005 SP1 to coexist with SQLExpress SP1 was that the "default" database instance, which in this case is SQL Server 2005 Enterprise SP1, wouldn't appear in SQL Management Studio when browsing for network servers. I'm not sure if this is a bug or some kinda "by design" thing that exists for backward compatability but tweaking the install order seems to have fixed the issue.

The install order is as follows:

  1. Install SQL Server 2005 Enterprise on the default instance
  2. Install SQL Server 2005 SP1 on the default instance
  3. Install SQLExpress SP1 on the "SQLExpress" instance

You will end up with SQL Enterprise on the "default" (also known as "MSSQLSERVER") instance and SQLExpress on the "SQLEXPRESS" instance.

I don't know if this is an weird scenario but it seems like it should be fairly common. I personally use this box as a "staging" server for websites that are in development and having SQLExpress on the box allows us to test sites without having to alter connect strings.

I suspect the issue appeared because I was installing SQLExpress SP1 before SQL Server 2005 Enterprise and since there's no slipstreamed SQL Server 2005 with SP1 SKU, I'm guessing the lack of SP1 on the default instance was confusing the "SQL Browser" service. I don't know why installing SP1 didn't fix the issue. The magic is all in the install-order I suppose.

Of course I haven't actually rebooted the machine yet. If the issue reappears after rebooting, this qualifies as a bug, right?

Domain Controller Installation Notes

I've installed my fair share of Windows 2003 domain controllers over the years and there are always a few things that for some reason aren't configured when running the Active Directory Wizard (DCPromo.exe):

  1. Time Server
  2. COM+ Security
  3. DNS Settings

This whole time server thing is sorta weird. From what I can tell there are at least two timing systems in a Windows enterprise. One seems to use Windows style stuff and the other seems to use standardized stuff. I don't know much about timing but I have figured out that Active Direcory uses Kerberos and Kerberos requires that all the machines using it have synchronized clocks. So at least one Domain Controller must have accurate time and the easiest way to take care of this is to just use the built-in time.windows.com servers. The problem is that by default 2003 doesn't seem to be able to talk to the Windows Time Servers (even though I see XP talking to time.windows.com like all the freekin time) so you have to screw around in the registry and make a slight change. The key is:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

Edit the "Type" field and change it to "NTP". Then run "w32tm /resync /rediscover" just to be safe.

I figured this out by plugging Event ID's into http://EventID.Net and reading how other people solved their timing issues. EventID.Net is a great resource however I have one moral issue with how they run their site. Its basically a collection of user created solutions to events that show up in Windows Event Logs. The issue is that they pulled one of those scams where the entire site was free until the database was populated by users and then later they locked out the users from parts of the site and now charge a "subscription fee". The site is still usable but instead of being able to click directly to MSDN articles and other links, you have to use Google to search for the KB ID's and whatnot since clicking on many of the links just takes you to a "pay now" page. This "bait and switch" story is all too common these days (CDDB, etc.)

Next up is the COM+ settings. This one is easy, just follow David Grant's directions on this page: http://eventid.net/display.asp?eventid=53258&eventno=4493&source=MSDTC&phase=1

And finally the DNS settings. This one took me a while to solve. Basically you have the DC's network device set to use itself as the DNS server (because you have DNS running on this box because its a Domain Controller, right?) but the DNS server can't resolve queries yet because the system is still starting up and the system needs to be able to resolve DNS queries so the solution is to assign extra DNS servers. Generally you'll want to use your secondary Domain Controller or your primary if you're setting up an additional controller.

So, for example, on DC1 set the secondary DNS to the IP of DC2 and on DC2 set the secondary DNS to the IP of DC1. If you're only using one controller (shame on you) find another reliable DNS server (your ISP's or the one built into your router) to use as a secondary.

Now reboot again and again until no more warnings or errors show up in the Event Logs. If you're still getting weird errors, wait 20 minutes before rebooting and if that still doesn't fix the problems, demote the server, remove it from the domain, format the hard drive and start over. Trying to fix a damaged Domain Controller is more hassle than its worth. Its easier to just flatten the box and start over.

Oh and two final notes:

  1. Don't even think about trying to use multiple network devices on a Domain Controller. Although it is possible to set up a DC in this configuration, the amount of work isn't worth the payoff.
  2. Make sure the SP1/R2 firewall is turned off. Since this isn't an Internet-facing machine this shouldn't be too much of an issue, however if you're paranoid you can exclude every port that Active Directory uses. A better solution would be to let the firewall figure out what ports to unblock based on the process (add programs to the exclusion list instead of ports) but I don't know all of the processes that the Active Directory uses so this isn't yet an option. If anyone has a list, go ahead and send it and I'll test the firewall settings with those processes assigned.

Shindig

"Mighty fine shindig!" - Malcolm Reynolds

I love candy!

Neo: Why are you here?
Oracle: Same reason, I love candy.

Defining the Digital Lifestyle

My lifestyle has always been somewhat different than what you would call "normal". I think I've been living the Digital Lifestyle for quite a bit longer than most people. My first computer was a Commodore VIC-20 and I was playing MUD on the internet before it was called "The Internet"... so I've been "digital" for a while. But what does that really mean?

Granted the definition probably changes over time but right now, to me, it means a lifestyle that uses technology to remove the bounds set by someone other than yourself.

So for example, the way I watch television is very different than the way most people think of watching TV. I don't actually own a TV anymore and I don't have a living room to put a TV in anyway. What I do have is a few computers, one that downloads stuff, one that I do work on and play games on and another one that I use for consuming media. I call it "The TV Computer".

This computer is currently a laptop and it was previously a real computer with a video capture card in it that never got used. I actually have plans to build a new "TV Computer" (one that is capable of playing GTA3) and I'm probably not going to be putting a capture card in that new version either.

Anyway the point is, if I want to watch a TV show, I don't tell my Tivo to record the next episode, I tell my P2P client to go download all of the episodes. That is what I mean by the Digital Lifestyle. No commercials. No cable company. No satellite company. Just an internet connection and a P2P cloud. I'm using technology in a way that breaks the bounds set up by the media company. That's the Digital Lifestyle. Sure, listening to a music file you paid $.99 for on the iTunes store is "digital" but you're using the technology in that way isn't freeing yourself from a boundry set up by someone else. Yeah the file is digital and the iPod is digital, but you're still only doing what "they" tell you to do with the file.

Look at it this way, if you're not using technology to change the way people think about... everything, then you might as well just listen to records or casette tapes. There's no benefit to having your media in digital format. Living the Digital Lifestyle breaks down borders and lets you decide what to do with your data instead of someone else deciding for you.