Page 2 of 2
Posted: Mon Oct 27, 2008 4:27 pm
by overly
If you can't get Motion and Zoneminder to simultaneously display a picture then its possible the V4L drivers don't do that for your equipment.
I've tried running them side-by-side but found that I can't get both to open the same video device simultaneously.
I may try again using the vloopback driver as described on the
Motion website
Posted: Mon Dec 14, 2009 12:29 am
by railgun
I have managed to get this working using a USB Webcam that cannot usually let 2 programs open the /dev/video1 device at the same time.
http://www.lavrsen.dk/foswiki/bin/view/ ... backDevice works for me ( compiling it can be a little tricky if you have never tried compiling a kernel module tho )
The thing is you also have to reverse the device order for it to work giving motion the primary control because it creates the vloopback pipe.
in /etc/modules i add vloopback ( you can modprobe it once compiled for testing but /etc/modules will put it in on restart as well )
The way vloopback works in this case is it adds /dev/video2 (input) and /dev/video3 (output) which motion uses to create a stream that zoneminder can use.
my camera is /dev/video1 . My motion.conf is similar in most settings to the example in the first post. The lines that differ are:
Code: Select all
videodevice /dev/video1
video_pipe /dev/video2
Then the most important part is to set the ZM Source settings for your loopback feed in zoneminder to the output pipe. ( the pipe is V4L1 even if the camera is V4L2 )
Code: Select all
/dev/video3
video 4 linux 1
PAL
YUV420P
And voila ! motion triggering ZM on a webcam. Anyone with say 2 webcams can increase the number of loopback pipes by putting
into /etc/modules and creating an extra motion thread.
Many thanks to Sledgehammer for saving me 10% CPU and digging through 600 false triggers on a sunny day !!
nb. copying and pasting the $ /usr/bin/zmsend.pl “1|on|500|Testâ€
Posted: Tue Dec 22, 2009 4:50 am
by dasbooter
Well I have 2 cameras running thru motion and piping outputs to zone minder but I have a little problem. The zmsend script doesnt tell which camera to record. If I wave my hand in front of camera 2 then camera 1 records.I think I need two zmsend scripts one for each camera and then I could put a call for each script in the cameras thread.config. Maybe there is some changes for zmtrigger too I am not sure. One thing for sure
Code: Select all
/usr/bin/zmsend.pl “1|on|500|Testâ€
Posted: Wed Dec 30, 2009 11:08 am
by littlej
hy, i have a problem canot get zm runing with the vloopback, i succesfuly added the module, modprobed with pipes=2 and i use video_pipe /dev/video8 and in zm /dev/video9. tryed all the modes in zm, v4l1 and all color modes, but none its working...can u asist somehow? how can i check what video modes are suportet by the vloopback device? thanks