-
gettin a movie screencap
hi
below i'm trying to get a movie screencap. but i get error no 259: "Driver cannot recognize the specified command parameter" error after the capture command returns. what i'm doing wrong here please?
Code:
int main(int argc, char* argv[])
{
int err=0;
char errstr[256];
//open and play the video
mciSendString("open messwiththebest.mpg alias mwtb",0,0,0);
mciSendString("play mwtb",0,0,0);
//pause the movie when user hits a key
getch();
mciSendString("pause mwtb",0,0,0);
//try to get a capture
err = mciSendString("capture mwtb E:\\capture.jpg",0,0,0); //error no: 259 is returned
mciGetErrorString(err,errstr,256);
return 0;
}
-
http://msdn2.microsoft.com/en-us/library/ms707265.aspx
It seems that you forgot to provide the last parameter.
-
i've tried the capture command with the 'wait' parameter. but it gives the same error msg.
-
I think you're missing the "as":
Code:
err = mciSendString("capture mwtb as E:\\capture.jpg wait",0,0,0);
Samples here.