User avatar
jbeale
Posts: 3581
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: PiKrellCam: motion vector detect + OSD web interface

Fri Jul 31, 2015 5:53 pm

I set my configuration to have the still images "clean" without overlay, and that is how they usually are saved (upper image) but sometimes I get an image that does have the onscreen overlay visible (lower image). These two stills were saved only a few minutes apart, and I was not actively viewing the preview page. I wonder if there is some timing race condition inside the image saving logic that occasionally saves with the text overlay.

Image

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

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Aug 01, 2015 1:31 am

jbeale wrote:I set my configuration to have the still images "clean" without overlay, and that is how they usually are saved (upper image) but sometimes I get an image that does have the onscreen overlay visible (lower image). These two stills were saved only a few minutes apart, and I was not actively viewing the preview page. I wonder if there is some timing race condition inside the image saving logic that occasionally saves with the text overlay.
I420 frames are drawn on (or not if clean is on) and then passed to the preview jpeg encoder input
port and the encoder output becomes the jpeg. I wanted to use buffer header time stamp information
to sync the buffers but at the time I wrote that code the time stamps were not working. So then
I just assumed that when I send a I420 buffer to the jpeg encoder, the next jpeg encoder output
will correspond to it. But if the previous I420 buffer has not come out of the jpeg encoder then
the frames are out of sync. At default settings the frame rate for that path is 6 per second so
that normally should be a safe assumption. But I've also I've seen that if the GPU is running close to its
limit frames are dropped somewhere in the preview jpeg encoder path and I don't know at what point
they can get dropped. So it's either a longer than expected delay through the jpeg encoder or
a frame drop. I think to figure out exactly what is going on I need to get good buffer
header time stamps and I need to recheck if I can get them with the current firmware.

User avatar
jbeale
Posts: 3581
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Aug 01, 2015 2:15 am

I tried setting up pikrellcam just now on a RPi which had never before had the software on it. After doing

Code: Select all

git clone https://github.com/billw2/pikrellcam
cd pikrellcam/
./install-pikrellcam.sh
and selecting port 80, autostart yes, blank password, I tried a web browser at the Pi's address and got:

Code: Select all

401 Authorization Required
nginx/1.2.1
which I had not seen before on my other pikrellcam install. What to do?
I also tried to reinstall and set a password, but that gave me an error:

Code: Select all

Enter a password for a web page login for user: pi
Enter a blank entry if you do not want the password login.
Enter password: raspberry

Starting PiKrellCam install...
No packages need to be installed.
Adding a pikrellcam autostart command to /etc/rc.local:
su pi -c '(sleep 5; /home/pi/pikrellcam/pikrellcam) &'
Adding to /etc/sudoers.d: www-data permission to run pikrellcam as user pi:
./install-pikrellcam.sh: line 307: htpasswd: command not found
chown: cannot access `www/.htpasswd': No such file or directory
EDIT: one problem was I didn't have 'htpasswd' installed, fixed that with

Code: Select all

sudo apt-get install apache2-utils
and then a reinstall setting a password works OK. Not sure if having no password is still allowed?

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

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Aug 01, 2015 3:00 am

jbeale wrote: EDIT: one problem was I didn't have 'htpasswd' installed, fixed that with

Code: Select all

sudo apt-get install apache2-utils
and then a reinstall setting a password works OK. Not sure if having no password is still allowed?
The install was supposed to install apache2-utils and not require that a password be set.
I did test that those things worked, but I'll look for what could have gone wrong.

User avatar
jbeale
Posts: 3581
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Aug 01, 2015 6:00 am

For what it's worth, I just realized the current default pikrellcam generates motion-area thumbnails which have different aspect ratios. At first I thought that was a good idea, but I now prefer to force them all to be square, seems to me it makes better use of screen real estate and looks nicer also. The below pikrellcam/scripts/preview-save script does this. File is also at https://github.com/jbeale1/PiCam1/blob/ ... eview-save

Code: Select all

#!/bin/bash

# This is a motion event on_motion_preview_save script.
# Uncomment lines to enable emailing the preview jpeg, copying the preview
# jpeg, taking a still, or generating a thumb of the preview jpeg.
#
# uncomment any echo lines to the LOG_FILE if you want logging.
#
# Argument substitution done by PiKrellCam before running this script:
#   $C - scripts directory so this script is found.
#   $F - the preview jpeg filename full path (from MJPEG_DIR)
#   $m - the media directory full path
#   $P - the command FIFO
#   $G - log file configured in ~/.pikrellcam/pikrellcam.conf.
#   $i	 width of the motion detected area in the preview jpeg
#   $J	 height of the motion detected area in the preview jpeg
#   $K	 x coordinate of the motion detected area center in the preview jpeg
#   $Y	 y coordinate of the motion detected area center in the preview jpeg
# 
# In ~/.pikrellcam.conf, for this script as is, make on_motion_preview_save:
#
# on_motion_preview_save  $C/preview-save  $F $m $P $G $i $J $K $Y

PREVIEW_JPEG=$1
MEDIA_DIR=$2
FIFO=$3
LOG_FILE=$4

# uncomment and edit MY_EMAIL to your email address to email the preview jpeg.
#
[email protected]
#mpack -s [email protected]$HOSTNAME $PREVIEW_JPEG $MY_EMAIL
#echo "mpack -s [email protected]$HOSTNAME $PREVIEW_JPEG $MY_EMAIL" >> $LOG_FILE



# uncomment to copy the low resolution preview jpeg to the stills directory.
# Edit PREVIEW_JPEG_DIR to copy it anywhere you want.
#
PREVIEW_JPEG_DIR=$MEDIA_DIR/stills
cp $PREVIEW_JPEG $PREVIEW_JPEG_DIR
echo "cp $PREVIEW_JPEG $PREVIEW_JPEG_DIR" >> $LOG_FILE



# uncomment if you want to take a still.  This is probably only useful if
# preview_save_mode is "first" because if the mode is "best" the still will
# be taken after the action has ended.  So use the on_motion_begin command
# to take a still if preview_save_mode is "best".  The on_motion_begin
# command can be a script like this or the internal command "@still"
# Note that taking a full resolution still can put a glitch into the motion
# video being recorded because the camera has to switch modes.
#
#echo "still" > $FIFO
#echo "preview save script: still" >> $LOG_FILE



# Uncomment the "convert" line to generate a thumb of the motion detected area
# inside of the preview jpeg.
# The default here is to save the thumb into the media_dir/stills directory
# so a name is created with a ".th" inserted into the PREVIEW_JPEG name in case
# saving the full jpeg has also been enabled to save to the same directory.
#
W=$5
H=$6
X=$7
Y=$8

if [ "$W" -gt "$H" ]; then
  SZ=$W
else
  SZ=$H
fi

XT=`expr $SZ / 2`
XO=`expr $X - $XT`
YT=`expr $SZ / 2`
YO=`expr $Y - $YT`
if [ "$XO" -lt 0 ]; then
  XO=0
fi
if [ "YO" -lt 0 ]; then
  YO=0
fi

THUMB_JPEG_DIR=$MEDIA_DIR/thumbs

# Change a motion-xxx.jpg into motion-xxx.th.jpg.  PREVIEW_JPEG is a full path.
# This is not necessary if THUMB_JPEG_DIR is different from PREVIEW_JPEG_DIR
# or the PREVIEW_JPEG is not copied.
BASE=`basename $PREVIEW_JPEG`
THUMB_JPEG=${BASE%.jpg}.th.jpg

convert $PREVIEW_JPEG -crop ${SZ}x$SZ+$XO+$YO -resize 150x150\! $THUMB_JPEG_DIR/$THUMB_JPEG
echo "convert $PREVIEW_JPEG -crop ${SZ}x$SZ+$XO+$YO -resize 150x150\! $THUMB_JPEG_DIR/$THUMB_JPEG" >> $LOG_FILE

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

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Aug 01, 2015 3:52 pm

jbeale wrote:At first I thought that was a good idea, but I now prefer to force them all to be square, seems to me it makes better use of screen real estate and looks nicer also.
I've updated pikrellcam git with this and it is better.

Also, the install script is updated with a fix for the no password option bug you found.

YvesG
Posts: 46
Joined: Wed Oct 03, 2012 6:54 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Aug 02, 2015 9:38 am

1. Is it possible to get access to a mjpeg stream? As i understand things here the preview is done by a refresh of the jpeg image every 1/x second.
A std mjpeg flow could be easier to use in 3rd party application.

2. live stream, recorded video all works fine on a computer or an iphone. Recorded Videos can't be viewed into android chrome browser (i think due to the removal of h264 by Google). Any other possibility to make video readable in google chrome on a tablet?

Thanks
Yves

User avatar
jbeale
Posts: 3581
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Aug 02, 2015 5:32 pm

YvesG wrote:2. live stream, recorded video all works fine on a computer or an iphone. Recorded Videos can't be viewed into android chrome browser (i think due to the removal of h264 by Google). Any other possibility to make video readable in google chrome on a tablet?
The R-Pi only has hardware support for H.264 format video; software transcode would take much longer.
I have a Samsung Galaxy Tab 3 (SM-T310 Android 4.4.2) and Chrome does play H.264 mp4 files, but my phone (GT-I8190 Android 4.1.1) does not play them. I downloaded the free "VLC for Android" app and that does play the .mp4 videos. I just have to download them first (long press on thumbnail, select download, swipe down to view downloads, press on downloaded filename to play in VLC).

The VLC Android player has several "fit to screen" sizing options including "center" which shows a 1:1 center crop of the full-HD video (significantly more detail visible than I normally see on my 480x800 pixel phone screen). Unfortunately you can't pan the crop area to other regions, as far as I know.

YvesG
Posts: 46
Joined: Wed Oct 03, 2012 6:54 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Aug 02, 2015 8:12 pm

Thanks jbeale, i will stick to h264 (i know what software encoding means for the raspberry).
Strange that your Samsung Galaxy Tab 3 (SM-T310 Android 4.4.2) and Chrome are able to play H.264 mp4 files. With my nexus 7 i need to download the file and read it in an external viewer.

Any idea about 1? real mjpeg stream?

Jasimo
Posts: 51
Joined: Mon Apr 27, 2015 11:50 am

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Aug 02, 2015 8:50 pm

Hi,
I have set the following in at-commands.conf

Code: Select all

# Adjust camera parameters in the evening: sunset{+-offset}
daily sunset-30 "@exposure_mode night"
daily sunset-30 "@video_fps 4"
daily sunset-30 "@video_mp4box_fps 4"
daily sunset-30 "@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"
the log tells me:

Code: Select all

2015-08-02 22:19:20 ==== PiKrellCam started ====
using FIFO: /home/pi/pikrellcam/www/FIFO
using mjpeg: /run/pikrellcam/mjpeg.jpg
execl:[/home/pi/pikrellcam/scripts-dist/_init /home/pi/pikrellcam /mnt/cam/medi$
  www/media link is already set to /mnt/cam/media
  /home/pi/pikrellcam/www/config.php: MJPEG_FILE not changed.
  /home/pi/pikrellcam/www/config.php: FIFO_FILE not changed.
  /home/pi/pikrellcam/www/config.php: PIKRELLCAM not changed.
execl:[/home/pi/pikrellcam/scripts/startup /home/pi/pikrellcam /mnt/cam/media /$
  MOUNT_DISK is not set.
circular buffer allocate: 10.94 MBytes (35 seconds at 2.5 Mbits/sec)
command_process: motion load_regions haus
sunrise/sunset times: valid  dawn/dusk times: valid
dawn:    6:21
sunrise: 7:02
sunset:  22:27
dusk:    23:08
sunset is set to 22:27
with the command

Code: Select all

daily sunset-30
it should switch at ~21:58 to sunset, but it doesn´t, could someone help me?

User avatar
jbeale
Posts: 3581
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

pikrellcam locked up?

Mon Aug 03, 2015 1:20 am

On one of my RPi's, pikrellcam has been running OK all day but simply stopped recording video at 5:21 pm today. The Pi itself is ok, the wifi link is still up, the web server and web page is still active, the preview jpeg simply always shows the last image at 5:21:22 pm. I'm not sure the logs say anything useful.

Code: Select all

[email protected] /tmp $ tail -20 /tmp/pikrellcam.log
event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/motion_2015-08-02_17.15.16_540.jpg
event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/motion_2015-08-02_17.15.16_540.jpg
event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/motion_2015-08-02_17.15.16_540.jpg
Video motion record stopped.
execl:[(MP4Box -quiet -fps 24 -add /home/pi/pikrellcam/media/videos/motion_2015-08-02_17.15.16_540.mp4.h264 /home/pi/pikrellcam/media/videos/motion_2015-08-02_17.15.16_540.mp4 2> /dev/null ; rm /home/pi/pikrellcam/media/videos/motion_2015-08-02_17.15.16_540.mp4.h264)]
execl:[/home/pi/pikrellcam/scripts/preview-save  /run/pikrellcam/motion_2015-08-02_17.15.16_540.jpg /home/pi/pikrellcam/media /home/pi/pikrellcam/www/FIFO /tmp/pikrellcam.log 214 192 312 125]
cp /run/pikrellcam/motion_2015-08-02_17.15.16_540.jpg /home/pi/pikrellcam/media/stills
convert /run/pikrellcam/motion_2015-08-02_17.15.16_540.jpg -crop 214x214+205+18 -resize 150x150\! /home/pi/pikrellcam/media/thumbs/motion_2015-08-02_17.15.16_540.th.jpg
event_preview_dispose(); removing /run/pikrellcam/motion_2015-08-02_17.15.16_540.jpg
event_motion_end_cmd(); running $C/motion-end $v $P $G
execl:[/home/pi/pikrellcam/scripts/motion-end /home/pi/pikrellcam/media/videos/motion_2015-08-02_17.15.16_540.mp4 /home/pi/pikrellcam/www/FIFO /tmp/pikrellcam.log]
UPLOADED motion_2015-08-02_17.15.16_540.jpg
Video record: /home/pi/pikrellcam/media/videos/motion_2015-08-02_17.21.19_541.mp4.h264 ...
event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/motion_2015-08-02_17.21.19_541.jpg
event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/motion_2015-08-02_17.21.19_541.jpg
event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/motion_2015-08-02_17.21.19_541.jpg
event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/motion_2015-08-02_17.21.19_541.jpg
event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/motion_2015-08-02_17.21.19_541.jpg
event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/motion_2015-08-02_17.21.19_541.jpg
event preview save: copy /run/pikrellcam/mjpeg.jpg -> /run/pikrellcam/motion_2015-08-02_17.21.19_541.jpg


[email protected] /tmp $ ll /run/pikrellcam/
total 184
-rw-r--r-- 1 pi pi 91690 Aug  2 17:21 mjpeg.jpg
-rw-r--r-- 1 pi pi     0 Aug  2 17:21 mjpeg.jpg.part
-rw-r--r-- 1 pi pi 91690 Aug  2 17:21 motion_2015-08-02_17.21.19_541.jpg

[email protected] ~ $ date
Sun Aug  2 18:21:22 PDT 2015

Jasimo
Posts: 51
Joined: Mon Apr 27, 2015 11:50 am

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Aug 04, 2015 6:15 am

Jasimo wrote:Hi,
I have set the following in at-commands.conf

Code: Select all

# Adjust camera parameters in the evening: sunset{+-offset}
daily sunset-30 "@exposure_mode night"
daily sunset-30 "@video_fps 4"
daily sunset-30 "@video_mp4box_fps 4"
daily sunset-30 "@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"
the log tells me:

Code: Select all

2015-08-02 22:19:20 ==== PiKrellCam started ====
using FIFO: /home/pi/pikrellcam/www/FIFO
using mjpeg: /run/pikrellcam/mjpeg.jpg
execl:[/home/pi/pikrellcam/scripts-dist/_init /home/pi/pikrellcam /mnt/cam/medi$
  www/media link is already set to /mnt/cam/media
  /home/pi/pikrellcam/www/config.php: MJPEG_FILE not changed.
  /home/pi/pikrellcam/www/config.php: FIFO_FILE not changed.
  /home/pi/pikrellcam/www/config.php: PIKRELLCAM not changed.
execl:[/home/pi/pikrellcam/scripts/startup /home/pi/pikrellcam /mnt/cam/media /$
  MOUNT_DISK is not set.
circular buffer allocate: 10.94 MBytes (35 seconds at 2.5 Mbits/sec)
command_process: motion load_regions haus
sunrise/sunset times: valid  dawn/dusk times: valid
dawn:    6:21
sunrise: 7:02
sunset:  22:27
dusk:    23:08
sunset is set to 22:27
with the command

Code: Select all

daily sunset-30
it should switch at ~21:58 to sunset, but it doesn´t, could someone help me?
now it works, reinstall of the at-commands.conf does the trick.

User avatar
jbeale
Posts: 3581
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Aug 04, 2015 2:13 pm

The problem Pi had another lockup this morning, so I resorted to running the below script as a watchdog on the mjpeg file. In my case the 'pikrellcam' process had terminated, so I could also use a script that saved the original PID and restarts it when it goes missing. Don't put too short a timeout on the "agelimit" if you autostart this on boot, or the pi will get into an endless reboot cycle if the script starts before pikrellcam has time to get rolling.

Code: Select all

#!/bin/bash
# calling script should kill any other versions of this first;
# we only need one of these processes running

filename="/run/pikrellcam/mjpeg.jpg"
agelimit=60

while true; do
  # wait for this long, first
  sleep 60
  # sleep 10

  # print age of $filename in seconds
  # echo $(( `date +%s` - `stat -L --format %Y $filename` ))
  # d=`date +%y-%m-%d_%H:%M:%S`
  d=`date`
  #echo "Current date: $d"
  age=$(( `date +%s` - `stat -L --format %Y $filename` ))

  if [ $age -gt $agelimit ]; then
    echo "$filename is $age seconds old, over limit of $agelimit seconds" >> bootlog.txt
    echo "Reboot at: $d" >> /home/pi/log/bootlog.txt
    sudo reboot
  fi
done

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

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Aug 04, 2015 7:54 pm

I've reworked the videos/stills web page (www/media.php) so that the files are in a scrollable
list with files grouped by day. It's a step towards making a long list of videos easier to manage.
Update with:

Code: Select all

cd ~/pikrellcam
git pull origin
Or if you want to get the media.php file:

Code: Select all

wget https://raw.githubusercontent.com/billw2/pikrellcam/master/www/media.php

User avatar
jbeale
Posts: 3581
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: PiKrellCam: motion vector detect + OSD web interface

Wed Aug 05, 2015 3:43 am

billw wrote:

Code: Select all

wget https://raw.githubusercontent.com/billw2/pikrellcam/master/www/media.php
Thanks for that update, it's nice to have them separated by day.
One suggestion- with my usual browser screen width, I could view at least 3 and maybe 4 columns at once, that would reduce the need for scrolling.

HeikoG
Posts: 12
Joined: Wed Oct 16, 2013 11:53 am

Re: PiKrellCam: motion vector detect + OSD web interface

Wed Aug 05, 2015 6:29 am

Many thanks for this great projects.
The watchdod is a good idea. Is it possible to add new functions to the System menu?

- Reboot
- Show log
- Clear log

Thanks

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

Re: PiKrellCam: motion vector detect + OSD web interface

Wed Aug 05, 2015 1:48 pm

jbeale wrote:
billw wrote: One suggestion- with my usual browser screen width, I could view at least 3 and maybe 4 columns at once, that would reduce the need for scrolling.
I started with just 2 columns because for more than that it needs a configuration option so people
can pick what they want. For my purposes I would like 3 columns so I am planning to make it
configurable.

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

Re: PiKrellCam: motion vector detect + OSD web interface

Wed Aug 05, 2015 1:51 pm

HeikoG wrote:Many thanks for this great projects.
The watchdod is a good idea. Is it possible to add new functions to the System menu?

- Reboot
- Show log
- Clear log

Thanks
Good ideas for the log. At first I was hesitant to consider a reboot, but the htpasswd now
in use is more secure so I'll look at doing that also.

boomlikethat
Posts: 85
Joined: Sun Aug 03, 2014 10:32 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Aug 06, 2015 1:12 pm

billw wrote:I've reworked the videos/stills web page (www/media.php) so that the files are in a scrollable
list with files grouped by day. It's a step towards making a long list of videos easier to manage.
Update with:

Code: Select all

cd ~/pikrellcam
git pull origin
Or if you want to get the media.php file:

Code: Select all

wget https://raw.githubusercontent.com/billw2/pikrellcam/master/www/media.php
Nice work, billw. Any chance we can get some navigation arrows to go back and forth to each next/prev video? Or even perhaps back/forth by each day too? Just a thought.

Also, I have a general question. I think I asked this before, but is it possible to have multiple thumbs generated for movement in different regions? Sometimes I find I'll skip clicking on a thumb to review a video, only to find out there was something else I wanted to keep within the same video. I kinda fell into that one by accident.

I'm guessing it's not, but thought I'd throw it out there.

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

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Aug 06, 2015 4:44 pm

boomlikethat wrote: Nice work, billw. Any chance we can get some navigation arrows to go back and forth to each next/prev video? Or even perhaps back/forth by each day too? Just a thought.
Next/prev by video would be good. I can do that and think about by day.
Also, I have a general question. I think I asked this before, but is it possible to have multiple thumbs generated for movement in different regions? Sometimes I find I'll skip clicking on a thumb to review a video, only to find out there was something else I wanted to keep within the same video. I kinda fell into that one by accident.

I'm guessing it's not, but thought I'd throw it out there.
It's not doable now and I don't have a good idea for how to handle something like that.
There could be highly variable numbers of thumbs generated per video based on
different users having different numbers of regions and if you wanted multiple thumbs
per region, how to decide when or how many to save. Once there are multiple variable
numbers of thumbs, then displaying them on the web page would likely be a big problem.

boomlikethat
Posts: 85
Joined: Sun Aug 03, 2014 10:32 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Aug 06, 2015 5:05 pm

billw wrote:
boomlikethat wrote: Nice work, billw. Any chance we can get some navigation arrows to go back and forth to each next/prev video? Or even perhaps back/forth by each day too? Just a thought.
Next/prev by video would be good. I can do that and think about by day.

Thank you!


Also, I have a general question. I think I asked this before, but is it possible to have multiple thumbs generated for movement in different regions? Sometimes I find I'll skip clicking on a thumb to review a video, only to find out there was something else I wanted to keep within the same video. I kinda fell into that one by accident.

I'm guessing it's not, but thought I'd throw it out there.
It's not doable now and I don't have a good idea for how to handle something like that.
There could be highly variable numbers of thumbs generated per video based on
different users having different numbers of regions and if you wanted multiple thumbs
per region, how to decide when or how many to save. Once there are multiple variable
numbers of thumbs, then displaying them on the web page would likely be a big problem.
Yeah, I can understand that. I don't know enough about other proprietary systems to know if they can as well. But the ones I know do not do it either.

Please don't take any of what I ask as criticism, this is a really great app and has shown benefits from my usage. I just want to be able to let it run, and quickly scan the "hits" and keep what I need in the shortest time possible. You have done that well.

Jasimo
Posts: 51
Joined: Mon Apr 27, 2015 11:50 am

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Aug 06, 2015 8:10 pm

Hi,

Just a question regarding the motion detection.
Does the size of the motion region I have set, anything to do with the parameter

Code: Select all

motion_magnitude_limit_count
in the conf file? I am asking because the description of this parameter says "Maximum should be something less than what fits in the motion regions"
rgs
Jan

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

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Aug 06, 2015 8:33 pm

Jasimo wrote:Hi,

Just a question regarding the motion detection.
Does the size of the motion region I have set, anything to do with the parameter

Code: Select all

motion_magnitude_limit_count
in the conf file? I am asking because the description of this parameter says "Maximum should be something less than what fits in the motion regions"
rgs
Jan
Detection is done by looking for motion in each region and there must be at least limit_count vectors
for a positive detect. So the width x height of each region better be somewhat larger than limit_count
or motion cannot be detected in the region.

This really should not be an issue and what I'm getting at in the description is that I'm suggesting
don't set really small regions. The default limit_count is 4 and if you don't want to detect smaller
objects and set it higher, to say 20, it would still take a pretty small region to run into trouble.
For 1080p video, the motion vector frame is 120x68. You could split that area into a 8x8 grid
of motion regions and each area would have about 128 vectors which is plenty of overhead.

It's just something to keep in mind as you block off motion areas.

Jasimo
Posts: 51
Joined: Mon Apr 27, 2015 11:50 am

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Aug 06, 2015 8:50 pm

thx for the help and description.
rgs
Jan

Jasimo
Posts: 51
Joined: Mon Apr 27, 2015 11:50 am

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Aug 08, 2015 12:37 pm

I just enabled the parameter annotate_show_motion in the conf file, but the video only shows me
Motion ( 0, 0) Integrated Offset ( 0, 0)
and nothing more during the video playback.
rgs
Jan

Return to “Camera board”