Quantcast

Problem regarding cvCaptureFromAVI

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem regarding cvCaptureFromAVI

Faryal Ali
Hi!!!

I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
My code is

CvCapture* capture = 0;
capture=cvCaptureFromAVI("file.avi");
and file.avi is present in project folder.(I have tried an alternate by giving the whole path).

Every time I run the code i get no error but the capture remains null.
Can anyone help me???

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

Matthias Schmieder
Try this:

Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:

capture=cvCaptureFromAVI("C:\\file.avi");

if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"


--- In [hidden email], "Faryal Ali" <farryal_ali@...> wrote:

>
> Hi!!!
>
> I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> My code is
>
> CvCapture* capture = 0;
> capture=cvCaptureFromAVI("file.avi");
> and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
>
> Every time I run the code i get no error but the capture remains null.
> Can anyone help me???
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

swaroop.mtech
In reply to this post by Faryal Ali
-tRY TO GIVE PATH LIKE THIS "C:\\JKSDHFW\\DJSDF\\filename.avi"

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

Faryal Ali
In reply to this post by Matthias Schmieder
i have tried this also...but result is same
--- In [hidden email], "hyblade" <schmieder.matthias@...> wrote:

>
> Try this:
>
> Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
>
> capture=cvCaptureFromAVI("C:\\file.avi");
>
> if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
>
>
> --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> >
> > Hi!!!
> >
> > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > My code is
> >
> > CvCapture* capture = 0;
> > capture=cvCaptureFromAVI("file.avi");
> > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> >
> > Every time I run the code i get no error but the capture remains null.
> > Can anyone help me???
> >
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

Matthias Schmieder
So then we start from the beginning:

What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?


--- In [hidden email], "Faryal Ali" <farryal_ali@...> wrote:

>
> i have tried this also...but result is same
> --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> >
> > Try this:
> >
> > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> >
> > capture=cvCaptureFromAVI("C:\\file.avi");
> >
> > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> >
> >
> > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > >
> > > Hi!!!
> > >
> > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > My code is
> > >
> > > CvCapture* capture = 0;
> > > capture=cvCaptureFromAVI("file.avi");
> > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > >
> > > Every time I run the code i get no error but the capture remains null.
> > > Can anyone help me???
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

Faryal Ali
i m using opencv1.0. I downloaded it from sourceforge and followed the tutorial. It works right for facedetection from images. But when i tried to detect face from avi file i got the problem.Uptil noe i have received no error because i wrote
if(!capture)
{
return -1;
}
so it enters the if statement and terminates without any error.
--- In [hidden email], "hyblade" <schmieder.matthias@...> wrote:

>
> So then we start from the beginning:
>
> What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?
>
>
> --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> >
> > i have tried this also...but result is same
> > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > >
> > > Try this:
> > >
> > > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> > >
> > > capture=cvCaptureFromAVI("C:\\file.avi");
> > >
> > > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> > >
> > >
> > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > >
> > > > Hi!!!
> > > >
> > > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > > My code is
> > > >
> > > > CvCapture* capture = 0;
> > > > capture=cvCaptureFromAVI("file.avi");
> > > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > > >
> > > > Every time I run the code i get no error but the capture remains null.
> > > > Can anyone help me???
> > > >
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

get_imaginary
Are you using windows?

There probably is some simple trick for reading AVI files in windows, but I never found it. I copied the code from an online tutorial for a CS class, and it didn't work. No error, but no frame data either. I ended up writing my own video frame extractor from scratch using DirectX....

I'd be curious to know if there's a simpler solution. It might be just a matter of downloading and installing some codec. But I didn't find one after a quick search, and since the DirectX does somewhat work, I've just been using that. The main difficulty I encountered is that there didn't seem to be any consistent concept of a video frame in DirectX -- at least not for AVI files.

- Robin


--- In [hidden email], "Faryal Ali" <farryal_ali@...> wrote:

>
> i m using opencv1.0. I downloaded it from sourceforge and followed the tutorial. It works right for facedetection from images. But when i tried to detect face from avi file i got the problem.Uptil noe i have received no error because i wrote
> if(!capture)
> {
> return -1;
> }
> so it enters the if statement and terminates without any error.
> --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> >
> > So then we start from the beginning:
> >
> > What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?
> >
> >
> > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > >
> > > i have tried this also...but result is same
> > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > >
> > > > Try this:
> > > >
> > > > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> > > >
> > > > capture=cvCaptureFromAVI("C:\\file.avi");
> > > >
> > > > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> > > >
> > > >
> > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > >
> > > > > Hi!!!
> > > > >
> > > > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > > > My code is
> > > > >
> > > > > CvCapture* capture = 0;
> > > > > capture=cvCaptureFromAVI("file.avi");
> > > > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > > > >
> > > > > Every time I run the code i get no error but the capture remains null.
> > > > > Can anyone help me???
> > > > >
> > > >
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

Faryal Ali
Yes i am using Windows XP. I mentioned in my first post
--- In [hidden email], "Robin" <rhewitt@...> wrote:

>
> Are you using windows?
>
> There probably is some simple trick for reading AVI files in windows, but I never found it. I copied the code from an online tutorial for a CS class, and it didn't work. No error, but no frame data either. I ended up writing my own video frame extractor from scratch using DirectX....
>
> I'd be curious to know if there's a simpler solution. It might be just a matter of downloading and installing some codec. But I didn't find one after a quick search, and since the DirectX does somewhat work, I've just been using that. The main difficulty I encountered is that there didn't seem to be any consistent concept of a video frame in DirectX -- at least not for AVI files.
>
> - Robin
>
>
> --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> >
> > i m using opencv1.0. I downloaded it from sourceforge and followed the tutorial. It works right for facedetection from images. But when i tried to detect face from avi file i got the problem.Uptil noe i have received no error because i wrote
> > if(!capture)
> > {
> > return -1;
> > }
> > so it enters the if statement and terminates without any error.
> > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > >
> > > So then we start from the beginning:
> > >
> > > What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?
> > >
> > >
> > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > >
> > > > i have tried this also...but result is same
> > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > >
> > > > > Try this:
> > > > >
> > > > > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> > > > >
> > > > > capture=cvCaptureFromAVI("C:\\file.avi");
> > > > >
> > > > > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> > > > >
> > > > >
> > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > >
> > > > > > Hi!!!
> > > > > >
> > > > > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > > > > My code is
> > > > > >
> > > > > > CvCapture* capture = 0;
> > > > > > capture=cvCaptureFromAVI("file.avi");
> > > > > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > > > > >
> > > > > > Every time I run the code i get no error but the capture remains null.
> > > > > > Can anyone help me???
> > > > > >
> > > > >
> > > >
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

~MrSu
try to uninstall version1.0 and install version1.1pre1a. there is an exe installer file. i donot have any problems with avi on windows. infact reading avi on opencv is pretty straight forward if the codes are installed. do you know what codec your avi is using?

before that try to get ffdshow from here http://www.softpedia.com/get/Multimedia/Video/Codec-Packs-Video-Codecs/FFDShow-MPEG-Video-Decoder.shtml 



--- In [hidden email], "Faryal Ali" <farryal_ali@...> wrote:

>
> Yes i am using Windows XP. I mentioned in my first post
> --- In [hidden email], "Robin" <rhewitt@> wrote:
> >
> > Are you using windows?
> >
> > There probably is some simple trick for reading AVI files in windows, but I never found it. I copied the code from an online tutorial for a CS class, and it didn't work. No error, but no frame data either. I ended up writing my own video frame extractor from scratch using DirectX....
> >
> > I'd be curious to know if there's a simpler solution. It might be just a matter of downloading and installing some codec. But I didn't find one after a quick search, and since the DirectX does somewhat work, I've just been using that. The main difficulty I encountered is that there didn't seem to be any consistent concept of a video frame in DirectX -- at least not for AVI files.
> >
> > - Robin
> >
> >
> > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > >
> > > i m using opencv1.0. I downloaded it from sourceforge and followed the tutorial. It works right for facedetection from images. But when i tried to detect face from avi file i got the problem.Uptil noe i have received no error because i wrote
> > > if(!capture)
> > > {
> > > return -1;
> > > }
> > > so it enters the if statement and terminates without any error.
> > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > >
> > > > So then we start from the beginning:
> > > >
> > > > What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?
> > > >
> > > >
> > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > >
> > > > > i have tried this also...but result is same
> > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > >
> > > > > > Try this:
> > > > > >
> > > > > > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> > > > > >
> > > > > > capture=cvCaptureFromAVI("C:\\file.avi");
> > > > > >
> > > > > > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> > > > > >
> > > > > >
> > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > >
> > > > > > > Hi!!!
> > > > > > >
> > > > > > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > > > > > My code is
> > > > > > >
> > > > > > > CvCapture* capture = 0;
> > > > > > > capture=cvCaptureFromAVI("file.avi");
> > > > > > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > > > > > >
> > > > > > > Every time I run the code i get no error but the capture remains null.
> > > > > > > Can anyone help me???
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

get_imaginary
In reply to this post by Faryal Ali
Sorry, I didn't look far enough down!

Yes, so was I. I used VC6++ pro to build, so it's not unique to VS2008. I use OpenCV quite a lot, and this is really the only problem I've encountered with it.

Since I found the example code on a course website (and have seen similar code on more than one course website), it's clear that some people are having better success than you or I in reading AVI files on windows. Let's hope one of them will see this thread and maybe we can find out what the differences are between their setup and ours!

- Robin


--- In [hidden email], "Faryal Ali" <farryal_ali@...> wrote:

>
> Yes i am using Windows XP. I mentioned in my first post
> --- In [hidden email], "Robin" <rhewitt@> wrote:
> >
> > Are you using windows?
> >
> > There probably is some simple trick for reading AVI files in windows, but I never found it. I copied the code from an online tutorial for a CS class, and it didn't work. No error, but no frame data either. I ended up writing my own video frame extractor from scratch using DirectX....
> >
> > I'd be curious to know if there's a simpler solution. It might be just a matter of downloading and installing some codec. But I didn't find one after a quick search, and since the DirectX does somewhat work, I've just been using that. The main difficulty I encountered is that there didn't seem to be any consistent concept of a video frame in DirectX -- at least not for AVI files.
> >
> > - Robin
> >
> >
> > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > >
> > > i m using opencv1.0. I downloaded it from sourceforge and followed the tutorial. It works right for facedetection from images. But when i tried to detect face from avi file i got the problem.Uptil noe i have received no error because i wrote
> > > if(!capture)
> > > {
> > > return -1;
> > > }
> > > so it enters the if statement and terminates without any error.
> > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > >
> > > > So then we start from the beginning:
> > > >
> > > > What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?
> > > >
> > > >
> > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > >
> > > > > i have tried this also...but result is same
> > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > >
> > > > > > Try this:
> > > > > >
> > > > > > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> > > > > >
> > > > > > capture=cvCaptureFromAVI("C:\\file.avi");
> > > > > >
> > > > > > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> > > > > >
> > > > > >
> > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > >
> > > > > > > Hi!!!
> > > > > > >
> > > > > > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > > > > > My code is
> > > > > > >
> > > > > > > CvCapture* capture = 0;
> > > > > > > capture=cvCaptureFromAVI("file.avi");
> > > > > > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > > > > > >
> > > > > > > Every time I run the code i get no error but the capture remains null.
> > > > > > > Can anyone help me???
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

patrickho78
I think the problem may be the codec of the avi. OpenCV will only play avi in i420 format.

To test this try an avi that has been converted by mencoder to i420 format.


--- In [hidden email], "Robin" <rhewitt@...> wrote:

>
> Sorry, I didn't look far enough down!
>
> Yes, so was I. I used VC6++ pro to build, so it's not unique to VS2008. I use OpenCV quite a lot, and this is really the only problem I've encountered with it.
>
> Since I found the example code on a course website (and have seen similar code on more than one course website), it's clear that some people are having better success than you or I in reading AVI files on windows. Let's hope one of them will see this thread and maybe we can find out what the differences are between their setup and ours!
>
> - Robin
>
>
> --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> >
> > Yes i am using Windows XP. I mentioned in my first post
> > --- In [hidden email], "Robin" <rhewitt@> wrote:
> > >
> > > Are you using windows?
> > >
> > > There probably is some simple trick for reading AVI files in windows, but I never found it. I copied the code from an online tutorial for a CS class, and it didn't work. No error, but no frame data either. I ended up writing my own video frame extractor from scratch using DirectX....
> > >
> > > I'd be curious to know if there's a simpler solution. It might be just a matter of downloading and installing some codec. But I didn't find one after a quick search, and since the DirectX does somewhat work, I've just been using that. The main difficulty I encountered is that there didn't seem to be any consistent concept of a video frame in DirectX -- at least not for AVI files.
> > >
> > > - Robin
> > >
> > >
> > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > >
> > > > i m using opencv1.0. I downloaded it from sourceforge and followed the tutorial. It works right for facedetection from images. But when i tried to detect face from avi file i got the problem.Uptil noe i have received no error because i wrote
> > > > if(!capture)
> > > > {
> > > > return -1;
> > > > }
> > > > so it enters the if statement and terminates without any error.
> > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > >
> > > > > So then we start from the beginning:
> > > > >
> > > > > What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?
> > > > >
> > > > >
> > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > >
> > > > > > i have tried this also...but result is same
> > > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > > >
> > > > > > > Try this:
> > > > > > >
> > > > > > > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> > > > > > >
> > > > > > > capture=cvCaptureFromAVI("C:\\file.avi");
> > > > > > >
> > > > > > > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> > > > > > >
> > > > > > >
> > > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > > >
> > > > > > > > Hi!!!
> > > > > > > >
> > > > > > > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > > > > > > My code is
> > > > > > > >
> > > > > > > > CvCapture* capture = 0;
> > > > > > > > capture=cvCaptureFromAVI("file.avi");
> > > > > > > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > > > > > > >
> > > > > > > > Every time I run the code i get no error but the capture remains null.
> > > > > > > > Can anyone help me???
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Problem regarding cvCaptureFromAVI

shparekh@yahoo.com
As I noted in some other thread... I used the codec msvc in the AVI writer and it worked for me.  This may sound dumb but I don't know why... but hopefully it helps you to focus on the real problem that you may be going after.
-sanjay




________________________________
From: patrickho78 <[hidden email]>
To: [hidden email]
Sent: Friday, July 31, 2009 12:56:06 PM
Subject: [OpenCV] Re: Problem regarding cvCaptureFromAVI

I think the problem may be the codec of the avi. OpenCV will only play avi in i420 format.

To test this try an avi that has been converted by mencoder to i420 format.


--- In [hidden email], "Robin" <rhewitt@...> wrote:

>
> Sorry, I didn't look far enough down!
>
> Yes, so was I. I used VC6++ pro to build, so it's not unique to VS2008. I use OpenCV quite a lot, and this is really the only problem I've encountered with it.
>
> Since I found the example code on a course website (and have seen similar code on more than one course website), it's clear that some people are having better success than you or I in reading AVI files on windows. Let's hope one of them will see this thread and maybe we can find out what the differences are between their setup and ours!
>
> - Robin
>
>
> --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> >
> > Yes i am using Windows XP. I mentioned in my first post
> > --- In [hidden email], "Robin" <rhewitt@> wrote:
> > >
> > > Are you using windows?
> > >
> > > There probably is some simple trick for reading AVI files in windows, but I never found it. I copied the code from an online tutorial for a CS class, and it didn't work. No error, but no frame data either. I ended up writing my own video frame extractor from scratch using DirectX....
> > >
> > > I'd be curious to know if there's a simpler solution. It might be just a matter of downloading and installing some codec. But I didn't find one after a quick search, and since the DirectX does somewhat work, I've just been using that. The main difficulty I encountered is that there didn't seem to be any consistent concept of a video frame in DirectX -- at least not for AVI files.
> > >
> > > - Robin
> > >
> > >
> > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > >
> > > > i m using opencv1.0. I downloaded it from sourceforge and followed the tutorial. It works right for facedetection from images. But when i tried to detect face from avi file i got the problem.Uptil noe i have received no error because i wrote
> > > > if(!capture)
> > > > {
> > > > return -1;
> > > > }
> > > > so it enters the if statement and terminates without any error.
> > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > >
> > > > > So then we start from the beginning:
> > > > >
> > > > > What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?
> > > > >
> > > > >
> > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > >
> > > > > > i have tried this also...but result is same
> > > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > > >
> > > > > > > Try this:
> > > > > > >
> > > > > > > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> > > > > > >
> > > > > > > capture=cvCaptureFromAVI("C:\\file.avi");
> > > > > > >
> > > > > > > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> > > > > > >
> > > > > > >
> > > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > > >
> > > > > > > > Hi!!!
> > > > > > > >
> > > > > > > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > > > > > > My code is
> > > > > > > >
> > > > > > > > CvCapture* capture = 0;
> > > > > > > > capture=cvCaptureFromAVI("file.avi");
> > > > > > > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > > > > > > >
> > > > > > > > Every time I run the code i get no error but the capture remains null.
> > > > > > > > Can anyone help me???
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>




------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
Yahoo! Groups Links




     

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

get_imaginary
Hi Sanjay,

Do you mean you used it to read AVI files? Not sure about the OP, but I don't have any problem writing them; only reading fails.

- Robin


--- In [hidden email], Sanjay Parekh <shparekh@...> wrote:

>
> As I noted in some other thread... I used the codec msvc in the AVI writer and it worked for me.  This may sound dumb but I don't know why... but hopefully it helps you to focus on the real problem that you may be going after.
> -sanjay
>
>
>
>
> ________________________________
> From: patrickho78 <paddy_ho@...>
> To: [hidden email]
> Sent: Friday, July 31, 2009 12:56:06 PM
> Subject: [OpenCV] Re: Problem regarding cvCaptureFromAVI
>
> I think the problem may be the codec of the avi. OpenCV will only play avi in i420 format.
>
> To test this try an avi that has been converted by mencoder to i420 format.
>
>
> --- In [hidden email], "Robin" <rhewitt@> wrote:
> >
> > Sorry, I didn't look far enough down!
> >
> > Yes, so was I. I used VC6++ pro to build, so it's not unique to VS2008. I use OpenCV quite a lot, and this is really the only problem I've encountered with it.
> >
> > Since I found the example code on a course website (and have seen similar code on more than one course website), it's clear that some people are having better success than you or I in reading AVI files on windows. Let's hope one of them will see this thread and maybe we can find out what the differences are between their setup and ours!
> >
> > - Robin
> >
> >
> > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > >
> > > Yes i am using Windows XP. I mentioned in my first post
> > > --- In [hidden email], "Robin" <rhewitt@> wrote:
> > > >
> > > > Are you using windows?
> > > >
> > > > There probably is some simple trick for reading AVI files in windows, but I never found it. I copied the code from an online tutorial for a CS class, and it didn't work. No error, but no frame data either. I ended up writing my own video frame extractor from scratch using DirectX....
> > > >
> > > > I'd be curious to know if there's a simpler solution. It might be just a matter of downloading and installing some codec. But I didn't find one after a quick search, and since the DirectX does somewhat work, I've just been using that. The main difficulty I encountered is that there didn't seem to be any consistent concept of a video frame in DirectX -- at least not for AVI files.
> > > >
> > > > - Robin
> > > >
> > > >
> > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > >
> > > > > i m using opencv1.0. I downloaded it from sourceforge and followed the tutorial. It works right for facedetection from images. But when i tried to detect face from avi file i got the problem.Uptil noe i have received no error because i wrote
> > > > > if(!capture)
> > > > > {
> > > > > return -1;
> > > > > }
> > > > > so it enters the if statement and terminates without any error.
> > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > >
> > > > > > So then we start from the beginning:
> > > > > >
> > > > > > What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?
> > > > > >
> > > > > >
> > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > >
> > > > > > > i have tried this also...but result is same
> > > > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > > > >
> > > > > > > > Try this:
> > > > > > > >
> > > > > > > > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> > > > > > > >
> > > > > > > > capture=cvCaptureFromAVI("C:\\file.avi");
> > > > > > > >
> > > > > > > > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > > > >
> > > > > > > > > Hi!!!
> > > > > > > > >
> > > > > > > > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > > > > > > > My code is
> > > > > > > > >
> > > > > > > > > CvCapture* capture = 0;
> > > > > > > > > capture=cvCaptureFromAVI("file.avi");
> > > > > > > > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > > > > > > > >
> > > > > > > > > Every time I run the code i get no error but the capture remains null.
> > > > > > > > > Can anyone help me???
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
>
>
>
> ------------------------------------
>
> Change settings: http://www.yahoogroups.com/mygroups, select
>    Get Emails (get all posts)
>    Daily Digest (one summary email per day)
>    Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
> Yahoo! Groups Links
>
>
>
>
>      
>
> [Non-text portions of this message have been removed]
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

get_imaginary
In reply to this post by patrickho78
That could be it. I see that's in the wiki too. I already have my DirectX workaround (which doesn't have that limitation), so I'm good, but hopefully this will help the OP. (Faryal, if this solves your problem, could you post to let us know? - thanks, R)

Thanks, Patrick!

- Robin


--- In [hidden email], "patrickho78" <paddy_ho@...> wrote:

>
> I think the problem may be the codec of the avi. OpenCV will only play avi in i420 format.
>
> To test this try an avi that has been converted by mencoder to i420 format.
>
>
> --- In [hidden email], "Robin" <rhewitt@> wrote:
> >
> > Sorry, I didn't look far enough down!
> >
> > Yes, so was I. I used VC6++ pro to build, so it's not unique to VS2008. I use OpenCV quite a lot, and this is really the only problem I've encountered with it.
> >
> > Since I found the example code on a course website (and have seen similar code on more than one course website), it's clear that some people are having better success than you or I in reading AVI files on windows. Let's hope one of them will see this thread and maybe we can find out what the differences are between their setup and ours!
> >
> > - Robin
> >
> >
> > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > >
> > > Yes i am using Windows XP. I mentioned in my first post
> > > --- In [hidden email], "Robin" <rhewitt@> wrote:
> > > >
> > > > Are you using windows?
> > > >
> > > > There probably is some simple trick for reading AVI files in windows, but I never found it. I copied the code from an online tutorial for a CS class, and it didn't work. No error, but no frame data either. I ended up writing my own video frame extractor from scratch using DirectX....
> > > >
> > > > I'd be curious to know if there's a simpler solution. It might be just a matter of downloading and installing some codec. But I didn't find one after a quick search, and since the DirectX does somewhat work, I've just been using that. The main difficulty I encountered is that there didn't seem to be any consistent concept of a video frame in DirectX -- at least not for AVI files.
> > > >
> > > > - Robin
> > > >
> > > >
> > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > >
> > > > > i m using opencv1.0. I downloaded it from sourceforge and followed the tutorial. It works right for facedetection from images. But when i tried to detect face from avi file i got the problem.Uptil noe i have received no error because i wrote
> > > > > if(!capture)
> > > > > {
> > > > > return -1;
> > > > > }
> > > > > so it enters the if statement and terminates without any error.
> > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > >
> > > > > > So then we start from the beginning:
> > > > > >
> > > > > > What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?
> > > > > >
> > > > > >
> > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > >
> > > > > > > i have tried this also...but result is same
> > > > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > > > >
> > > > > > > > Try this:
> > > > > > > >
> > > > > > > > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> > > > > > > >
> > > > > > > > capture=cvCaptureFromAVI("C:\\file.avi");
> > > > > > > >
> > > > > > > > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > > > >
> > > > > > > > > Hi!!!
> > > > > > > > >
> > > > > > > > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > > > > > > > My code is
> > > > > > > > >
> > > > > > > > > CvCapture* capture = 0;
> > > > > > > > > capture=cvCaptureFromAVI("file.avi");
> > > > > > > > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > > > > > > > >
> > > > > > > > > Every time I run the code i get no error but the capture remains null.
> > > > > > > > > Can anyone help me???
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem regarding cvCaptureFromAVI

Faryal Ali
When I consulted my sir, he has restrictricte me to use c# opencv.so em using emgu cv now. And i m able to capture video in c# by using emgucv's function.
thanx for ur help...
--- In [hidden email], "Robin" <rhewitt@...> wrote:

>
> That could be it. I see that's in the wiki too. I already have my DirectX workaround (which doesn't have that limitation), so I'm good, but hopefully this will help the OP. (Faryal, if this solves your problem, could you post to let us know? - thanks, R)
>
> Thanks, Patrick!
>
> - Robin
>
>
> --- In [hidden email], "patrickho78" <paddy_ho@> wrote:
> >
> > I think the problem may be the codec of the avi. OpenCV will only play avi in i420 format.
> >
> > To test this try an avi that has been converted by mencoder to i420 format.
> >
> >
> > --- In [hidden email], "Robin" <rhewitt@> wrote:
> > >
> > > Sorry, I didn't look far enough down!
> > >
> > > Yes, so was I. I used VC6++ pro to build, so it's not unique to VS2008. I use OpenCV quite a lot, and this is really the only problem I've encountered with it.
> > >
> > > Since I found the example code on a course website (and have seen similar code on more than one course website), it's clear that some people are having better success than you or I in reading AVI files on windows. Let's hope one of them will see this thread and maybe we can find out what the differences are between their setup and ours!
> > >
> > > - Robin
> > >
> > >
> > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > >
> > > > Yes i am using Windows XP. I mentioned in my first post
> > > > --- In [hidden email], "Robin" <rhewitt@> wrote:
> > > > >
> > > > > Are you using windows?
> > > > >
> > > > > There probably is some simple trick for reading AVI files in windows, but I never found it. I copied the code from an online tutorial for a CS class, and it didn't work. No error, but no frame data either. I ended up writing my own video frame extractor from scratch using DirectX....
> > > > >
> > > > > I'd be curious to know if there's a simpler solution. It might be just a matter of downloading and installing some codec. But I didn't find one after a quick search, and since the DirectX does somewhat work, I've just been using that. The main difficulty I encountered is that there didn't seem to be any consistent concept of a video frame in DirectX -- at least not for AVI files.
> > > > >
> > > > > - Robin
> > > > >
> > > > >
> > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > >
> > > > > > i m using opencv1.0. I downloaded it from sourceforge and followed the tutorial. It works right for facedetection from images. But when i tried to detect face from avi file i got the problem.Uptil noe i have received no error because i wrote
> > > > > > if(!capture)
> > > > > > {
> > > > > > return -1;
> > > > > > }
> > > > > > so it enters the if statement and terminates without any error.
> > > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > > >
> > > > > > > So then we start from the beginning:
> > > > > > >
> > > > > > > What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?
> > > > > > >
> > > > > > >
> > > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > > >
> > > > > > > > i have tried this also...but result is same
> > > > > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > > > > >
> > > > > > > > > Try this:
> > > > > > > > >
> > > > > > > > > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> > > > > > > > >
> > > > > > > > > capture=cvCaptureFromAVI("C:\\file.avi");
> > > > > > > > >
> > > > > > > > > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi!!!
> > > > > > > > > >
> > > > > > > > > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > > > > > > > > My code is
> > > > > > > > > >
> > > > > > > > > > CvCapture* capture = 0;
> > > > > > > > > > capture=cvCaptureFromAVI("file.avi");
> > > > > > > > > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > > > > > > > > >
> > > > > > > > > > Every time I run the code i get no error but the capture remains null.
> > > > > > > > > > Can anyone help me???
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Problem regarding cvCaptureFromAVI

shparekh@yahoo.com
In reply to this post by get_imaginary
Robin,

You probably got your answer by now... but sorry, I was thinking writing.  I did not have any problems reading the files.  Basically I was dealing with uncompressed avi files that I captured using canon's point and shoot camera.  One way you can do is read in the avi files using virtual dub and then convert them to uncompressed format and then try reading them in.

-sanjay




________________________________
From: Robin <[hidden email]>
To: [hidden email]
Sent: Friday, July 31, 2009 2:20:24 PM
Subject: [OpenCV] Re: Problem regarding cvCaptureFromAVI

Hi Sanjay,

Do you mean you used it to read AVI files? Not sure about the OP, but I don't have any problem writing them; only reading fails.

- Robin


--- In [hidden email], Sanjay Parekh <shparekh@...> wrote:

>
> As I noted in some other thread... I used the codec msvc in the AVI writer and it worked for me.  This may sound dumb but I don't know why... but hopefully it helps you to focus on the real problem that you may be going after.
> -sanjay
>
>
>
>
> ________________________________
> From: patrickho78 <paddy_ho@...>
> To: [hidden email]
> Sent: Friday, July 31, 2009 12:56:06 PM
> Subject: [OpenCV] Re: Problem regarding cvCaptureFromAVI
>
> I think the problem may be the codec of the avi. OpenCV will only play avi in i420 format.
>
> To test this try an avi that has been converted by mencoder to i420 format.
>
>
> --- In [hidden email], "Robin" <rhewitt@> wrote:
> >
> > Sorry, I didn't look far enough down!
> >
> > Yes, so was I. I used VC6++ pro to build, so it's not unique to VS2008. I use OpenCV quite a lot, and this is really the only problem I've encountered with it.
> >
> > Since I found the example code on a course website (and have seen similar code on more than one course website), it's clear that some people are having better success than you or I in reading AVI files on windows. Let's hope one of them will see this thread and maybe we can find out what the differences are between their setup and ours!
> >
> > - Robin
> >
> >
> > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > >
> > > Yes i am using Windows XP. I mentioned in my first post
> > > --- In [hidden email], "Robin" <rhewitt@> wrote:
> > > >
> > > > Are you using windows?
> > > >
> > > > There probably is some simple trick for reading AVI files in windows, but I never found it. I copied the code from an online tutorial for a CS class, and it didn't work. No error, but no frame data either. I ended up writing my own video frame extractor from scratch using DirectX....
> > > >
> > > > I'd be curious to know if there's a simpler solution. It might be just a matter of downloading and installing some codec. But I didn't find one after a quick search, and since the DirectX does somewhat work, I've just been using that. The main difficulty I encountered is that there didn't seem to be any consistent concept of a video frame in DirectX -- at least not for AVI files.
> > > >
> > > > - Robin
> > > >
> > > >
> > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > >
> > > > > i m using opencv1.0. I downloaded it from sourceforge and followed the tutorial. It works right for facedetection from images. But when i tried to detect face from avi file i got the problem.Uptil noe i have received no error because i wrote
> > > > > if(!capture)
> > > > > {
> > > > > return -1;
> > > > > }
> > > > > so it enters the if statement and terminates without any error.
> > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > >
> > > > > > So then we start from the beginning:
> > > > > >
> > > > > > What version of OpenCV do you use? How did you compile it? Where there any errors? are all dlls at the right places...and so on?
> > > > > >
> > > > > >
> > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > >
> > > > > > > i have tried this also...but result is same
> > > > > > > --- In [hidden email], "hyblade" <schmieder.matthias@> wrote:
> > > > > > > >
> > > > > > > > Try this:
> > > > > > > >
> > > > > > > > Copy the avi file into you C:\ folder. Then try to open the avi file by calling the function:
> > > > > > > >
> > > > > > > > capture=cvCaptureFromAVI("C:\\file.avi");
> > > > > > > >
> > > > > > > > if it works the problem lies in the path-string. Try to use this scheme - "C:\\path\\to\\my\\video\\file.avi"
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In [hidden email], "Faryal Ali" <farryal_ali@> wrote:
> > > > > > > > >
> > > > > > > > > Hi!!!
> > > > > > > > >
> > > > > > > > > I m implementing a sample code to run a video from avi file.I m using VS2008 on Windows XP.But it does not seem to work.
> > > > > > > > > My code is
> > > > > > > > >
> > > > > > > > > CvCapture* capture = 0;
> > > > > > > > > capture=cvCaptureFromAVI("file.avi");
> > > > > > > > > and file.avi is present in project folder.(I have tried an alternate by giving the whole path).
> > > > > > > > >
> > > > > > > > > Every time I run the code i get no error but the capture remains null.
> > > > > > > > > Can anyone help me???
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
>
>
>
> ------------------------------------
>
> Change settings: http://www.yahoogroups.com/mygroups, select
>    Get Emails (get all posts)
>    Daily Digest (one summary email per day)
>    Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
> Yahoo! Groups Links
>
>
>
>
>      
>
> [Non-text portions of this message have been removed]
>




------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
Yahoo! Groups Links




     

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

Loading...