Apologies, this isn’t working for me - please be patient with my level of technical knowledge! Thanks.
I clicked the patch file link, saved the contents to ‘/home/pi/arducam_patch_001.patch’, then ‘sudo chmod 777 arducam_patch_001.patch’, then ‘patch -p1 -i /home/pi/arducam_patch_001.patch’ (and tried ‘sudo patch -p1 -i /home/pi/arducam_patch_001.patch’). This is what I see:
$ patch -p1 -i /home/pi/arducam_patch_001.patch
can’t find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
patching file /home/pi/arducam_patch_001.patch
Hunk #1 FAILED at 181.
1 out of 1 hunk FAILED – saving rejects to file /home/pi/arducam_patch_001.patch.rej
can’t find file to patch at input line 22
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
and ‘make -j4’ needsa to be ‘-j1’ (also the memory swap file needs upping to 1Gb). There are other changes - see the RPi instructions.
The main point though, is that’s the procedure I followed (i.e. I followed the RPi instructions) and that’s how I’ve ended up with a conflict where the Arducam autofocus no longer works.
Cheers
The impotent part is that I have a version with the patches already applied and it compiled fine on my RPi4.
To get that you have to use git clone https://github.com/supertobi/libcamera-apps.git
and not git clone https://github.com/raspberrypi/libcamera-apps.git
And yes, it would me much nicer, if arducam could provide up to date deb files, or get the changes merged into the official version.
Thanks for this. I’ll try starting from scratch again and this time will do as you suggest - ‘supertobi’, not ‘raspberrypi’ in the git clone. Assuming that works, the last part I’m after is date/time format directives in the annotate_cv_stage, as per this:
Do you have any thoughts on this? I see davidplowman (RPi engineer who kindly agreed the need for the new directives) is doing stuff on supertobi github too and wondered how one ‘lobbies’ for updates?
Thanks
No, davidplowman does not do stuff on my fork, but in the main branche. But I just merged the changes from davidplowman into my fork. I haven’t tested if it still builds, but I see no reason why it should not.
Thank you very much - post processing and autofocus now working together. Re the annotate_cv-stage date/time format directives, presume that’s an ‘as and when’ job for the RPi engineers. The only other issue is with libcamera-vid cpu usage gradually increasing to 100% - compared to raspivid, libcamera-vid might be more powerful but it’s not simple to use! Thanks again.
EDIT: I’m not very good at reading the github web pages and can now see that the annotate_cv-stage date/time format directives are available - thanks to whoever did that!
Hey all – I’m running the new 64MP autofocus camera with a pi4. I use the pi for a host of things at work but realized I could replace my old dashcam with this pi since it has nothing better to do when I’m not using it. I’ve been trying to make sense of how exactly to get the date/time on my videos (I’m not streaming, just recording straight to video via libcamera and then converting with mkvmerge via a bash script).
So it looks like the annotate_cv is the way to go, and based on my googling @oldgit you’ve been the spearhead of getting this working for your swallow cam. I’m even more of an amateur than you, lol.
So two things – I assume that @supertobi 's fork did the trick for getting that to work, because as best I can tell this far the arducam version of libcamera doesn’t seem to support the annotate_cv (admittedly I could be doing something wrong – it also seems to not have libav as an option for codec, but with the rpi certain, as you’ve both discussed here, the autofocus controls are missing).
The other thing is that arducam, within the last week or so, has further updated their version to include the option to set the focus at a fixed distance using --afmode to set the autofocus mode (auto/continuous/manual) and --manualfocus to set the specific value for the focus. @supertobi does your fork automatically pull these updates?
I’d greatly appreciate any help you all could offer!
No, do you know if this patches are somewhere available? @wong any hints?
What I do is to update from time to time my fork to keep it up to date with the latest libcamera-apps version. That is something I think arducam could/should do. So I’m doing there job for free.
I’m really annoyed about arducam that they:
don’t try harder to push there patches upstream. (Or if they do don’t talk about it.)
don’t have at least there own up-to-date public fork, but only provide patches from time to time.
don’t publish status updates here in the forum.
If they don’t improve how they work together with the upstream project they are just a electronic scrap producing company. And that is really sad because the hardware is nice.
In this thread is mentioned that 0.0.10 has the manual focus settings.
I only noticed the changes in the settings because it might attempt to get libav working, I tried installing the raspberry pi version of lib camera, but obviously that messed up the auto focus settings. But when I went back, the previous settings that I had for auto focus didn’t work, because they changed the parameters in the new version. --autofocus and --continue-autofocus don’t work with .10, but unless I miss something I didn’t say anything about this change in the official documentation.
We will create a new repository to manage this, please wait a moment, it won’t be long.
Unless there is a special usage, all our updates are pulled from the official previous commits, which are guaranteed to be the latest. We will also add relevant update instructions in the new repository.
If you have a better suggestion, you can also tell me.I’ll reply on this thread when I’m done.
Even better is of course to bring your patches upstream. Then there would be no need for any special repository. (In the long run less work for everyone.)
I was able to get annotate_cv.json working by building libcamera in the directory per @supertobi’s recommendations (and installing all the dependencies/prerequisites/opencv per the instructions, and then copying ‘libpost_processing_stages.so’ into /usr/local/lib and /usr/local/aarch64-linux-gnu, overwriting the existing one, so it works with the installed arducam libcameraapps. That’s really all I need for my purposes as I’m not streaming, just saving to video. Thanks for the help.
I would like to apologize for you first. Because of the work transfer, I gave the job of replying to the forum to a new colleague, which caused me to forget to reply to your message. Sorry again.
I submitted a new patch a long time ago. Because I am currently developing a high-priority project, the independent opening of a warehouse has been put on hold, please understand.
I’ll still add this to my to-do list and work on it when I update libcamera in the future.
It is worth reminding, because we are worried that users’ information will not be replied in time, so we will make a backend to monitor the system on the forum, but we will not retrieve the resolved posts. This thread has been resolved. If you still have problems later, you can open a new thread for discussion.