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.
This commit is contained in:
Maurice ONeal 2022-12-21 20:44:58 -05:00
parent b470915276
commit 736b8c5ec4
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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);
}
}