to extract video and move into the newfolder [closed]
My task to extract the video of 1min before using after trigger here trigger is passing when->it contains datetimeformat(190425132148).I need to convert this format into minute and subtract formatted minute with 1min(21-1) therfore result will be 20:00 the video play from 20:00 and ends in 21:00 exactly 1minute video have to take and save in separate folder but .and I record video for every 5 minutes.I have no idea about this extraction. Below is the code,
tm exampleTime()
{
struct tm tm;
strptime("2019-04-09 14:28:16", "%Y-%m-%d %H:%M:%S", &tm);
return tm;
}
int main() {
struct tm when;
when = exampleTime();
VideoCapture obj;
Mat frame;
obj.open(recordVideo->getVideoFile(when));
while(obj.read(frame)) {
imshow("A", frame);
char exitKeyPress = (char)waitKey(500); //to terminate
if( exitKeyPress == ESC_KEY_PRESSED )
break;
}
obj.release();
Sorry, but this is not even an opencv problem and it is off topic
please note, that your playback rate is NOT synchronized to any real time clock. whatever you dowith
tm
orlocaltime()
-- the results will be pure bogus !really, opencv is a computer-vision library, while what you need is video editing software.