This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
cap = cv2.VideoCapture(0) # for IPCamera format : rtsp://admin:[email protected]:554/1 | |
# Define the codec and create VideoWriter object | |
fourcc = cv2.VideoWriter_fourcc(*'mp4v') | |
out = cv2.VideoWriter('traffic_video_back.mp4',fourcc, 15.0, (1920,1080)) | |
frame_count = 0 | |
while(cap.isOpened()): |