-
- Posts: 87
- Joined: Sun Aug 03, 2014 10:32 pm
Re: PiKrellCam: wish list
@billw,
You and jbeale have really done amazing things with this, and as I use this, I see a few things that might be helpful.
I do get a lot of hits each day, which is fine, and the thumbs help with that (especially the way jbeale recently set it up). But clicking on each filename to see the video/image can be a tad tough when I have 80-100 hits.
I would like to request the ability to navigate to the "next" or "previous" video/image, (if you think they are viable to the community, and when you have the time). I'm thinking next/previous by date/time, and perhaps buttons before or after the delete and download buttons.
Again, thanks for all the hard work, this will be my "goto" from now on.
You and jbeale have really done amazing things with this, and as I use this, I see a few things that might be helpful.
I do get a lot of hits each day, which is fine, and the thumbs help with that (especially the way jbeale recently set it up). But clicking on each filename to see the video/image can be a tad tough when I have 80-100 hits.
I would like to request the ability to navigate to the "next" or "previous" video/image, (if you think they are viable to the community, and when you have the time). I'm thinking next/previous by date/time, and perhaps buttons before or after the delete and download buttons.
Again, thanks for all the hard work, this will be my "goto" from now on.
Re: PiKrellCam: motion vector detect + OSD web interface
Hi all,
I'm trying to set 2592 × 1944 15fps video mode, but it doesn't work...
I have set:
video_width 2592
video_height 1944
video_fps 14
video_mp4box_fps 14
mjpeg_divider 2
Has anyone tried it?
Thanks in advance, and thanks for this great software!
D.
I'm trying to set 2592 × 1944 15fps video mode, but it doesn't work...
I have set:
video_width 2592
video_height 1944
video_fps 14
video_mp4box_fps 14
mjpeg_divider 2
Has anyone tried it?
Thanks in advance, and thanks for this great software!
D.
Re: PiKrellCam: motion vector detect + OSD web interface
@billw
I'm still having the occasional glitch when mp4box fails to convert a recorded video (I've updated my Pi's software and changed power supply's and the camera module itself).
Is it possible to stop mp4box from running and just keep the h264 file recorded by PiKrellCam instead (I'm quite happy with this format)?
Cheers
Paul
I'm still having the occasional glitch when mp4box fails to convert a recorded video (I've updated my Pi's software and changed power supply's and the camera module itself).
Is it possible to stop mp4box from running and just keep the h264 file recorded by PiKrellCam instead (I'm quite happy with this format)?
Cheers
Paul
Re: PiKrellCam: motion vector detect + OSD web interface
You can change the video_filename suffix. In pikrellcam.conf, change line:mrlinux2u wrote:@billw
Is it possible to stop mp4box from running and just keep the h264 file recorded by PiKrellCam instead (I'm quite happy with this format)?
Code: Select all
video_filename $M_%F_%H.%M.%S_$N.mp4
Code: Select all
video_filename $M_%F_%H.%M.%S_$N.h264
Re: PiKrellCam: motion vector detect + OSD web interface
Hi billw,billw wrote:You can change the video_filename suffix. In pikrellcam.conf, change line:mrlinux2u wrote:@billw
Is it possible to stop mp4box from running and just keep the h264 file recorded by PiKrellCam instead (I'm quite happy with this format)?toCode: Select all
video_filename $M_%F_%H.%M.%S_$N.mp4
And restart pikrellcam. I haven't seen that glitch either so I'm not sure what could be happening.Code: Select all
video_filename $M_%F_%H.%M.%S_$N.h264
Cheers for that, much appreciated, and a very simple solution

Paul
-
- Posts: 87
- Joined: Sun Aug 03, 2014 10:32 pm
Re: PiKrellCam: motion vector detect + OSD web interface
Ok, I have a question.
If I have multiple regions set up, it seems the recording begins from whatever region is activated first.
So, if by chance, movement happens from another region while the other is recording, will it not be recorded? I don't quite understand all of what regions/vectors do beyond picking up motion from within those regions, so I might have missed something.
Or, maybe it's processing speed. I'm using a RPi B+ now. Will an RPi2 speed up processing enough to better handle things like that? Or is that relevant?
Thanks!
If I have multiple regions set up, it seems the recording begins from whatever region is activated first.
So, if by chance, movement happens from another region while the other is recording, will it not be recorded? I don't quite understand all of what regions/vectors do beyond picking up motion from within those regions, so I might have missed something.
Or, maybe it's processing speed. I'm using a RPi B+ now. Will an RPi2 speed up processing enough to better handle things like that? Or is that relevant?
Thanks!
Re: PiKrellCam: motion vector detect + OSD web interface
The regions divide the screen into areas that are sensitive to motion. So to check for motionboomlikethat wrote: If I have multiple regions set up, it seems the recording begins from whatever region is activated first.
So, if by chance, movement happens from another region while the other is recording, will it not be recorded? I don't quite understand all of what regions/vectors do beyond picking up motion from within those regions, so I might have missed something.
Or, maybe it's processing speed. I'm using a RPi B+ now. Will an RPi2 speed up processing enough to better handle things like that? Or is that relevant?
the program looks at each region and if motion is detected in any one of them then a recording is started.
Then at each subsequent check time, each region is checked again and motion in any of them keeps
the recording going. There is no separate recording per region, but motion in any one region
applies to the whole recording and the composite vector is just the mechanism for how I determine
if a region has motion.
I do all development on a Pi 2 but my deployed Pi detection stations are B+ Pis which also run
gkrellmd so I'm always monitoring the CPU usage which typically ranges from 10% - 40%. With
occasional slightly higher peaks. This is while nginx on the B+ is streaming the mjpeg. When
a mp4 is encoded or a timelapse converted, CPU goes to 100% but the motion detection
keeps working so I have not seen a B+ issue.
Just think of the regions as a mask for areas sensitive to motion and there is really only one
final whole screen motion detect event possible.
Re: PiKrellCam: motion vector detect + OSD web interface
In case you want to save just the still image instead of the video to a remote site, you can do something like this:
/home/pi/pikrellcam/scripts/motion-end
/home/pi/pikrellcam/scripts/motion-end
Code: Select all
#!/bin/bash
VIDEO_FILE=$1
FIFO=$2
LOG_FILE=$3
# construct still filename from video filename
F=$(basename $VIDEO_FILE .mp4).jpg
curl -T /home/pi/pikrellcam/media/stills/$F ftp://ftp.mysite.com/pics/$F --user USERNAME:PASSWORD
Re: PiKrellCam: motion vector detect + OSD web interface
Is there scope to trigger a recording after a pattern of regions is triggered, so to capture when someone walks left to right across a scene when hitting 2 or more regions in order? Also is there any way to create regions from a mask? No worries if no to both questions..just thoughtsbillw wrote:The regions divide the screen into areas that are sensitive to motion. So to check for motionboomlikethat wrote: If I have multiple regions set up, it seems the recording begins from whatever region is activated first.
So, if by chance, movement happens from another region while the other is recording, will it not be recorded? I don't quite understand all of what regions/vectors do beyond picking up motion from within those regions, so I might have missed something.
Or, maybe it's processing speed. I'm using a RPi B+ now. Will an RPi2 speed up processing enough to better handle things like that? Or is that relevant?
the program looks at each region and if motion is detected in any one of them then a recording is started.
Then at each subsequent check time, each region is checked again and motion in any of them keeps
the recording going. There is no separate recording per region, but motion in any one region
applies to the whole recording and the composite vector is just the mechanism for how I determine
if a region has motion.
I do all development on a Pi 2 but my deployed Pi detection stations are B+ Pis which also run
gkrellmd so I'm always monitoring the CPU usage which typically ranges from 10% - 40%. With
occasional slightly higher peaks. This is while nginx on the B+ is streaming the mjpeg. When
a mp4 is encoded or a timelapse converted, CPU goes to 100% but the motion detection
keeps working so I have not seen a B+ issue.
Just think of the regions as a mask for areas sensitive to motion and there is really only one
final whole screen motion detect event possible.

Cheers,
Kev
Re: PiKrellCam: motion vector detect + OSD web interface
I had a more simple idea about handling the regions: Would it be possible to implement that only detected motion in one region triggers an action, maybe starting a script for emailing?kevw wrote: Is there scope to trigger a recording after a pattern of regions is triggered, so to capture when someone walks left to right across a scene when hitting 2 or more regions in order? Also is there any way to create regions from a mask? No worries if no to both questions..just thoughts![]()
Re: PiKrellCam: motion vector detect + OSD web interface
Is the idea that you still want to record video from motion in any region, but have a special script action triggered by any activity in one specific region?Raspberrz wrote:I had a more simple idea about handling the regions: Would it be possible to implement that only detected motion in one region triggers an action, maybe starting a script for emailing?
Re: PiKrellCam: motion vector detect + OSD web interface
Hi,
could someone explain the parameter for motion_vectors_dimming and motion_area_min_side, did they affect the motion detection? I read the explanation in the conf file, but I didn't catch the sentence.
Rgs
Jan
could someone explain the parameter for motion_vectors_dimming and motion_area_min_side, did they affect the motion detection? I read the explanation in the conf file, but I didn't catch the sentence.
Rgs
Jan
Re: PiKrellCam: motion vector detect + OSD web interface
Exactly! Like recording every motion in the driveway, but only starting a script if there's something in front of my door. I suggested starting a script because I'm planning to change output via gpio.jbeale wrote:Is the idea that you still want to record video from motion in any region, but have a special script action triggered by any activity in one specific region?
Re: PiKrellCam: motion vector detect + OSD web interface
The dimming is the percent to dim the jpeg stream when the show of motion vectors is enabled.Jasimo wrote:Hi,
could someone explain the parameter for motion_vectors_dimming and motion_area_min_side, did they affect the motion detection? I read the explanation in the conf file, but I didn't catch the sentence.
Rgs
Jan
If you want more contrast between the image and drawn motion vector squares, set the dimming
lower. Set it higher if you want to see the image better, but less contrast is available for the vectors.
If motion vector count limit is set low, the size of the detected object can be very small and the blow
up of that detected area for a thumb can be grainy or even missed since there can be some skew. Setting
a minimum to the motion area side compensates for that. The units of the minimum is pixels.
Neither of these affect actual motion detection.
Re: PiKrellCam: motion vector detect + OSD web interface
That's getting into taking action based on some kind of tracking information which is currentlykevw wrote: Is there scope to trigger a recording after a pattern of regions is triggered, so to capture when someone walks left to right across a scene when hitting 2 or more regions in order? Also is there any way to create regions from a mask? No worries if no to both questions..just thoughts![]()
not done. Although I've thought that eventually I would do something about that .
Nope to the mask unless you want to come with some way other than the gui to generate
a motion regions file. It could be done, but I have no plans to do so.
Re: PiKrellCam: motion vector detect + OSD web interface
thx for the explanation.
Re: PiKrellCam: motion vector detect + OSD web interface
As a one shot, the motion area information can be passed to the preview-save script and it may orRaspberrz wrote:Exactly! Like recording every motion in the driveway, but only starting a script if there's something in front of my door. I suggested starting a script because I'm planning to change output via gpio.jbeale wrote:Is the idea that you still want to record video from motion in any region, but have a special script action triggered by any activity in one specific region?
may not be something right at the door. So to know if something gets to the door or is at the door
is getting into tracking information which is not available, but again is something I've had in mind.
Re: PiKrellCam: motion vector detect + OSD web interface
Actually, you were having the right idea and I was being too complicated. If there was a config for:billw wrote:As a one shot, the motion area information can be passed to the preview-save script and it may orRaspberrz wrote:Exactly! Like recording every motion in the driveway, but only starting a script if there's something in front of my door. I suggested starting a script because I'm planning to change output via gpio.jbeale wrote:Is the idea that you still want to record video from motion in any region, but have a special script action triggered by any activity in one specific region?
may not be something right at the door. So to know if something gets to the door or is at the door
is getting into tracking information which is not available, but again is something I've had in mind.
Code: Select all
on_region_motion region_number script_command
be useful.
Re: PiKrellCam: motion vector detect + OSD web interface
git update
Web page password protection is now changed to use htpasswd. The install-pikrelllcam.sh
script will need to be run after an update with git pull origin to get web page password protection.
Web page password protection is now changed to use htpasswd. The install-pikrelllcam.sh
script will need to be run after an update with git pull origin to get web page password protection.
Re: PiKrellCam: motion vector detect + OSD web interface
Maybe I just haven't updated to the latest, or mistyped something but I was puzzled for a while about why my motion-end script didn't work. Until I realized that the file was /home/pi/pikrellcam/scripts/motion-end (with a dash) but
/home/pi/.pikrellcam/pikrellcam.conf was calling out on_motion_end $C/motion_end $v $P $G
with an underscore.
Two other comments:
1) I never heard of curlftpfs but discovered today it is very handy for scripts to add and clean out files from a remote FTP site, handling it just as a local directory.
2) If you want to detect fast and bright things (eg. car headlights, not people) at night, with pikrellcam it is much better to just leave the camera framerate at 24 fps. With slow shutter, the motion detection often does not see cars at all (headlights become a long static streak, instead of a moving point of light). If you want to detect dark and slow-moving things, then slow shutter is an advantage.
/home/pi/.pikrellcam/pikrellcam.conf was calling out on_motion_end $C/motion_end $v $P $G
with an underscore.
Two other comments:
1) I never heard of curlftpfs but discovered today it is very handy for scripts to add and clean out files from a remote FTP site, handling it just as a local directory.
2) If you want to detect fast and bright things (eg. car headlights, not people) at night, with pikrellcam it is much better to just leave the camera framerate at 24 fps. With slow shutter, the motion detection often does not see cars at all (headlights become a long static streak, instead of a moving point of light). If you want to detect dark and slow-moving things, then slow shutter is an advantage.
-
- Posts: 37
- Joined: Mon Aug 19, 2013 11:12 am
Re: PiKrellCam: motion vector detect + OSD web interface
This is working almost perfecty. I did notice that for the past couple of evenings no (or very little) motion has been captured between the sunset and sunrise times.billw wrote:I've pushed an update and sun times should be working. Those that want to change frame fps
at night can put lines like this in ~/.pikrellcam/at-commands.conf:G7BWP - The installer is changed to handle non pi user, but I don't have a setup to test withCode: Select all
# sunrise/sunset or dawn/dusk (times are reported in the log file) # Motion is detected and preview updated at video_fps/mjpeg_divider so # mjpeg_divider should be changed when video_fps is changed. Also change # video_mp4_box to track video_fps or mp4 will be slow or fast motion. # # Adjust camera parameters in the evening: sunset{+-offset} daily sunset "@exposure_mode night" daily sunset+10 "@video_fps 4" daily sunset+10 "@video_mp4box_fps 4" daily sunset+10 "@mjpeg_divider 1" # Adjust camera parameters in the morning sunrise{+-offset} daily sunrise-10 "@video_fps 24" daily sunrise-10 "@video_mp4box_fps 24" daily sunrise-10 "@mjpeg_divider 4" daily sunrise "@exposure_mode auto"
so please post any errors you get if you try to install again.
In /tmp/log
sunrise/sunset times: valid dawn/dusk times: valid
dawn: 4:21
sunrise: 5:05
sunset: 20:48
dusk: 21:31
the last capture last evening was at 20:51 and the first capture this morning was 05:54
my at-commands file
Code: Select all
daily sunset "@exposure_mode night"
daily sunset+10 "@video_fps 4"
daily sunset+10 "@video_mp4box_fps 4"
daily sunset+10 "@mjpeg_divider 1"
# Adjust camera parameters in the morning sunrise{+-offset}
daily sunrise-10 "@video_fps 24"
daily sunrise-10 "@video_mp4box_fps 24"
daily sunrise-10 "@mjpeg_divider 4"
daily sunrise "@exposure_mode auto"
any ideas?
Thanks
ste
-
- Posts: 87
- Joined: Sun Aug 03, 2014 10:32 pm
Re: PiKrellCam: motion vector detect + OSD web interface
@billw/jbeale
Just ran the update, getting this on the thumbnail screen: Any ideas? Thanks!
Update:
Seems to correct itself once videos are recorded and thumbs are being created, but upon clearing the videos/thumbnails, the same erroneous view comes up (0 events in 399,539.4 hours)
Just ran the update, getting this on the thumbnail screen: Any ideas? Thanks!
Update:
Seems to correct itself once videos are recorded and thumbs are being created, but upon clearing the videos/thumbnails, the same erroneous view comes up (0 events in 399,539.4 hours)
Re: PiKrellCam: motion vector detect + OSD web interface
Yes, I didn't handle the special case of "no events". Right now it was coded to take the time difference between the first event and the last event, because I didn't know how to tell when to start timing from whenever you last cleared out the folder.
The big number problem with no events is fixed in the version I'm using now, see below, but I made another change also, adding current time/date at upper right. I didn't know how to do that without adding another frame around the whole window and putting the rest of the header off-center due to my lack of PHP/HTML coding skills.
https://github.com/jbeale1/PiCam1/blob/ ... thumbs.php
The big number problem with no events is fixed in the version I'm using now, see below, but I made another change also, adding current time/date at upper right. I didn't know how to do that without adding another frame around the whole window and putting the rest of the header off-center due to my lack of PHP/HTML coding skills.
https://github.com/jbeale1/PiCam1/blob/ ... thumbs.php
Re: PiKrellCam: motion vector detect + OSD web interface
It could be that the lighting conditions are such that you are always getting the noise "sparkles"stephencassidy wrote: This is working almost perfecty. I did notice that for the past couple of evenings no (or very little) motion has been captured between the sunset and sunrise times.
...
the last capture last evening was at 20:51 and the first capture this morning was 05:54
at night and that would inhibit the current motion detection. Improving detection during those
sparkle periods is next up for me to work on.
If that's what is affecting you, turn on showing of vectors and you should see the noise. I see the
noise level also affected somewhat by frame rate so if this is it, you could try a different night frame
rate until I get this issue worked out.
Re: PiKrellCam: motion vector detect + OSD web interface
I just fixed an oversight in the install script for the new htpasswd option where the password was
not properly set up. So if you tried it and didn't get a web page password, try again.
not properly set up. So if you tried it and didn't get a web page password, try again.