title: Python - OpenCV VideoCapture = False (Windows)
body: <p>I have a simple piece of code, written in Python (version 2.7.11) designed to do things to a video file as follows:</p>
  
  <pre><code>import cv2
  
  cap = cv2.VideoCapture('MyVideo.mov')
  print(cap)
  print(cap.isOpened())
  
  while(cap.isOpened()):
      #Do some stuff
  </code></pre>
  
  <p>The result of print(cap) is a 8 digit hex number, so I don't know if that means that the video has been found.</p>
  
  <p>However, the print statement for cap.isOpened() returns False. I have tried several fixes, but none of them worked. Any help or insight would be very helpful.</p>
  
  <p>Things to note/things I have tried</p>
  
  <ul>
  <li>I am running Windows 8.1, Python 2.7.11 and OpenCV 3.1.0</li>
  <li>The location of the video file is in the same directory as the Python script</li>
  <li><p>I have the following directories appended to my PATH variable: </p>
  
  <pre><code>C:\Users\MyName\OpenCV3\opencv\build\x64\vc14\bin; 
  C:\Users\MyName\OpenCV3\opencv\sources\3rdparty\ffmpeg;
  C:\Python27\;
  C:\Python27\Scripts
  </code></pre></li>
  <li><p>I have checked that I have opencv_ffmpeg.dll in the OpenCV vc14 bin directory</p></li>
  <li><p>I have checked that said dll file is titled opencv_ffmpeg310_64.dll</p></li>
  <li><p>I have tried redownloading said dll file, and renaming it to include the version of OpenCV and the fact that my system is a 64-bit one</p></li>
  <li><p>I have tried placing the dll file in the Python27 directory</p></li>
  <li><p>The code above works on Mac, but not on Windows (tried the code on 2 different Macs and it worked, tried it on 2 different Windows machines and it returned false both times)</p></li>
  </ul>