Cv2.imshow very slow in Rock Pi N10

Hi,

I wrote a simple video playing python code using cv2 as below:

import cv2

if name == ‘main’:

cap0=cv2.VideoCapture("v2_4.mp4")

if not (cap0.isOpened()):
    print ("Could not open video device 0")

ret0,orig_img=cap0.read()
win_name = 'NPU ssd video'
#cv2.namedWindow(win_name, cv2.WINDOW_NORMAL)

while(ret0):
    cv2.imshow(win_name,orig_img)
    key=cv2.waitKey(1) & 0xFF
    ret0,orig_img=cap0.read()

cap0.release()
cv2.destroyAllWindows()

when I run it, the following warning/error message show up:

(NPU ssd video:31404): dbind-WARNING **: 21:58:42.502: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

And the playing frame rate is very slow (expect 30fps but only 5~7 fps)

Questions:

  1. why the warning/error message show up? is this warning causing the frame rate so slow?
  2. how can I make the frame rate faster? hopefully back to 30 fps.

Thank you for your help.

  1. why the warning/error message show up? is this warning causing the frame rate so slow?
    SOLVED: check the solution here
  2. how can I make the frame rate faster? hopefully back to 30 fps.
    SOLVED: I was running nomachine remote to the Rock Pi N10 that’s why so slow. Once I turn off the nomachine and work on the Rock Pi N10, the play back frame rate looks normal now.
1 Like