Hi!
I captured Decklink 8k input video with opencv-python for live video
I was able to read the video by using it in the same way as when reading the webcam (VideoCapture(devide_idx)).
I know Decklink 8k Pro supports up to 60fps. but I can't reach 60fps in opencv with Decklink 8K pro
How can I reach 60 fps?
here is my code
- Code: Select all
def decklink_py():
capture = cv2.VideoCapture(1, cv2.CAP_DSHOW)
startTime = time.time()
while True:
ret, frame = capture.read()
if not ret:
print('can not read retval')
break
frameCounter += 1
if time.time() - startTime >= 1:
fps = frameCounter
frameCounter = 0
startTime = time.time()
cv2.putText(result, "FPS: " + str(fps), (0, 100), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0))
cv2.imshow('frame', result)
key = cv2.waitKey(1)
if key == 27: # ESC
break