Send Motion-user mailing list submissions to
[email protected]
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
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."
Today's Topics:
1. Re: on_area_detect script help ([email protected])
2. Re: Conversion specifiers... (John B)
3. Re: Conversion specifiers... (Dave Howorth)
4. Re: Conversion specifiers... (Dave Howorth)
----------------------------------------------------------------------
Message: 1
Date: Sat, 14 Mar 2020 12:20:27 -0700
From: [email protected]
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] on_area_detect script help
Message-ID:
<cagd+p+axkqgpyc7wryj7_cczjyy83_u2vnupmfc0wluv0_l...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
>From the motion.conf file that I just checked:
# Both %f and %n are only defined for on_picture_save,
# on_movie_start and on_movie_end
On Sat, Mar 14, 2020 at 12:10 PM Frank Bennett <[email protected]> wrote:
> Sorrow, is email the only way to reply to a thread:
> *Re: [Motion-user] on_area_detect script help
> <https://sourceforge.net/p/motion/mailman/message/36941311/>*
> On 3/7/20 1:36 AM, Colin Law wrote:
>
> On Fri, 6 Mar 2020 at 23:24, Frank Bennett <[email protected]>
> <[email protected]> wrote:
>
> I'm running motion 4.2.2. I'm getting area_detect in the log file but getting
> nothing from the save.sh script. running:
> $ /usr/local/bin/motion -c /s/motion/config/motion.conf
> I get:
> mv: missing destination file operand after 'keep/'
>
> That means that the mv command was only given one parameter instead of
> two. The only way I can see that being the case in the script you
> provided is if $1 is empty. I see you have an echo there, does it
> show anything?
>
> for: on_area_detected "/bin/bash /s/motion/save.sh %f"
> it appears the %f provides nothing, the use of %f was mentioned in an
> example script I found somewhere...I don't see how motion.c provides %f
> the script save.sh works fine...
> *root@fw:/s/motion# ll save.sh *
> -rwxr-xr-x 1 root root 33 Mar 2 12:49 save.sh*
>
> *root@fw:/s/motion# ./save.sh CAM2_102-654-202003141236.mp4*
> CAM2_102-654-202003141236.mp4
>
> *root@fw:/s/motion# ll keep/*
> total 5664
> drwxr-xr-x 2 root root 4096 Mar 14 12:48 ./
> drwxr-xr-x 5 fwb fwb 331776 Mar 14 12:48 ../
> -rw-r--r-- 1 root root 5445249 Mar 14 12:37 CAM2_102-654-202003141236.mp4
>
> *root@fw:/s/motion# cat save.sh *
> #!/bin/bash
>
> echo $1
> mv $1 keep/
>
> *root@fw:/s/motion# grep save /s/motion/config/camera2.conf *
> # Rotate image this number of degrees. The rotation affects all saved
> images as
> on_area_detected "/bin/bash /s/motion/save.sh %f"
> # When set to 'first', only the first picture of an event is saved.
> # Picture with most motion of an event is saved when set to 'best'.
> # Picture with motion nearest center of picture is saved when set to
> 'center'.
>
> thanks,
> Frank
>
> Colin
>
> _______________________________________________
> Motion-user mailing
> [email protected]https://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 2
Date: Sat, 14 Mar 2020 14:31:48 -0500
From: John B <[email protected]>
To: [email protected]
Subject: Re: [Motion-user] Conversion specifiers...
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII
On Sat, 14 Mar 2020 14:38:11 +0100
Joris <[email protected]> wrote:
> Hello all,
>
>
> > Under Conversion Specifiers it says: "In addition to the above, the
> > conversion specifiers include the same options as for the C function
> > strftime (3)."
> >
>
> Something new I learned today, thanks Dave :-)
> If strftime is supported you can just use the formatting string like in the
> date command I suggested.
> picture_filename "%d %b %g"
>
> This gets you very close to what you are asking.
>
>
> Kind regards,
> Joris
Okay, I tried with the %y and that worked just fine for me. It now gives me 14
Mar 20, though I was really hoping for 14 MAR 20.
So, I dug a little more on that webpage for date and found another page to
look at and it showed me I could use ^ after a %, so I tried %d %^b %y and
that
did the trick! It put 14 MAR 20 in my directory I have motion videos and
snapshots sent to.
Thanks again to you and Dave Howorth for this information. It's now
bookmarked...just in case I need more or a year down the road someone else
like me asks about something similar and I can then point them in this
direction.
JB
------------------------------
Message: 3
Date: Sat, 14 Mar 2020 23:36:24 +0000
From: Dave Howorth <[email protected]>
To: [email protected]
Subject: Re: [Motion-user] Conversion specifiers...
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII
On Sat, 14 Mar 2020 13:31:37 -0500
John B <[email protected]> wrote:
> On Sat, 14 Mar 2020 00:37:00 +0000
> Dave Howorth <[email protected]> wrote:
>
> > On Fri, 13 Mar 2020 09:15:44 -0500
> > JB <[email protected]> wrote:
> >
> > > Hi gang,
> > >
> > > I'd like to be able to have the files of pictures/movies that
> > > get saved to my directory to have a different 'text' name to them.
> > >
> > > Presently they will have %Y%m%d on them and as the file name.
> > >
> > > What I would prefer to have for both is day month year like
> > > this - 13 MAR 20
> > > Looking at the 'Conversion specifiers' table in the Motion
> > > guide
> >
> > I'm not entirely sure I know what you mean by this, but I'm assuming
> > https://motion-project.github.io/motion_config.html#Configuration_OptionsTopic
> >
> > Under Conversion Specifiers it says: "In addition to the above, the
> > conversion specifiers include the same options as for the C function
> > strftime (3)."
> >
> > The documentation for strftime, as found for example at
> > http://man7.org/linux/man-pages/man3/strftime.3.html says: " %b
> > The abbreviated month name according to the current locale.
> > (Calculated from tm_mon.)"
>
> Aha! Thank you for this information!
>
> >
> > So I'd say I do see how to do this, but I'm not going to try; it
> > seems a bizarre thing to want to do.
>
> Just your opinion. We all know about those things.
Indeed :) No offence intended.
> JB
------------------------------
Message: 4
Date: Sat, 14 Mar 2020 23:38:55 +0000
From: Dave Howorth <[email protected]>
To: [email protected]
Subject: Re: [Motion-user] Conversion specifiers...
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII
On Sat, 14 Mar 2020 14:31:48 -0500
John B <[email protected]> wrote:
> On Sat, 14 Mar 2020 14:38:11 +0100
> Joris <[email protected]> wrote:
>
> > Hello all,
> >
> >
> > > Under Conversion Specifiers it says: "In addition to the above,
> > > the conversion specifiers include the same options as for the C
> > > function strftime (3)."
> > >
> >
> > Something new I learned today, thanks Dave :-)
> > If strftime is supported you can just use the formatting string
> > like in the date command I suggested.
> > picture_filename "%d %b %g"
> >
> > This gets you very close to what you are asking.
> >
> >
> > Kind regards,
> > Joris
>
> Okay, I tried with the %y and that worked just fine for me. It now
> gives me 14 Mar 20, though I was really hoping for 14 MAR 20.
>
> So, I dug a little more on that webpage for date and found another
> page to look at and it showed me I could use ^ after a %, so I tried
> %d %^b %y and that did the trick! It put 14 MAR 20 in my directory I
> have motion videos and snapshots sent to.
Excellent. Well done on digging a bit further to find exactly what you
wanted.
> Thanks again to you and Dave Howorth for this information. It's now
> bookmarked...just in case I need more or a year down the road
> someone else like me asks about something similar and I can then
> point them in this direction.
>
> JB
>
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
------------------------------
------------------------------
Subject: Digest Footer
_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user
------------------------------
End of Motion-user Digest, Vol 165, Issue 10
********************************************