Camera-streamer configuration on the new camera stack for OctoPi

I had a little struggle to add a second Logitech C270 camera on my Raspberry PI 4 with camera-streamer.
I could get both cameras to work but not at the same time. If I reboot the service instance of camera-streamer for CAM1 the other one (CAM2) would work and if I do the same for CAM2 then CAM1 would work again.
I could solve it by using MJPG instead of YUYV. I think it has to do with limitations in the internal USB hub in the PI 4. MJPG uses compression whereas YUYV does not.
I checked the image difference and found that MJPG gives a little bit sharper image anyway so I switched to MJPG by setting FORMAT=MJPG in the configuration files of both camera's.

Just sharing this with the community. I hope this could be helpful for anybody.

Interesting, as I have the same problem. Also with two Logitech cams (HD920 and a B525HD).

I also started with YUYV on both cams and switched to MJPG as well as JPEG. However, the B525HD was never working correctly.

After switching it back to YUYV on 480p, it is now working. Higher resolution will cause a Server-Error. The 920 is running in 1080p on MJPG without any bigger problems (sometimes it freezes).

Try listing the supported formats by the camera:
v4l2-ctl --list-formats -d /dev/v4l/by-id/whatevercameranameyougot

Thanks. YUYV and MJPG are supported (by both).
However, this discussion is not at the right place. I already have a topic open: New camera stack - one of 2 cameras not active - #14 by Wit4r7

Please don't hesitate to comment there if you have any additional ideas. I would be pleased, if it would work better.

1 Like

Hi All, I've tried editing the config file at /boot/camera-streamer/usb-cam1.conf and changing the frame rate:


which I'd hope would be pretty noticeable but the feed looks to be anywhere from 10-30 fps (ie smooth). Are there lower limits imposed on the framerate somewhere?

Is Multicam compatible with the new Stack? New stack is working and can see both camers with http://octopi2:8081/stream and http://octopi2:8082/stream (with OPTIONS="--http-listen="). Also an wget on octopi retries a shotshop or the stream.
But Multicam plugin shows only:

Webcamstream nicht geladen
It might not be configured correctly or require authentication. You can change the URL of the stream under "Settings" > "Classic Webcam" > "Stream URL". If you don't have a webcam you can also just disable webcam support there.
Aktuell konfigurierte Stream-URL: http://octopi2:8081/stream

I tried also localhost instead of hostname octopi2. Same problem.

This is a new installation with new camera stack. On my older installation I got multicam running with the old camera stack.

Any Ideas?

It should generally be fine. If you have an issue, open your own "Get Help" topic.

I am by no means an expert. I've just been struggling with this new stack for about a week. The command v4l2-ctl --all should tell you the actual frame rate along with resolution and a host of other info.

If you only have one camera and it is USB, the system might be using /boot/camera-streamer/usb-default.conf instead of /boot/camera-streamer/usb-cam1.conf. When I was first trying to get my camera working, I "added" a camera and it created a conf file in a subdirectory. I don't remember where it was. I found some documentation somewhere regarding multicam setup which told me where it was, and I backtracked from that experiment. I am using the usb-default.conf with my one USB camera and I can control the framerate correctly.

Also, it is not clear from posts on this page, but the video that displays in the control tab (http://octopi.local/?#control) or the home page (http://octopi.local) is still coming from MJPEG-Streamer (with its own settings) unless you replace the Classic Webcam plugin with the Camera Streamer Control plugin.

Whart is the syntax in the usb.conf file to add multiple options? I want to disable autofocus and place my absolute focus on 40.

#Additional options
OPTIONS='--camera options="camera-auto_focus[=0]" --camera options="LensPosition=40"

Is this correct? I can't find an answer to this anywhere, not on camera-streamer's documentation as well.

Thanks in advance! :slight_smile:

Not sure what the square brackets are doing there, but this configuration used to work for a Pi Cam V3 (I have referenced my own comment from 12 months ago so hoping it's not changed!)

OPTIONS='--camera-options="AfMode=0" --camera-options="LensPosition=1"

Adjust numbers as you see fit.

1 Like

A tip, in case someone runs into my trouble:

Cannot find encoder to convert from 'YUYV'


Cannot find encoder to convert from 'MJPG'

I had cut the amount of memory shared with the GPU down to 16MB on the Raspberry Pi (raspi-config) because "I won't need that because I'm not running a desktop".

Uh, nope. Back up to 128MB and the camera came right on (after hours of head-scratching).

I haven't determined the minimum GPU memory config for this.

While I was at it (and after I got the camera to come on), I moved the USB cable to one of the USB3 ports. Don't know if this was involved in the frame-freezing I got with prior setups, but I'm hoping I'm good on MJPG now.

I'm using zero 2w with a V1 Pi camera, OctoPrint version: 1.10.1.

Currently, the only way is by using http://pizero.local/webcam/control to start streaming.
However, pizero.local/:8080/stream can't reach.

From the browser dev tool I found pizero.local/webcam/stream?_cb=1716623****** is working.

Hi there,

I am a bit confused on changing the options on the camera. Do i need to remove the flash card from the PI and then edit in /boot/camera-streamer/libcamera.conf` ?

Or can i also change the settings through putty?

you can change via putty with sudo nano /boot/camera-streamer/libcamera.conf. ctrl+s to save, ctrl+x to exit.

I see the options now but nothing changes if i add options. In the /webcam/control i can see changes if i make them but nothing changes in the /boot/camera-streamer/libcamera.conf file.

Are you restarting the camera streamer?

sudo service camera-streamer restart

If that doesn't work I suggest you start a get help topic and include everyone the template asks for.

Thanks! that worked.

Please open your own "Get Help" topic, rather than posting on this documentation topic.

Did you get to the bottom of this? I am having the same problem.