Pablo
Pablo

Reputation: 1

Video Player using Emgu CV

I want to make a video player with detection of objects using Emgu CV. I'd like to start with reading from a video source file and that is where I got an error. In line:

Capture capture = new Capture(@"C:/Users/Paul/Desktop/Film/parrot.avi");

there is an exception:

An unhandled exception of type 'System.NullReferenceException' occurred in Emgu.CV.dll
Additional information: Unable to create capture from C:/Users/Paul/Desktop/Film/parrot.avi

I have tried many combinations and different source types like AVI, WMV, MPEG and still got the exception. What can I do to make it work?

Upvotes: 0

Views: 4722

Answers (3)

G.C.
G.C.

Reputation: 1

I had this problem for some days, I could not read nor write a video on the Desktop. No error on initialization, but a Capture with Width and Height = 0 returning null frames.

It started working simply by changing the path to:

".\parrot.avi" 

This happened to me on Win8.1 using Emgu 3.1.0.2282b

Upvotes: 0

putuyuwono
putuyuwono

Reputation: 119

What version of Emgu CV that you are using? If it is 2.4.10 then I suggest you to use the 3.0.0 version. I have encountered the same problem when I use the most current stable version (2.4.10), but it seems to be patched in the latest alpha version (3.0.0). Now, I can easily capture usb camera, video file, or RTSP stream (IP Camera) using Emgu CV Capture class.

Probably you have solved this problem by now, however I hope this information will also be useful for others.

Upvotes: 0

Explorer
Explorer

Reputation: 31

I faced a similar problem. If this question is still open then try adding:

opencv_ffmpegXXX.dll 

(XXX is your emgucv version) to ur project's exe folder (Debug/Release). FFmpeg is used by opencv for handling video.

P.S.:opencv_ffmpegXXX.dll is located in extracted emgucv/bin folder.

Upvotes: 3

Related Questions