Archive for the ‘computers’ Category

Recording from a Hauppauge HVR-950Q USB TV Tuner to VirtualDub

Saturday, March 6th, 2010

The 2010 Vancouver Olympics are over. IMHO, they were awesome. Unfortunately, it’s time to get back to work. Almost.

I want to record some video from Shaw On Demand of a curling event that I attended live. I have access to a Hauppauge HVR-950Q USB TV tuner – a great piece of hardware paired with terrible software.

I had multiple issues, but in the end, as I type this, I have my old laptop capturing the video from the composite (i.e. “RCA” video) input from the Shaw Digital Box.

I started this adventure on my day-to-day laptop, a 1.5 year old laptop running Vista. On this computer, the WinTV 6 software could not properly display the signal from the composite input. It would get about 1 frame per second, plus some really weird “chipmunkesque” spurts of audio. It was unusable to view the composite feed, never mind trying to record from it. I then tried the newly released WinTV 7 software from the Hauppauge website. It was worse – it is even more bloated, even slower, and still unable to view the composite input properly. Note: I have previously watched the Over-the-Air HDTV channels with this unit, so it’s specific to the composite input, and it might be specific to my laptop. There is a big difference between OTA HDTV and composite – an OTA signal is compressed MPEG2 and the unit passes it directly over the USB to the TV tuning software, whereas, the composite is fed in some sort of raw format that requires massive USB bandwidth – i.e. there is no on-device MPEG encoding.

I tried VirtualDub next, the free video capture software that I’ve used from time-to-time for years. VDub could preview the signal fine, and with much less processor overhead. Unfortunately, when I tried to start the capture, I kept getting this error: “The Capture device does not support the video format”. I eventually find a solution to this error, but only after I tried my ancient laptop.

I tried using my ancient HP Celeron 1.1Ghz laptop. It runs XP, and my theory was that the Hauppauge software just doesn’t like Vista. This might be true. I was able to use the WinTV 6 software on the old laptop fine… eventually. You have to run the install, and the setup from an administrative login. Otherwise, the software will crash hard, without giving any clues as to why. Watching the composite input in WinTV 6 used a lot of the CPU, but it is a 5 year old laptop, so it’s all relative. It was unfortunately, far too slow to do a live encoding to MPEG.

So, I knew that the composite signal worked reasonably well. I tried VirtualDub on the ancient computer. I got the same error when trying to start the capture. The fix? The trick is to look at the VirtualDub device properties to see in which format the preview was coming in. In my case, it’s 720×480 UYVY. Once I set this on my custom capture format, VirtualDub worked fine. I’m not able to encode to MPEG live, I’m using HuffYUV and 10s of GB of hard drive space to capture 2 hours of video, but it will work. I’ll have to transcode to MPEG4 later.

In the end, I could probably have used VirtualDub on the first laptop that I tried now that I knew how to get a compatible capture format. According to Google, there aren’t many people who have had these problems… I feel special. Sometimes I wish things would “just work.”

Spoolsv.exe using lots of CPU on a Terminal Server

Friday, July 17th, 2009

I have this recurring problem at one client’s site.  The setup is a small Windows 2003 Terminal Server environment, with remote POS terminals over the Internet – I don’t like this arrangement for the many single points of failure (a couple ADSL lines, a couple routers, a couple switches, a single server, etc.), but that’s beyond the scope of this post.

This client is happens to be running BBL, AKA WinPOS, AKA, WinBPS, over Terminal Server.  I have no comment on the software itself, it’s the arrangement of using it over Terminal Server over the Internet that makes me nervous – no, I had no input into this setup.

A further complication, is that the printers that the software uses, Zebra, label/ticket printers, have poor drivers that I don’t believe to be TS compatible.  They sometimes get stuck when the remote session is closed.  This eventually screws up the Windows spooler service.

When this system stops working, new Remote Desktop sessions fail to start properly.  After logging into the server, I will check the processor usage in Task Manager.  If the spoolsvc.exe process is using a lot of processor time, this is what I do:

N.B. Follow at Your Own Risk.

Stop the spooler service (no one will be able to print, but they probably can’t already):

net stop spooler

Open RegEdit.exe and browse to this part of the registry:

HKLM\SYSTEM\CURRENTCONTROLSET\CONTROL\PRINT\PRINTERS\

At times, I’ll find dozens of stale Terminal Server printers listed.

Export the registry keys first, to make a backup, just in case.

Then delete the Terminal Server printers from that same part of the registery, do NOT delete the local printers.  These are the ones with the “…on MyComputer … in session…” within the printer name.

Deleting these has worked for this particular server several times to resolve the CPU hogging spooler service (spoolsv.exe)… but sometimes they can’t be deleted in RegEdit.

Grab a copy of RegDelNull by Systernals, it’s free as in beer.

Use RegDelNull.exe to remove some of the entries that would not delete manually – I’m looking at you Mr. Zebra Printer Driver.

Here’s what that looks like (anonymized, of course):

C:\Installs>regdelnull HKLM\System\CurrentControlSet\Control\Print\Printers -s

RegDelNull v1.10 - Delete Registry keys with embedded Nulls
Copyright (C) 2005 Mark Russinovich
Sysinternals - www.sysinternals.com

Null-embedded key (Nulls are replaced by '*'):

HKLM\SYSTEM\CURRENTCONTROLSET\CONTROL\PRINT\PRINTERS\Zebra101 _
on MyComputer(from MyComputer2) in session 3\PrinterDriverData\Barcodes\(0x1701)*de 93

You get a prompt to fix the Null.  Say “Yes”.

Then go back up a few steps and delete the problematic printer from RegEdit.  With the null value gone, you can delete it.

Then restart the spooler service.

net start spooler

If this works, the spooler will start, it won’t use a suspicious amount of processor cycles, and the RDP connections will start working immediately – no reboots required.

Then go and find updated drivers.

I’d be glad to hear about a better solution… please comment below.

Free Computer Burn-In Software

Tuesday, June 2nd, 2009

I thought that free burn-in software would be easier to find.

Every now and then I cobble a computer together from parts, or I have to diagnose a PC that is crashing from time to time.  Unfortunately, even though a PC can boot, it doesn’t mean that it’s stable and ready to go. The tool for this job is burn-in software.

I used to use the free-as-in-beer version of SiSoft Sandra, but over the years it has gotten rather bloated.  Anyway, SiSoft Sandra is more geared towards benchmarking a computer rather than stress testing.

Today, I found a great little tool that seems to do a good-enough job of testing the CPU and RAM – it also puts a modest amount of load on the hard drive.

The free tool that I am currently recommending: CPU Stability Test by Jouni Vuorio. It seems to run fine in all current versions of Microsoft Windows.

Link: http://www.pcworld.com/downloads/file/fid,7146-order,1/reviews.html

It’s a bit old, circa 2000, and I can’t find a current website for it… but it works.  There are several “high-quality”, i.e. non-spammy, websites that host CPU Stability Test. Just Google for it if the link above goes stale.

There is still room to find a better free utility, but for now I’m satisfied.  But, if you have other suggestions for free burn-in testing software, please leave a comment!

Update: A free utility for testing memory (i.e. looking for bad memory sticks) that runs inside Windows – http://hcidesign.com/memtest/. If you’ve got the ability to reboot the machine, then use Memtest86.

A free schtasks.exe equivalent for XP Home edition

Monday, December 15th, 2008

It’s funny how one stumbles upon the finer differences between XP Home and XP Professional once in a while. Every good geek knows the biggest limits to XP Home such as no ability to join a corporate network, no Remote Desktop, and no encrypted file system (EFS).  But who knew about a tiny utility that will run a Windows Scheduled Task from the command line? That would be “schtasks.exe”, and it’s not included in XP Home.

The background: I needed a Limited User in Windows to be able to do something requiring Administrative permissions.  There are a few ways to do this, but in this situation, running a scheduled task was the obvious best choice because the task was already there as an overnight maintenance job.

A quick Google search for “run scheduled task from command line” will lead you to the aforementioned schtasks tool.  Well, I could copy the file from an XP Pro workstation, but that would violate Microsoft’s copywrite.

Fortunately, more searching will turn up a reference to an old MS tool “jt.exe” from it’s Windows 2000 Resource Kit.  You can get individual tools from the W2K ResKit here: ftp://ftp.microsoft.com/reskit/win2000/. The license to JT and is much more permissive.  You’re free to use it, but at your own risk.

The “JT” syntax is not straight forward to me.  But these the two examples will probably help:

This lists all tasks: jt.exe /se

This will run (”activate”?) a task (you do not need to include the .job in the TaskName): jt.exe /sac TaskName /rj

On the XP Home Edition computer I was setting this on, the Limited User could run all the scheduled tasks, even when it couldn’t “see” the task in the list. YMMV.

One could  make this end-user friendly by wrapping a batch file around it and put an icon with a link to your script on the Desktop.

Free way to compare two folders in Windows

Friday, November 14th, 2008

Here’s my reasonably quick and free way to compare the files in a folder.  I’ve assumed a bit of computer knowledge, mostly, because I don’t have time to fill in the many little details.

Get a copy of WinMerge from Sourceforge – it’s a tool often used by programmers to see differences in text files.

Open a command window

- e.g. start –> run –> “cmd”

Create a text file with the names, sizes, and date stamps from folder “A”

- e.g. dir c:\the_documents\*.* > this_computer.txt

Do the same for folder “B”

- e.g. dir \\that_computer\c$\the_documents\*.* > that_computer.txt

Open both files in WinMerge.

- the differences in the two “dir” outputs will be higlighted for you.

Now if you’re still not sure if the files are the same or now, e.g. if the files are the same size but have different date stamps, then search for a utility called “md5sums”.  This will create md5 hashes of all files in a folder.

e.g. c:\tools\md5sums -n “\\distribution\c$\program files\cybex\*.*” > distrib2.txt

That’s it.  It’s been a couple weeks since the last blog post. We’ve been busy at Perceptus.  Our next project is going live soon – retailers with multiple locations in BC and Alberta, watch this space.  Our next product is geared for you!