Closed bryn51 closed 2 years ago
I have the exact same problem. Only workaround I have fond so far is to use prebuild image with Arducam 16MP AF support. Only bad thing about it is that it's older build from January so it's not the latest OctoPi nightly. But you can update OctoPi later from UI or SSH. https://forum.arducam.com/t/aufocus-camera-with-octoprint-on-pi-zero/2558/3
I ran into the same issue too. This looks like it's due to a bug in libcamera that was just fixed.
However, until the fix is released, this can be addressed by updating plugins/input_libcamera/input_libcamera.cpp
line 259 from
controls_.set(controls::FrameDurationLimits, { frame_time, frame_time });
to
controls_.set(controls::FrameDurationLimits, Span<const int64_t, 2>({ frame_time, frame_time }));
I've also pushed this change to my own fork: khenriks/mjpg-streamer.
I managed to find another workaround before the fix is released. If you downgrade your libcamera-dev and libcamera-apps to version 0.0.7 then the mjpg-streamer will compile. Versions 0.0.8 and 0.0.9 won't work.
Thanks guys for responding. At least I now know "it's not just me"!
I'll look into a) precompiled version of input-libcamera.so and b) going back a version to 0.0.7 c) see if a simple edit to the source file to implement the code fix can stick.
And see which works.
(c) is the first one to try, because it has less moving parts and addresses the root cause (judging from the analysis provided by the guy that fixed it). I know how to copy code. And I have GitKraken.
It's a good thing he found it because it's not something within my skillset. I am old time C++ and templates are out of scope 4 me.
Later it may be possible to upgrade, and get the fix in released code. I can move on without the need to buy another camera.
Cheers!
@khenriks FYYI, I manually made the changes in the fix you mentioned, and recompiled for mjpg-streamer-libcamera.
The following results (it worked to fix the issue).
Scanning dependencies of target input_libcamera make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build' make[3]: Entering directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build' [ 55%] Building CXX object plugins/input_libcamera/CMakeFiles/input_libcamera.dir/input_libcamera.cpp.o [ 59%] Building CXX object plugins/input_libcamera/CMakeFiles/input_libcamera.dir/LibCamera.cpp.o [ 62%] Building C object plugins/input_libcamera/CMakeFiles/input_libcamera.dir/jpeg_utils.c.o [ 66%] Linking CXX shared library input_libcamera.so make[3]: Leaving directory '/home/pi/mjpg-streamer-libcamera/mjpg-streamer-experimental/_build' [ 66%] Built target input_libcamera
In fact the overall build got to the end without any further errors. I'll proceed to test the thing, but I'm happy progress was made, and thanks to you for spotting the fix.
I have the exact same problem. Only workaround I have fond so far is to use prebuild image with Arducam 16MP AF support. Only bad thing about it is that it's older build from January so it's not the latest OctoPi nightly. But you can update OctoPi later from UI or SSH. https://forum.arducam.com/t/aufocus-camera-with-octoprint-on-pi-zero/2558/3
The fix suggested by @khenriks was effective.
I ran into the same issue too. This looks like it's due to a bug in libcamera that was just fixed.
However, until the fix is released, this can be addressed by updating
plugins/input_libcamera/input_libcamera.cpp
line 259 fromcontrols_.set(controls::FrameDurationLimits, { frame_time, frame_time });
to
controls_.set(controls::FrameDurationLimits, Span<const int64_t, 2>({ frame_time, frame_time }));
I've also pushed this change to my own fork: khenriks/mjpg-streamer.
Thanks for this! Glad it's been resolved by libcamera
This was now fixed in https://github.com/ArduCAM/mjpg-streamer/commit/a35c442a605f65444c01eb054656ed4a180c7cae mjpg-streamer will compile with libcamera 0.0.9.
Yes. I verified the fix for mjpg_libcamera build (related to Arducam camera)
I applied the 3 changed lines of code to the controls.h on my system and input_libcamera.so now compiles correctly.
And the input_libcamera.so does its job too, The video image is acquired and passed through to Octoprint application.
OK, I have Raspberry Pi 4B/8GB, which boots into Octopi based on latest nightly Build Raspian 11 / 64 Bit version.
whilst attempting to run the make for: mjpg-streamer-libcamera, one of the tasks is to build input_libcamera.so, essential to he overall role of this software to get video from the camera and stream it to http.
this is the output of the make:(partial, where the errors begin).
==========
Clearly the make doesnt like 'controls.h' which is part of the libcamera installation. I know insufficient about this environment to further anlayse, but clearly its causing enough of a problem to stop the process. And without this my Arducam 16MP AF device cannot 'work' to do its job to provide vision into the octoprint application. So, this is all supposed to work. Please can someone point me to a stable version that works so I can move onward. Or just fix this issue. I have posted this same Issue onto the libcamera git.