1 | initial version |
To use the IP Cam's Stream on your python program, you have to find the URL of the Video Stream. This URL is differ based on manufactures. You can easily Find the URL of video stream from these Website
https://www.ispyconnect.com/sources.aspx
there will be lots of URL formats. Select the Brand of you IP Cams and try the one by one in your python program.
Dahua is Here in my case,
My Code to capture and play the Video from the IP cam is Shows Below . (Username and Password of my IP cam is Both admin, admin)
import cv2
while True: cap = cv2.VideoCapture('http://admin:[email protected]/cgi-bin/snapshot.cgi?loginuse=admin&loginpas=admin')
ret, frame = cap.read()
cv2.imshow('image', frame)
cv2.waitKey(1)