Time Lapse Video at an SF Convention using Linux and a webcam

20 01 2012

For quite a while I’ve been interested in using commodity hardware (a webcam, a small linux machine) to take time lapse videos. It didn’t seem like that complex a problem, but there were a lot of logistical and mildly technical obstacles to overcome. After a couple tests and short videos, it was time to set things up to record a four day long video at [Arisia](http://arisia.org/), in particular, a shot of the registration area.
Here’s how I did it.

Read the rest of this entry »

Advertisements




Hosting a Terreria Server – The yakshaving commences

22 05 2011

Four kids, four laptops, one minecraft worldSo the latest craze around here is Terraria. Think of it as Minecraft in 2d. Naturally, since the kids here are all Minecraft addicts, Terraria was a natural next step. Minecraft, the gateway drug for MMPORPGs.
Of course, “DAD! Can you host a Terraria server for us?” was inevitable. “Sure”, the foolish Dad says, “Where’s the Linux client?”
“Yeah, so, there’s a problem with the Linux server version of Terraria. There isn’t one.”
Awesome.
So began my descent into Windows hosting hell. I share my experiences here with you, to hopefully lesson your pain.
A server
Windows xp laptop in the server rackIn order to make this work, you naturally need a server. I had a spare Windows XP Dell 620 laptop lying around that looked like it was ready for abuse, so that was put up as my offering to the network gods. Getting said laptop into the server closet proved to be a bit of a challenge, since I was faced with some awesome challenges:
* The NIC on the laptop (or the drivers) are unstable. Occasionally it will drop the network connection, requiring a physical cable drop and reconnect. Wonderful.
* Terraria is a DirectX application. Ergo, it cannot be started via RDP (which reduces the video driver capability). I must start Terraria on the console of the laptop in the server closet before connecting to it.
* The screen on the laptop is twitchy – Occasionally the screen will blank out, and only a hard reset will restore it.
Installation
Setting up and running the Terraria server was pretty straightforward. Install Steam, download/install Terraria, start up the game, click ‘start server’. Easy, huh? Note that because it uses Steam, you need to use a unique login. My experience has been that the Steam credentials are only checked during startup – once the server is running, you can log out of steam on the server and run up a client machine on the same login.
Networking
Anyone who is familiar with firewalled hosted services should be able to set up their network appropriately. In our network environment, we host servers behind a NAT enabled firewall, and set up port-forwards to internal services. This makes the server relatively isolated from the internet at large, but allows for the server to be accessed from the outside world.
Some basic guidelines when setting up your server:
* Do not host your Windows box on the internet without a firewall. Really, just don’t do it. Windows boxes are the most often attacked, have the most vulernabilities, are the most commonly compromised.
* Running a Windows host with a ‘self hosted’ firewall is marginally better, but is still easy to run up in an ‘unsafe’ configuration without you even knowing it’s happened.
* Terraria uses port ‘31337’ for the server. Note that this port is ALSO used by the (mostly old school now) ‘Back Orifice’ application – a tool generally used to hack servers. Many firewall tools and applications may flag Terraria servers are Back Orifice servers, and disallow them
Testing the server’s available is pretty easy. Log into your Linux box out on the net (you do have one, don’t you?) and test connectivity to the server:

dbs@calypso:~$ telnet your.firewall.ip 31337
Trying 1.2.3.4...
Connected to your.firewall.ip.
Escape character is '^]'.

Hooray! Your server is ready to access! Run up Terraria on your computer, and connect to the IP address of your server (note that Terraria doesn’t support hostnames [idiotic in my opinion] – you must connect by IP). You’re in the game!
Conclusion
In so many ways, Terraria is NOT ready for prime time. The lack of a decent server mode, the requirement for DirectX for even basic operation (even in server mode) – these make hosting a server more painful than necessary. It can be done, but I don’t know how long this house of cards will last.
Oh, the game itself? Don’t know, haven’t played it, there’s no Mac version.





CONGO Update – The road to 2.1.

10 05 2011

I’ve set a goal for myself. Have CONGO v 2.1 released by June 1st. It’s an auspicious goal to be sure, and recent career shifts have either made it more likely (more time to work on it) or less likely (new job) to have time to dedicate to coding.
But goshdarn it, I’m going to try.
congov2-eclipse-screenshot.pngWhile coding away last night at a particularly recalcitrant chunk of the new ‘Links’ system (I’ve been… instructed… by my pesky users, that ‘Friends’ is really too ‘social buzzy funtime networking’ for an event management system), I was curious how big CONGO had gotten. So a couple greps got me some quick stats:

Total lines of Java : 13,412
Total lines of XML : 5,492
Total lines of JSP : 5,543

This makes CONGO the largest application I’ve ever written completely on my own. Oh sure, I’ve worked on larger systems, but that was part of a team with other coders. This one (with some small help from 1-2 folks – accounting for around 2% of the code) is all mine.
I’m always looking for alpha and beta testers. Interested? Lemme know. Continuous build / QA testing is working, so there’s always new builds and bugs that need to be tracked.





My bosses are audiophiles.

26 04 2011

It’s interesting working for a music distribution company – our upper management tends to the audiophile / retro-geek crew.
Witness our CEO’s office:
CEO Rig
And the CTO’s office:
CTO Rig
I do wonder at the massive old-skool speaker stacks and tube amps… in a 15×15 standard drywall office, but it does look sorta neat.





My Chumbys and Me

18 04 2011

It’s no secret I’m a big fan of Woot and the excitement that can accompany a Woot-Off, that festival of consumerism and feeding frenzy for those susceptible to impulse buys.
A few frenzies ago included offering up a Chumby One for the attractive price of $49.
Chumby one!
I bought two.
I’d been trying to figure out various ways gaining ‘shelf-top’ access to online music resources. Back in the day, I’d picked up a Roku Soundbridge or two, but I’ve never been completely satisfied with the results. Even modern versions of these devices are in my opinion too expensive and too limited. They play music, that’s it. Even though Roku has moved on, other manufacturers are offering similar devices for $250.
Screw that.
The Chumby One is a small 450mghz Linux computer with Wifi, 64meg of RAM, and a 3.5″ color screen. It has everything I was looking for in a ‘bedside’ or ‘shelfside’ device. It can play music, it has a touchscreen that can show a wide variety of content, and it’s controllable from a centralized server. It has line-level audio out via a headphone connector, as well as internal speakers. The design allows for easy ‘bedside’ use, along with unattended modes.
The final button for me was the inclusion of a powered USB port on the back. This means I now had an easy charging station nearby for my iPhone, without taking up another power outlet and the accompanying cable mess.
I love the variety of apps, both the whimsical (David Letterman’s Top 10) and the useful (A constantly updated weather / traffic / time / date page that shows ‘local status’ in real time) – all while happily playing Radioparadise for me.
And. Heck. They’re cute.





The Blog is Resurrected… for now.

9 03 2011

Well that was no fun.
For a while, I was in a funk because the Planet-Geek.com site was not posting ANY of my articles. And when I logged into the maintenance pages, I couldn’t see any of my articles for the last year.
Now, the site has something like 1600 articles on it. I was pretty cranky at the possibility of losing all my content. But the database itself seemed okay, and I could see entries in it. Just new content was not showing up.
Tonight I decided to sit down and figure out WTF was wrong with it.. It took about half an hour to determine the root of the problem…
I was logging into the wrong site.
We migrated the blogs off msb to msb2 a year or so ago, but I never a) removed the old bookmark in my shortcuts, and b) never updated the maintenance page to point to the correct toolset.
So I was editing the old site.
Boy do I feel like a dork.





Performance Tuning with Trac

14 02 2011

I’ve been using Trac for managing all the bugs enhancements in CONGO for the last 3 years or so. For the most part, it’s been pretty useful, though I haven’t been thrilled with some performance problems I was having.
Most notably, a simple page load would take 4-5 seconds to come back.
I thought the initial problem was due to the older (v0.11) version I was running. But after a painful SVN crash and rebuild, and taking that opportunity to upgrade to 0.12 and move to a faster host, the performance problems were still there.
When reading Trac performance blogs, the first thing everyone says is “For gods sake, make sure you’re running mod_python!!!” Well, I was. So that wasn’t it.
I found the answer in an older blog post that mentioned the Chrome elements in Trac were rendered on the fly via Python. This didn’t make sense, as they were primarily static elements.
So why not cache them?
A quick tweak to the vhost configuration:

<LocationMatch /[^/]+/chrome>
Order allow,deny
Allow from all
ExpiresDefault "now plus 12 hours"
</LocationMatch>

(which, by the way, necessitated adding mod_expires in apache), and a restart, and my load times went from 6.6 seconds:

172.16.1.1 – – [13/Feb/2011:22:58:13 -0500] “GET
/chrome/site/stonekeep-ball-logo.gif HTTP/1.1” 200 6660
http://trac.stonekeep.com/&#8221; “Opera/9.80 (Windows NT 5.1; U; en) Presto/2.7.62
Version/11.01”

down to zilch due to caching:

172.16.1.1 – – [14/Feb/2011:08:15:51 -0500] “GET
/chrome/site/stonekeep-ball-logo.gif HTTP/1.1” 304 –
http://trac.stonekeep.com/wiki/WikiStart&#8221; “Mozilla/5.0 (Macintosh; U; Intel Mac OS X
10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4”

Win!!!