Discussing the new camera-streamer based webcam stack for OctoPi currently in development

How can I use camera-streamer in multiple instances? I have a 5001 and 5002 instance with both usb and raspicams. I tried using add-usb-camera and specifying those ports as well as trying to edit both configs in the camera-streamer folder.

Here's my log : WacBl-gITvg - paste.octoprint.org

Thank you so much! I'll try it out this afternoon.

How did you fix the driver error? I‘ve installed the arducam stuff, changed the config.txt and recompiled the streamer and it still doesn‘t work.

When I try the test command to take a photo, it throws 2 errors: Camera no found and driver needs an upgrade.

Do you know how I could fix that?

Can you help me with this?

its gone down for me . i have teh camera installed and reporting in but for the life of me i cant get octopi to recognise it. Does anyone ahve any suggestions ?

Command line output
Preview window unavailable
[0:02:43.520725994] [1522] INFO Camera camera_manager.cpp:299 libcamera v0.0.0+ 4225-74d023d8
[0:02:43.583033627] [1524] INFO RPI raspberrypi.cpp:1476 Registered camera /bas e/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media1 and ISP device /dev/m edia0
[0:02:43.584004987] [1522] INFO Camera camera.cpp:1028 configuring streams: (0) 2328x1748-YUV420
[0:02:43.584431077] [1524] INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0m ux/i2c@1/imx519@1a - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected u nicam format: 2328x1748-pRAA
#0 (0.00 fps) exp 32844.00 ag 8.00 dg 1.00
#1 (30.00 fps) exp 32844.00 ag 8.00 dg 1.00
#2 (30.00 fps) exp 32844.00 ag 8.00 dg 1.00


i followed steps 1,2 and 4 here - Quick Start - Arducam Wiki

Then compile and reinstall camera streamer from here GitHub - ayufan/camera-streamer: High-performance low-latency camera streamer for Raspberry PI's

Setup a symbolic link from /usr/bin/ to the new camera streamer in /usr/local/bin

in the command line cd to /usr/bin and run the command 'ln -s /usr/local/bin/camera-streamer'

ok so currently the arducam scripts remove camera-streamer

After some further testing it looks like if you don't want to use the autofocus ability of the Arducam 16mp AF camera then this works OOTB. You just need to remember to add in the config.txt entries and hash out the AF setting in the camera streamer conf file.

To use AF then my option above works until the arducam libcamera PDAF/CDAF changes are reflected upstream to the PI libcamera implementation

Thank you so much for sharing your research!
So wait, you are saying the camera works out of the box without AF?! What version of OctoPi do I need to be running? Do I need octopi-uptodate? And what do I need to add/comment out of the config.txt?

How do I create a symbolic link?

Is it enough to just run:

Step 1:
wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
chmod +x install_pivariety_pkgs.sh

Step 2:
./install_pivariety_pkgs.sh -p libcamera

Step 3 gets left out

Step 4:
For IMX519 Autofocus Camera Modules:

sudo nano /boot/config.txt 
add dtoverlay=imx519 under the line [all]
#Save and reboot.

For IMX519 Fixed Focus Camera Modules:

sudo nano /boot/config.txt 
add dtoverlay=imx519,vcm=off under the line [all]
#Save and reboot.

Which Step 4 do I need to use? Fixed focus or Autofocus?

Also how do I access the stream?

ok so if you want it without AF just flash teh latest build from octopi build and then add

# Example for IMX519
gpu_mem=128 # preferred 160 or 256MB

and in /boot/camera-streamer/libcamera.conf

hash out the last line that mentions AfMode=2" --camera-options="AfRange=2

finish setting up octopi and it shoudl all be there - i then added camera setting addon to control the maual focus

Thank you so much! I‘ll try this today!
Do I need to change anything about the camera-stream link in octoprint?

Update: I tried it out and the stream was there. But for some reason it was black.

I for some reason decided to try it with a newer version. After downloading I noticed, that there was no camera-streamer folder in there. Now I'm trying with the build from March 28th. What version are you using?

Do you have any idea why it could have been black?

I'll come back tomorrow. I'd be really happy, if you could help me. :grin:

I got it to work yesterday. :partying_face: :partying_face: Here are my steps for everyone who needs it:

To make it work I did these two steps described by @flipside
At first SSH into the Pi. If you don't know how, look it up on the internet.

In the root directory of the Pi type:
cd /boot
sudo nano config.txt

Then put the following unter the header "[all]":

gpu_mem=128 # preferred 160 or 256MB

Write out the file by pressing "Ctrl+O" and then "Enter". You can exit the file with "Ctrl+X".

Next, open the "libcamera.conf" file by pasting the following commands into the terminal:
cd camera-streamer
sudo nano libcamera.conf

Put a "#" in front of the following:

OPTIONS='--camera-options="AfMode=2" --camera-options="AfRange=2"'

Putting a "#" in front of something, makes it a comment. Comments don't get read by the system.
Write out the file by pressing "Ctrl+O" and then "Enter". Exit the file with "Ctrl+X".

In your camera settings in Octoprint you should have:


Everything should be working and you should be up and running.