| Jason! ( @ 2003-12-02 22:10:00 |
| Current mood: | yawn! |
How to think like a computer: 1 in a series.
I've been trying to fiddle with the WXDU webcams. We've got a bt878 based video capture card with multiple inputs. I've got multiple cameras, should be no problem, right?
Why don't I use USB based webcams? USB lines don't go very far, and the rooms that I've got webcams in are quite a bit a ways apart. With a capture card, I can run analog line wherever I want, and control it all from one location, which is also the webserver.
Wrong. I had a cron job running to run the two scripts to grab a frame from the appropriate input on the capture card (one script per cam input). When I started running them both in the timed job queue, the new script wouldn't capture images. I took the new cam input script out of the job queue and ran it from the command line. It worked just fine. Back in the job queue: no dice.
I finally guessed that because the script were being run at the same time, they were competing for the capture card and the new script was losing every time. I put a little delay in so that the commands wouldn't run at almost exactly the same time, and everything seemed to start working again.
The are other, more right ways to fix this, but I'm too tired to explain further.