As I'm moving closer and closer to medical school, I seem to be doing less and less medicine. From helping build a local bar as a volunteer (a worthy cause, in my book), to hack-building cool gadgets. I'm picking up bizarre skill sets left and right. This is adding to the already diverse skill sets I had acquired on my previous jobs. I'll detail my rants, raves and experiences here.

Wednesday, October 9, 2013

I know I went silent for awhile. New job and more. Tons more. I'm getting back to some of the projects, but I'm also taking on a new one. I need to install some basic security cameras at a facility. I'd prefer that they work using the network infrastructure (It's not a computing intensive location). Really cheap IP cameras run around $70, and I'm not looking to pick up another maintenance hobby.

A Raspberry Pi runs $35, and the camera runs $25. That's essentially an HD IP camera for $60 (I've got an insane number of power supplies lying around the house). I also already own a Pi and camera to play with.

I bounced over to the Raspberry Pi foundation's website to see what they had to say about the camera. They have some good tips on getting the camera installed. However, I hit a couple of snags and couldn't get videos to stream over the network. It was dinner time and I had to bounce out to have dinner with friends.

All this does is make sure the directory exists, then it creates a series of 960x540 JPEG's of quality 80 every 10 milliseconds for 9999999 seconds (I think it's seconds). The "-th" is a thumbnail configuration, and the "&" tells this script to run in the background (I think).
The next part of the script is one that I'm not sure about. It streams the JPEG, but I'm not completely sure I understand everything, yet.

I did mess around with the JPEG settings. I selected the 960x540 image size because all of my monitors are 1080p, at least. This way I can easily accommodate multiple streams on the same monitor. I set the time lapse down to 10 milliseconds, but it didn't seem to increase the streamed frame rate. I put quality at 80 because it was where I could read some text from across the room in my test image. I finally messed around with all three of these settings to try to improve the frame rate, but with no real success. It also appears that frame rate is impacted by the amount of light in the image (In theory this makes sense, but we should still be able to get decent lighting/shutter speed without sacrificing frame rates).