Webcam with Bullseye on Raspberry Pi 4 anyone?

Hi, I was wondering if anyone has gotten the V2 camera streaming to OctoPrint from a Rapsberry Pi 4 that is running Raspberry Pi OS "Bullseye" version? If so, I would like to know what they did to get it to work.

first of all we need to know what doesn't work :slight_smile:

any errors?

The discussion here is probably relevant:

The TL/DR: Bullseye introduces a different 'stack' for the picams, and it's not directly compatible with mjpg-streamer. It sounds like you can still enable the 'legacy' stack to get the old behavior and compatibility back, but that's not enabled by default.

change

camera_auto_detect=1

to

camera_auto_detect=0

in the config.txt

Thank you. I had looked at that, but didn't read all the way to the end. I think foosel summed it up pretty well "So, am I reading this thread right so far that picams won't work with mjpg-streamer on bullseye? If so, that is a major show stopper for a new OctoPi release for now."

I was careful with how I phrased this topic. I wasn't asking for help getting it to work. From my reading, I was pretty sure it doesn't work "yet", but will once some updates come out. I was just wondering if by any chance someone had been successful with streaming on Bullseye.

I assume that if I had said "Buster" lots of folks would have said, "yep, I'm doing that".

I posted the solution right above your post.

I tried that and it made no difference for me. Are you streaming to OctoPrint from the V2 camera on an RPi4B running Bullseye?

Yes - tested it a few hours ago.

I suggest you try buster first to make sure the camera is working

The camera is working with buster. I followed the Optional: Webcam section of this post https://community.octoprint.org/t/setting-up-octoprint-on-a-raspberry-pi-running-raspbian-or-raspberry-pi-os/2337 and it works.

I just tried those same instructions with bullseye and this is what I got when I entered ./mjpg_streamer -i "./input_raspicam.so -fps 5" -o "./output_http.so"

MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39
ERROR: could not find input plugin
       Perhaps you want to adjust the search path with:
       # export LD_LIBRARY_PATH=/path/to/plugin/folder
       dlopen: ./input_raspicam.so: cannot open shared object file: No such file or directory

1 Like

Same issue,
./mjpg_streamer -i "./input_raspicam.so -fps 5 -x 1920 -y 1080 -rot 180" -o "./output_http.so -p 8050" MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39 ERROR: could not find input plugin Perhaps you want to adjust the search path with: # export LD_LIBRARY_PATH=/path/to/plugin/folder dlopen: ./input_raspicam.so: cannot open shared object file: No such file or directory
Looks like we need new instruction for bullseye how to run camera.

Have you enabled the legacy stack for the camera?

Yes, not sure is it confirmation enabled legacy stack or not.
image

What does this output:

grep camera_auto_detect /boot/config.txt

nothing.
image

Well, that is weird, I'd have expected this to either return this set to 0 or 1. Try adding

camera_auto_detect=0

to /boot/config.txt, see if it helps. If not I'm out of ideas for now. Latest bullseye nightly builds of OctoPi worked on my test setup with a pi cam, and all that needed to be changed for that to work was the above option in /boot/config.txt which supposedly enables the legacy stack.

updated, rebooted
image

Maybe the issue in RPi3, and it works for RPi4.

also, is there any movement to avoid using legacy stack?

I tested it on a Pi Zero 2 which is pretty close to a Pi 3 (same soc).
Any idea which nightly you used?

It's out of our hands - mjpg streamer is 3rd party software, which we will have to wait for an update. Mjpg streamer doesn't see many updates these days.

Ustreamer, another camera streaming software, is being worked on by its author to add compatibility, it's in-progress.

Do you have to rebuild it once the legacy stuff has been enabled again? No concrete ideas, just wondering.

The DLOPEN errors when trying to use the raspicam plugin indicate that mjpg-streamer wasn't built with the raspicam plugin enabled.

For those users on bullseye, can you try with the uvc plugin instead? This would be the same as the 'USB' camera setup.

I wouldn't be surprised if mjpg-streamer's build system can't find the proper libraries for the raspicam plugin on bullseye. They moved a lot of the RPi specific libraries around, as I detailed on a ustreamer ticket: Can't build with `WITH_OMX=1` on Raspberry Pi OS Bullseye · Issue #123 · pikvm/ustreamer · GitHub