I am trying the below code
capture = cv2.VideoCapture(\'sample.mp4\') colors=[tuple(255 * np.random.rand(3)) for i in range(5)] while (capture.isOpened()):