I have tried this code, but it can't retrieve the frame rate and frame count. Please help me.
import cv2
def with_opencv(filename):
video = cv2.VideoCapture(filename)
frame_count = video.get(cv2.CAP_PROP_FRAME_COUNT)
frame_rate = video.get(cv2.CAP_PROP_FPS)
return frame_count / frame_rate
print(with_opencv('vid.hevc'))