from common import cam_utils
import cv2


if __name__ == '__main__':
    
    cam_config={
        "name":"testcamera",
        "url":0,
        "_id":"1234"
       
        }
    behav_config = {
        "_id":"xyz",
         "params":{"readMethod":"video","motionEnabled":True}
    }
    
    cap = cam_utils.cap_rtsp(cam_config,behav_config)
    
    while True:
        ret,image=cap.read()
        if ret:
            cv2.imshow("vid",image)
            cv2.waitKey(1)