It is required to determine the resolution of the video clip before sending it for processing. How to do it through Python?

1 answer 1

import cv2 file_path = "./video.avi" vid = cv2.VideoCapture( file_path ) height = vid.get(cv2.CAP_PROP_FRAME_HEIGHT) width = vid.get(cv2.CAP_PROP_FRAME_WIDTH)