Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading a video in OpenCV in Python

I'm desperately attempting to load a video file in OpenCV in Python (on OSX Lion) using the following code:

> import cv
> capture = cv.CaptureFromFile("in.avi")

However, i only get the following warning:

> WARNING: Couldn't read movie file in.avi

There is no explanation as to what the problem is (it can't find the file, wrong codec, etc). As far as Google is concerned I'm the only one in the universe getting this exact message in OpenCV.

I've read the 'codec compatibility docs' here and made sure to convert the video to the correct codec using mencode, but it still doesn't work.

Any ideas as to what I'm doing wrong?

like image 849
laugejepsen Avatar asked Feb 22 '12 14:02

laugejepsen


1 Answers

Answer: See my comment - Wrong path.

like image 82
platinummonkey Avatar answered Sep 20 '22 23:09

platinummonkey