1 | initial version |
First thing is to make sure the name and path of the video file is correct.
If there is nothing wrong with the path, than this is almost always a codec problem. OpenCV is trying to find the codec to open the video and is not finding it.
Download a codec package into your system (easy to find on google) and then try to run the same code again. I've seen a lot of people solving this problem just doing this.