Given below is the code written for getting live stream from an IP Camera.
from cv2 import * from cv2 import cv import urllib import numpy as np k=0 capture=
I had the same problem. The solution without requests or urllib: just add the user and password in the cam address, using VideoCapture, like this:
E.g.
cv2.VideoCapture('http://user:password@XXX.XXX.XXX.XXX/video')
using IPWebcam for android.