From 736b8c5ec4cacc4a280444dd56fc51a998fd8ec2 Mon Sep 17 00:00:00 2001 From: Maurice ONeal Date: Wed, 21 Dec 2022 20:44:58 -0500 Subject: [PATCH] v1.5.t17 Fixed an invalid argument in the ffmpeg command from vcodec to -vcodec. Also added a 10sec delay to simulate a running ffmpeg if it fails for what ever reason. --- src/common.h | 2 +- src/main.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common.h b/src/common.h index 95f22c7..8763319 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.t16" +#define APP_VER "1.5.t17" #define APP_NAME "Motion Watch" struct shared_t diff --git a/src/main.cpp b/src/main.cpp index 9cff0f6..273959a 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,7 +69,7 @@ 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 cmd = "ffmpeg -hide_banner -i " + share->recordUrl + " -y -vcodec " + share->vidCodec + " -movflags faststart -t 10 " + bufPath; recLog("ffmpeg_run: " + cmd, share); @@ -91,6 +91,8 @@ void recLoop(shared_t *share) { remove(bufPath); } + + sleep(10); } }