I’ve bumped games-action/pink-pony to 1.2.1 now in my overlay.
I’ve been playing around for a little while with the idea of mapping the Steam Community social network. A couple of days, I decided I’d dig up the old code and get it going again. I ported some old code I wrote in C# for the purpose to Python using the Django framework (mainly to make database access easier). I then wrote a script that would go through Steam, starting with myself, find all the person’s friends who were in Adelaide, then work out from there.
In the end, there are 2,195 people on Steam in Adelaide, who are friends with other people in Adelaide, who are somehow connected to me. There are a total of 4,814 friendships linking these people together, and I excluded a total of 32,561 people who didn’t write in their profile that they were from Adelaide (so, for example, if you only said you were in South Australia, or didn’t put in a location at all, you’d be excluded), but were friends with someone who was. Considering that there’s only two or three of degrees of separation in the geek/gamer community in Adelaide, I’m reasonably certain I got everyone on the main “island”. Of course, there’s going to be some people that will be cut off for whatever reason (such as one of their friends blocking the route to them because their friend isn’t listed as being in Adelaide), but 2,195 people sounds about correct.
I’m also not counting relationships through groups. Groups take more code to make it work.
Now that I have this data, I can also tell you who the most popular people are in Adelaide on Steam. These are the people with the most amount of friends in Adelaide, based on what they wrote in their profile:
I’m playing around with different graphs in graphviz to generate a more graphical representation of this data. Unfortunately for me, it seems to take a lot of CPU power to generate these things. Here are a couple I’ve made up so far:
twopi, overlap=true: Warning: The full-size image that is linked to is a 2636×2678 pixels PNG (7.7MB).
fdp: Warning The one-third size image that is linked to is a 5064×10138 pixels PNG (24.1MB), and may crash your browser.
I’m going to keep playing with these graphs though, hopefully I can make something really pretty.
Once I’ve done that, maybe it’s time to map all of Australia as well? But I think I’ll need to offload the script somewhere else to do that…
Happy new year! I should really update my blog more…
This is a simple bash (shell) script to do timelapse photography with Webcam 2000. In fact, it’ll work with any webcam software that outputs a single JPEG frame when given a HTTP request (as opposed to a multipart image stream).
1 2 3 4 5 | #!/bin/bash while [ 1 -lt 2 ]; do wget http://localhost:8080/ -O`date +%Y%m%d-%H%M%S.jpg` sleep 5s done |
This assumes the camera is running on http://localhost:8080/ I found over the space of two days worth of samples, it took wget about a quarter of a second to run on the machine I was using. It doesn’t go for pefect timing, and it will drift a bit from day to day. As you get more photos in the folder, the slower things will run. Bear in mind too that your webcam software takes a bit of time to respond to HTTP requests, and also has to encode the JPEG image frames. I was using a OV51x-chipset camera (Creative Webcam Vista) which actually talks JPEG over USB, so there wasn’t a great quality loss saving everything as JPEG. Plus, the camera was only 15$ anyway, and the image quality isn’t that great so I wasn’t worried.
The picture files are named YYYYMMDD-HHmmss, ie: a photo taken at 1:10:56pm on 29th December, 2008 is called 20081229-131056.jpg. This way, the frames can have their filename sorted, and the frames will be in the correct order.
Then, to encode the resulting frames in XVID, I used:
1 2 3 4 5 6 7 8 9 10 | #!/bin/sh rm divx2pass.log frameno.avi mencoder "mf://*.jpg" -mf fps=30:type=jpg:w=800:h=600 -nosound \ -ovc lavc -sws 2 -ffourcc XVID \ -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=1 -noskip \ -o /dev/null mencoder "mf://*.jpg" -mf fps=30:type=jpg:w=800:h=600 -nosound \ -ovc lavc -sws 2 -ffourcc XVID \ -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vpass=2 -noskip \ -o timelapse.avi |
In that example I assume 800×600 frames to be played at 30fps, with a 1000kbit/s bitrate. You can also encode in H.264 using the x264 encoder, which results in better quality:
1 2 3 4 5 6 7 8 9 10 11 | #!/bin/sh rm divx2pass.log frameno.avi mencoder "mf://*.jpg" -mf fps=30:type=jpg:w=800:h=600 -nosound \ -of rawvideo -ovc x264 \ -x264encopts bitrate=1000:frameref=6:analyse=all:me=umh:subme=7:trellis=2:bframes=1:subq=7:brdo:mixed_refs:weight_b:bime:no_fast_pskip:direct_pred=auto:mixed_refs:nr=200:threads=auto:turbo=2:pass=1 \ -noskip -o /dev/null mencoder "mf://*.jpg" -mf fps=30:type=jpg:w=800:h=600 -nosound \ -of rawvideo -ovc x264 \ -x264encopts bitrate=1000:frameref=6:analyse=all:me=umh:subme=7:trellis=2:bframes=1:subq=7:brdo:mixed_refs:weight_b:bime:no_fast_pskip:direct_pred=auto:mixed_refs:nr=200:threads=auto:pass=2 \ -noskip -o timelapse.264 mkvmerge -o timelapse.mkv timelapse.264 |
mkvmerge also allows you to define chapters for your time lapse, which is useful for breaking it up by day (and then, by hour if you like). But to do that you’ll need to write your own chapters XML file.
As an example, I did some timelapse photography of a LAN at a friend’s house.
You can also see in my example that I turned on labels in Webcam 2000 to have the current time embedded at the top of each frame. They don’t always match the time on the filename (-2 seconds at most), but it’s still good for debugging things, and it also is a good caption to have in the final video.
I’m now looking into a much more elegant Linux-only solution to this. I’m looking at camsource with anticipation, and I’ll do some experiments with that at some point.
I’ve updated my Trackmania Disassembler to support Trackmania Nations Forever and Trackmania United Forever. And it seems Nadeo have finally gone off their weak XOR password obfuscation algorithm. The previous part of the file that held the password is now always blank – wether there is a password there or not, and the password seems to be buried somewhere in the data block.
Seeing as the algorithm has been now changed, I thought I’d document how the old password algorithm worked.
1F B4 E5)5E 24 F0 0F 5A)As an example, say my password is “passwd”. That means the encrypted form of my password is 1F B4 E5 2E 45 83 7C 2D 3A.
XOR for password obfuscation is trivial to decode. If you know the original text and the encoded text, you can determine the cipher text. (Original XOR Encoded = Cipher) Once you know the ciper text, you can then encode or decode text freely. (Original XOR Cipher = Encoded; Encoded XOR Cipher = Original)
The size of the password stored the old way is variable, so a long password will take more bytes to store than a short one.
There’s more about the XOR cipher on Wikipedia.
So far, looking at the Trackmania Forever stuff, I’ve noticed:
A new release of IGA Ad Cache Editor: The “I gotta stop playing Warcraft if I expect to get any development work done” edition. (0.1.5)
What’s new in 0.1.5:
All of this can be gotten from the igaeditor website…
Powered by WordPress