I am using OpenCV to display a video my code is as
#include #include #include #include
I had the same problem. Very annoying (opencv 2.4.9). But what worked for me was passing the absolute file name (avi or mpeg), i.e whole path.
E.g.:
char* fileName = "D:/myVideos/video.avi" ... VideoCapture capture(fileName );