I’m working on a webcam for my imac. When someone has the web page open, I want to send the page a new snap shot from the web cam every 5 seconds or so. I have <head><title>Live Webcam page</title><meta http-equiv="refresh" content="5" /><meta http-equiv="expires" content="0" /></head> so the page is reloaded every 5 seconds.
Here is a history of my attempts so far:
- tried using
isightcapture. This works fine when I run it in the terminal, but not otherwise. - tried using
imagesnap. This, again works fine from the terminal, but almost always generates a solid green image otherwise. - tried using
qt-capture. Again, works fine from the terminal, but not otherwise. - tried putting these commands in a script, then running the script. No difference.
I understand apple has been making it progressively more difficult to programatically operate the camera, for “security reasons”, possibly causing these problems. Anyone have a solution?
OK, I found that apple wants the web cam to be operated by the “current user”, so these tools need to be run from a shell, opened by the current user. I can put them in a script, then run the script myself, and they work. I can’t run the script from a webpage however.