diff --git a/README.md b/README.md index bd38e53..99f6678 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ frame_gap = 10 # check the pixel diffs for motion. the lower the value, the more frames # will be checked, however with that comes higher cpu usage. # -img_thresh = 1024 +img_thresh = 10000 # this indicates how many pixels need to be different in between frame_gap # before it is considered motion. any video clips found with frames # exceeding this value will be moved from buff_dir to web_root. diff --git a/src/common.cpp b/src/common.cpp index 654e6ff..0ddcbd5 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -192,7 +192,7 @@ bool rdConf(shared_t *share) share->retCode = 0; share->frameGap = 10; share->pixThresh = 150; - share->imgThresh = 1024; + share->imgThresh = 10000; share->secs = 60; share->maxDays = 15; share->maxClips = 90; diff --git a/src/common.h b/src/common.h index 8763319..b240a42 100644 --- a/src/common.h +++ b/src/common.h @@ -35,7 +35,7 @@ using namespace cv; using namespace std; using namespace std::filesystem; -#define APP_VER "1.5.t17" +#define APP_VER "1.5.t18" #define APP_NAME "Motion Watch" struct shared_t diff --git a/src/main.cpp b/src/main.cpp index 273959a..3d19556 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,7 +69,10 @@ void recLoop(shared_t *share) for (auto i = 0; i < share->secs; i += 10) { auto bufPath = cleanDir(share->buffDir) + "/" + to_string(i) + "." + share->vidExt; - auto cmd = "ffmpeg -hide_banner -i " + share->recordUrl + " -y -vcodec " + share->vidCodec + " -movflags faststart -t 10 " + bufPath; + auto limSecs = to_string(share->secs + 2); + auto cmd = "timeout -k 1 " + limSecs + " "; + + cmd += "ffmpeg -hide_banner -i " + share->recordUrl + " -y -vcodec " + share->vidCodec + " -movflags faststart -t 10 " + bufPath; recLog("ffmpeg_run: " + cmd, share);