Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

to extract video and move into the folder

        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();

to extract video and move into the folder

        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();

to extract video and move into the foldernewfolder

 

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,

code,

 tm exampleTime() 
   {

{

struct tm tm;

tm;

strptime("2019-04-09 14:28:16", "%Y-%m-%d %H:%M:%S", &tm);

&tm);

return tm; }

}

int main() {

{
 struct tm when;

when = exampleTime();

exampleTime();

VideoCapture obj; Mat frame;

frame; obj.open(recordVideo->getVideoFile(when));

obj.open(recordVideo->getVideoFile(when));

while(obj.read(frame)) {

while(obj.read(frame)) {

 imshow("A", frame);

 char exitKeyPress = (char)waitKey(500);   //to terminate
 if( exitKeyPress == ESC_KEY_PRESSED )
     break;
}
obj.release();

} obj.release();