Monday, January 19, 2009

Map Mod

If you click here, you will see the latest incarnation of the World Domination map. If not, well I guess I can't force you. There are a few, very minor modifications:

  • I added my logo at the bottom of the map.
  • The map is a teensy bit (40 pixels) wider.
  • Everything is scooched ever-so-slightly to the East.
  • Some under-the-hood caching issues with Internet Explorer are fixed.
Nothing (heh) Earth-shattering, to say the least.

The wider map and the eastward shift puts New Zealand over on the left edge. Our Kiwi pals were getting cut off on the old map and folks in Hawaii were crowding out the zoom control. That's all fixed.

The big downside with that is you losers with 1024x768 displays are kinda fucked, since the map is now 16 pixels wider than your screen.

I've never witnessed the IE problem before (IE supposedly hammers the server mercilessly when it downloads the markers), but I ran across a fix accidentally so I figured what the Hell, why not? After I went to all that trouble it seems like there may be some Firefox issues with that, but I'm in wait-and-see mode for the time being.

And of course, as for the logo, the more pix there are of Hinky Dink on the Web, the better. That particular piece is not working exactly the way I hoped it would. My smiling face stays in the same place when you move the map around, but it blinks in and out when the markers are refreshed. It shouldn't do that (at least, NIMHO).

One thing I played around with that didn't work was a timestamp for the most recent data refresh. Part of the reason for that is for the next timelapse video and the other part is so you can tell when there's no one playing. My approach was all wrong in the first place, so I'm exploring alternatives.

This is a work in progress so if you visit the link and it's not working, then it's probably because I broke it.

Saturday, January 10, 2009

UT99 Time Squeeze

The Big Squeeze

For the last week I've been trying to make a time lapse video of the World Domination Map. The waiting was the hardest part. The result wasn't as good as I expected it to be, but it was an experiment anyway and I learned a lot of things along the way.

Here it is.

The Joy of ffmpeg

FACT: there is no joy.

ffmpeg is a wonderful tool for both Linux and Windows, but if you're not a video pro you're going to get lost in all the command line switches.

However, it was the only tool (I found) for this job, which required taking a snaphot of a browser once every 30(-ish) seconds.

If you read the fine manual page, you will notice there is a switch, -x11grab, that takes an X display (the desktop GUI in Linux) for input. When I saw that I knew immediately I had found the tool I needed.

But as it happens, there is no binary, ready-to-install, ffmpeg package on Earth for Debian or Ubuntu that includes this incredibly useful option (and just forget about finding it in the Windows package). You have to build it yourself.

No big deal. I've been compiling crap on Linux since 1994. But if you decide to roll your own ffmpeg to get x11grab, compile and run it in you home folder. Do not run "make install" because you do not have all the libraries required to make a version as "full featured" as the one that's already installed on your system.

As with all other desktop capture programs in the Known Universe, there is no "timelapse" option. However, ffmpeg will let you take a capture every so many seconds, but if you roll that into a video file, it won't play back as timelapse. You have to capture each frame, save it as a PNG (Portable Network Graphics) file, and stitch those files back together with ffmpeg to get a timelapse video.


I set up to take a snapshot once every 30 seconds. With the playback rate that means one second of vid time is going to take about a half hour to collect. Armed with that knowledge, I started capturing and took a nap.

After I woke up I stitched all the frames together to take a peek at the few seconds of video I managed to acquire. The results were not up to my expectations. The individual PNG files were perfect, as crystal-clear as they were originally on the screen.

Glommed together as a video, they were ugly as Hell.

I played around with the output options, but in the end I couldn't fix it. If there was fixing to be done, it could only be done in "post production", so I decided as long as I kept the PNG files I could mess around with the quality options at my leisure.

Final Run

There were other problems.

First, the Map is a nasty memory-leaker. This is a known issue with the Google Maps API. Nothing to be done there, but ffmpeg likes its CPU cycles and memory. Running both on the same box is pushing things to the limit.

Second, there is the issue of knowing where, exactly, the browser is on the X display. Not a problem if its full screen. This is where it gets weird.

I had to display on one Linux machine and capture from another. For this I used a VM (virtual machine) on my laptop. Then, on a Windows box, I ran an X session (with Cygwin-X) at the perfect screen resolution, which seemed to be 1050x800. This VM dedicated all its resources to running The Map in a browser. For days.

Then I dedicated another VM to grab the remote X display of the laptop VM on the Windows box over the network. Got that? Three physical boxes, two VMs.

Third, The Map has a tendency to just stop. It's not that big of a deal to get it started again, so I just decided to keep an eye on it during this test run.

It ran for four days. Sometime during the last day the VM running ffmpeg ran out of disk space. ffmpeg never complained or errored out. It just kept making zero-byte files, which, when you give it a thought or two, is not a very helpful way to operate.

During those four days I on worked the Map's stopping problem. Every time I thought I had it nailed, it would stop again. The Map is updated by a bash script that peals off the name, ping, score, and IP address data for latitude and longitude.

You may recall the fun I had with GoDaddy last year with this issue. As it turns out, the same problem(s) still exist. Every now and then, the ftp process that delivers the data to the server just HANGS. How and why I don't care anymore, since I don't like dealing with GoDaddy's Tech support.

But in the end I hacked the script around so that it can detect that it's HUNG and kill any outstanding ftp process.

As a result of that, The Map now works better than ever (knock on wood). But in the process of fixing the script, I broke it completely and The Map didn't update for about an hur and a half.

At that point I killed everything and started working on the video. Even with the thousands of zero byte files I still had 5 minutes of video. When I made the final version, I doubled the speed before I uploaded it to YouTube.

Version 2.0

Version 2.0 is now in the planning stage, using lessons learned during the production of version 1.0. I hope to get a full week's worth of capture this time around.

Sunday, January 04, 2009


Today, I got home from eating breakfast out with the wife (Pinky Dink), turn on my barely one year old Samsung 216BW widescreen monitor and everything was piss-yellow.

I fired up the ATI Catalyst Control Center (which I hate) and bumped the blue channel up until it looked OK. That was fine for a few minutes, but it started going yellow on me again, sort of pulsating.

Certain the monitor was dying, I switched to another box (I have five boxes on a keyboard/mouse/video [KVM] switch). Every box was fine, so I went back to Old Yellowstain and twiddled the cable.

The screen went black and the box rebooted. No video. At all.

Popped the side cover off and pulled the video card out. The cooling fan was jammed tight.

Another. Fucking. Fan. GRRRRRRRRR.

I dropped back to the built-in Radeon Express 200 and it was fine (after a little screwing around). Played a few rounds of UT with no problems.

Obviously during these last ten or eleven months of crashing UT, dicking around with drivers, changing the hardware, etc., the problem was a lousy, fucking, pancake fan.

I ran out and bought an NVidia card to replace it. 9400 GT. No SLI support, which I can't use in this box anyway, having only one PCI-e slot. Off-brand (PNY), sixty-five bucks (which means you can probably get it for $49.95 at TigerDirect), 512MB of RAM (the old one had 256).

It, too, has a fucking fan, meaning some day it will die. By that time, I'm sure I'll be able to get a 1T card for sixty five bucks.

Now, as to why I hate ATI.

It was the FAN, right? No reason to hate ATI. After all, they didn't design the fan.

What I hate about ATI, what I really, really HATE is that bloated, steaming pile of shit called "The Catalyst Control Center" (CCC). After a reboot it takes forever and a day and a half to give you back control of your system once you log in. NVidia's equivalent (NVidia Control Panel) takes seconds to light up in the system tray and you're ready to rock and roll.

The only reason I was running CCC was it was the only way to turn on the "VPU Recover" option (much easier with the Omega driver).

So there you have it. I will probably be playing UT a lot more this Winter.

See you online!

Saturday, January 03, 2009


Dear mrhinkydink,

Video Disabled

A copyright owner has claimed it owns some or all of the audio content in your video Websense Policy Bypass. The audio content identified in your video is Through Being Cool by Devo. We regret to inform you that your video has been blocked from playback due to a music rights issue.

Replace Your Audio with AudioSwap

Don't worry, we have plenty of music available for your use. Please visit our AudioSwap library to learn how you can easily replace the audio in your video with any track from our growing library of fully licensed songs.

Other Options

If you think there's been a mistake, or you have other questions, please visit the Copyright Notice page in your account.

The YouTube Content Identification Team

Sigh... I suppose Recombo DNA is next.