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: Multiple cams & cpu usage (Richard Bown) 2. Re: split boundary ???? (Dmitry Katsubo) 3. New feature: User-defined variables in configuration file (Dmitry Katsubo) 4. lastsnap (Harlan Daneker) ---------------------------------------------------------------------- Message: 1 Date: Thu, 21 Jan 2016 18:32:35 +0000 From: Richard Bown <rich...@g8jvm.com> Subject: Re: [Motion-user] Multiple cams & cpu usage To: Motion discussion list <motion-user@lists.sourceforge.net> Message-ID: <20160121183235.7b803921.rich...@g8jvm.com> Content-Type: text/plain; charset=UTF-8 FORGET IT :) found the attachment on the FAQ page On Thu, 21 Jan 2016 17:24:40 +0000 Richard Bown <rich...@g8jvm.com> wrote: > Hi > trying to get each instance of motion running as a service > > /etc/init.d/motion2 > =motion2 > PATH_BIN=/bin:/usr/bin:/sbin:/usr/sbin > DAEMON=/usr/bin/motion2 > PIDFILE=/var/run/$NAME.pid > DEFAULTS=/etc/default/$NAME > DESC="motion2 detection daemon" > > ENV="env -i LANG=C PATH=$PATH_BIN" > > . /lib/lsb/init-functions > > test -x $DAEMON || exit 0 > > RET=0 > > [ -r "$DEFAULTS" ] && . "$DEFAULTS" || start_motion_daemon=yes > > > check_daemon_enabled () { > if [ "$start_motion_daemon" = "yes" ] ; then > return 0 > else > log_warning_msg "Not starting $NAME daemon, disabled via > /etc/default/$NAME" > return 1 > fi > > } > > > case "$1" in > start) > if check_daemon_enabled ; then > if ! [ -d /var/run/motion2 ]; then > mkdir /var/run/motion2 > fi > chown motion:motion /var/run/motion2 > > log_daemon_msg "Starting $DESC" "$NAME" > if start-stop-daemon --start -c motion2.conf --oknodo --exec $DAEMON -b > -v --chuid motion ; > then log_end_msg 0 > else > log_end_msg 1 > RET=1 > fi > fi > ;; > > stop) > log_daemon_msg "Stopping $DESC" "$NAME" > if start-stop-daemon --stop --oknodo --exec $DAEMON --retry 30 ; then > log_end_msg 0 > else > log_end_msg 1 > RET=1 > fi > ;; > > reload|force-reload) > log_daemon_msg "Reloading $NAME configuration" > if start-stop-daemon --stop --signal HUP --exec $DAEMON ; then > log_end_msg 0 > else > log_end_msg 1 > RET=1 > fi > ;; > > restart-motion) > if check_daemon_enabled ; then > log_action_begin_msg "Restarting $NAME" > if $0 stop && $0 start ; then > log_action_end_msg 0 > else > log_action_cont_msg "(failed)" > RET=1 > fi > fi > ;; > > restart) > $0 restart-motion2 > ;; > > *) > echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload}" > RET=1 > ;; > esac > > > exit $RET > > > > > In the line > if start-stop-daemon --start -c motion2.conf --oknodo --exec $DAEMON -b -v > --chuid motion > > its not passing -c motion2.conf to the starting daemon process > > if I put -- start [-c motion2.conf] --oknodo > It starts > and ps ax shows > PID motion2 [-c motion2.conf] > > one problem is "-c" is a valid switch for start-stop-daemon > > How do you pass the config file to the daemon process, in this case motion2 > ???????? > I've tried using quotes as well > > I do have a script in /usr/bin called cam2 which just has the line > motion2 -c /etc/motion/motion2.conf & > that starts up as it should , but not when used as the $DAEMON in above > > I'm a bit stuck , can someone assist please > Thanks > > > > > > On Thu, 21 Jan 2016 13:34:51 +0000 > Richard Bown <rich...@g8jvm.com> wrote: > > > I tried using one instance of motion with multiple threads, but for some > > reason it was no longer > > sending jpegs on motion detected. > > > > So now trying multiple instances of motion. > > As I run motion as a service, if I restart the service it kills all the > > processes and just > > starts one. > > > > so to get around this, I'd like to spawn the other instances of motion when > > the service is > > started. > > > > so at the end of motion.conf I added > > /usr/bin/motion2 -c /etc/motion/motion2.conf & > > I made motion.conf executable as well, motion2 is sym linked to > > /usr/bin/motion > > > > But It doesn't work :( > > > > odroid@odroid:/etc/motion$ sudo service motion restart > > * Restarting motion... > > * Stopping > > motion detection daemon motion [ OK ] > > * Starting motion detection daemon motion [ > > OK ] > > [ > > OK ] > > odroid@odroid:/etc/motion$ ps ax | grep motion > > 17624 ? Sl 0:00 /usr/bin/motion > > 17630 pts/1 S+ 0:00 grep --color=auto motion > > > > But > > > > odroid@odroid:/etc/motion$ sudo motion2 -c ./motion2.conf > > [0] Processing thread 0 - config file ./motion2.conf > > [0] Motion 3.2.12 Started > > [0] Motion going to daemon mode > > odroid@odroid:/etc/motion$ ps ax | grep motion > > 17624 ? Sl 0:05 /usr/bin/motion > > 17640 ? Sl 0:00 motion2 -c ./motion2.conf > > > > Any ideas ???? > > > > TIA > > > > > > > > > > > > On Wed, 20 Jan 2016 10:30:16 +0100 > > M?bin ??yer <mubinic...@gmail.com> wrote: > > > > > I run also one motion with 2 threads for each USB webcam. I have not > > > experienced such bugs or errors. > > > > > > 2016-01-19 18:12 GMT+01:00 tosiara <tosi...@gmail.com>: > > > > > > > Not necessary. I simply run the same binary with different config on the > > > > command line > > > > > > > > On Tue, Jan 19, 2016 at 7:01 PM, Richard Bown <rich...@g8jvm.com> wrote: > > > > > > > >> Many thanks > > > >> Am I correct with multiple instances of motion you copy the motion > > > >> binary > > > >> to motion1, motion2, ect > > > >> and the conf files for each motion1.conf motion2.conf > > > >> > > > >> > > > >> > > > >> On Tue, 19 Jan 2016 17:03:29 +0200 > > > >> tosiara <tosi...@gmail.com> wrote: > > > >> > > > >> > I use separate motion process per camera. Mostly because of a bug > > > >> > when > > > >> > threaded config can cause picture corruptions (pictures partialy > > > >> > mixed) > > > >> > I don't thing there will be any significant performance or memory > > > >> penalty > > > >> > if you are using threaded or not threaded scenario. It's only about > > > >> > maintaining config files > > > >> > > > > >> > On Tue, Jan 19, 2016 at 4:54 PM, Richard Bown <rich...@g8jvm.com> > > > >> wrote: > > > >> > > > > >> > > > > > >> > > Hi > > > >> > > > > > >> > > Which is going to have to use less cpu/memory usage ??? > > > >> > > using one instance of motion with multiple cameras > > > >> > > multiple instances of motion with one cam/motion > > > >> > > The later is easier to configure, I have three cams , two web IP > > > >> > > and > > > >> one > > > >> > > USB cam > > > >> > > But it will be using a ARM SBC, twice the speed of a Rasp PI2, the > > > >> same > > > >> > > SBC is also used > > > >> > > as streaming media device, So far no problems with one instance of > > > >> motion > > > >> > > when Kodi is run. > > > >> > > TIA > > > >> > > -- > > > >> > > -- > > > >> > > Best wishes /73 > > > >> > > Richard Bown > > > >> > > > > > >> > > Email : rich...@g8jvm.com > > > >> > > HTTP : http://www.g8jvm.com > > > >> > > nil carborundum a illegitemis > > > >> > > > > > >> > > > > > >> ################################################################################## > > > >> > > Ham Call: G8JVM . QRV: 50-432 MHz + Microwave 23 cms 140W, 13 cms > > > >> 100W & > > > >> > > 3cms 5W > > > >> > > Maidenhead QRA: IO82SP38, LAT. 52 39.720' N LONG. 2 28.171 W > > > >> > > QRV VHF 6mtrs 200W, 4 mtrs 150W, 2mtrs 400W, 70cms 200W > > > >> > > OS: Linux Mint 17.3 x86_64 on a Dell Inspiron N5030 laptop > > > >> > > > > > >> > > > > > >> ################################################################################## > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> ------------------------------------------------------------------------------ > > > >> > > Site24x7 APM Insight: Get Deep Visibility into Application > > > >> > > Performance > > > >> > > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > > > >> > > Monitor end-to-end web transactions and take corrective actions now > > > >> > > Troubleshoot faster and improve end-user experience. Signup Now! > > > >> > > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > > >> > > _______________________________________________ > > > >> > > Motion-user mailing list > > > >> > > Motion-user@lists.sourceforge.net > > > >> > > https://lists.sourceforge.net/lists/listinfo/motion-user > > > >> > > http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome > > > >> > > > > > >> > > > >> > > > >> > > > >> -- > > > >> -- > > > >> Best wishes /73 > > > >> Richard Bown > > > >> > > > >> Email : rich...@g8jvm.com > > > >> HTTP : http://www.g8jvm.com > > > >> nil carborundum a illegitemis > > > >> > > > >> ################################################################################## > > > >> Ham Call: G8JVM . QRV: 50-432 MHz + Microwave 23 cms 140W, 13 cms 100W > > > >> & > > > >> 3cms 5W > > > >> Maidenhead QRA: IO82SP38, LAT. 52 39.720' N LONG. 2 28.171 W > > > >> QRV VHF 6mtrs 200W, 4 mtrs 150W, 2mtrs 400W, 70cms 200W > > > >> OS: Linux Mint 17.3 x86_64 on a Dell Inspiron N5030 laptop > > > >> > > > >> ################################################################################## > > > >> > > > >> > > > >> > > > >> ------------------------------------------------------------------------------ > > > >> Site24x7 APM Insight: Get Deep Visibility into Application Performance > > > >> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > > > >> Monitor end-to-end web transactions and take corrective actions now > > > >> Troubleshoot faster and improve end-user experience. Signup Now! > > > >> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > > >> _______________________________________________ > > > >> Motion-user mailing list > > > >> Motion-user@lists.sourceforge.net > > > >> https://lists.sourceforge.net/lists/listinfo/motion-user > > > >> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome > > > >> > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > Site24x7 APM Insight: Get Deep Visibility into Application Performance > > > > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > > > > Monitor end-to-end web transactions and take corrective actions now > > > > Troubleshoot faster and improve end-user experience. Signup Now! > > > > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > > > _______________________________________________ > > > > Motion-user mailing list > > > > Motion-user@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/motion-user > > > > http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome > > > > > > > > > > > > > > > > > -- -- Best wishes /73 Richard Bown Email : rich...@g8jvm.com HTTP : http://www.g8jvm.com nil carborundum a illegitemis ################################################################################## Ham Call: G8JVM . QRV: 50-432 MHz + Microwave 23 cms 140W, 13 cms 100W & 3cms 5W Maidenhead QRA: IO82SP38, LAT. 52 39.720' N LONG. 2 28.171 W QRV VHF 6mtrs 200W, 4 mtrs 150W, 2mtrs 400W, 70cms 200W OS: Linux Mint 17.3 x86_64 on a Dell Inspiron N5030 laptop ################################################################################## ------------------------------ Message: 2 Date: Thu, 21 Jan 2016 23:43:17 +0100 From: Dmitry Katsubo <dm...@mail.ru> Subject: Re: [Motion-user] split boundary ???? To: Motion discussion list <motion-user@lists.sourceforge.net> Message-ID: <56a15f05.7090...@mail.ru> Content-Type: text/plain; charset=utf-8 On 2015-12-17 23:06, tosiara wrote: > The source code contains following explanation: > https://github.com/Mr-Dave/motion/blob/master/netcam.c#L1227 > > /* > * We have a boundary string crossing > * packets :-(. We will copy all the > * data up to the beginning of the > * potential boundary, then re-position > * the (partial) string to the > * beginning and get some more input > * data. First we flush the input > * buffer up to the beginning of the > * (potential) boundary string. > */ > > Can you check if your camera got damaged and sends broken frames? I have actually the same problem (motion v3.2.12). I have reported it here: https://github.com/sackmotion/motion/issues/36 I suggest that "netcam_tolerant_check on" hides these log messages. (indeed my camera might send JPEG images which are not "correct") > On Thu, Dec 17, 2015 at 11:44 PM, Richard Bown <rich...@g8jvm.com > <mailto:rich...@g8jvm.com>> wrote: > > On Thu, 17 Dec 2015 20:51:37 +0000 > Richard Bown <rich...@g8jvm.com <mailto:rich...@g8jvm.com>> wrote: > >> On Thu, 17 Dec 2015 15:09:55 -0500 >> Kinney Baughman <baughma...@appstate.edu <mailto:baughma...@appstate.edu>> >> wrote: >> >>> Hello fellow Odroid user!! >>> >>> I think I've been here before myself but it's been a while. >>> >>> You say your config file hasn't changed. >>> >>> But if you're using motion 3.2.12, then you've definitely upgraded motion. >>> >>> I think that's the problem. >>> >>> My memory is fuzzy here but I think there is a point in the upgrade cycle >>> with motion that you have to redo your motion.conf file because the new >>> motion uses new/different parameters. And that's why you're getting all >>> those errors. >>> >>> Someone feel free to correct me but my advice is to reinstall or upgrade >>> motion and edit the new motion.conf file that is generated by comparing it >>> to your old motion.conf and uncommenting the directives that look most like >>> your old conf file and go from there. >>> >>> Hope this helps get you off the dime. >>> >>> >> >> Hi Kinney >> >> I have re-installed , and purged so it was a clean install, but I did use my >> old config file >> So that could be it. >> , So I clean it all out and start with a fresh config >> >> Thanks for the reply > > Well , a complete fresh reload and used the file provided, which there are > some differences > > But still doing it, very strange , also does it with two different ip cams > > log:- > odroid@odroid:~$ sudo motion -n > [0] [NTC] [ALL] conf_load: Processing thread 0 - config file > /etc/motion/motion.conf > [0] [ALR] [ALL] conf_cmdparse: Unknown config option "sdl_threadnr" > [0] [NTC] [ALL] motion_startup: Motion 3.2.12+git20140228 Started > [0] [NTC] [ALL] motion_startup: Logging to syslog > [0] [NTC] [ALL] motion_startup: Using log type (ALL) log level (NTC) > [0] [NTC] [ENC] ffmpeg_init: ffmpeg LIBAVCODEC_BUILD 3670272 > LIBAVFORMAT_BUILD 3670272 > [0] [NTC] [ALL] main: Thread 1 is from /etc/motion/motion.conf > [0] [NTC] [ALL] main: Thread 1 is device: > http://192.168.51.139:7777/videostream.cgi input -1 > [0] [NTC] [ALL] main: Stream port 8081 > [0] [NTC] [ALL] main: Waiting for threads to finish, pid: 7545 > [1] [NTC] [ALL] motion_init: Thread 1 started , motion detection Enabled > [1] [ALR] [NET] netcam_start: Network Camera thread starting... for url > (http://192.168.51.139:7777/videostream.cgi) > [0] [NTC] [STR] httpd_run: motion-httpd testing : IPV4 addr: 127.0.0.1 port: > 8080 > [0] [NTC] [STR] httpd_run: motion-httpd Bound : IPV4 addr: 127.0.0.1 port: > 8080 > [0] [NTC] [STR] httpd_run: motion-httpd/3.2.12+git20140228 running, accepting > connections > [0] [NTC] [STR] httpd_run: motion-httpd: waiting for data on 127.0.0.1 port > TCP 8080 > [1] [NTC] [NET] netcam_read_first_header: Found Conn: close header > ('Connection: close') > [1] [NTC] [NET] netcam_setup_html: connected, going on to read image. > [1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1 items > [1] [ALR] [NET] netcam_handler_loop: Camera handler thread [2] started > [1] [NTC] [STR] http_bindsock: motion-stream testing : IPV4 addr: 0.0.0.0 > port: 8081 > [1] [NTC] [STR] http_bindsock: motion-stream Bound : IPV4 addr: 0.0.0.0 port: > 8081 > [1] [NTC] [ALL] motion_init: Started motion-stream server in port 8081 auth > Disabled > [1] [WRN] [NET] netcam_next: called with no data in buffer > [1] [NTC] [NET] netcam_read_html_jpeg: Potential split boundary - 1447 chars > flushed, 1 re-positioned > [1] [NTC] [EVT] event_new_video FPS 2 > [1] [NTC] [EVT] event_newfile: File of type 8 saved to: > /home/odroid/Pictures/motion/01-20151217213839.avi > [1] [NTC] [ALL] motion_detected: Motion detected - starting event 1 > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213839-00.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213839-01.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213840-00.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213840-01.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213841-00.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213841-01.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213842-00.jpg > [1] [NTC] [NET] netcam_read_html_jpeg: Potential split boundary - 1447 chars > flushed, 1 re-positioned > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213842-01.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213843-00.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213843-01.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213844-00.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213844-01.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213845-00.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213845-01.jpg > [1] [NTC] [EVT] event_newfile: File of type 1 saved to: > /home/odroid/Pictures/motion/01-20151217213846-00.jpg > [1] [NTC] [NET] netcam_read_html_jpeg: Potential split boundary - 1447 chars > flushed, 1 re-positioned > [1] [NTC] [NET] netcam_read_html_jpeg: Potential split boundary - 1623 chars > flushed, 1 re-positioned > [1] [NTC] [NET] netcam_read_html_jpeg: Potential split boundary - 1447 chars > flushed, 1 re-positioned > [1] [NTC] [NET] netcam_read_html_jpeg: Potential split boundary - 599 chars > flushed, 1 re-positioned > [1] [NTC] [NET] netcam_read_html_jpeg: Potential split boundary - 1447 chars > flushed, 1 re-positioned > [1] [NTC] [NET] netcam_read_html_jpeg: Potential split boundary - 1447 chars > flushed, 1 re-positioned > [1] [NTC] [NET] netcam_read_html_jpeg: Potential split boundary - 1447 chars > flushed, 1 re-positioned > > > and just goes on and on > > real weird -- With best regards, Dmitry ------------------------------ Message: 3 Date: Fri, 22 Jan 2016 19:58:49 +0100 From: Dmitry Katsubo <dm...@mail.ru> Subject: [Motion-user] New feature: User-defined variables in configuration file To: Motion discussion list <motion-user@lists.sourceforge.net> Message-ID: <83a2946d94925def7662a421bf5d7...@www.centurion.link> Content-Type: text/plain; charset=US-ASCII; format=flowed Hello to everybody, I am curios if there is any way to define a custom value for some variable, for example, camera label? The idea is that this variable can be defined in per-camera configuration (/etc/motion/thread1.conf): define %e=Front camera and then used in some global option (/etc/motion/motion.conf): on_motion_detected echo "[%e] Motion detected" | mail root -- With best regards, Dmitry ------------------------------ Message: 4 Date: Tue, 26 Jan 2016 12:21:14 -0500 From: Harlan Daneker <hdane...@gmail.com> Subject: [Motion-user] lastsnap To: Motion discussion list <motion-user@lists.sourceforge.net> Message-ID: <CAC1WkiQCY0VDPE=ikrfbeaj5jkyol3ypsc90z3z0v-71wgc...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" (Fedora 23) I'm running 4 cctv cameras with 4 separate bt878 chips. I'm saving a jpg and overwriting it every 5 seconds for each camera, Each camera has it's own directory that the jpg is in. For some reason motion is getting mixed up sometimes and putting the jpg for the wrong camera in the directories, then it corrects its self. What causes this and any suggestions. Thanks -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 ------------------------------ _______________________________________________ Motion-user mailing list Motion-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/motion-user End of Motion-user Digest, Vol 116, Issue 9 *******************************************