The Ultimate Windows Server 2003 Media Hack

Doh, if you are going to use your Windows Server 2003 as a streaming server for your Xbox 360, you might be in trouble. For a while I went with a rather sophisticated solution, running a Windows XP Media Center within a Virtual Server on my Windows Server 2003. The solution is not the desired one and as Windows Media Center and the Media Center Extender within Xbox 360 have some trouble in streaming h.264 encoded movies files, I had to dig a bit deeper.

Before you go one, please be aware of the following disclaimer:

The following is given under a “works on my machine” premise. The proposed approach is based on my very personal attempts and comes a”as is”. If you try to attempt the following steps, you do it on your own risk. It is not supported by Microsoft, and hey, in case you brick your box don’t expect any support from Microsoft. Don’t blame it to me either as you did it on your own risk, but let me know as it could be fun, tough.

There are several ways to share media with your Xbox 360. The easiest ways is to check out http://www.xbox.com/pcsetup/. After determining your OS, you will be guided through the best way to share media. Bad luck if you work on a Windows Server 2003, though. Not supported, you will be told.

The easiest way is to share media over Windows Media Player 11. Windows Server 2003 comes with Windows Media Player 10. But as we know the core of Windows Server 2003 is somehow Windows XP and therefore there must be away to install WMP 11 on Windows Server 2003. If you google for it, you will come along a dozen hacks and workarounds and most of them won’t work.  Recently, this guy called C:Amie posted some awesome hack C:Amie provided a new link to install Windows Media player 11 on Windows Server 2003. If you have time, go through it, if you are in a hurry, do it that way:

  1. Make sure your box is fully patched and Service Pack 2 is installed.
  2. Download Windows the Windows Media Player 11 installer for Windows XP.
  3. Download the automatic installer from C:Amie’s website.
  4. Run the automatic installer and extract it to any folder on your Windows Server 2003 box.
  5. Copy the previously downloaded wmp11-windowsxp-x86-enu.exe into the same directory.
  6. Go to the folder and run the INSTALL.CMD file.
  7. Follow the onscreen instructions.INSTALLER.CMDThe script creates a temporary folder on your C: drive called C:wmp11. There you have to change the compatibility mode of two files to Windows XP. Go to C:wmp11update1. and right click the update.exe file. Chose the Compatibility tab and check the Compatibility mode for Windows XP. Make the same for the update.exe file in c:wmp11update2.
    update.exe Properties Dialog
  8. Now go back to the command line window and press a key to continue and the simply wait.
  9. The software updater wills start after some time and after some more time you will end up with the UPnP for Windows Server 2003 dialog.UPnP for Windows Server 2003
    Check the Universal Plug and Play checkbox and select Next and then Finish.
  10. If everything went well, you will end up with Windows Media Player 11 on a Windows Server 2003. Hurray.Everything OK

But you remember that we want to stream h.264 encoded files to our Xbox 360, right? The good news is that Windows 7 will support h.264 natively. The bad news is that we work on a Windows Server 2003 right now.  With some work however, we can teach our Windows Server 2003 also to deal with h.264 encoded .mp4 files. All we have to do is to install some codecs and to apply some registry hacks.

  1. For the sake of simplicity, I took the K-Lite Mega Codec pack. It took the mega pack instead of the standard pack because Dirty Harry is using a .44 and not a .375. This might be reason enough.
  2. During installation select Profile 2. It’s the default profile without the players (you remember we want to stream anyway). Feel free to experiment with other profiles and custom settings.K-Lite Mega Codec Pack Setup Dialog
  3. When you come along the Select Additional Task step, don’t forget to scroll down and to check Make thumbnail generation possible for the following types. This will create the thumbnails in the Windows explorer and within the Windows Media Player 11.
    K-Lite Mega Code Pack Setup Dialog - Additional Tasks

At this point your Windows Media Player can play h.264 encoded files but your server is still not capable to share any kind of .mp4 files. They won’t show up in the folders monitored by Media Player until we apply some tweaks to the registry.

On my crusade I came along two registry patches. It seems that they did not work for everybody, however, nobody tried on Windows Server 2003. It worked for me after I installed bot
h of them.

  1. Download the first registry patch, rename to .reg and install it.
  2. Download the second registry patch, rename to .reg and install it.
  3. Reboot to apply the registry changes.

Now, out Windows Server 2003 is capable to stream h.264 encoded media files. The previous patches will now cause that Windows Media Player 11 will add all kinds of .mp4 or .m4a files within the monitored folders. Adding these folders to be streamed is straight forward.

  1. Go to  Libary /Add to Library…Windows Media Player 11 - Library Menu
  2. Add all kinds of folders that should be streamed to your Xbox 360. The media types will be organized automatically, so movies, music files and images will be shown in the corresponding tabs in the NXE.Add to Library Dialog
  3. In some rare cases (and I know what I am talking about as I encountered this rare case) all your mp4 files won’t show up in the movie folders. In this case select Library / Other and check if the files are shown there.Windows Media Player 11 - Other  MediaIf you find all your files here, something went terrible wrong with your media library. Calm down, there is a easy workaround (FWIW: if you already share media, stop sharing as the following won’t work).Go to C:Documents and Settings[YouProfileName]Local SettingsApplication DataMicrosoft and delete the Media Player folder. This will wipe out the whole media library for this computer. Restart from 1. and everything should be green now.Media Player Library

Now, where everything is nicely organized, indexed and monitored, we are ready to share our media with the Xbox 360.

  1. Turn on your Xbox 360.No kidding, you won’t be able to turn on sharing if the 360 is not on at that point of time.
  2. Go to Library / Media Sharing…Media Sharing
  3. Now it’s straight forward:a) Check Share my media to b) Select your Xbox 360c) Click AllowMedia Sharing Dialog
  4. Finally, don’t forget to check out the Customize button which will open a dialog for some more fine tuning (what kinds of media to share, what ratings to share, etc.)

Now got to your Xbox 360 and enjoy your h.264 streamed media.

There are a few point’s I haven’t found out how to resolve, yet.

  1. The registry hacks don’t include .mkv file extensions. Also both hacks could be combined into one. I simply haven’t spend time in this yet.
  2. The 360 won’t show any thumbnails for the h.264 encoded files. Not sure if this is related to the XNE or the Media Player. This might worth some more investigation.
  3. The 360 does not show the length of the media file. It does so for .avi files, so this might be automatically answered once 2. is answered.

High-Res Skype

Go and get some good webcam (I use the Microsoft LifeChat NX-6000), navigate to the Skype user settings

 C:\Program Files\Users\[YourWindowsProfile]\AppData\Roaming\Skype\[YourSkypeProfile]

open config.xml and follow the instruction by Phillip Torrone, seeking for the <Video> tag. I am using Skype version 3.6.0.248 and the configuration file looks quite different now. However, adding the <CaptureWidth> and <CaptureHeight> tag works fine as well with this version since it was especially introduced with version 3.6. At the end your configuration file should look similar to this one.

Skype High-Res Hack

I re-started Skype and it looks like the other side can see me in 640×480 now.

WRT54GSV4 Wireless Bridge

After switching from WEP to WPA2, of course I had to update several XP and Vista machines. However, the 360 made most trouble since I used a D-Link 700AP before which was configured as a wireless bridge. Since I run a Linksys WRT54GS as gateway, it seemed to be the easiest way to get a second device of the same kind to be set up as wireless bridge being flashed with an alternative firmware. However, I realized that there is a endless number of devices in this series. After getting the device, I had to figure out, the new device is version 7. Due to an change in the manufacturer firmware, the ROM size of the device was continuously reduced. At this time I thought about the fact, getting a WRT54G (which is the old hardware factor and Linux based) might have been the better choice. Now I simply replaced the existing device with version 4 with the new one. and the old one providing 4 MB of RAM became the wireless gateway.

There are a couple of alternative firmware projects for the WRT54GS. After reading though a couple of posts in various forums, it seemed that OpenWrt is the best choice. In addition, X-Wrt seemed to be suitable for easy setup. During the setup of OpenWrt, I encountered several problems ending up in my router being bricked. So I had to recover the device using TFTP and the original firmware.

After several failures and digging a bit more I found more and much better documentation on DD-WRT including documentation for setting up wireless bridges. While v23 does only support WPA2-mixed mode, I switched over to v24 RC4 which finally supports WAP2 Personal.

Robotics Studio: Additional Shader Files for NVidia GeForce Go 5200

Due to some issues with the NVidia GeForce Fx Go 5200 graphics card of the Toshiba m200 Tablet PC, I got some modified shader files for this card, with permission to put them on the Channel9 sandbox.

“Together with the Redmond group we did some experiments using several different shader files with the Robotics Studio Simulation Environment and a NVidia GeForce Fx Go 5200 graphics chips with 32MB memory as it is found on the Toshiba m200 Tablet PC”

The archive contains two shader files. Unpack and copy the files into the folder store\media within your MSRS directory.

I have tested these files with the chipset mentioned above and the November CTP of the Robotics Studio.

As it works with the mobile version of the chipset, the shaders may also work with the NVidia GeForce Fx 5200 as well as with other chipsets. Please contribute in testing your graphics card (as it does not work with the November CTP) and let the team know if your graphics card does run the simulation with these shader files.”

The files can be downloaded directly from Channel9.

World Clock

Today, I spent some minutes to enhance my desktop. I installed AveDesk 1.2 and the World Clock v0.2.0 docklet.  Just rename the zipped file to .aveinst and double click it. Also ensure, that SysStats is installed before that. After spending some more time with setting up the clocks, I got only one black clock without any map in it. It took a while to find out, where the problem was. The problem is already known and depends on the regional settings of your windows. Using the German settings the system expects some floats using a format like this xxx.xxx.xxx,xx while the US layout the docklet was written for, uses xxx,xxx,xxx.xx. Unlike in the article before the World.vba there does not work, because the french settings use numbers with a format like xxx xxx xxx,xx.

This additional function and the two changes in MoveMap() should be enough for the German settings:

Function stringToFloat(strMeters)

  if isNull(strMeters) then
    stringToFloat = 0
    exit function
   end if

  'US xxx,xxx.xx to DE xxx.xxx,xx
  strMeters = replace(strMeters, ".", "foobar")
  strMeters = replace(strMeters, ",", ".")
  strMeters = replace(strMeters, "foobar", ",")

  stringToFloat = strMeters

End Function
Function MoveMap()

 centerX = SysStatsModel.Width/2
 centerY = SysStatsModel.Height/2

 latitude = stringToFloat(SysStatsModel.Meters("Latitude"))
 longitude = stringToFloat(SysStatsModel.Meters("Longitude"))

 ' ...

End Function

You can download the modified World.vbs (as it is, without any warranty, usage on your own risk, just rename the file from World.txt to World.vbsl). Now copy the file to the folder DockletsSysStatsscriptsworld within your AveDesk directory. If you try to add more then one instances of the world clock on your desktop, copy the World.ini file from the DockletsSysStatsconfigs directory for each clock and rename it. Assign to each clock its own .ini file. Otherwise all the docklets will be the same after the next start of AveDesk.

After spending this afternoon to find out how it works, it looks pretty nice:

WorldClock