Hi all,
I can't seem to play my avi files using OpenCV. I am on a Mac and the files work with Quicktime and VLC player. I have tried using mencoder to convert it to i420 but that still has not been successful. No error messages occur and it seems like the program closes automatically and I'm not sure how to debug it.
int main(int argc, char* argv[])
{
cvNamedWindow( "Example2", CV_WINDOW_AUTOSIZE );
CvCapture* capture = cvCreateFileCapture( argv[1] );
IplImage* frame;
while(1) {
frame = cvQueryFrame( capture );
if( !frame ) break;
cvShowImage( "Example2", frame );
char c = cvWaitKey(33);
if( c == 27 ) break;
}
cvReleaseCapture( &capture );
cvDestroyWindow( "Example2" );
}