IMX519 PDAF Release

Same with the latest stable (.21)

same with .19, .16 …
Is there a way to

i think you’re trying to install the kernel driver using
./ -p imx519_driver_low_speed

that doesn’t exist (check the supported package list and you’ll see it’s not there, there is something named similar but that only works on earlier kernel versions. Now @Edward can chime in here but I’m wondering if the kernel driver is even needed now as i believe it’s now built into the pi kernel directly

im re doing the install but your libcamera packages dont seem to be recognised in thew new camera streamer package in octopi , its works if i compile ayufans libcamera but then AF doesn’t seem to work

octopi buld here - Feedback for the latest camera-streamer based webcam stack build (20230328122604) · Issue #3 · OctoPrint/OctoPi-UpToDate (

libcamera compile i use
git clone GitHub - ayufan/camera-streamer: High-performance low-latency camera streamer for Raspberry PI’s --recursive
apt-get -y install libavformat-dev libavutil-dev libavcodec-dev libcamera-dev liblivemedia-dev v4l-utils pkg-config xxd build-essential cmake libssl-dev

cd camera-streamer/
sudo make install

pi@octopi:~ $ libcamera-still -t 5000 -n -o test.jpg
[0:01:02.158493725] [1268] INFO Camera camera_manager.cpp:299 libcamera v0.0.4+ 22-923f5d70
[0:01:02.280631954] [1269] INFO RPI raspberrypi.cpp:1476 Registered camera /bas e/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media2 and ISP device /dev/m edia0
[0:01:02.281810288] [1268] INFO Camera camera.cpp:1028 configuring streams: (0) 2328x1748-YUV420
[0:01:02.282310340] [1269] 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:01:02.307265079] [1273] WARN IPARPI raspberrypi.cpp:801 Could not set AF_MOD E - no AF algorithm
Segmentation fault
pi@octopi:~ $ uname -a
Linux octopi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux
pi@octopi:~ $ dpkg -l | grep libcamera
ii libcamera-apps-lite 0~git20230301+54a781d-1 armhf libcam era-apps-lite
ii libcamera-dev:armhf 0~git20230302+923f5d70-1 armhf comple x camera support library (development files)
ii libcamera0:armhf 0~git20230302+923f5d70-1 armhf comple x camera support library
ii python3-libcamera 0~git20230302+923f5d70-1 armhf comple x camera support library (Python 3 bindings)


Atfer 6.1.21, No longer need to use the installation script


We have fully open sourced the libcamera code:

1 Like

I use the imx519 currently completely without arducam specific software, all integrated now.
To make autofocus work currently the tuning file needs to be copied manually. With that picamera is able to execute contrast autofocus cycles only, no pdaf.
For pdaf the libcam software ist needed. I better use only contrast autofocus for stability.
Is there a schedule when pdaf is integrated upstream in libcam?


Currently in continuous communication with libcamera, but the progress is a bit slow.

Good to know about that, thank you! Just keep us updated, thx for your effort in this!

So, trying to follow this thread after being out for a few weeks. Is the new autofocus working or not? Do I have to start from a fresh Rpi install? Are there instructions somewhere to either update what I currently have working (though slow on the autofocus) or start fresh?

The autofocus in the demo video was great, would like my system to focus that fast. Has any customer been able to get their camera focusing that fast?

Also, the press release on the website was not clear. Is this working with the existing 16mp cameras I purchased some time back, or do you need to purchase a new 16mp camera?


All imx519 are supported, and the faster-focusing speed is due to changing the algorithm, which has nothing to do with the hardware.

Now that we have released it, if you want to use it, please run the installation procedure again to install a new set of software. Please make sure your kernel is above 5.15.84

So just to confirm are you saying that if we ahve a kernel greater than 6.1.21 then we no longer need to use any of teh scripts from you highlighted in the red box in the post im reposnding to ?

If we do still need some of these please can you list in a new post here exactly which bits


Yes, you can use the official version directly.

However, if you need to use the PDAF focusing algorithm, you may also need to install our libcamera library.

Is there anything in the documentation that you find unclear or need assistance with?

After Raspberry Pi Bullseye OS 6.1.21:

Before Raspberry Pi Bullseye OS 6.1.21:

HI so im using a build of octopi that uses a new camera streamer implementation from here - GitHub - ayufan/camera-streamer: High-performance low-latency camera streamer for Raspberry PI's. Out of the box the 16mp AF camera works but only with manual focus. If i run your install script, then it removes the camera-streamer setup and i must recompile it and symlink teh files

From what i can tell there are 13 commits difference between your form of libcamera and PI’s , will these be integrated do you know. If they are then the whole Octopi/camera-streamer setup should, i believe, work out of the box


Could you please let me know which script you are using and if there is any documentation available?

Sorry, no plans at the moment.

its yours from here in particular its

./ -p libcamera

that removes the camera-streamer install that comes part of the octopi build here -

so to be clear
i write this image to teh sdcard - Release OctoPi 1.0.0 with OctoPrint 1.8.7 (build 20230504122418 from branch camera-streamer) · OctoPrint/OctoPi-UpToDate · GitHub

If i leave it as it is i can get the Camera to work without AF

To get AF to work i need to run Arducams installs from Quick Start - Arducam Wiki

This removes the camera-streamer and to replace it i run teh recomplies/install from GitHub - ayufan/camera-streamer: High-performance low-latency camera streamer for Raspberry PI's and have to symlink the camera-steamer file from /usr/local/bin to /usr/bin


It shouldn’t cause any issues, but I’ll test it to confirm.


This problem does exist, but we can’t solve it, because the camera-streamer package has set the version number of the libcamera0 package it depends on to death. Users can only compile camera-streamer manually.