Hardware Photos Unix

Getting Motion working with Vivotek IP Camera

I finally got around to looking into rigging up some security cameras around my home so I can find out what damn neighbors have been letting their dogs do their business in front of my gate! I actually caught one woman and her dog and when I pointed out nicely that there was a tree only 20 feet down the sidewalk, she said her dog wants to urinate where it wants, so she lets it because it pulls the leash. Yeah, well, that’s why you are the HUMAN and the master to the animal. Ah, don’t get me started, that is a whole other blog post.

Anyway, where were we? Oh, right! IP cameras! I decided upon the Vivotek IB8369 since, well, it’s awesome. Works at night, great resolution, nice range, can be outdoors, uses POE, and a bunch of other stuff, check the website, what am I, a sales guy?

OK, next step, I wanted to rig this up using my Linux box, not Windows. So I decided to use Motion to capture AVI video when there is motion detected. It will do so, AND store individual JPG frames so you can pick one that is a nice shot and then post it all around your neighborhood with a caption that says “BAD DOG OWNER”. Your needs may differ.

Getting Motion working was a bit of a hassle, here are a few things I did that could help you if you are trying to set this up also.

First, the camera itself, you should set a static IP on it using it’s web interface, and then I had to go into Configuration->Media->Video and set stream 1 to use JPEG. You will also need to set the “Frame size” to something where the width/height are divisible by 16, otherwise you will see messages like below from the Motion logs:

[1] [CRT] [NET] [Aug 27 18:45:01] netcam_start: netcam image height (1080) is not modulo 16

And here is a screenshot of the webcam settings page:

The next thing is to make sure your /etc/motion.conf has good settings. If you haven’t, you could see messages in the log like:

[1] [NTC] [STR] [Aug 27 18:49:06] http_bindsock: motion-stream testing : IPV4 addr: port: 8081
[1] [CRT] [STR] [Aug 27 18:49:06] http_bindsock: motion-stream bind() failed, retrying:
[1] [ERR] [STR] [Aug 27 18:49:06] http_bindsock: motion-stream socket failed, retrying:
[1] [CRT] [STR] [Aug 27 18:49:06] http_bindsock: motion-stream creating socket/bind ERROR:
[1] [ERR] [ALL] [Aug 27 18:49:06] motion_init: Problem enabling motion-stream server in port 8081:

Most are okay from the defaults, here are the ones I changed to make things work:

netcam_keepalive on
target_dir /var/motion
stream_motion on
stream_localhost off
webcontrol_localhost off

And then finally the commands to run Motion:

chown motion /var/motion/
service motion start
tail -f /var/log/motion.log

The error log is your friend, and once you have things working nicely, change the log level in the conf file to something more reasonable.





Borders without Books

It is sad to see all these bookstores closing these days, and even the large bookstores are suffering. Perhaps some karma at play, seeing how they forced the little bookstores to close in the past!

But nonetheless, I am sad to see this particular Borders shut down, since they had an AWESOME selection of tech books! And I was just there a few days ago to see ALL the bookshelves empty of knowledge.

They were selling everything in the store, even those big-ass bookshelves. I thought briefly of putting in a 12 foot high bookshelf in my home office but decided against it.


Google Screensaver on x64

Well, I’m in the process of configuring a new Vista Ultimate system on an Intel 64-bit cpu.

One of the first problems I had was I wanted to get the google screensaver working. I downloaded Picassa and that includes the screensaver app, but I was not seeing it as an option on my windows control panel screensaver section!

Turns out you need to:

Go to C:\Windows\SysWOW64 folder, copy the file
GPhoto.scr and paste it in to the C:\Windows\System32 folder.

Now it works great! Now if only google will adapt it to allow arrow controls to go back/forward through the photos.

One more note… if you using windows media player to play music, you’ll need to go into tools->options and check the “allow screensaver during playback” box to have the screensaver work when music is playing.