title: How to Capture Video Stream with OpenCV (Python)
body: <p>I want to process mms video stream with OpenCV using Python. 
  The stream comes from an IP camera I have no control over (traffic monitor). 
  The stream is available as mms or mmst schemes -</p>
  
  <pre><code>mms://194.90.203.111/cam2
  </code></pre>
  
  <p>plays on both VLC and Windows Media Player.</p>
  
  <pre><code>mmst://194.90.203.111/cam2
  </code></pre>
  
  <p>works only on VLC.
  I've tried to change the scheme to HTTP by re-streaming with FFmpeg and VLC but it didn't work.</p>
  
  <p>As far as I understand, mms is using Windows Media Video to encode the stream. No luck adding '.mjpeg' at the end of the URI. I've yet to find what types of streaming are accepted by OpenCV.</p>
  
  <p>Here's my code - </p>
  
  <pre><code>import cv2, platform
  #import numpy as np
  
  cam = "mms://194.90.203.111/cam2"
  #cam = 0 # Use  local webcam.
  
  cap = cv2.VideoCapture(cam)
  if not cap:
      print("!!! Failed VideoCapture: invalid parameter!")
  
  while(True):
      # Capture frame-by-frame
      ret, current_frame = cap.read()
      if type(current_frame) == type(None):
          print("!!! Couldn't read frame!")
          break
  
      # Display the resulting frame
      cv2.imshow('frame',current_frame)
      if cv2.waitKey(1) &amp; 0xFF == ord('q'):
          break
  
  # release the capture
  cap.release()
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>The 
  What am I missing? What type of video streams can OpenCV capture?
  Is there an elegant solution without scheme change or transcoding?</p>
  
  <p>Thanks!</p>
  
  <p>Python ver 2.7.8, OpenCV's ver 2.4.9, Both x86. Win7 x64 </p>