User avatar
underwhelmd
Posts: 66
Joined: Fri Jul 08, 2016 10:05 pm
Location: East Coast, Canada

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Sep 16, 2017 5:53 pm

Gavinmc42 wrote:
Sat Sep 16, 2017 6:29 am
If that works solar powered Zero W cams?

Parts are being (slowly) gathered here for that very thing.


Just curious what other folks are using for gpu_mem (/boot/config.txt) on a zero running pikrellcam?

mine = gpu_mem=128

it doesn't take long for it to use a small amount of swap. A Pi3 never does running the same system.

Code: Select all

pi@lessthanzero:~ $ free
            total         used          free     shared    buffers     cached
Mem:        379572     341292      38280      26460      30884     241124
-/+ buffers/cache:      69284      310288
Swap:       102396        188       102208

User avatar
Gavinmc42
Posts: 1502
Joined: Wed Aug 28, 2013 3:31 am

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Sep 17, 2017 1:24 am

I use 128MB, anything less can cause trouble.
I did test down to 96MB but 128MB seemed safest, as these things run 24/7/365.

Also depends on the OS, Pikrellcam is Raspbian ? Lite
.MotionEyeOS is Buildroot, I tinker with piCore and Ultibo, OS space gets smaller each time so less of an issue.

The 1GB Pi's I never worry about they seem to have plenty of room.
Zero W is a bit of a pain as the wireless works best with Lite which takes the most memory.
Ideally Pikrellcam on piCore would be my preferred solution, but piCore is not Debian based so I need a higher skillset to port it :oops:
Hopefully new kernel releases with solve some issues, min 4.9?

A smaller motion camera solution would be great as I have a Clusterhat and and I'm slowly acquiring more normal Zeros to populate it with 4 Pi's.
Pikrellcam will run on the mother Pi 2 and trigger an smaller app on the Zeros to capture at the same time.
USB booting the Zero's on the hat is doable, loading a full LIte + Pikrellcam , very, very slow progress :oops:
I may just have to figure out how to roll my own Debian OS, pretty sure I don't need all 1.3GB+ of Raspbian Lite.
Especially when I know i can get raspivid/still working on piCore <100MB. Even old 256MB A's should work?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

hystrix
Posts: 50
Joined: Mon Jan 07, 2013 12:44 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Sep 23, 2017 5:10 pm

This is excellent software. I have captured some really nice images and videos: http://pibat.afraidofsunlight.co.uk/pi-projects

I have set the configuration to record a timelapse photo every 10 seconds from when motion is detected. I have a custom timelapse_convert script that timestamps the files and moves them to the Stills folder as if they were manual still captures (i.e. filename is: motion_yyyy-mm-dd_hh_mm_ss.ss.jpg).

In the PiKrellCam OSD, when I visit the Stills folder, all of the images are shown, but only in List View. Changing to Thumbs View still only shows a list.

How can I get thumbnail images visible in the Thumbs View? It would be really useful for quickly seeing which images to download, and which to delete.

billw
Posts: 332
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Sep 25, 2017 12:53 am

hystrix wrote:
Sat Sep 23, 2017 5:10 pm
This is excellent software. I have captured some really nice images and videos: http://pibat.afraidofsunlight.co.uk/pi-projects

I have set the configuration to record a timelapse photo every 10 seconds from when motion is detected. I have a custom timelapse_convert script that timestamps the files and moves them to the Stills folder as if they were manual still captures (i.e. filename is: motion_yyyy-mm-dd_hh_mm_ss.ss.jpg).

In the PiKrellCam OSD, when I visit the Stills folder, all of the images are shown, but only in List View. Changing to Thumbs View still only shows a list.

How can I get thumbnail images visible in the Thumbs View? It would be really useful for quickly seeing which images to download, and which to delete.
Those are very colorful birds, nice photos and videos!

Still thumbs are something I neglected back when. To get that in a way that works for when you move pictures into the stills
directory, I think it would have to show scaled images and not separate thumb jpegs. That would just show whats there and I
wouldn't have to implement managing separate thumbs from both still and timelapse shots which would take a lot longer
to do. It would mean slower page loading, but I think I'll try it and we can see if it works good enough.

davefi
Posts: 6
Joined: Fri Jan 27, 2017 9:26 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Sep 25, 2017 11:58 am

hystrix wrote:
Sat Sep 23, 2017 5:10 pm
This is excellent software. I have captured some really nice images and videos: http://pibat.afraidofsunlight.co.uk/pi-projects
Wow, thats a nice looking camera project! I realise its quite recent still being September, but do you plan to do a write up with info on the parts used etc, as that project box looks particularly neat for Pi Zero projects!

BR
Dave

hystrix
Posts: 50
Joined: Mon Jan 07, 2013 12:44 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Sep 25, 2017 5:32 pm

davefi wrote:
Mon Sep 25, 2017 11:58 am
hystrix wrote:
Sat Sep 23, 2017 5:10 pm
This is excellent software. I have captured some really nice images and videos: http://pibat.afraidofsunlight.co.uk/pi-projects
Wow, thats a nice looking camera project! I realise its quite recent still being September, but do you plan to do a write up with info on the parts used etc, as that project box looks particularly neat for Pi Zero projects!

BR
Dave
Yes - I'll write up the info on the parts used. Just waiting for a wet, cold week-end.

hystrix
Posts: 50
Joined: Mon Jan 07, 2013 12:44 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Sep 25, 2017 5:36 pm

billw wrote:
Mon Sep 25, 2017 12:53 am
hystrix wrote:
Sat Sep 23, 2017 5:10 pm
This is excellent software. I have captured some really nice images and videos: http://pibat.afraidofsunlight.co.uk/pi-projects

I have set the configuration to record a timelapse photo every 10 seconds from when motion is detected. I have a custom timelapse_convert script that timestamps the files and moves them to the Stills folder as if they were manual still captures (i.e. filename is: motion_yyyy-mm-dd_hh_mm_ss.ss.jpg).

In the PiKrellCam OSD, when I visit the Stills folder, all of the images are shown, but only in List View. Changing to Thumbs View still only shows a list.

How can I get thumbnail images visible in the Thumbs View? It would be really useful for quickly seeing which images to download, and which to delete.
Those are very colorful birds, nice photos and videos!

Still thumbs are something I neglected back when. To get that in a way that works for when you move pictures into the stills
directory, I think it would have to show scaled images and not separate thumb jpegs. That would just show whats there and I
wouldn't have to implement managing separate thumbs from both still and timelapse shots which would take a lot longer
to do. It would mean slower page loading, but I think I'll try it and we can see if it works good enough.
Many thanks in advance for taking a look. The scaled images of videos works really well, and it's really easy to select those for downloading or deleting.

billw
Posts: 332
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Fri Sep 29, 2017 8:52 pm

hystrix wrote:
Sat Sep 23, 2017 5:10 pm
In the PiKrellCam OSD, when I visit the Stills folder, all of the images are shown, but only in List View. Changing to Thumbs View still only shows a list.

How can I get thumbnail images visible in the Thumbs View? It would be really useful for quickly seeing which images to download, and which to delete.
You can upgrade now and get a Stills page thumbnail view. The thumbs are automatically generated under media_dir/stills/.thumbs
when stills are first viewed. So the first view of new stills will load more slowly and it can take some time to generate all the thumbs
if you have many stills.

There's also a diskfree percent check that can be enabled to delete oldest videos when disk free gets low.

hystrix
Posts: 50
Joined: Mon Jan 07, 2013 12:44 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Sep 30, 2017 7:12 am

billw wrote:
Fri Sep 29, 2017 8:52 pm
hystrix wrote:
Sat Sep 23, 2017 5:10 pm
In the PiKrellCam OSD, when I visit the Stills folder, all of the images are shown, but only in List View. Changing to Thumbs View still only shows a list.

How can I get thumbnail images visible in the Thumbs View? It would be really useful for quickly seeing which images to download, and which to delete.
You can upgrade now and get a Stills page thumbnail view. The thumbs are automatically generated under media_dir/stills/.thumbs
when stills are first viewed. So the first view of new stills will load more slowly and it can take some time to generate all the thumbs
if you have many stills.

There's also a diskfree percent check that can be enabled to delete oldest videos when disk free gets low.

Upgraded, and it's perfect. :)

On my PiZeroW, 66 still images didn't really take that long to load.

Many thanks for this upgrade.

User avatar
underwhelmd
Posts: 66
Joined: Fri Jul 08, 2016 10:05 pm
Location: East Coast, Canada

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Oct 01, 2017 2:35 pm

billw wrote:
Fri Sep 29, 2017 8:52 pm
You can upgrade now and get a Stills page thumbnail view. The thumbs are automatically generated under media_dir/stills/.thumbs
when stills are first viewed. So the first view of new stills will load more slowly and it can take some time to generate all the thumbs
if you have many stills.

There's also a diskfree percent check that can be enabled to delete oldest videos when disk free gets low.


Thank you BillW. The diskfree percent check is very handy to have.

I had been using the great cdrof.sh script by punacmc and it's working well across several Pi but I will check out this upgrade's features.

punacmc
Posts: 31
Joined: Tue Nov 19, 2013 4:07 am

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Oct 08, 2017 11:18 pm

Bill, can you make it to where we can use the full resolution of the cameras? I'm ok with the reduced frame rates. I would like to use all 8MP of the v2 camera for a project. -Mike

billw
Posts: 332
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Oct 09, 2017 2:54 am

punacmc wrote:
Sun Oct 08, 2017 11:18 pm
Bill, can you make it to where we can use the full resolution of the cameras? I'm ok with the reduced frame rates. I would like to use all 8MP of the v2 camera for a project. -Mike
You can bypass what the menu settings allow and edit pikrellcam.conf to set whatever you want to video_width,
video_height, and video_fps.

I wanted a set of sensible preset values in the OSD without trying to cover every possible combination, but will take
a look.

ufohunterpikrellcam
Posts: 3
Joined: Sun Sep 10, 2017 8:38 am

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Oct 12, 2017 9:12 pm

Hi,

1. Is there a possibility in the future to add a min/max function to the Vector Magnitude setting?
So it will be possible to exclude superfast Objects like Birds or so on from recording.

2. I am UFO researcher so i will be watching the sky with Pikrellcam. For that I have the problem with changing light conditions.
The cam will recognize motion often when the light conditions are changing but without real motion.
Is there a solution for that problem? Maybe the Algorytm?

3. Is there a update in the pipeline for the next time ?

billw
Posts: 332
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Fri Oct 13, 2017 11:54 pm

ufohunterpikrellcam wrote:
Thu Oct 12, 2017 9:12 pm
Hi,

1. Is there a possibility in the future to add a min/max function to the Vector Magnitude setting?
So it will be possible to exclude superfast Objects like Birds or so on from recording.

2. I am UFO researcher so i will be watching the sky with Pikrellcam. For that I have the problem with changing light conditions.
The cam will recognize motion often when the light conditions are changing but without real motion.
Is there a solution for that problem? Maybe the Algorytm?

3. Is there a update in the pipeline for the next time ?
One reason I did not add a max config is that an initial motion trigger could be lower but then subsequent
triggers could be greater than a max setting but the record has already started. There was some discussion a while back
about something similar and I was thinking then that a filter for a custom detect like you want should be handled by a
post or concurrent processing monitor of the motion events that decides whether to keep or delete the video. This
would be something to tie in to an on_motion_begin command that reads the /run/pikrellcam/motion-events file to
decide the fate of the video. But then I didn't follow up with anything and I haven't heard if anyone has tried something
like that. A custom motion-events filter could look at vector count ranges as well as magnitude ranges and it could make
complicated decisions based on overall motion (changes of direction or pauses) vs time for a range of object sizes.
It's a long range use of the motion-events file I had in mind, but it would take some development effort.
But I'll look over this situation again.

For your sky viewing, is it that clouds are detected as moving? And is it motion direction or bursts that are triggering.
A lot can be determined by turning on Preset and Vectors and observing what is going on when motion is detected.
And looking at the motion-events file for those detects could help also.

There will be more updates.

ufohunterpikrellcam
Posts: 3
Joined: Sun Sep 10, 2017 8:38 am

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Oct 14, 2017 10:53 am

Thank you very much for your fast answer.
When I look in the Log File for the error events with clouds and so on there is only 1 Direction Detect and nothing more to see as trigger for the files. Is there a possibility to exclude light changing conditions from recognize as motion? When the camera regulates light conditions because of coming clouds or so on there will be motion.

billw
Posts: 332
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Oct 14, 2017 2:44 pm

ufohunterpikrellcam wrote:
Sat Oct 14, 2017 10:53 am
When I look in the Log File for the error events with clouds and so on there is only 1 Direction Detect and nothing more to see as trigger for the files. Is there a possibility to exclude light changing conditions from recognize as motion? When the camera regulates light conditions because of coming clouds or so on there will be motion.
After one of those detects, copy the /run/pikrellcam/motion-events file and post it so I can see the details about the detect.
You have to copy it somewhere because it will be overwritten at a next detect.

That can give a clue if anything can be done with magnitude and count adjustments. But aside from that, I've started thinking that another way to help with both of your problems would be to add a confirm delay setting. Right now there is a confirm gap and with that a second confirm motion detect is required within the confirm gap period (I assume you have not set that to zero, if so, it should not be zero). But right now the confirm can happen right away. If I add a confirm delay, then the second confirm event could be delayed a second or so so that light level changes could settle and the fast flying birds would be out of frame.

wally333
Posts: 77
Joined: Mon Jun 06, 2016 7:09 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Oct 15, 2017 1:44 am

I just installed it and have started playing with it, documentation on using it is less than clear, but it has captured some motion activated videos of very good quality, but I've also managed to crash the nginx webserver twice requiring a reboot to get it back. Makes the learning curve even steeper than it should be. If pressing buttons on a web page can crash the server there be serious issues!


I'd post the last state and motion-events files but seems it'd be a waste of bandwidth as the post-crash version is exactly the same as the last pre-crash versions I'd looked at. As I said I'm trying to figure it out and probably doing "stupid" things, but I think we can all agree that this shouldn't crash the nginx server no matter what webpage button press sequence I use.


sudo killall nginx

followed by re-running
./pikrellcam/install-pikrellcam.sh

doesn't get it back, only a reboot seems to work.

wally333
Posts: 77
Joined: Mon Jun 06, 2016 7:09 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Oct 15, 2017 9:52 pm

I've locked it up a third time, this time I tried to record the order of my webpage button presses.

Reboot Pi3
Open Webpage -- the three large buttons "vibrate" up & down making it a bit hard to find the click target.

Press System then Start -- monitoring window opens on webpage and preview display appears to work well.

Press Show Presets -- get the four image overlay boxes on the image

Enable Motion -- sems to captuer motion triggerd videos, did several with varying light levels.

System Stop
Medial->Videos -- Playback is fine, deleted one from yesterday and the darkest one from today.

System Start, Enable Motion -- seems to be working OK.

System Stop, Media Videos -- playback is fine, delete another one.

Then I start exploring some of the features.
Press Timelapse -- nothing happens.
Press Preset -- nothing happens
System Start No Preview window webpage "locks up" eventually I get: 504 Gateway Time-out nginx/1.10.3

Nothing about pikrellcam works again until I reboot.

Suggestions?

hystrix
Posts: 50
Joined: Mon Jan 07, 2013 12:44 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Oct 16, 2017 5:50 pm

wally333 wrote:
Sun Oct 15, 2017 9:52 pm
I've locked it up a third time, this time I tried to record the order of my webpage button presses.

Reboot Pi3
Open Webpage -- the three large buttons "vibrate" up & down making it a bit hard to find the click target.

Press System then Start -- monitoring window opens on webpage and preview display appears to work well.

Press Show Presets -- get the four image overlay boxes on the image

Enable Motion -- sems to captuer motion triggerd videos, did several with varying light levels.

System Stop
Medial->Videos -- Playback is fine, deleted one from yesterday and the darkest one from today.

System Start, Enable Motion -- seems to be working OK.

System Stop, Media Videos -- playback is fine, delete another one.

Then I start exploring some of the features.
Press Timelapse -- nothing happens.
Press Preset -- nothing happens
System Start No Preview window webpage "locks up" eventually I get: 504 Gateway Time-out nginx/1.10.3

Nothing about pikrellcam works again until I reboot.

Suggestions?
I have 3 Raspberry Pi cameras running Pikrellcam with any problems....until tonight. The extremely windy conditions caused one camera to trigger all day. I have it set so on motion start, time-lapse images are created every 10 seconds. Eventually, I ran out of disk space, and got the 504 Gateway Time-out error when I tried to stop motion on the web interface.

The display told me that the camera could not be enabled, and to check the ribbon cable etc. However, after deleted all the files in the timelapse folder to free up some disk space, the camera was still working - time-lapse images were still being created - but no preview on the web interface - just the camera error message.

I solved it by using PuTTY to send FIFO commands to end the time-lapse and to disable motion. Then I had to stop and restart the nginx server, then reboot.

It's not a huge problem, since the weather conditions were exceptional today. Can time-lapse images also be deleted when diskfree percent reaches the set limit? ;)

wally333
Posts: 77
Joined: Mon Jun 06, 2016 7:09 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Oct 16, 2017 9:47 pm

hystrix wrote:
Mon Oct 16, 2017 5:50 pm
wally333 wrote:
Sun Oct 15, 2017 9:52 pm
I've locked it up a third time, this time I tried to record the order of my webpage button presses.

Reboot Pi3
Open Webpage -- the three large buttons "vibrate" up & down making it a bit hard to find the click target.

---- stuff deleted -----

Then I start exploring some of the features.
Press Timelapse -- nothing happens.
Press Preset -- nothing happens
System Start No Preview window webpage "locks up" eventually I get: 504 Gateway Time-out nginx/1.10.3

Nothing about pikrellcam works again until I reboot.

Suggestions?
I have 3 Raspberry Pi cameras running Pikrellcam with any problems....until tonight. The extremely windy conditions caused one camera to trigger all day. I have it set so on motion start, time-lapse images are created every 10 seconds. Eventually, I ran out of disk space, and got the 504 Gateway Time-out error when I tried to stop motion on the web interface.

The display told me that the camera could not be enabled, and to check the ribbon cable etc. However, after deleted all the files in the timelapse folder to free up some disk space, the camera was still working - time-lapse images were still being created - but no preview on the web interface - just the camera error message.

I solved it by using PuTTY to send FIFO commands to end the time-lapse and to disable motion. Then I had to stop and restart the nginx server, then reboot.

It's not a huge problem, since the weather conditions were exceptional today. Can time-lapse images also be deleted when diskfree percent reaches the set limit? ;)
Sounds like the issue that I trigger easily while mousing around the webpage trying to figure out how to use the system.

I bet you could have simply skipped all the other PuTTY actions and simply rebooted :)

billw
Posts: 332
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Oct 16, 2017 11:49 pm

hystrix wrote:
Mon Oct 16, 2017 5:50 pm
I have 3 Raspberry Pi cameras running Pikrellcam with any problems....until tonight. The extremely windy conditions caused one camera to trigger all day. I have it set so on motion start, time-lapse images are created every 10 seconds. Eventually, I ran out of disk space, and got the 504 Gateway Time-out error when I tried to stop motion on the web interface.

The display told me that the camera could not be enabled, and to check the ribbon cable etc. However, after deleted all the files in the timelapse folder to free up some disk space, the camera was still working - time-lapse images were still being created - but no preview on the web interface - just the camera error message.
A camera error message on the preview means a pikrellcam start failed to open the camera, and that pikrellcam no longer runs.
Maybe you tried starting pikrellcam thinking the running one stopped? It sorta sounds to me like the mmal callbacks stopping that was
a problem in a Rasbian version around the beginning of the year, so are you running a more recent release?

I don't know about the nginx problems. I haven't seen that and just now is the first I'm hearing of it.

I'll add disk percent checks to timelapse.

arnauld
Posts: 4
Joined: Wed Oct 14, 2015 2:12 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Oct 17, 2017 4:15 pm

Is it possible to record a video with 720p/60fps ?

Thank you.

ufohunterpikrellcam
Posts: 3
Joined: Sun Sep 10, 2017 8:38 am

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Oct 23, 2017 4:50 pm

Is there any posibility to set the Motion Vector Magnitude Value lower than 1?
I also wanna record slow moving Objects like far plaines and so on with lower Magnitude of Vector.

Greetings

billw
Posts: 332
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Oct 24, 2017 4:00 pm

arnauld wrote:
Tue Oct 17, 2017 4:15 pm
Is it possible to record a video with 720p/60fps ?
Edit pikrellcam.conf and set video_fps, video_height, and video_width to what you want and don't use the OSD menus.

billw
Posts: 332
Joined: Tue Sep 18, 2012 8:23 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Oct 24, 2017 4:09 pm

ufohunterpikrellcam wrote:
Mon Oct 23, 2017 4:50 pm
Is there any posibility to set the Motion Vector Magnitude Value lower than 1?
I also wanna record slow moving Objects like far plaines and so on with lower Magnitude of Vector.
It's an integer value, so no. Right now it's limited to 3 because of noise issues, but I'll change that to allow lower to 1 so you
can experiment. If you want to try it now without waiting for an update, you can edit src/config.c and change:

Code: Select all

    if (pikrellcam.motion_magnitude_limit < 3)
        pikrellcam.motion_magnitude_limit = 3;
to
    if (pikrellcam.motion_magnitude_limit < 1)
        pikrellcam.motion_magnitude_limit = 1;
Then run make.,
Then stop pikrellcam, edit pikrellcam.conf to change motion_magnitude_limit to 1, and restart pikrellcam.

Edit: Sorry, I gave wrong info here. You edit magnitude_liimit lines in preset-servos.conf or preset-no-servos.conf depending on
if you use servos. Also, don't set below 2 because code assumes magnitude will never be 1 as that limits vector directions to
only 1 pixel left, right, up, down and this leads to noisy vector direction checking. So setting a limit of 1 will not work.

Return to “Camera board”

Who is online

Users browsing this forum: No registered users and 7 guests