Send Motion-user mailing list submissions to motion-user@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/motion-user or, via email, send a message with subject or body 'help' to motion-user-requ...@lists.sourceforge.net You can reach the person managing the list at motion-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Motion-user digest..." Today's Topics: 1. Re: How to configure auto-tracking for a PTZ netcam? (Christophe Lohr) ---------------------------------------------------------------------- Message: 1 Date: Wed, 31 Jan 2018 09:29:27 +0100 From: Christophe Lohr <christophe.l...@imt-atlantique.fr> To: motion-user@lists.sourceforge.net Subject: Re: [Motion-user] How to configure auto-tracking for a PTZ netcam? Message-ID: <fb661794-133f-4b94-5bcf-246262ed8...@imt-atlantique.fr> Content-Type: text/plain; charset="utf-8" Hello, ? May I propose a patch for this? I have coded something to do the job. Basically, this add a new option:? "on_camera_move",? a command to be executed when the camera has to be moved in tracking mode. The command can move the camera according to its API (see example), or something else... This hook is then called by?? track_center()? and?? track_move() Several parameters are passed as environment variables: - When called by track_center(): TRACK_ACTION=center TRACK_XOFF TRACK_YOFF - When called by track_move(): TRACK_ACTION=move TRACK_CENT_HEIGHT TRACK_CENT_MAXX TRACK_CENT_MAXY TRACK_CENT_MINX TRACK_CENT_MINY TRACK_CENT_WIDTH TRACK_CENT_X TRACK_CENT_Y TRACK_IMGS_HEIGHT TRACK_IMGS_MOTIONSIZE TRACK_IMGS_WIDTH - in both cases: TRACK_HOMEX TRACK_HOMEY TRACK_IOMOJO_ID TRACK_MAXX TRACK_MAXY TRACK_MINMAXFOUND TRACK_MINX TRACK_MINY TRACK_MOTHORX_REVERSE TRACK_MOTHORY_REVERSE TRACK_MOTORX TRACK_MOTORY TRACK_MOVE_WAIT TRACK_PAN_ANGLE TRACK_PORT TRACK_SPEED TRACK_STEP_ANGLE_X TRACK_STEP_ANGLE_Y TRACK_STEPSIZE TRACK_TILT_ANGLE TRACK_TYPE Well, this almost do the job. But to be honest, I would not recommend it for a production grade system. Keep this as 'experimental' ;-) Best regards Christophe Le 11/01/2018 ? 16:15, Christophe Lohr a ?crit?: > Hello, > ? I have a Vivotek PS81X1 netcam. > How may I configure motion to get auto-trackin? > > Basic control of this camera is performed via: > > - to get the MPEG stream: > http://10.42.0.96/video3.mjpg > > - PTZ commands: > curl http://10.42.0.96/cgi-bin/camctrl/camctrl.cgi?move=left > curl http://10.42.0.96/cgi-bin/camctrl/camctrl.cgi?move=right > curl http://10.42.0.96/cgi-bin/camctrl/camctrl.cgi?move=up > curl http://10.42.0.96/cgi-bin/camctrl/camctrl.cgi?move=down > > - to get a snapshot: > http://10.42.0.96/cgi-bin/viewer/video.jpg?streamid=2 > > etc. > > > So, how may I configure motion for this kind of PTZ commands? > > > Best regards > Christophe > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: on_camera_move.patch Type: text/x-patch Size: 7619 bytes Desc: not available -------------- next part -------------- A non-text attachment was scrubbed... Name: on_camera_move_vivotek.sh Type: application/x-shellscript Size: 920 bytes Desc: not available -------------- next part -------------- netcam_url http://10.42.0.96/video3.mjpg output_pictures off track_type = 4 track_auto = on track_move_wait 20 on_camera_move = /usr/local/src/motion/on_camera_move_vivotek.sh ; video_pipe = /dev/video1 ; motion_video_pipe = /dev/video2 ------------------------------ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ------------------------------ Subject: Digest Footer _______________________________________________ Motion-user mailing list Motion-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/motion-user ------------------------------ End of Motion-user Digest, Vol 139, Issue 19 ********************************************