CvVideoWriter *writeravi = cvCreateVideoWriter("C:\\outavi.avi",CV_FOURCC('D','I','V','X'),fps,cvSize(frameW,frameH),isColor);
for(int stepframe=0;stepframe<numFrames;stepframe++)
{
cvGrabFrame(captureavi);
imgavi=cvRetrieveFrame(captureavi);
int t= cvWriteFrame(writeravi,imgavi);
cvShowImage("image",imgavi);
cvWaitKey(20);
}
It gives me aceess violation,(even writeravi=0x003ecd18 )
if i put "0" or "-1" instead of CV_FOURCC('D','I','V','X') it works but ) stands for uncompress output & -1 gives dialg box to select compression type , from which Intel indeo video 4.5 works for me.
But in my applicationh i cant use ) or -1 7 i want compresss output.
[edit]SHOUTING removed, Code block added, "Treat my content as plain text..." option disabled - OriginalGriff[/edit]