title: OpenCV load video from url
body: <p>I have a video file (i.e. <code>https://www.example.com/myvideo.mp4</code>) and need to load it with OpenCV.</p>
  
  <p>Doing the equivalent with an image is fairly trivial:</p>
  
  <pre><code>imgReq = requests.get("https://www.example.com/myimage.jpg")
  imageBytes = np.asarray(bytearray(data), dtype=np.uint8)
  loadedImage = cv2.imdecode(image, cv2.IMREAD_COLOR)
  </code></pre>
  
  <p>I would like to do something similar to the following (where <code>loadedVideo</code> will be similar to what OpenCV returns from <code>cv2.VideoCapture</code>):</p>
  
  <pre><code>videoReq = requests.get("https://www.example.com/myimage.mp4")
  videoBytes = np.asarray(bytearray(data), dtype=np.uint8)
  loadedVideo = cv2.videodecode(image, cv2.IMREAD_COLOR)
  </code></pre>
  
  <p>But <code>cv2.videodecode</code> does not exist. Any ideas?</p>
  
  <hr>
  
  <p><strong>Edit:</strong> Seeing as this may be a dead end with only OpenCV, I'm open for solutions that combine other imaging libraries before loading into OpenCV...if such a solution exists.</p>