0

I'm doing a small project on Raspberry Pi 4. Also, I want to use QtMultimedia to list all cameras on pi, But it returns an empty list.

# This is my testing code

from PyQt5.QtMultimedia import QCameraInfo

print(QCameraInfo.availableCameras())

I already took a picture via use raspistill so the camera is works.

2 Answers 2

1

To read available cameras in PyQt5, you need to install Qt 5 Multimedia module plugins

$ apt install libqt5multimedia5-plugins
0
0
from PyQt5.QtMultimedia import *

cmara=QCameraInfo()
for i in cmara.availableCameras():
    print(i.description())

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.