Commit Graph

127 Commits

Author SHA1 Message Date
zii
c103ee3c47 Updated README 2024-08-02 08:42:10 -04:00
zii
c2b6575800 v3.5
-The app no longer works on multi-service arch and will instead
 operate under a single master service.
2024-08-02 08:22:37 -04:00
zii
7046dd1162 v3.5.t3
-recording loop detected in "starving" state now triggers and auto
 restart of the recording loop.

-preparing to release to main.
2024-08-02 07:55:04 -04:00
zii
daad0dffa2 v3.5.t2
-re-added recordloop as a thread within the app.
-the app no longer use mutiple services and will instead fully
 operate in a single master service.
-build/install.py will now install the app as a single service.
-added/updated -s, -r and -q options to manage the single master
 service.
2024-04-21 08:03:30 -04:00
zii
33519acf7a v3.4
-added the conf open option to the file menu.
-added /installers to the git ignore file so the large installer
 files don't get included in the git repo.
-the build script will no longer include libc because it doesn't
 need it and having it was causing seg faults on the deployed app.
-releasing to main.
2024-04-14 08:01:54 -04:00
zii
553585e275 v3.4.t4
-changed the app name to JustMotion to match the git repository.
-changed the build system away from cmake to qmake now that the
 app doesn't depend on openCV.
-changed the build/install scripts to python based scripts which
 now includes the ability create an installer.
2024-04-10 20:51:56 -04:00
zii
c5393484c2 v3.4.t3
-added aud_codec to the conf file so audio codec is now a
 configurable option.

-renamed stream_codec to vid_codec on the conf file to contrast
 aud_codec.

-rtsp streams now use udp instead of tcp.

-updated README with conf file changes.
2024-04-03 17:28:53 -04:00
zii
330393667e v3.4.t2
- RuntimeMaxSec only needs to apply for vid_loop services.
  condition added.

- The app will no longer attempt to take ownership of the
  footage folder.
2024-02-24 21:26:36 -05:00
zii
4ce8a75d9d v3.4.t1
- the recorder service is having problems with ffmpeg stalling out
  once again. added "RuntimeMaxSec" to the service files to see
  if that helps.
2024-02-24 21:10:06 -05:00
zii
970b9b5fc5 v3.3
-releasing to master branch
2023-12-24 10:30:36 -05:00
zii
2aa5683c15 -fixed up the documentation 2023-12-24 10:26:52 -05:00
zii
7ca4fc3dbe v3.3.t9
-moved buff_path setup code away from rdconf() to loadSh(). this
 insures root will never take ownership of the camera buffer.
-added service group option.
-updated the documentation in preperation of release.
2023-12-23 17:38:11 -05:00
zii
bb8a1fad45 v3.3.t8
-removed the chown commands from install services function. It
 will now be up to the user to manage folder permissions.
2023-12-18 21:07:00 -05:00
Zii
da941d8d18 v3.3.t7
-detect loop will now use the previous video clip as a base for the
 next 3 video clips. doing this prevents the same clips from being
 processed multiple times.
2023-11-23 09:22:06 -05:00
Zii
5b444fd754 v3.3.t6
-detectloop now operates on a minimum of 3 clips and then grabs
 only the second and third to last clips. this insures only
 finished clips from the stream are grabbed.
2023-11-19 20:45:22 -05:00
Zii
4f0c37b92b v3.3.t5
-again reformed the detectloop class to use filesystem monitoring
 instead of timers to pull clips from the live stream.

-removed the loop class after reforming detectloop.
2023-11-18 18:40:26 -05:00
Zii
60a24c9d67 v3.3.t4
-completely reformed the eventloop code to be more efficent and
 removed the use backward/forward facing functions.
-added the live_secs config option that limits the amount of live
 footage the app will record to the buffer directory.
-moved away from ffmpeg hls formatting. live footage will instead
 just be recorded in clips inside of the 'live' directory, the
 stream.m3u8 file will not longer be created. doing this removes
 the codec/container limitations that hls imposed.
-changed up the default conf values that better suits a low spec
 machine like a resberrypi.
2023-11-05 18:44:50 -05:00
Zii
525c342c0f v3.3.t3
-moved all service related code to seperate files.
-split the camera service into 2 systemd services.
-the -i, -c and -d options now function differently to support the
 split systemd services.
-internal logging was completely removed. all verbose output will
 instead just go to stderr/stdout. will use journalctl for real
 time logging instead.
-fixed the magick compile/install script so it will actually run
 now.
-fixed a bug in the config file reading functions so it will now
 trim off white spaces and line breaks at the ends. doing this
 now prevents undefined behaviour if any parameter has a line
 break in it.
-service user was added as a config file option. this can be used
 to set user name the installed services will run under. the
 default user is "mow."
-the install.sh script will now add the default mow user to the
 video group making it possible to record footage from webcams
 without permission issues.
2023-10-27 15:43:17 -04:00
Zii
83080cfe41 v3.3.t2
-pixel sizes for video and thumbnails are now configurable
-the amount of recording and snapshot threads are now
 configurable
-changed the default buffer and recording directories to
 drop the application name and also drop a level
-service files are now stored in a dedicated dir
-fixed logging so it will capture errors better
-moved folder structure building to rdConfig() and added more
 error capturing
-recording fps is now configurable
2023-10-19 15:04:39 -04:00
Zii
41ccf1d1e7 v3.3.t1
-removed the web interface. this project will instead continue to
 focus on backend operations. external applications can interface
 with the buf/rec directories to provide frontend operations.

-removed the magick binary file from the project. magick will
 instead be built from source on the target machine for maximum
 support for the target architecture.

-stream codec and format are now user configurable.

-recording thumbnail and video formats are now user configurable.
2023-10-08 10:09:15 -04:00
Zii
b09ff1a19a v3.2
- added fuse3 to setup.sh since imagemagic depends on it
- fixed the double program name bug in the detection log
- releasing to main
2023-09-14 14:53:18 -04:00
Zii
8f80ce34f1 v3.2.t3
-the live stream is now a part of the camera's main page.
-fixed symm links for the main page not being created on install.
-removed deprecated ffmpeg timeout option.
-copied hls.js as a local file so live streams will still work
 without being connected to the internet.
2023-08-26 09:52:51 -04:00
Zii
3791b29cf7 v3.2.t2
-fixed the -i option that was using /etc instaead of /etc/mow
-the externalized image comparison executable is now configurable
 in the config file.
-moved the main index.html and theme.css files to the buffer dir,
 moving even more io to the buffer dir.
2023-08-06 10:17:10 -04:00
Zii
a8bd0ab7bf fixed compile error for older QT versions 2023-07-31 16:44:25 -04:00
Zii
367ecc839b v3.2.t1
-the -d option will no longer directly run camera instances. it
 will instead utilize systemd to install camera services.

-added -i, -l and -r options to manage camera services.

-the app will now default work and output directories in the
 /var/opt directory instead of /var/www/html and /tmp, making
 it a better neighbour in the fact that it won't overwrite
 existing websites or tmp files.

-install.sh will now create an unprivileged mow user that will
 be used to run camera services. all in effort to make the app
 a good neighour and follow good security practice.
2023-07-31 11:16:07 -04:00
Zii
25528617d5 v3.1
Current version is stable, realeasing to master.
2023-07-23 09:35:36 -04:00
Zii
ad733f8317 v3.1.t2
added a buffer directory so the actual work of image frame capture
and live video recording can be moved off of main storage.

also removed installation of the apache2 http server from
install.sh to make this app more agnostic and leave it up to the
end user to install what ever web server they want.
2023-07-18 18:47:14 -04:00
Zii
c17f74bea9 v3.1.t1
-Fixed the compile error for older versions of QT.
2023-06-20 18:02:35 -04:00
Zii
5f9c4be6b2 v3.1.t1
-added event age to evt_t as a way to track the age of the event
 in EventLoop so now only events approching and exceeding
 evMaxSecs will have the video range added for writing.
2023-06-20 17:49:52 -04:00
Zii
ff5f95f445 v3.0.0
The app in it's current iteration is stable in testing. Releasing
to master.
2023-06-18 09:06:12 -04:00
Zii
4300651a52 v3.0.t19
-the ffmpeg auto refresh logic is working, just need to shorten
 the frequency by setting recloop's heartbeat to default.

-added hls flag "omit_endlist" so the auto refresh doesn't cut off
 the stream at the web browser end.
2023-06-14 20:57:18 -04:00
Zii
71fc5b0bc2 v3.0.t18
-ffmpeg still stalls even with tcp timeout parameters in place.
 added self end -t option to match the heart beat of RecLoop.
 doing this auto re-fresh ffmpeg every 30mins and should prevent
 stall. for some reason ffmpeg just can't run long term without
 stalling.
2023-06-13 20:58:45 -04:00
Zii
a493c7da5d v3.0.t17
-finally fixed the crashing issue. it turns out EventLoop::exec()
 was calling vidList.removeLast() on an empty list every now and
 then, causing qt to fatal assert. I removed the line since it is
 not even needed.
2023-06-11 09:09:49 -04:00
Zii
510bdda64c v3.0.t16
-the debug code from the previous commit help narrow down what
 function is causing the crash but that's it, I need more. decided
 add the debug build type to cmake and will use gdb to help with
 debugging.

-decided to remove the debug code since I'll use gdb as the long
 term solution going forward.
2023-06-11 07:41:57 -04:00
Zii
9e7d8ee1ee v3.0.t16
-the app is still crashing, adding a bunch of console output to
 help with debug.
2023-06-10 22:44:38 -04:00
Zii
09a0f030ac v3.0.t16
-added mutex thread protection. getting sigmentation faults on the
 test machine. added thread protection on various shared
 parameters in hope that it fix the random crashing issue.
2023-06-10 21:51:39 -04:00
Zii
51218198b5 v3.0.t15
-changed up the logic in EventLoop to better honer maxEventSecs
 and pick the highest scoring event as the event name and
 thumbnail.
2023-06-10 09:45:26 -04:00
Zii
baf0b86610 v3.0.t14
-didn't properly remove use of evhist from the last commit. it is
 truely removed now.

-added delay cycles to detectLoop is motion was detected to
 prevent some event overlap.
2023-06-09 19:59:16 -04:00
Zii
4b4c2649b8 v3.0.t13
-removed use of evtHist. will instead allow eventLoop to que up
 duplicate live video clips and then remove later using
 QStringList::removeDuplicates().

-changed up the ffmpeg commands to utilize tcp and re-added a tcp
 timeout argument, removing the need for command stall checking.

-added logic to pick the snapshot with the highest diff score as
 the event thumbnail.
2023-06-09 16:24:32 -04:00
Zii
16312a93f5 v3.0.t12
-added a termination slot to RecLoop that will kill the long term
 ffmpeg commands and connected it to 'aboutToQuit' signal. this is
 expected to kill the ffmpeg commands properly when quiting the
 main process.
2023-06-01 16:59:37 -04:00
Zii
4bf260c0ae v3.0.t11
-max_event_secs is not being honered correctly. EventLoop was not
 calculating the amount the hls clips to grab from live correctly.
 chanaged it to properly calculate file count based on hls segment
 size.

-updated the documentation as the current version nears stable
 release.
2023-06-01 16:11:58 -04:00
Zii
71df7d1eb5 v3.0.t10
-turns out the previous statment on the previous commit is
 incorrect. it is every possible to overlap events. to
 mitigate this, evtHist was added to shared_t to track
 recently copied source vids and remove them from the
 event queued to be written.
2023-05-30 20:03:22 -04:00
Zii
732a604c24 v3.0.t9
-removed the delay after motion was detected. it was not having
 the desired effect and after more thought event overlap would
 be impossible anyway.

-the test cameras are still picking up motion during the post
 command. adjusted the after command delay to see if that
 helps.

-reduced the DetectLoop heartbeat from 3 to 2 to better match
 the record loop's cadence.
2023-05-29 20:06:19 -04:00
Zii
de24a94bd4 v3.0.t8
-the test cameras are picking up motion as post command is running.
 added a delay increment to DetectLoop in hope to fix this.

-removed the upkeep log since it doesn't really provide any useful
 information.

-adjusted the default motion score again.

-reduced the amount of image files DetectLoop needs from 3 to 2.
2023-05-29 17:43:31 -04:00
Maurice ONeal
b445906403 v3.0.t7
-added a dely to DetectLoop after a positive motion detection to
 prevent motion event overlap.

-moved the 2 image diff pair compair to proper "end of array" in
 DetectLoop.

-increased the size of the image stream so queded up events will
 be able generate thumbnails properly.

-cleaned off a bunch of unused parameters in the code.

-adjusted the default motion sensitivity after real world
 testing.

-added libfuse-dev to setup.sh since imagemagic needs that to
 operate.
2023-05-27 09:33:14 -04:00
Maurice ONeal
4134d4befb v3.0.t6
The Qt approach to grabbing frames from the live stream was also
a failure.

- decided to switch to a combination ffmpeg and imagemagic was
  external commands to do motion detection. this approach
  elimates the need for opencv altogeather so it was removed
  from the project. system resource usage appears to be decent
  and perhaps better than opencv.
2023-05-26 16:12:53 -04:00
Maurice ONeal
f850ec6a46 v3.0.t5
-fixed all loop structors used throughout the app. they were
 running too fast.

-added more log lines to aid with debug.
2023-05-21 09:34:57 -04:00
Maurice ONeal
496bac7d7e v3.0.t4
I'm going to test a move away from opencv's videoio module.
Videoio simply refuses to open any video file even with
FFMPEG builtin. I tested old v2.2 code and even that failed
on a fresh install of ubuntu sever so this tells me an
update on opencv's side broke something.

This issue is not new and frankly I'm tired of chasing it.
I'm giving QT's QMediaPlayer a try to see how it works out.
Will still need opencv for the absdiff and threshold
functions, otherwise I would have dropped the API
altogeather.

Now that the app has QT::Multimedia, QT6 is now the minimum
version it will support. CMakeList.txt and the setup script
updated accordingly.
2023-05-20 19:18:55 -04:00
Zii
40ef014e0f v3.0.t3
Got the app up to "not failing immediately" state.

However, for some reason DetectLoop is failing hard via opencv
being unable to open the stream clips.

I'll continue deep diving this. For now everything else works.
2023-05-17 21:10:39 +00:00
Zii
80e6980d9e Fixed a compile error. 2023-05-17 19:40:09 +00:00