cap = cv2.VideoCapture('http://hello:goodbye@127.0.0.1/?action=stream?otherparamshere) 

Read more of this post