Page 1 of 1
Using the output of a script as the source of an Image
Posted: Mon Sep 08, 2008 3:45 pm
by diggler
Hi
I have written a small perl script to extract a jpeg from a Linksys WVC54G which is notoriously awkward by normally only providing a propriatory image stream.
Is there any way of using this script directly from zoneminder; i.e. define this script as the source where the output of the script is a jpeg?
Thanks in advance
Diggler
Posted: Mon Sep 08, 2008 6:55 pm
by haus
If you haven't tried it yet:
In the source of the monitor, set source type to file and enter the path to the script? Probably make sure the script has the proper shebang and all the right permissions. I've never done it, though, but it seems like it should work.
Posted: Mon Sep 08, 2008 10:42 pm
by diggler
I tried that, it seems it is looking for a file to open - it complains the file is not a valid jpg file ; I could run the file regulary in a cron job and read the results but there would be locking issues and other contention. I would rather run the script and take the result.
The script sends the jpg to STDOUT so i was hoping that I could just suck it in to zoneminder.
Thanks
Diggler
Posted: Tue Sep 09, 2008 3:51 pm
by coke
Maybe something's wrong with the jpeg it's outputting? Try piping it to an image viewer, do you get anything?
Posted: Mon Sep 15, 2008 10:58 pm
by diggler
Woohoo
Well, got a workaround which seems to be ok if a little slow; have converted the perl code to run under cgi-bin and now treat it as a network web-cam (if a little slow).
For what its worth if anyone has one of these godawful webcams feel free to pm me for the code.
Cheers
Diggler