Archive for the ‘Entertainment’ Category

Automated webcam capture/image downloader

Wednesday, January 2nd, 2008

The other day I was checking out a webcam at a local ski resort, and wanted to see what an entire day’s worth of shots looked like played in a movie. I’m sure there are apps out there that do this sort of thing, and might even be an easier way of doing this. Regardless, I decided to have a play.

Below is a simple VB Script file (sorry windowless folks) that will download and save an image to your hard drive. It will save the images in the same directory the script is running.

Dim imageURL
imageURL = "http://www.mtbachelor.com/@@/cams/wvskycam.jpg"
Function SaveBinaryData(FileName, ByteArray)
	Const adTypeBinary = 1
	Const adSaveCreateOverWrite = 2
	Dim BinaryStream
	Set BinaryStream = CreateObject("ADODB.Stream")
	BinaryStream.Type = adTypeBinary
	BinaryStream.Open
	BinaryStream.Write ByteArray
	BinaryStream.SaveToFile FileName, adSaveCreateOverWrite
End Function
Function BinaryGetURL(URL)
	Dim Http
	Set Http = CreateObject("WinHttp.WinHttpRequest.5.1")
	Http.Open "GET", URL, False
	Http.Send
	BinaryGetURL = Http.ResponseBody
End Function
Function doSave()
	Dim image, fName, p_month, p_day, p_hour, p_minute, p_second
	image = BinaryGetURL(imageURL)
	p_month = padZero(Month(Now))
	p_day = padZero(Day(Now))
	p_hour = padZero(Hour(Now))
	p_minute = padZero(Minute(Now))
	p_second = padZero(Second(Now))
	fName = p_month & "_" & p_day & "_" & Year(Now) & "-" & p_hour & "_" & p_minute & "_" & p_second & ".jpg"
	SaveBinaryData fName,image
End Function
Function padZero(val)
	If(Len(val) < 2) Then
		val = "0" & val
	End If
	padZero = val
End Function
doSave()

Copy and paste the above script into an empty text file. Go find a webcam you’d like to capture. When viewing the webcam image, right click and copy the images URL. Change the imageURL variable at the top of the script. Save the script (.vbs extension). Next you’ll need to set up an automated task to run the script. For help on how to set up tasks, check out this KB article. You’ll want to schedule it run somewhat frequently, but no more frequent than the webcam updates.

That’s pretty much all you need to do. If everything goes right, image files should start appearing in the directory that the script is located.

To create a movie from the sequence, you’ll need to find some software to do that. Out of sheer laziness, I just use QuickTime Pro, but there’s a bunch of shareware/freeware options available out there.

Have fun…

Heavy Metal Umlaut - The Diacritical Mark of the Beast

Tuesday, September 11th, 2007

motorhead logo

While trying to find some information on umlauts and the German language, I came across this and about pissed myself: The Heavy mMetal Umlaut

Hip hop meets the violin

Friday, August 10th, 2007

Paul Dateh and inka one, layin’ it down. You can find their myspace pages here and here

Tsukuba - nonsense instruments

Thursday, August 9th, 2007

Breakin’ - Turbo’s Broom-Dance

Wednesday, August 1st, 2007

That’s hot.

8BitBoy - Andre Michelle

Monday, July 30th, 2007

http://8bitboy.popforge.de/

Karsten Obarski invented 1987 - twenty years ago - the MOD format for his Ultimate Tracker running on Amiga computers. Since then, countless songs are created, especially for the demoscene.

MODs have special attributes. All samples are stored in 8bits and the number of voices is limited to four. To have something similarly to chords, the three notes of it are repeated very fast. This makes MODs sound so freaky.

Finally 8BitBoy brings those songs back online.

Habanero Pepper - It’s just food. What could go wrong?

Thursday, July 26th, 2007

That’s 200,000 - 300,000 scoville units of mouth burning fun!

Onslaught 2

Thursday, July 19th, 2007

This game is a total time suck! Prepare to get nothing done today :)

iPhone advertisement remix

Wednesday, July 11th, 2007

Driver’s License as Ableton Live MIDI Controller

Monday, July 9th, 2007

Dan Deacon on NBC

Wednesday, July 4th, 2007

I think this guy is brilliant in his own “special” way.

Checkout more from Mr. Deacon, or visit his Web site.