Request: Support IMX519 (Arcucam 16mpix)

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.

These cameras require using the Arducam Camera Control plugin to control focus because it's not using standard v4l drivers I think for controlling the mechanical focus which is what the camera settings plugin requires. It's similar to my older generation lower resolution arducam autofocus camera.

I have tried the Arducam Camera control plugins but they do not work with my IMX519., unable to adjust the focus.
The Camera Settings plugin does adjust the focus but I am unable to save the required setting, it resets to 0 if the system is restarted. The horizontal and vertical flip function does not work.
I don't know if the Arducam Control plugins would work with the more expensive " 64MP Hawk-eye Autofocus Camera Module for Raspberry Pi" but as it is quite a lot more expensive than the IMX519 I am not sure I want to buy one without knowing if it will work.
I don't seem to be able to find any more information about my camera being used with octoprint.

Did you save the preset in the camera settings plugin and set it as startup?

It could also be a limitation based on the FAQ.

Do you find any way to this camera working ?? i try all of this but nothing, have somebody step by step guide for Arducam 16mpx please? ,..