Hi All,
As I reported a year ago, Reinhard (see "Homemade webcam" from wurzelmac) instructed me how to use a normal camera as webcam, employing the software gphoto2. This gives a much clearer and nicer photo than you could get with most webcam cameras. Based on my one year experience, I would like to update my procedure as follows:
1. Camera, Canon Powershot A510 or other compatible camera. See a list here.
http://www.gphoto.org/proj/libgphoto2/support.php I bought a used A510 on Ebay for about $20.
2. USB cable (powered) to reach from computer to camera location. Mine is 10 m, two cables coupled together, reaching from camera to computer. This might be about the maximum possible length.
3. The ACK-800, 3.15V DC power supply for the Canon camera, which cost about $15 from China, has never failed over 1 year continuous duty.
4. For the camera mount. I am using a small plastic refrigerator box with a window cut out and plexiglas hot-glued in. This is located outside the house on a covered balcony.
5. Following Reinhard's instructions for gphoto2, I first installed Homebrew (
http://brew.sh/ ). Then on the Mac Terminal used the command
brew install gphoto26. My gphoto2 programming ability is very limited, but I managed with some guidance from the Internet to write gphoto2 instructions, which are entered in the Mac Terminal. Thus the camera will zoom, take photos at desired intervals in sec., overwrite and store as a desired file name. These instructions involve only two command lines as follows:
With the camera turned on, first run this command twice
killall PTPCamera After the second time you should get the response ?No matching processes were found?.
Then copy and paste and run in the Terminal this command line shown below. Make sure you get the entire line copied.
gphoto2 --set-config zoom=3 -I 60 --capture-image-and-download --force-overwrite --filename webcamcanon.jpg
This sets the zoom as desired to 3, the interval between taking shots of 60 sec and stores the image with a desired filename, here webcamcanon.jpg. The last image is deleted by the "force-overwrite" The image-taking will continue until stopped by closing the Terminal window.
At first, often the zoom will not be found, causing a non-zoomed photo to be taken. If I want to zoom, I need to close the Terminal window, open a new one and enter the command line again.
Here is the gphoto2 reply I get in the Terminal window after each photo:
Waiting for next capture slot 55 seconds...
Capturing frame #276...
New file is in location /store_00010001/DCIM/900CANON/IMG_0029.JPG on the camera
Saving file as webcamcanon.jpg
Deleting file /store_00010001/DCIM/900CANON/IMG_0029.JPG on the camera
Waiting for next capture slot 55 seconds...
Capturing frame #277... You can experiment with different zoom values(1 to 9). The interval values I can be any value in seconds. Complex programs can be written with gphoto2 to control the camera but these above commands accomplish what I want to do. Additional ideas can be obtained from the references below. I am attaching 2 photos, unzoomed and zoom=2
If the photo file is selected, the resulting photos appear in Preview, and the new one is seen by clicking on the last one.
Failure and restarting procedure: On my system with the long 10m USB cord or 2 shorter cords put together, failure may occur every day or so. This is indicated by the message PTP I/O Error , and the picture-taking and downloading then fails. If this happens I then close the Terminal window or force-quit Terminal. Then I disconnect the camera USB at the computer for a few seconds, restart Terminal and choose a new window. Start over by running the two commands. This procedure will take less than a minute.
It can happen that the camera might turn itself off. This occurred recently when I shut down my computer because of an approaching thunderstorm.
When restarting, I noticed that when I entered the first "killall PTPCamera" that I got the reply ?No matching processes were found?. Normally this comes only after the second "killall PTPCamera" command. I simply went outside and pressed the camera's on-off button. Then I started the procedure with the terminal window again and all was well. Recently I had to turn the camera on a second time and repeat the procedure. After every restart remember to go to Weathercat and reset the Webcam Local File, as explained below.
Images can be saved individually and as 1-hour videos with Weathercat as follows:
Set path to the image file name with Preferences>Webcam. On my iMac these are located at
Users>Irvingdunn>Library>Application Support>WeatherCatMedia>Movies and Pictures. If you have a disruption in the image-taking, after restarting make sure that you check to see that Weathercat is saving the images. This is done by clicking on Show Video Preview on the Webcam page. If the current image is not shown then you have to reset the Set Path.
I sometimes use iMovie to make longer videos from the individual jpg photos saved by WC. WC saves one hour .mov videos which can be imported directly into iMovie. The normal speed can be decreased or increased by a factor of 8. The .mov files can also be imported into QuickTime Player by simply dragging them in one by one to create a large .mov video for the day. This can be uploaded to YouTube. You can see a recent unzoomed result here.
www.youtube.com/watch?v=qRgRhpaY0sE&feature=youtu.beAs always when taking WC-saved images, there is a reduced resolution caused by the WC compression.
Using your webcam image online:
Setup a Simple Web weather webpage in the Preferences of WeatherCat.
I am paying about $5 per month to a provider for hosting my Simple Webcam website:
www.magpie-hill.com WeatherCat can send your image to Wunderground (preferences>online>Wunderground PWS) and to other weather sites (>additional services).
From Wunderground or your own website the image URL can be given to webcam hosts, such as Lookr.
I hope some of this is useful.
Irving
Some useful links on using gphoto2https://www.linux.com/news/controlling-your-camera-your-computer-gphotohttp://www.moreno.marzolla.name/software/linux-time-lapse/https://wiki.archlinux.org/index.php/Digital_Cameras