Karl’s Blog

09 May 12 How to Create a RAM Disk in Mac OSX

This is a useful example of how to create a RAM disk in Mac OSX. The number 1165430 represents the number of sectors to allocate; each sector contains 512 bytes. The example below will create a RAM disk named ramdisk with 569.06 MB of space.

diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1165430`

10 Apr 12 How to reindex every table with SQL Server

A useful script I’ve used to reindex every table in an SQL Server database.

EXEC sp_MSforeachtable 'DBCC DBREINDEX (''?'', '' '', 80)'
EXEC sp_updatestats

06 Dec 08 Home Theatre PC – Part 2 The Software


Part 1 of this article discusses the hardware selection in my home theatre PC.  This article will focus on the software that enables the system to watch, pause, record live TV and to steam video over a wireless-n network served from UPnP media server. The major software components of interest are the operating system and media center.

The Operating System

I have a tendency to avoid commercial software as I have found that the freely available open source solutions tend to be as good and are more responsive to their deficiencies.  However, for this build I have gone against my natural instinct and am using Microsoft Windows XP Media Center Edition.  The primary reason for this was I was having driver problems with my wireless-n card in the alternate OS choices.

The installation and configuration of Microsoft Windows XP Media Center Edition was straight forward.  The installation process was the same as any windows OS installation and configuring the Media center utilize the TV Tuner, IR Reciever, IR Blaster was straight forward.  After completing the on screen instructions I had a current guide and was able to pause, rewind, and watch live TV.

Media Centre

I haven’t found an all in one software solution that does everything I wanted in my HTPC, so I’ve selected Microsoft Windows XP Media Center Edition and XBMC (XBox Media Center).  The installation of XBox Media Center was a little less obvious.  After downloading the windows edition and attempting to run the installation programs and error dialog popped up indicating that the installation program couldn’t locate MSVCR71.dll.  I was able to resolve this by downloading the dll and copying it to the windows\system folder.  In general I don’t recommend downloading random files form the internet and installing them into your system folder but as yet I haven’t detected any adverse effects.

I’ve read in the XBMC forums that they are aware of this issue and didn’t fix it for the atlantis release because they were not sure what the legal ramifications were to shipping the dll.  They indicated that Microsoft has reorganized its c libraries, responsible for providing some of the basic c functions like printf.  I hope that the folks at XBMC can resolve this issue, initially I almost abandoned the software because of the faulty installation program.

After working through the installation process, I was able to stream high quality video over my wireless-n network.  The video format I was streaming was an avi container with xvid compressed video and AC3 5.1 sound.  The initial buffering was a little longer then I was expecting but reasonable and the video streamed reasonably well.  The one issue I have with the system is whenever its in an erroneous state: slow network, unable to find an audio device the video plays in ultra high speed.  During normal video playback you can adjust the AV sync in real time and the list of supported codecs is sufficient for my needs.

Once XBox Media Center starts I’m able to navigate the menus with the Media Center Remote but haven’t figured out how to start XBMC using just the remote.  Most of the articles I’ve read online seem to disable the existing support for Windows Media Center.


An alternative configuration I was considering and would work equally well was a Linux OS with MythTV and XBox Media CenterXBMC is available for Ubuntu and I was able to get it to install on Gentoo as well.  For Gentoo you can use the information in the bug to create a custom ebuild, until the ebuild is added to portage.  The reason I abandoned the Linux configurations was because the wireless network drivers were not establishing a reliable network connection and I felt the time associated with getting lirc, sound and the graphics card working correctly was not worth it.

The Media Server

My media server is a Gentoo machine running MythTV and TwonkyVision UPnP MediaServer, you don’t need both and as a media server they both have similar features.  MythTV does have more features but these are only important if you plan on using the myth frontend.  Should MythTV add UPnP support to the MythVideo plugin then I would have selected this as the all in one software solution for the HTPC and the media server.  I could have used a network share and used MythTV as is but I’ve had problems with the resilience of watching video from a network share.


For right now the ease of installation of Windows Media Center and features available with XBMC allowed me buld the system with features I needed.  I’ll keep an eye on MythTV as the runner up I think there is a lot of potential there.  Windows Media Center also had the advantage of having free guide information, MythTV gets its guide information from Schedules Direct a service that you have to pay 20 dollars a year for.

Tags: , , , , , , , , , , , , , , , , , , , , ,