I am using OpenCV to display a video my code is as
#include
#include
#include
#include
I also got the same error if the video is not present in the folder. So, just put the video at a place where you don't need to give a long path which you are doing currently (just to see that your program can work). For example, i have placed my video just outside the "source folder", so i just write capture = cvCreateFileCapture("video.avi");
I just used double quotes instead of single quotes using the entire video path and it worked for me! (on windows)