The Shuttersnitch Proxy

What the heck is “The Shuttersnith Proxy?” I hear you ask! Well, Shuttersnitch is an excellent application for the iPad that allows you to view images as they are sent to it from a Wifi enabled camera. It listens for incoming images, then displays them on the iPad, allowing you to zoom in, tag & rate the images as they are received. This is ideal in a wireless environment where your camera can send images wirelessly to the iPad, such as the Canon 5D Mark II when used the an WFT-E4 wireless grip.

For those of us not lucky enough to have a €900  WFT-E4 there’s another option. Stick a laptop in the middle. I know this limits to using the camera tethered via USB cable rather than wireless, but it’s the next best thing.

Now comes the “Proxy” bit. I’ve hacked together a VBScript program that monitors a particular folder on the laptop for new jpg files, then opens a session to the iPad and sends on the file. It’s a kind of proxy, and since it’s main intention is for use with Shuttersnitch, I’ve called it “The Shuttersnitch Proxy”. 🙂

So, the full setup is:

  • Camera tethered to Latop via USB cable.
  • Canon EOS Utility running on laptop to take RAW and JPG files into a configured directory on laptop.
  • Shuttersnitch Proxy monitoring the directory into which the images are coming from the camera.
  • iPad running Shuttersnitch.

Oh, and I forgot to mention that there’s a wireless router providing wireless connectivity between the laptop and the iPad. (Must get me a battery powered one of these for more mobility).

So, when I click my camera shutter, the image is sent to the laptop via USB, and as soon as the script sees the JPG, it forwards it onto the FTP server on the iPad, and is displayed a second or two later. The script looks specifically for “.JPG” files, and ignores the “.CR2” RAW files, which the iPad wouldn’t be able to display anyway, and would take too long to transfer via wireless

For anyone that’s interested, here’s the VBScript:

sPath = "\localhostC$tmptmp"
sComputer = split(sPath,"")(2)
sDrive = split(sPath,"")(3)
sDrive = REPLACE(sDrive, "$", ":")
sFolders = split(sPath,"$")(1)
sFolders = REPLACE(sFolders, "", "\") & "\"
Dim oShell, oExec, sLine
Const ForReading = 1, ForWriting = 2

Set oShell = CreateObject("WScript.Shell")

Set objWMIService = GetObject("winmgmts:\" & sComputer & "rootcimv2")
Set colMonitoredEvents = objWMIService.ExecNotificationQuery _
("SELECT * FROM __InstanceOperationEvent WITHIN 1 WHERE " _
& "TargetInstance ISA 'CIM_DataFile' AND " _
& "TargetInstance.Drive='" & sDrive & "' AND " _
& "TargetInstance.Path='" & sFolders & "'")

Wscript.Echo vbCrlf & Now & vbTab & "Begin Monitoring for a Folder Change Event..." & vbCrlf

Do
Set objLatestEvent = colMonitoredEvents.NextEvent
Select Case objLatestEvent.Path_.Class

Case "__InstanceCreationEvent"
if objLatestEvent.TargetInstance.Extension = "jpg" then
WScript.Echo Now & vbTab & objLatestEvent.TargetInstance.FileName & " was created" & vbCrlf
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(sPath & "cmdfile.txt", ForWriting, True)
f.WriteLine "open 10.4.11.44 26000"
f.WriteLine "snitch"
f.WriteLine "password"
f.WriteLine "bin"
f.WriteLine "put """ & objLatestEvent.TargetInstance.FileName & ".jpg"""
f.WriteLine "bye"
f.close
Set oExec = oShell.Exec("ftp -s:cmdfile.txt")
end if

Case "__InstanceDeletionEvent"
WScript.Echo Now & vbTab & objLatestEvent.TargetInstance.FileName & " was deleted" & vbCrlf

Case "__InstanceModificationEvent"
If objLatestEvent.TargetInstance.LastModified <> objLatestEvent.PreviousInstance.LastModified then
WScript.Echo Now & vbTab & objLatestEvent.TargetInstance.FileName & " was modified" & vbCrlf
End If

IF objLatestEvent.TargetInstance.LastAccessed <> objLatestEvent.PreviousInstance.LastAccessed then
WScript.Echo Now & vbTab & objLatestEvent.TargetInstance.FileName & " was accessed" & vbCrlf
End If

End Select
Loop

 

 

 

 

 

Set objWMIService = nothing
Set colMonitoredEvents = nothing
Set objLatestEvent = nothing

So there you have it. “The Shuttersnitch Proxy”. Not coming to a movie theatre near you. 🙂

Shuttersnitch costs about €12 and is available in the Apple AppStore.

 

3 thoughts on “The Shuttersnitch Proxy”

  1. I just tested this out with the “Personal Hotspot” feature on my iPhone. The laptop and iPad both associated to the phone, and I was able to send files from the laptop to the Shuttersnitch app on the iPad. My script in the article above was used, and when I dropped a jpg into the relevant directory, it was displayed on the iPad a couple of seconds later. No need to buy a battery powered wireless router now. 🙂

  2. This is great. I’ve tried to get it working but can’t. Can you give step by step instructions on what to do? Thanks

Comments are closed.

%d bloggers like this: