In [1]:
import cv2

In [2]:
cap_file = cv2.VideoCapture('data/temp/sample_video.mp4')
print(type(cap_file))


<class 'cv2.VideoCapture'>

In [3]:
print(cap_file.isOpened())


True

In [4]:
cap_file_wrong = cv2.VideoCapture('wrong_path')
print(type(cap_file_wrong))


<class 'cv2.VideoCapture'>

In [5]:
print(cap_file_wrong.isOpened())


False