import numpy as np
import cv2
import ffmpeg
# Capture video from file
cap = cv2.VideoCapture('dbfs:/databricks-datasets/cctvVideos/mp4/test/Browse1.mp4', cv2.CAP_V4L)
while True:
success, img = cap.read()
print(success)
if success:
cv2.imshow("video", img)
cv2.waitKey(1)
if 0xFF == ord('q') :
break
else:
break
This is the code which I was using.