Problem with reading video file opencv 3.1 [closed]
Hi All,
I just recently installed opencv3.1 and i wanted to read a video file. Everything seem fine to as i have used code before. Please anyone look at this:
VideoCapture capture;
while (1) {
capture.open("C:/Users/hp/Documents/motionTrackingTutorial/bouncingBall.avi");
if (!capture.isOpened()) {
cout << "ERROR ACQUIRING VIDEO FEED\n";
getchar();
return -1;
}
// ...............other code are implemented here
}
The video file is not read as "ERROR ACQUIRING VIDEO FEED" is been displayed. Please can anyone help.
capture.open("C:/Users/hp/Documents/motionTrackingTutorial/bouncingBall.avi"); should be before while
Hi LBerger, tried that still did not work.
You have got an example in samples/cpp/starter_video.cpp. You can try this example :
If it works try with your video (I have installed opencv in f:/lib)
Hi LBerger,
The example in starter_video.cpp still fails read from the video file and then opens my webcam as seen from the code snippet below:
Copy 768x576.avi in folder where is exe file like this you can check problem with path name :
After to open this video you will need opencv_ffmpeg310_64.dll. If opencvcannot find this dll there is no error message. You can check if everything is OK using "depends"
Hi LBerger,
I found a way around this, it was resolved by adding the path to opencv_ffmpeg310_64.dll to my path variable. All was history.
Thanks for your response.