streamlit-webrtc icon indicating copy to clipboard operation
streamlit-webrtc copied to clipboard

Raspberry Pi 4B Webcam "Device not available (Requested device not found)"

Open mcguirepr89 opened this issue 2 years ago • 0 comments

Hello and thank you very much for your work on this suite of great tools.

I am trying to get the simple example app.py working on my Raspberry Pi 4B:

from streamlit_webrtc import webrtc_streamer
webrtc_streamer(key="sample")
streamlit run app.py

Though there seems to be an issue accessing the Raspberry Pi's webcam. Here is the output from libcamera-hello --list-cameras which gives a little information about the camera version and capabilities:

Available cameras
-----------------
0 : ov5647 [2592x1944] (/base/soc/i2c0mux/i2c@1/ov5647@36)
    Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16, 0)/2560x1920 crop]
                             1296x972 [43.25 fps - (0, 0)/2592x1944 crop]
                             1920x1080 [30.62 fps - (348, 434)/1928x1080 crop]
                             2592x1944 [15.63 fps - (0, 0)/2592x1944 crop]

From the Streamlit webGUI I see "Device not available (Requested device not found)" when trying to "SELECT DEVICE" and "NotFoundError: Requested device not found" when trying to "START."

I imported the logging library and added the following to my app.py example:

st_webrtc_logger = logging.getLogger("streamlit_webrtc")
st_webrtc_logger.setLevel(logging.WARNING)

but I'm not seeing a Traceback with any other information, otherwise I would certainly wish to provide that. I assume I'm not using the logging library properly. :embarrassed:

To ensure that the camera access issue wasn't a security issue, I did also proxy things through SSL (using caddy), but that did not change the observed behavior. I also set the site permissions within the web browser explicitly to allow use of the webcam, but that did not change anything either.

I hope I've provided enough information to get started troubleshooting this if that is something for which you would have time.

My very best regards, Patrick

PS I got to this repo from this article -- It's a bummer that neither your github handle nor your name are mentioned as the backbone for the project :skeleton: :scaffolding: :framework:

mcguirepr89 avatar Jun 17 '23 21:06 mcguirepr89