title: How to to play videos from the web using Opencv and python
body: <p>am looking devolop something simply with opencv.Am looking to play videos from the web using opencv the way you can play videos from your laptop by passing the location path now a trying to pass the video url and get it to play.so far am getting error any suggestion would be nice.</p>
  <pre><code>import cv2 
  import numpy as np 
  import urllib3
  
  
  http = urllib3.PoolManager()
  r = http.request('Get','https://www.youtube.com/watch?v=NWdrO4BoCu8&amp;list=RDNWdrO4BoCu8&amp;start_radio=1')
  cap = cv2.VideoCapture('https://www.youtube.com/watch?v=NWdrO4BoCu8&amp;list=RDNWdrO4BoCu8&amp;start_radio=1') 
  
  
  if (cap.isOpened()== False): 
      print(&quot;Error opening video file&quot;) 
  
  
  while(cap.isOpened()): 
      
  
      ret, frame = cap.read() 
      if ret == True: 
  
          cv2.imshow('Frame', frame) 
  
          if cv2.waitKey(25) &amp; 0xFF == ord('q'): 
            break
          else: 
              break
  
  
  cap.release() 
  cv2.destroyAllWindows() 
  </code></pre>