title: OpenCV Python RTSP stream
body: <p>I want to stream the video from IP camera by using RTSP. But I am having a problem. I have installed prerequirements and also, my RTSP link works on VlC player. But when I tried it in the editor and run it, it says Camera could not be found.<br />
  Here is my code.</p>
  <pre><code>import cv2
  import numpy as np
  cap = cv2.VideoCapture(&quot;rtsp://admin:admin@xxx.xxx.xxx.xxx:xxx/media/video1/video&quot;)
  
  while True:
      ret, img = cap.read()
      if ret == True:
      cv2.imshow('video output', img)
      k = cv2.waitKey(10)&amp; 0xff
      if k == 27:
          break
  cap.release()
  cv2.destroyAllWindows()
  </code></pre>