jit
Posts: 33
Joined: Fri Apr 18, 2014 2:52 pm

Re: PiKrellCam: feature request

Sat Jan 16, 2016 3:09 pm

billw wrote:
boomlikethat wrote: Been thinking about this for a bit, and that's a request to have a "select all" button for the thumbs area. The reason I ask is this. Because I live on a busy street, I get a lot of hits each day (cars, etc). That's to be expected on my end.

However, after manually scanning the videos, archiving the ones I need for further review, I would use the "delete all". What I was not aware of is that I think it also deletes any recordings that are still in process. In the previous app I used, I could select all, and then de-select ones I wanted to further review.

I think with a "select all" button, it would only select those completed in the thumbs area.

Please correct me if I'm wrong on this, or whatever. Thanks!
Upgrade available - thumbs page can select by days or all.

Delete Day can delete a recording in progress and that is a problem. And deleting by selection
will only delete videos you can see on the thumbs page, so as you are saying, that seems to
me a better way to do it.

So I've removed the "Delete Day" and "Archive Day" buttons from the thumbs page and now
all deleting/archiving is done by selections. The delete day from the videos page can still
be a problem and I'll be looking at that.

One thing I'm wondering, is anybody using the videos page preferentially over the thumbs page?
For my part, I find since I added selections to the thumbs page I rarely manage videos from
the videos page anymore, and once I get to adding thumbs for manual and timelapse
recordings, I expect I'll never be using the videos page. So if nobody speaks up I may end up
getting rid of the videos page.
I generally tend to use the thumbs page - its ideal for seeing activity at a glance. I wouldn't mind if the videos page got dropped.

I do have a request surrounding the thumbs page. Background: I have my pi uploading the videos to dropbox (rather than leaving them on the pi). So what I've done is manually hack the thumbs page so that it links to the dropbox URL of the video. Unfortunately upgrading causes this to be lost. It would be great if a parameter could be provided in the configuration to allow the prefix of the video URL to be set. e.g. if not set then use localhost as usual, otherwise use [configuredUrlPrefix]/[videoFilename].

Btw, burst detection seems to be working well. So far I haven't seen any missed events - many thanks for your great work on this!

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

Re: PiKrellCam: feature request

Sat Jan 16, 2016 9:06 pm

jit wrote: I do have a request surrounding the thumbs page. Background: I have my pi uploading the videos to dropbox (rather than leaving them on the pi). So what I've done is manually hack the thumbs page so that it links to the dropbox URL of the video. Unfortunately upgrading causes this to be lost. It would be great if a parameter could be provided in the configuration to allow the prefix of the video URL to be set. e.g. if not set then use localhost as usual, otherwise use [configuredUrlPrefix]/[videoFilename].
So if the prefix URL is set you want all videos to come from dropbox as if the
the URL is the videos directory ... and the thumbs are still local?

If you could post the code you use it would be easier for me to see what you need.
A diff of your mods against the original would be good, with of course your real
dropbox URL edited to conceal it.

jit
Posts: 33
Joined: Fri Apr 18, 2014 2:52 pm

Re: PiKrellCam: feature request

Sat Jan 16, 2016 9:35 pm

billw wrote:
jit wrote: I do have a request surrounding the thumbs page. Background: I have my pi uploading the videos to dropbox (rather than leaving them on the pi). So what I've done is manually hack the thumbs page so that it links to the dropbox URL of the video. Unfortunately upgrading causes this to be lost. It would be great if a parameter could be provided in the configuration to allow the prefix of the video URL to be set. e.g. if not set then use localhost as usual, otherwise use [configuredUrlPrefix]/[videoFilename].
So if the prefix URL is set you want all videos to come from dropbox as if the
the URL is the videos directory ... and the thumbs are still local?

If you could post the code you use it would be easier for me to see what you need.
A diff of your mods against the original would be good, with of course your real
dropbox URL edited to conceal it.
Yes the thumbs are still local. Here's the diff for media-archive.php:

Code: Select all

759c759
<                                               echo "<a href=\"https://www.dropbox.com/home/Apps/myapp?preview=$fname\">";
---
>                                               echo "<a href=\"$path\">";
I was just thinking that it might be more flexible is to have a configuration entry where parameters can be substituted in (e.g. in a similar way that video_filename in pikrellcam.conf can have %F substituted in). Having the ability to perform substitutions means that it would be fairly easy to adapt use to form any URL pattern, thereby allowing other solutions such as Google Drive to be used instead of Dropbox.

Lets say that you chose to call this configuration parameter video_url, then perhaps

# default value to preserve existing functionality
video_url %file_path

# used for dropbox
video_url https://www.dropbox.com/home/Apps/myapp?preview=%fname

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

Re: PiKrellCam: feature request

Sun Jan 17, 2016 12:35 am

jit wrote: I was just thinking that it might be more flexible is to have a configuration entry where parameters can be substituted in (e.g. in a similar way that video_filename in pikrellcam.conf can have %F substituted in). Having the ability to perform substitutions means that it would be fairly easy to adapt use to form any URL pattern, thereby allowing other solutions such as Google Drive to be used instead of Dropbox.

Lets say that you chose to call this configuration parameter video_url, then perhaps

# default value to preserve existing functionality
video_url %file_path

# used for dropbox
video_url https://www.dropbox.com/home/Apps/myapp?preview=%fname
Ok, I'll get it in for the next upgrade.

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

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Jan 19, 2016 7:26 pm

An upgrade is up.
@jit, the video_url option affects web page behavior and really isn't supported internally by
pikrellcam, so I put the config for it in ~/pikrellcam/www/config-user.php. After upgrading, reload
a page and a VIDEO_URL option will be in the config.

New features:
I upgraded to using annotate_V3 which appeared around March 2014, so it was time and I
hope everybody has updated their distribution since then. New pikrellcam.conf options to edit,
or example settings with a FIFO command:

Code: Select all

echo annotate_text_background_color 808080 > ~/pikrellcam/www/FIFO
echo annotate_text_brightness 255 > ~/pikrellcam/www/FIFO
echo annotate_text_size 42 > ~/pikrellcam/www/FIFO
If you had previously configured: annotate_black_bg on
The new eqivalent you'll have to redo is: annotate_text_background_color 0

You can prepend or append strings independently from multiple scripts to the annotated text date
string shown on videos. Search for "annotate" on the help page for docs. There's a demo script
in there I'll reproduce here. After upgrading, run this script and watch the OSD:

Code: Select all

#!/bin/bash
echo annotate_text_background_color 808080 > ~/pikrellcam/www/FIFO
echo annotate_text_size 42 > ~/pikrellcam/www/FIFO

# simulate a temperature.
TEMP="29.1C"
echo annotate_string append id1 _$TEMP > ~/pikrellcam/www/FIFO; sleep 3
echo annotate_string prepend id2 ${HOSTNAME}_ > ~/pikrellcam/www/FIFO; sleep 3
TEMP="30.4C"
echo annotate_string append id1 _$TEMP > ~/pikrellcam/www/FIFO; sleep 3
echo annotate_string remove id2 > ~/pikrellcam/www/FIFO; sleep 3
echo annotate_string remove id1 > ~/pikrellcam/www/FIFO

echo annotate_text_background_color none > ~/pikrellcam/www/FIFO
echo inform \"End of annotate_string demo\" 3 3 1 > ~/pikrellcam/www/FIFO
echo inform timeout 3 > ~/pikrellcam/www/FIFO
If you have ds18b20 chips connected, there's a new ds18b20.py script which will append temperature
readings to the annotated text string. See at-command examples in the Help page.

jit
Posts: 33
Joined: Fri Apr 18, 2014 2:52 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Jan 21, 2016 7:13 pm

billw wrote:An upgrade is up.
@jit, the video_url option affects web page behavior and really isn't supported internally by
pikrellcam, so I put the config for it in ~/pikrellcam/www/config-user.php. After upgrading, reload
a page and a VIDEO_URL option will be in the config.

New features:
I upgraded to using annotate_V3 which appeared around March 2014, so it was time and I
hope everybody has updated their distribution since then. New pikrellcam.conf options to edit,
or example settings with a FIFO command:

Code: Select all

echo annotate_text_background_color 808080 > ~/pikrellcam/www/FIFO
echo annotate_text_brightness 255 > ~/pikrellcam/www/FIFO
echo annotate_text_size 42 > ~/pikrellcam/www/FIFO
If you had previously configured: annotate_black_bg on
The new eqivalent you'll have to redo is: annotate_text_background_color 0

You can prepend or append strings independently from multiple scripts to the annotated text date
string shown on videos. Search for "annotate" on the help page for docs. There's a demo script
in there I'll reproduce here. After upgrading, run this script and watch the OSD:

Code: Select all

#!/bin/bash
echo annotate_text_background_color 808080 > ~/pikrellcam/www/FIFO
echo annotate_text_size 42 > ~/pikrellcam/www/FIFO

# simulate a temperature.
TEMP="29.1C"
echo annotate_string append id1 _$TEMP > ~/pikrellcam/www/FIFO; sleep 3
echo annotate_string prepend id2 ${HOSTNAME}_ > ~/pikrellcam/www/FIFO; sleep 3
TEMP="30.4C"
echo annotate_string append id1 _$TEMP > ~/pikrellcam/www/FIFO; sleep 3
echo annotate_string remove id2 > ~/pikrellcam/www/FIFO; sleep 3
echo annotate_string remove id1 > ~/pikrellcam/www/FIFO

echo annotate_text_background_color none > ~/pikrellcam/www/FIFO
echo inform \"End of annotate_string demo\" 3 3 1 > ~/pikrellcam/www/FIFO
echo inform timeout 3 > ~/pikrellcam/www/FIFO
If you have ds18b20 chips connected, there's a new ds18b20.py script which will append temperature
readings to the annotated text string. See at-command examples in the Help page.
Many thanks for the update. I've just tested the video url and it works perfectly!

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

updated auto-delete files script (disk space usage)

Wed Jan 27, 2016 2:58 am

Someone else posted a script to auto-delete the oldest files, and I've been happily using it. Then, when I shifted my media to a USB drive using a symbolic link from /home/pi/pikrellcam/media to /mnt/usb1/media (which is the physical device /dev/sda1 ) I realized the cleanup script was still looking only at the root filesystem usage, and so failed to work and the USB drive filled up to 100%. Below is the modification to allow the script to check usage on the disk volume you are actually using for the media archives. Make sure to adjust

Code: Select all

_VOLUME="/dev/sda1" 
to match whatever path 'du' reports for disk usage where you are saving your media.

Code: Select all

#!/bin/bash

_ARCHIVE_OLDER_DAYS="-1 Days"  # how many days old for media before archiving
_VOLUME="/dev/sda1"     # volume to check for disk space usage
_USED_SPACE_LIMIT=85    # percent disk space used over which files are deleted

# Move _ARCHIVE_OLDER_DAYS stills and video to that date's archive folder
echo "archive_still day `date --date="$_ARCHIVE_OLDER_DAYS" +'%F'`"  > /home/pi/pikrellcam/www/FIFO
echo "archive_video day `date --date="$_ARCHIVE_OLDER_DAYS" +'%F'`"  > /home/pi/pikrellcam/www/FIFO

# if used space is over threshold, delete old files and directories to save storage space until threshold reached
# this keeps as much as possible files present
_USED_SPACE=`df  | grep $_VOLUME | awk '{print $5}' |  sed -e "s/\%//g"`
# echo "used space: $_USED_SPACE%"


if [[ ( "$_USED_SPACE" > "$_USED_SPACE_LIMIT" ) ]] ; then
 echo -e "used space over $_USED_SPACE_LIMIT%, deleting old files..."

 _LOOP=0;

 while [[ ( "$_USED_SPACE" > "$_USED_SPACE_LIMIT" )  && ( "$_LOOP" < "100" ) ]] ; do
  _OLDEST=`find /home/pi/pikrellcam/media/archive/ -type f -printf '%T+ %p\n' | sort | head -n 1 | cut -d "+" -f 1 | sed -e "s/\-/\//g"`
  echo "oldest files:$_OLDEST"

  echo "delete oldest folder:/home/pi/pikrellcam/media/archive/$_OLDEST"
  rm -rfv "/home/pi/pikrellcam/media/archive/$_OLDEST"
  sync

  _USED_SPACE=`df  | grep $_VOLUME | awk '{print $5}' |  sed -e "s/\%//g"`
  echo "used space now: $_USED_SPACE%"
  _LOOP=$((_LOOP + 1))
 done

 echo "done"
 df
else
 echo -e "used space below $_USED_SPACE_LIMIT%, nothing to do!"
fi
In my case I run this script every hour at 15 minutes past, by putting this in crontab:

Code: Select all

15 * * * * sudo -u pi /home/pi/pikrellcam/scripts/pk-archive 2>&1 | /usr/bin/logger -t PK-Archive
Last edited by jbeale on Mon Feb 08, 2016 2:00 am, edited 1 time in total.

jit
Posts: 33
Joined: Fri Apr 18, 2014 2:52 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Wed Jan 27, 2016 8:43 am

Just wanted to report a minor bug that I noticed with the UI. I suspect that this is a side effect of me storing videos remotely (dropbox) rather than on local disk. On the thumbs page, if you select anything and click on delete, it doesn't seem to delete the thumb - I think that it may be attempting to delete the video locally and failing, which then prevents the thumb from being deleted.

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

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Jan 30, 2016 5:30 pm

Right now i receive emails (thanks to preview-save) from PiKrellCam with a preview of a jpeg.
That's great but ... is it possible to add in addition into the body of the message a link that point to the corresponding video?

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

Re: PiKrellCam: motion vector detect + OSD web interface

Mon Feb 01, 2016 8:07 pm

YvesG wrote:Right now i receive emails (thanks to preview-save) from PiKrellCam with a preview of a jpeg.
That's great but ... is it possible to add in addition into the body of the message a link that point to the corresponding video?
Add a $v to the end of the on_motion_preview_save connand in pikrellcam.conf. Then edit the
preview_save script to build a url and change mpack to use the -d option:

Code: Select all

VID=$5
[email protected]
echo "http://url$VID" > /tmp/vid
mpack -s [email protected]$HOSTNAME -d /tmp/vid $PREVIEW_JPEG $MY_EMAIL
rm /tmp/vid

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

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Feb 04, 2016 12:14 pm

@billw:

I have an odd request, and I'm not even sure it can be done at this level. I have PiKrellCam deployed on 2 RPi2's, both directly connected to my router and network. I do that to keep out (or reduce) the possibility of my signals being jammed or interfered with. Sounds paranoid, but it has happened with one annoying neighbor. He's part of the reason I have them up (threats, damage to property, etc., and couldn't prove anything). Long story, won't go further here.

Well, I sense my signal is being either blocked or hacked again. On both cameras, and at the same time, when this neighbor leaves for work. Even while having sensor regions directly where driving and walking occur. So I'm wondering:

1. Can a direct ethernet connection be blocked?
2. Is is possible to show that in the log? Some kind of RF interference report?

Again, I know it's sounds nutz, but this has now happened a couple of times, and at the same times. So I'm suspicious.

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

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Feb 04, 2016 3:03 pm

when you say "directly connected" does that mean you have wired ethernet cable connecting them? That ought to be reliable, unless someone has actually connected to your internal network somehow (or broken through your firewall)

If you suspect a network compromise, you could have the RPi run standalone, just recording to local memory and see if that makes a difference. (After doing a fresh known-good install of raspbian and PiKrellCam of course)

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

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Feb 04, 2016 3:11 pm

jbeale wrote:when you say "directly connected" does that mean you have wired ethernet cable connecting them? That ought to be reliable, but if the RPi boxes rely on wifi for connection, the wifi signal is certainly possible to jam.
@jbeale:

Yes, that is correct. Did a little drilling, and hooked them directly to the router. I do know about WiFi jammers (they are illegal in my state).

That's why I'm concerned, seems to happen when this neighbor leaves his house for work. The cam never goes off until he's driving off. Maybe I need to change my settings. Maybe I need to work on making a PIR work with PiKrellCam. I've seen it talked about around here, so maybe it's possible.

It should be reliable, and since it's IP driven, it should be secure. I would think you'd have to know the IP address and username/pw to do any damage.

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

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Feb 04, 2016 4:51 pm

I think most likely your motion settings are set such that the car is not detected until he speeds up. So at the start, a car moving very slowly in the driveway does not reach the motion threshold. You can also try increasing the pre-event trigger time, so PiKrellCam uses a larger pre-roll buffer and your recording starts earlier before the actual trigger.

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

Re: PiKrellCam: motion vector detect + OSD web interface

Thu Feb 04, 2016 4:53 pm

jbeale wrote:I think most likely your motion settings are set such that the car is not detected until he speeds up. So at the start, a car moving very slowly in the driveway does not reach the motion threshold. You can also try increasing the pre-event trigger time, so PiKrellCam uses a larger pre-roll buffer and your recording starts earlier before the actual trigger.
Good idea. Thanks, John, I'll give that a try.

User avatar
micksulley
Posts: 163
Joined: Sat Mar 03, 2012 11:48 am
Location: Melton Mowbray, England

Re: PiKrellCam: motion vector detect + OSD web interface

Fri Feb 05, 2016 2:41 pm

Is it possible to trigger via a PIR?
PiKrellCam works fine for me most of the time but I am on a busy road, so set detection zone to just trigger on my driveway, but when it is wet I see the reflection of the traffic on the wet paving bricks and that triggers the motion detection. I feel that a PIR may solve the problem.
Thanks
Mick

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

Re: PiKrellCam: motion vector detect + OSD web interface

Fri Feb 05, 2016 3:12 pm

boomlikethat wrote:
jbeale wrote:I think most likely your motion settings are set such that the car is not detected until he speeds up. So at the start, a car moving very slowly in the driveway does not reach the motion threshold. You can also try increasing the pre-event trigger time, so PiKrellCam uses a larger pre-roll buffer and your recording starts earlier before the actual trigger.
Good idea. Thanks, John, I'll give that a try.
@jbeale:

OK, I tried that. I know that a motion light is activated on this neighbors porch, and neighbor walking to his truck, so that should trigger everything. Today it did not. I bumped up the Pre-Capture on one cam to about 15 (FYI, Confirm Gap 3, Event Gap 20, Post Capture 4). Maybe not high enough?

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

Re: PiKrellCam: motion vector detect + OSD web interface

Fri Feb 05, 2016 3:14 pm

micksulley wrote:Is it possible to trigger via a PIR?
PiKrellCam works fine for me most of the time but I am on a busy road, so set detection zone to just trigger on my driveway, but when it is wet I see the reflection of the traffic on the wet paving bricks and that triggers the motion detection. I feel that a PIR may solve the problem.
Thanks
Mick
@Mick:

I've wanted to try that. I'd have to see how to connect it to the RPi, then have PiKrellCam read motion from there.

I'm also guessing the PIR would have to be outside (My cams are in a window inside).

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

Re: PiKrellCam: motion vector detect + OSD web interface

Fri Feb 05, 2016 7:20 pm

You can do a walk test yourself to check things out. Just walk by at the right distance from the camera and see if it triggers. If you walk slowly enough it won't, depending on settings. In some cases depending on camera angle, the camera can be blinded in the morning if the rising sun shines directly into the lens.

PIR sensors are good at detecting body heat if you walk by close enough. You would think a car would be easy as it is larger, but PIR may or may not detect a car. If the car has been running a while and the tailpipe is visible to the sensor; yes, but that isn't always the case and when a car has just started up, everything is still cold.

FWIW- I have experimented with a somewhat more exotic sensor, which costs around $100. http://pulsedlight3d.com/
It has a usable range of about 25 meters, and detects most things pretty well unless it is a polished shiny surface angled away.
It does not work well in the rain, as it wants to detect all the raindrops.

User avatar
micksulley
Posts: 163
Joined: Sat Mar 03, 2012 11:48 am
Location: Melton Mowbray, England

Re: PiKrellCam: motion vector detect + OSD web interface

Fri Feb 05, 2016 10:48 pm

I have done tests on a PIR, just detecting, not triggering video, and it seemed to work fairly well, details
here

http://www.raspberrypi-spy.co.uk/2013/0 ... pi-part-1/

Yes my camera is inside looking through a window, I put a hole through the wall and mounted the PIR on the outside. I found I needed to angle it down and play with the sensitivity to get it about right.

If I can get it to work with PiKrellCam I can review the videos it creates. Any suggestions how to do it?

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

Re: PiKrellCam: motion vector detect + OSD web interface

Fri Feb 05, 2016 11:57 pm

micksulley wrote:I have done tests on a PIR, just detecting, not triggering video, and it seemed to work fairly well, details
here

http://www.raspberrypi-spy.co.uk/2013/0 ... pi-part-1/

Yes my camera is inside looking through a window, I put a hole through the wall and mounted the PIR on the outside. I found I needed to angle it down and play with the sensitivity to get it about right.

If I can get it to work with PiKrellCam I can review the videos it creates. Any suggestions how to do it?
Probably look around on the web for a python script that reads a gpio connected to a PIR and
at the point where it detects the gpio transition, just open ~/pikrellcam/www/FIFO and write
into it. You can send a command to record a fixed length video or send commands to "trigger"
the motion detect routines inside pikrellcam. If you use "motion trigger" you can get a motion
video that keeps recording as long as there are PIR events inside of the motion event_gap
time. Even If the overall motion enable is off, motion trigger commands can still record motion videos.
Search for "motion trigger" on the Help page.

Maybe somebody already has a similar script. At some point, it would be useful to put such
a thing in the distribution or at least link to something somebody has.

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

Re: PiKrellCam: motion vector detect + OSD web interface

Sat Feb 06, 2016 5:26 pm

billw wrote:
YvesG wrote:Right now i receive emails (thanks to preview-save) from PiKrellCam with a preview of a jpeg.
That's great but ... is it possible to add in addition into the body of the message a link that point to the corresponding video?
Add a $v to the end of the on_motion_preview_save connand in pikrellcam.conf. Then edit the
preview_save script to build a url and change mpack to use the -d option:

Code: Select all

VID=$5
[email protected]
echo "http://url$VID" > /tmp/vid
mpack -s [email protected]$HOSTNAME -d /tmp/vid $PREVIEW_JPEG $MY_EMAIL
rm /tmp/vid
Thank you, i now get a link into my email !!!

xzanfr
Posts: 18
Joined: Wed Jun 20, 2012 12:52 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Sun Feb 07, 2016 9:30 am

micksulley wrote:I have done tests on a PIR, just detecting, not triggering video, and it seemed to work fairly well, details
here

http://www.raspberrypi-spy.co.uk/2013/0 ... pi-part-1/

Yes my camera is inside looking through a window, I put a hole through the wall and mounted the PIR on the outside. I found I needed to angle it down and play with the sensitivity to get it about right.

If I can get it to work with PiKrellCam I can review the videos it creates. Any suggestions how to do it?
Hi Mick.

I've had some success with that exact same piece of python with my trailcam.
Initially I had used RPi web cam interface where the script used FIFO to start the recording process however I've since changed to Pikrellcam and just use the PIR to turn on the IR lamp as pikrellcam works so well with the motion detection.

I've just commented out the FIFO code and have posted up the python script in its entirety here.
Billw describes the FIFO for pikrellcam here (its a couple of pages back in this thread) & above so by combining the post and the commented out bits of the script you should be able to get it to work.

jdupa
Posts: 3
Joined: Mon May 18, 2015 10:52 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Feb 09, 2016 4:40 am

EDIT: I found the problem, I had to install gst-rtsp-server-1.4.4 as pet Thomas' instructions...

Thank you ALL for your fantastic work!!!

I am having problems installing the streamer. I followed Thomas' instructions on Jessy and:

Code: Select all

[[email protected]:~]# gst-launch-1.0 --version
gst-launch-1.0 version 1.4.4
GStreamer 1.4.4
http://packages.qa.debian.org/gstreamer1.0
[[email protected]:~]# gst-inspect-1.0 | grep omx
omx:  omxmpeg2videodec: OpenMAX MPEG2 Video Decoder
omx:  omxmpeg4videodec: OpenMAX MPEG4 Video Decoder
omx:  omxh263dec: OpenMAX H.263 Video Decoder
omx:  omxh264dec: OpenMAX H.264 Video Decoder
omx:  omxtheoradec: OpenMAX Theora Video Decoder
omx:  omxvp8dec: OpenMAX VP8 Video Decoder
omx:  omxmjpegdec: OpenMAX MJPEG Video Decoder
omx:  omxvc1dec: OpenMAX WMV Video Decoder
omx:  omxh264enc: OpenMAX H.264 Video Encoder
[[email protected]:~]# git clone https://github.com/Gateworks/gst-gateworks-apps.git
Cloning into 'gst-gateworks-apps'...
remote: Counting objects: 73, done.
remote: Total 73 (delta 0), reused 0 (delta 0), pack-reused 73
Unpacking objects: 100% (73/73), done.
Checking connectivity... done.
[[email protected]:~]# cd gst-gateworks-apps
[[email protected]:~/gst-gateworks-apps]# make
Package gstreamer-rtsp-server-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-rtsp-server-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-rtsp-server-1.0' found
Package gstreamer-rtsp-server-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-rtsp-server-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-rtsp-server-1.0' found
compiling file: src/gst-variable-rtsp-server.c
src/gst-variable-rtsp-server.c:41:21: fatal error: gst/gst.h: No such file or directory
 #include <gst/gst.h>
                     ^
compilation terminated.
Makefile:108: recipe for target 'obj/gst-variable-rtsp-server.o' failed
make: *** [obj/gst-variable-rtsp-server.o] Error 1
Include files are gone from the repository, can they be posted here?

Thanks,
J
Last edited by jdupa on Tue Feb 09, 2016 8:27 pm, edited 1 time in total.

Mercedes
Posts: 2
Joined: Tue Feb 09, 2016 7:01 pm

Re: PiKrellCam: motion vector detect + OSD web interface

Tue Feb 09, 2016 7:24 pm

The following are set in my pikrellcam.conf file:

video_width 1920
video_height 1080
video_motion_name_format motion_%F_%H.%M.%S_$N.h264
video_fps 30

When I run simple statistics on the generated motion_xxx.h264 file, it shows the frame rate at 25fps:

ffmpeg -i motion_xxx.h264
.
.
.
Input #0, h264, from 'motion_xxx.h264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p, 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc

How can I increase the output to 30fps

thanks…

EDIT:
...Time ago I was advised to down-clock the Pi to: arm_freq_min=400; sdram_freq_min=200; core_freq_min=200 to make sure the gadget does not overheat in the hot climate. I never realized that this will affect the fps issue!!! But it did!!! I reverted the Pi to default clock frequencies and now am enjoying a stunning 1080p full 30fps output playing in a correct time frame. Would love to know the theory behind though...
Last edited by Mercedes on Wed Feb 17, 2016 5:15 pm, edited 1 time in total.

Return to “Camera board”