cannot play avi file

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

cannot play avi file

BZ-4
Hello, am a biginer to opencv and am faing a problem with reading avi
files.I have tried the cvCreateFileCapture but does not seem to load
the avi.is my video file in a wrong format or what?what am i supposed
to do?
thanx in advance

Reply | Threaded
Open this post in threaded view
|

Re: cannot play avi file

davidmarcelo2003
could you show us the code you are testing?
maybe the avi is in the wrong format, check the opencv wiki...

Regards.
2008/12/26 bz <[hidden email]>

>   Hello, am a biginer to opencv and am faing a problem with reading avi
> files.I have tried the cvCreateFileCapture but does not seem to load
> the avi.is my video file in a wrong format or what?what am i supposed
> to do?
> thanx in advance
>
>  
>


[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: cannot play avi file

BZ-4
sorry for long delay the code i m testing is here:

cvNamedWindow( "Example2",1 );
        CvCapture* capture = cvCreateFileCapture( "movie.avi");
        IplImage* frame;
        while(true) {
        frame = cvQueryFrame( capture);
        double x=cvGetCaptureProperty(capture, 3 );
        std::cout<<x;
        if( !frame ) std::cout<<" no frame";//break;
        cvShowImage( "Example2", frame );
        char c = cvWaitKey();
        if( c == 27 ) break;
        }
        cvReleaseCapture( &capture );
        cvDestroyWindow( "Example2" );



--- In [hidden email], Entrada <entrada@...> wrote:
>
> could you show us the code you are testing?
> maybe the avi is in the wrong format, check the opencv wiki...
>
> Regards.
> 2008/12/26 bz <brimzi@...>
>
> >   Hello, am a biginer to opencv and am faing a problem with
reading avi
> > files.I have tried the cvCreateFileCapture but does not seem to
load
> > the avi.is my video file in a wrong format or what?what am i
supposed
> > to do?
> > thanx in advance
> >
> >  
> >
>
>
> [Non-text portions of this message have been removed]
>


Reply | Threaded
Open this post in threaded view
|

Re: cannot play avi file

dede_bl4ckheart
convert the AVI using mencoder first:

mencoder in.avi -ovc raw -vf format=i420 -o out.avi