Decklink 8K with opencv-python frame rate

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

hms9110

  • Posts: 1
  • Joined: Thu Apr 07, 2022 12:37 am
  • Real Name: minsoo hong

Decklink 8K with opencv-python frame rate

PostThu Apr 07, 2022 2:03 am

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

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 14 guests