[OpenCV][Python] Save video
import os import cv2 from pathlib import Path from datetime import datetime path = Path('/home/ubuntu/data/') path.mkdir(parents=True, exist_ok=True) src = '/dev/video0' W, H, fps = 1920, 1080, 6 cap = cv2.VideoCapture(src) fourcc = cv2.VideoWriter_fourcc('H','2','6','4') cap.set(3, W) cap.set(4, H) cap.set(5, fps) cap.set(6, fourcc) t = datetime.now().strftime('%Y-%m-%d_%H-%M-%S_%f') f_name = o..