Request: Support IMX519 (Arcucam 16mpix)

Camera model
Arducam 16 mpix

What is the problem?

  • not working / not supported webcam

What did you already try to solve it?
Error at the kernel_driver installation step of this tutorial:

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)

pi@octopi:~ $ ./install_pivariety_pkgs.sh -p imx519_kernel_driver

Hardware Revision: 902120
Kernel Version: 5.4.79-v7+
OS Codename: buster
ARCH: armv7l

Need to delete some links... cause of 5 link limitation:

imx519_kernel_drive 100%[===================>] 3.78K --.-KB/s in 0.001s

Cannot find the corresponding package, please send the following information to
Hardware Revision: 902120
Kernel Version: 5.4.79-v7+

Additional information about your setup (OctoPrint version, OctoPi version, ...)

  • 0.18, on raspberry pi zero 2.

Arducam Support wrote me:

Unfortunately, Octoprint currently does not support IMX519,
Please use the official SD Card image flash system, for more information, please refer to:

Best Regards,

I don't see a reason why the cam shouldn't work on an OctoPi image.
Also the support is probably either mixing up OctoPi and OctoPrint (one is the image for Pis and the other is the printserver) or they didn't bother to check for it at all.

OctoPrint supports mjpeg streams from any source.

I was able to run step 1 - 5 from the guide without any issues on a fresh 0.18 image on Pi Zero 2.
I guess something went wrong wen you executed step 4. Either try it again on you current image or flash a fresh image and try it again.

pi@octopi:~ $ ./install_pivariety_pkgs.sh -p imx519_kernel_driver
=================================================
Hardware Revision: 902120
Kernel Version: 5.10.63-v7+
OS Codename: buster
ARCH: armv7l
=================================================

--2022-02-16 20:27:00--  https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/imx519_kernel_driver_links.txt
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/ac6f361a-5478-488c-9831-a842488255a8?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220216T202701Z&X-Amz-Expires=300&X-Amz-Signature=3c596811f0eabfdd3f423c38c9b1d3463dcd3ae91e6a6ac8bcb19b199c07d2d8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dimx519_kernel_driver_links.txt&response-content-type=application%2Foctet-stream [following]
--2022-02-16 20:27:01--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/ac6f361a-5478-488c-9831-a842488255a8?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220216T202701Z&X-Amz-Expires=300&X-Amz-Signature=3c596811f0eabfdd3f423c38c9b1d3463dcd3ae91e6a6ac8bcb19b199c07d2d8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dimx519_kernel_driver_links.txt&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3986 (3.9K) [application/octet-stream]
Saving to: ‘imx519_kernel_driver_links.txt’

imx519_kernel_driver_links.txt              100%[===========================================================================================>]   3.89K  --.-KB/s    in 0.001s  

2022-02-16 20:27:01 (2.78 MB/s) - ‘imx519_kernel_driver_links.txt’ saved [3986/3986]

--2022-02-16 20:27:01--  https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/Arducam_pivariety_v4l2_v1.0/imx519_v4l2.tar.gz
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/2fe2df64-a029-49b6-9cc9-06c4de948ac5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220216T202702Z&X-Amz-Expires=300&X-Amz-Signature=f8529f1e0be8eb9377a0281ba23a97a52b8a68d03bebf5160c36cfaac5612b91&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dimx519_v4l2.tar.gz&response-content-type=application%2Foctet-stream [following]
--2022-02-16 20:27:02--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/353945933/2fe2df64-a029-49b6-9cc9-06c4de948ac5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220216T202702Z&X-Amz-Expires=300&X-Amz-Signature=f8529f1e0be8eb9377a0281ba23a97a52b8a68d03bebf5160c36cfaac5612b91&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=353945933&response-content-disposition=attachment%3B%20filename%3Dimx519_v4l2.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 243938 (238K) [application/octet-stream]
Saving to: ‘imx519_v4l2.tar.gz’

imx519_v4l2.tar.gz                          100%[===========================================================================================>] 238.22K  1.31MB/s    in 0.2s    

2022-02-16 20:27:02 (1.31 MB/s) - ‘imx519_v4l2.tar.gz’ saved [243938/243938]

is kernel driver
Release/
Release/uninstall_driver.sh
Release/install_driver.sh
Release/arducam_camera_selector.sh
Release/bin/
Release/bin/5.10.46-v7+/
Release/bin/5.10.46-v7+/imx519.dtbo
Release/bin/5.10.46-v7+/ak7375.ko
Release/bin/5.10.46-v7+/imx519.ko
Release/bin/5.10.63-v7+/
Release/bin/5.10.63-v7+/imx519.dtbo
Release/bin/5.10.63-v7+/ak7375.ko
Release/bin/5.10.63-v7+/imx519.ko
Release/bin/5.10.73-v7l+/
Release/bin/5.10.73-v7l+/imx519.dtbo
Release/bin/5.10.73-v7l+/ak7375.ko
Release/bin/5.10.73-v7l+/imx519.ko
Release/bin/5.10.73-v7+/
Release/bin/5.10.73-v7+/imx519.dtbo
Release/bin/5.10.73-v7+/ak7375.ko
Release/bin/5.10.73-v7+/imx519.ko
Release/bin/5.10.46+/
Release/bin/5.10.46+/imx519.dtbo
Release/bin/5.10.46+/ak7375.ko
Release/bin/5.10.46+/imx519.ko
Release/bin/5.10.73+/
Release/bin/5.10.73+/imx519.dtbo
Release/bin/5.10.73+/ak7375.ko
Release/bin/5.10.73+/imx519.ko
Release/bin/5.10.17-v7+/
Release/bin/5.10.17-v7+/imx519.dtbo
Release/bin/5.10.17-v7+/ak7375.ko
Release/bin/5.10.17-v7+/imx519.ko
Release/bin/5.10.63+/
Release/bin/5.10.63+/imx519.dtbo
Release/bin/5.10.63+/ak7375.ko
Release/bin/5.10.63+/imx519.ko
Release/bin/5.10.92-v8+/
Release/bin/5.10.92-v8+/imx519.dtbo
Release/bin/5.10.92-v8+/ak7375.ko
Release/bin/5.10.92-v8+/imx519.ko
Release/bin/5.10.63-v8+/
Release/bin/5.10.63-v8+/imx519.dtbo
Release/bin/5.10.63-v8+/ak7375.ko
Release/bin/5.10.63-v8+/imx519.ko
Release/bin/5.10.92+/
Release/bin/5.10.92+/imx519.dtbo
Release/bin/5.10.92+/ak7375.ko
Release/bin/5.10.92+/imx519.ko
Release/bin/5.10.17-v7l+/
Release/bin/5.10.17-v7l+/imx519.dtbo
Release/bin/5.10.17-v7l+/ak7375.ko
Release/bin/5.10.17-v7l+/imx519.ko
Release/bin/5.10.17+/
Release/bin/5.10.17+/imx519.dtbo
Release/bin/5.10.17+/ak7375.ko
Release/bin/5.10.17+/imx519.ko
Release/bin/5.10.17-v8+/
Release/bin/5.10.17-v8+/imx519.dtbo
Release/bin/5.10.17-v8+/ak7375.ko
Release/bin/5.10.17-v8+/imx519.ko
Release/bin/5.10.46-v7l+/
Release/bin/5.10.46-v7l+/imx519.dtbo
Release/bin/5.10.46-v7l+/ak7375.ko
Release/bin/5.10.46-v7l+/imx519.ko
Release/bin/5.10.92-v7l+/
Release/bin/5.10.92-v7l+/imx519.dtbo
Release/bin/5.10.92-v7l+/ak7375.ko
Release/bin/5.10.92-v7l+/imx519.ko
Release/bin/5.10.92-v7+/
Release/bin/5.10.92-v7+/imx519.dtbo
Release/bin/5.10.92-v7+/ak7375.ko
Release/bin/5.10.92-v7+/imx519.ko
Release/bin/5.10.63-v7l+/
Release/bin/5.10.63-v7l+/imx519.dtbo
Release/bin/5.10.63-v7l+/ak7375.ko
Release/bin/5.10.63-v7l+/imx519.ko
Installing IMX519 and AK7375...
--------------------------------------
reboot now?(y/n):
y
reboot

I can't test the other stuff because I don't own that cam.

One difference I can see:

The different Kernel versions might make a difference?

thanks for replay and your time to help me.

my kernel version was much too old. after upgrade i pass step 4 and 5. but i cant still see any stream?

Likewise it will not work as mjpg_streamer doesnt support the format of the camera.
(Struggling myself also with the cam ......)
~/mjpg-streamer $ ./mjpg_streamer -i "input_uvc.so" /dev/video0 -o "output_http.so -p 8090"
MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: -1
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
i: The specified resolution is unavailable, using: width 1280 height 720 instead
i: Could not obtain the requested pixelformat: MJPG , driver gave us: pRAA
... will try to handle this by checking against supported formats.
Init v4L2 failed !! exit fatal
i: init_VideoIn failed

1 Like

I bought this IMX519 in order to use it with Octoprint too ... I have the same error as @3D_Druckerplausch

Is the IMX519 similar to the IMX559? There's a request to add support for the IMX559 to the camera settings plugin, so I would think someone has gotten it working with OctoPrint.

it's not about the control it's about grabbing the image and put it into a stream.
The Git request is about control as far as i can see

Understood, but anyone using my plugin has already setup the stream. There'd be absolutely no point otherwise.

edit: to be even clearer: the fact that someone is requesting me to add the controls to my plugins means they've probably gotten it working with mjpg-streamer or some sort of streamer program.

As far as i figured out the whole Raspicam ist not applicable on the IMX519 it comes with it's own thing and mjpg_streamer & uStreamer cant handle the format provided by the cam.
pi@ratos:~/mjpg-streamer $ v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

    [0]: 'pRAA' (10-bit Bayer RGRG/GBGB Packed)
            Size: Discrete 4656x3496
            Size: Discrete 3840x2160
            Size: Discrete 2328x1748
            Size: Discrete 1920x1080
            Size: Discrete 1280x720
    [1]: 'RG10' (10-bit Bayer RGRG/GBGB)
            Size: Discrete 4656x3496
            Size: Discrete 3840x2160
            Size: Discrete 2328x1748
            Size: Discrete 1920x1080
            Size: Discrete 1280x720

And also uStreamer reports:
-- INFO [70915.239 stream] -- Device fd=8 opened
-- INFO [70915.239 stream] -- Using input channel: 0
-- INFO [70915.239 stream] -- Using resolution: 1280x720
-- ERROR [70915.239 stream] -- Could not obtain the requested pixelformat=MJPEG; driver gave us unsupported
-- ERROR [70915.239 stream] -- Unsupported pixelformat=pRAA (fourcc)
-- INFO [70915.239 stream] -- Device fd=8 closed
-- INFO [70915.239 stream] -- Sleeping 1 seconds before new stream init ...

There is not enough info about this cam yet since it's quite new and except of the provided tools there is not much info (yet)

Seems like you have to convert one of those formats to mjpeg.

You can try to do that with ffmpeg - which can also be the mjpeg server.

This guide should help you with the basic setup

But unfortunately I can't really help you with the conversion since I can't test it.

You should start with

sudo systemctl disable webcamd.service 

to disable the mjpeg-streamer autostart. Otherwise it might interfere with other stuff you're testing.

Getting a bit further now i can create an RTSP stream with their patched Raspivid called Libcamera-vid.
Still have to figure out to get an Mjpeg stream altough .....
libcamera-vid -o - -t 0 -n | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264

1 Like

Getting more close :slight_smile: .... but still bounces on an error:
libcamera-vid -o - -t 0 -n | ./ustreamer --device=/dev/stdin --format=MJPEG --host=0.0.0.0 -p 8081 -r 1280x720 -c hw

Gives the uStream error:
-- INFO [82548.184 stream] -- Device fd=8 opened
-- ERROR [82548.184 stream] -- Can't query device (VIDIOC_QUERYCAP): Inappropriate ioctl for device
-- INFO [82548.184 stream] -- Device fd=8 closed
-- INFO [82548.184 stream] -- Sleeping 1 seconds before new stream init ...

1 Like

So, having a RPiZ2W and this IMX519 camera via HDMI extension lead me down a path that leads me to believe that I may have backed a Kickstarter that didn't quite deliver. Effectively, they released a bare minimum product, fixing in post, relying on the community, yada, yada.

From all the information I have found there are currently some issues with the /dev/video1X devices (which are interfaces to do "GPU accelerated" video conversion such as one might want to use with a camera that doesn't have MJPEG "built in") on this version of the Pi that haven't quite been worked out by the normal libcamera-X softwares, much less the Arducam fork. Given the depreciation of OMX/Raspicam for m2m/v4l2/libcamera in general coupled with the shift to 64 bit compatibility it seems there's a lot of work being done and not everything is fully shifted over. We may all have to be patient or lend a hand with development.

I had sent a feature request in for the camera controls because eventually this seems it will be ironed out with an MJPEG option available, but I don't think it's any responsibility of Octoprint.

I've tried several software to get a stream running without resorting to ffmpeg in the hopes that I can find the most efficient method including the alternate branch of ustreamer that is implementing m2m (GitHub - pikvm/ustreamer at m2m) that I hoped may have resolved some issues for me, but nothing has panned out so far. I can now take some rather impressive photos without throwing errors. I haven't gotten to finishing this as I'm working on 3 Pi related camera projects currently. Ffmpeg was actually the route I was going to take next since it seems unlikely that I can use ustreamer raw sink options to stream a currently recording file given the status of the Arducam fork of libcamera.

3 Likes

Hi,

it seems we are looking for the same thing. I tried to get the imx519 running with ffmpeg for a few days now, still with no positive result. First I used the Zero 2 W, now testing on a RPi 3. There is also a thread regarding this in the Arducam forum:

Please share if you have any kind of success!

Best regards,

1024kilobyte

Being very much a novice I came across this topic in my attempt to get the Arducam IMx519 to work with my Octoprint setup. I bought the Arducam because I thought it would give me a better picture than the one I get from the basic Rasberry Pi cam I have had for a long time.
I did manage to get it working with an older version of Octopi on an older Rasberry Pi 3 but it would appear not to work with the latter version of Octopi.
trying to follow the setup procedure from Arducam everything seems to be OK until I check Video device (ls /dev/video*) and do not see /dev/video0 or /dev/video1.
I am afraid I have reached the limit of my understanding so have I wasted my time getting the camera?

You probably need to install the new 1.0.0rc2 of the octopi image and use the arducam hacked mjpgstreamer replacement for libcamera input.

Thanks for the info, I have used the new1.0.0rc2 of the octopi image and followed the setup from Arducam. I can now see the camera srteam. I still have little control over the camera, ie the flip vertical and horizontal does not work and focus is not so easy. I am afraid I am not sure how to "use the arducam hacked mjpgstreamer replacement for libcamera input." or how to get it. I am afraid my knowledge of this is very limited.

Step 4 of this guide?

After too many failed attempts I have managed to get my Arducam IMxX519 to work, I did however gain some knowledge along the way! I still have a problem with the "Camera Settings" plugin, I am unable to get the horizontal and vertical flip to work. They work OK with a setup using a standard Pi Camera but not with the Arducam. A work around I found was to use the settings in the Webcam and Timelapse OctoPrint settings. This 'flipped the picture in the webcam view but not in the Finished Timelapse recordings.
The focus setting cannot be saved, it is resetting to '0' when the Octoprint Raspberry Pi is rebooted.