Commit Graph

138 Commits

Author SHA1 Message Date
Bill Wilson 994384dae9 Zooming, preview stall warnings, HQ still resolutions.
V 4.3.2
Zoom in to a percent of the camera sensor.  Selected zooms are saved
as part of a Preset Settings.  A large zoom can help with camera focusing.

Show stall warning on preview when GPU jpeg encoder does not keep up
converting the preview images and frames are dropped.  This problem showed
up with the HQ camera on Pi 4 where video_fps needs to lowered to around
20 to avoid stalls.  I don't see the problem on Pi 2 with HQ camera or
with V1 or v2 cameras, so maybe a later firmware version will help.

Put in HQ still resolutions and now still resolution options shown depend
on camera resolution detected.

Checking archive diskfree failed to remove stills.

Changed how to track through the preview jpeg encoder which preview frame
to use for thumbs.

Added greyworld
2020-06-08 17:45:34 -05:00
Bill Wilson 08ed7926e5 video_mp4box_fps can be fractional.
V4.3.1
Setting a fractional video_mp4box_fps slightly different from video_fps
can tune possible audio/video drift for longer videos.
2019-08-04 10:32:03 -05:00
Bill Wilson 6afc8ec42c Motion events can record stills instead of videos.
V 4.3.0
Added mode for recording motion stills with configurable max stills per minute.

Help page no longer in a frame so brower back button will work.

Removed motion_preview_save_mode. Preview/thumb now always saved as first.
2019-07-31 18:24:19 -05:00
Bill Wilson 949225d275 Changes for Pi 4 peripheral base and Buster installs
V 4.2.1
Pi 4 servos use peripheral base 0xfe000000
Buster install:
	Install package ffmpeg instead of libav-tools
	Install php7.3
scripts-dist/startup waits up to 10 seconds for NFS mount.
2019-07-01 10:48:26 -05:00
Bill Wilson 1e970587b8 motion_detects_fifo for reading all motion detects.
V 4.2.0
~/pikrellcam/www/motion_detects_fifo can be read to get all motion
detects regardless of motion videos enabled state.

Moved Setup->Config->Times/* and Setup->Settings->Startup_Motion
to Setup->Config->Motion
2019-05-30 14:36:19 -05:00
billw2 0172d45cce
Merge pull request #42 from barrywoolgar/patch-1
Replace deprecated use of `create_function`
2019-04-24 12:58:33 -05:00
Barry Woolgar cba30ea406
Replace deprecated use of `create_function`
As reported by @Egregius in #41 create_function is deprecated since PHP 7.2. This PR replaces it with an anonymous function, which are supported since PHP 5.3, so should still be backwards compatible with older Raspberry Pis running Jessie.
2019-04-21 13:56:56 +01:00
Bill Wilson 5c46d0d943 Another _fix_thumbs change. 2018-05-20 16:58:26 -05:00
Bill Wilson 00d57bdb3a _fix_thumbs script changes 2018-05-20 15:15:06 -05:00
Bill Wilson 9352a74fe6 fix_thumbs tries to generate mp4 from stray h264 videos
Show a web page nfs mounting message in case nfs mount takes a long time.
2018-05-20 12:14:37 -05:00
Bill Wilson f89a08d296 Fix audio triggered video name bug. 2018-02-24 09:53:53 -06:00
Bill Wilson 1033029866 Update fix_thumbs to know about stills thumbs 2018-02-03 12:54:44 -06:00
Bill Wilson 84751294b7 Do not try to NFS archive if archive is Stale.
Some help page edits.
2018-01-20 12:46:25 -06:00
Bill Wilson cc38c3bd1f Change NFS archiving examples to use media-archive. 2018-01-19 15:13:20 -06:00
Bill Wilson 5ecc0a9877 NFS archiving additions to help, web pages, and startup script.
V 4.1.5
scripts-dist/startup has NFS archive mounting support.
Archive calendar can view by year.
2018-01-19 12:01:47 -06:00
Bill Wilson c44fc9db38 Web page start use installing user. Motion trigger codes.
V 4.1.4
Bug fix for pikrellcam Start from web page: use installing user instead
of hard wired "pi".

motion trigger FIFO command can encode for user defined trigger type (PIR,
laser, etc).  Previously web page showed "Extern" for videos with only a
FIFO trigger, but now shows either "FIFO" or the user defined trigger type
string.

Archive web page show if archive is NFS mounted.

Print media or archive directories when viewing media.
2018-01-10 13:41:50 -06:00
Bill Wilson 3b9d547360 Setting E_USER in _upgrade complication, take it out. 2017-12-31 12:19:51 -06:00
Bill Wilson 875f0a92b1 Fix web page sys_command.php to use $USER instead of pi 2017-12-31 12:10:13 -06:00
Bill Wilson 93da71ddd1 Audio can trigger videos. Fix 2 channel audio bug.
V 4.1.3
2017-12-28 17:42:58 -06:00
Bill Wilson f5974326c9 V 4.1.2 - bugfix: videos were ending after event_gap instead of post_capture.
Fix video writing bug to end of event_gap bug that was created when video
writing was moved to a thread.

Add day_loop arg option to FIFO archive_video command so loop videos can
be archived by FIFO.
2017-12-18 12:49:18 -06:00
Bill Wilson e8bc67b707 Loop time limit change while loop recording bugfix. 2017-11-05 08:58:10 -06:00
Bill Wilson 3c8e41ad73 V 4.1 - loop recording with loop diskusage percent limit.
disk free checking for stills/timelapse.
pikrellcam.conf: on_motion_enable on_loop_end on_manual_end

Move video data writing from the h264 mmal callback to a thread to stop
delays in the callback when there is high flash disk activity.  Reduces
lost video frames and displayed annotation time skipping.

Move temporary MP3 file to tmpfs for same flash disk delays reason to
reduce MP3 data losses.

Bugfix: add missing buffer return in h264 callback to stop callback hangs
when config change causes video buffer init.
2017-11-04 10:29:57 -05:00
Bill Wilson bf127548a9 For Stretch, edit nginx sites-available/pikrellcam to use php7.0 2017-10-26 09:33:32 -05:00
Bill Wilson d37d2b0db0 install script installs php7.0 for Stretch 2017-10-25 10:23:21 -05:00
billw2 de7d40dd16 Merge pull request #31 from hvdwolf/master
Enable streaming video; remove double -r 6
2017-10-03 09:28:29 -05:00
hvdwolf 1c5ad7687b Enable streaming video; remove double -r 6
The created mp4 files are not streaming video files but "standard" mp4 files with the metadata (moov atom) at the end.
To make it possible to simply stream them, add the "-movflags faststart" option to the avconv/ffmpeg command. This will add a second pass, bit the overhead will be 1-2%
Also remove the double "-r 6"
2017-10-02 10:11:52 +02:00
Bill Wilson b5d7466596 4.0.5 - Diskfree percent oldest file deletion. Stills thumb view.
Stills thumbs auto created under media_dir/stills/.thumbs when they
are first viewed.
2017-09-29 15:38:46 -05:00
Bill Wilson 4e29482e30 Fix annotation strings to allow spaces and longer length 2017-08-30 13:24:23 -05:00
Bill Wilson 6061341b23 Do not abort if create archive directory fails. 2017-06-18 19:50:30 -05:00
Bill Wilson 6f1e0b6c26 Bugfix for $v variable passed to on_motion_end.
Started adding code for loop recording - feature is not functional yet.

Put Help page in a scroll.
2017-05-25 11:33:32 -05:00
Bill Wilson bdce38ac34 Change for libmp3lame segfault. Simplify running on_motion_end_cmd.
Removed lame_set_VBR_q() call to try to stop segfault in L3psycho_anal_vbr().
Maybe shouldn't have used lame_set_VBR_q() since it's mentioned only in lame.h.

Simplified running of on_motion_end_cmd. Instead of catching SIGCHCLD for mp4
boxing, append on_motion_end_cmd to the MP4Box command chain. Do double fork()
for exec_no_wait() so init now handles not waited for exec children.
2017-04-17 08:54:27 -05:00
Bill Wilson c9f162d20c Audio/video recording. Help page has audio docs.
Version 4.0: add audio recording to videos and audio streaming to a browser.
2017-04-11 09:49:16 -05:00
Bill Wilson 611df035ad Avoid trying to set modes when it could fail: eg NFS, VFAT. 2016-11-07 10:44:22 -06:00
Bill Wilson 10a0987654 Trap bad getgrgid() & getpwuid() returns (for NAS directories).. 2016-11-06 19:17:45 -06:00
Bill Wilson d3b8dceb0b Add some verbose logging to try to track down a seg fault. 2016-11-06 12:51:09 -06:00
billw2 1697ed0ee6 Merge pull request #16 from Yves911/patch-3
Allow to specify refresh speed of the live preview
2016-08-27 08:22:05 -05:00
Yves911 ac093993ae Allow to specify refresh speed of the live preview
This pull request allow end-user to specify refresh rate of the live.php window
for example
https://xxxxxx/live.php?refresh=1500
in nothing is specified we keep the default value of 150 ms
2016-08-21 10:50:22 +02:00
Bill Wilson 40fa20dfd2 Add multicast_enable option to pikrellcam.conf 2016-08-11 09:28:51 -05:00
Bill Wilson bd0e5586fd Fix typos in multicast alarm scripts. Add pkc-recv script. 2016-08-08 08:00:34 -05:00
Bill Wilson e06088966c Fix typos in multicast alarm scripts. Add pkc-recv script. 2016-08-08 07:53:03 -05:00
Bill Wilson 122161eeee Multicast interface and motion-events file
Multicasting for communication and control between all PKCs and desktops
on a LAN.  pkc-xxx and example-motion-send-alarm scripts.

/run/pikrellcam/motion-events file can be read to get motion events
by x,y position or motion region.

Add FIFO commands for motion times.
2016-08-07 08:08:07 -05:00
Bill Wilson f79b63932c $A arg so preview_save script can email thumb jpeg 2016-07-04 13:28:40 -05:00
Bill Wilson c77380964f Bugfixes: web page disk usage display, command line args
At first USB mount of media dir, the archive dir was not made.

Disk total/free checked the archive dir, so would be zeros until pikrellcam
restart.  Change disk total/free to check archive dir only if archive mode.

Rebuild of command line args for passing to sudo instance in servo mode
was mangled.

Change halt_enable default to on

Version to 3.0.6
2016-07-01 10:55:24 -05:00
Bill Wilson 31689a75d5 Enable -debug-fps option 2016-05-26 10:10:35 -05:00
Bill Wilson b5b7bba032 Fix motion vector width calculation for v2 camera 1640 modes. 2016-05-24 12:09:35 -05:00
Bill Wilson 54ace58903 Compile for lc_time added to pikrellcam.conf 2016-05-19 12:41:46 -05:00
Bill Wilson 569f8a00fa Add lc_time to pikrellcam.conf 2016-05-19 12:40:47 -05:00
Bill Wilson f9493f5886 Video name changed from detect to start time.
Video frame count, time and fps are in /run/pikrellcam/state.
root no longer needs to be in the video group for PWM servo use.
Added V2 camera modes.
2016-05-18 09:18:45 -05:00
Bill Wilson be521c173b Add halt and reboot from web page. 2016-04-27 17:16:52 -05:00
Bill Wilson a110be2977 V3.0 with servo control and presets
Control servos using hardware PWM GPIOs or other GPIOs using ServoBlaster.

Presets group motion detect counts/limits and motion regions into settings
presets and servo positions into position presets.  New files preset.c
and servo.c

www/state link to /run/pikrellcam/state

Single videos link on index.php

Fix timelapse stills to not create zero sized jpegs.

Motion regions save/load by name usage changed to backup roll for presets.
2016-04-23 10:18:38 -05:00