#Raspberry Camera Module 3 support?
2817 messages Β· Page 3 of 3 (latest)
Why did you install it manually??
mmmh i think it's because i saw that it was an issue in one of the logs and tried to install it to resolve it
It could be fine but it also could break everything ^^
Can you try a fresh installation real quick?
yes
You don't have to send the crowsnest.log again π
Was just to confirm that it takes the correct device but that should be the case all the time now
just in case π
it's fine if i just change SD card ? don't have to backup things ?
If you have another sdcard just use that
yeap
As long as you don't delete the old one you shouldn't need to backup anything
i had a backup anyway, but i just backup all again
When i'll boot on it, what do you want me to do ? install spyglass ?
Just download spyglass and run it.
No need to install
If it's MainsailOS make sure to follow the pinned message
Good to know π
Then slowly start to install everything else you had
and see at what step it starts to fail
ok thank you !
I bet it's the typical behaviour like always and it just works now somehow
So maybe just a bad libcamera installation
Setup crowsnest
yes but i put like 8081 in port ? and webcam2 on url like always ?
or reverse and i set spyglass on 8081
Yes, you just have to use separate ports for both cams and the correct /webcam url
Doesn't matter what cam has which port
ok so spyglass take a /webcam "slot" so it's still webcam2,3,4
Not directly. Mainsail is binding the ports 8080, 8081, 8082,.... onto /webcam, /webcam2, /webcam3,....
oh it's mainsail the main thing ok !
so no problem !
and i was wondering, is it possible to setup multiple cam with spyglass ? like crowsnest, the .conf layout is a no for me but maybe there is another way
Atm, no. Maybe we will support it in the feature but I don't think so, as we are using the picamera2 module that doesn't have good support for usb cams.
If you connect a second raspi cam, we can talk about supporting it π
ahah ok cool ! π
mmmh i should find a way to connect a second oneπ
We already got an add_usbcam_support branch but that one is pretty early and we don't have that much time atm to work on that. The hardest thing on that is the fps limitation as we can't set it with picamera2 and the cam just go as fast as it can. Also this only support cams with onboard H264 encoder as picamera2 only supports those.
And we didn't see any benefit to add support for that as we only have one known issue yet that made a cam unusable somehow with camera_auto_detect=1 but that was pretty early in development and I think that problem got resolved by now.
So this branch is more just a proof of concept.
oooh yes i see ! you should work with Crowsnest, but i already that was the case :p
We are trying our best to get integrated into crowsnest. There shouldn't be that much hurdles left but we don't have time atm to fix that last few pieces.
Also there is already another project with v3 support currently getting into crowsnest already on the develop branch but as that is written in c, you have to compile it manually and it take some time to do so. Also that crowsnest branch isn't supported atm so you would be on your own.
oh i see ok, just a matter of time, yes...
by the way thank you for your time !
And gooood news, i think i just encounter the guilty :p
when i put display_lcd_rotate=2 dtoverlay=rpi-ft5406,touchscreen-inverted-x=1,touchscreen-inverted-y=1
and reboot the webcam doesn't work
I already thought that ^^
yes !
Try to use only dtoverlay=rpi-ft5406
Remove the display_lcd_rotate=2 and ,touchscreen-inverted-x=1,touchscreen-inverted-y=1
yes i try !
it's that one !
webcam off with that
Can you send me a link to the exact display and the tutorial you followed for that?
And maybe try to comment out the camera_auto_detect=1 and add instead dtoverlay=imx708
I hate it if tutorials don't explain the settings they are changing. It's sometimes hard to find anything about the raspi drivers
But they could still provide some more informations that the customer can learn something.
Does the screen work without the dtoverlay=rpi-ft5406?
yeah they add the screen in their kit like 3 months ago, and i think it was a recurring question
just rebooted, nope
mmh i mean the screen works but not the cam
Wait what?!
ahahah
WTF
Did you made these changes?
So after you added it once your camera breaks from now on even after deleting it?
and add an hashtag to camera_auto_detect
Then revert those changes again and reboot
Can you send your /boot/config.txt again?
I will try the changes on my printer too even without the screen to maybe reproduce it on my end
wait something's wrong on my side π
i forgot to delete dtoverlay=rpi-ft5406facepalm
π€¦ββοΈ
i retry π
You can still revert those changes if you want, shouldn't make any difference
yeah i retry this
yes doesn't work either
cam off, screen ok
Can you send your /boot/config.txt?
yes trying something before
i still had #dtoverlay=vc4-kms-v3d ....that's why cam wasn't working, too much thing, hahah
OK ! I can now confirm that it works with that
screen=ok (but flipped), cam=ok
Can you send the /boot/config.txt that I can see what you exactly have now?
Then try to add display_lcd_rotate=2
Yes
nope ...
So it didn't rotate the screen?
nope, webcam still good
Try to change the dtoverlay=vc4-kms-v3d to dtoverlay=vc4-fkms-v3d with the display_lcd_rotate=2 still in place. This might crash the cam but could lead to rotation
Tell me π
π’
i did: dtoverlay=imx708,touchscreen-inverted-x=1,touchscreen-inverted-y=1
but touch screen doesn't work either, but screen is flipped
i try you thing
doesn't work π
for both ! screen and cam
Then you might have to open an issue on https://github.com/raspberrypi/picamera2
You can tell them that you are using https://github.com/roamingthings/spyglass that is using picamera2 and that you need to add dtoverlay=rpi-ft5406 to your /boot/config.txt that your touchscreen is working correctly but that will break the camera.
Then give them the output of either spyglass or libcamera-hello
Maybe they can help you to troubleshoot that further and maybe find a solution or direct you to the correct destination for the problem.
If they want you to redirect you to us again, you can say that you already troubleshooted with us as far as possible
Thank you i'll do !
i found someone with kinda the same thing https://github.com/raspberrypi/picamera2/issues/282
Nope, it shouldn't be the same
oh yes, he has a dt overlay but it's fkms
Yes, your problem is specific to the rpi-ft5406 driver.
Found something on the vc4-fkms-v3d problem too π
Can you run pip show picamera2?
Maybe it's the same problem
Then it shouldn't be the case
for what ?
That it's the same problem as with an older vc4-fkms-v3d bug
oh yeah yeah
That bug got patched in version 0.3.5
wow wow wow, cam wasn't working after changing config.txt, it was just dtoverlay=vc4-fkms-v3d which is "KMS" not "FKMS"...
just something ahah π
If you are responding to the bug thing, yeah I know but it was still possible that there was maybe a similar bug causing the same problem
for my case yeah
Tbh the whole kernel/libcamera is a mess right now. In kernel 6.1 something that produces a green line at bottom in camera-streamer with some cameras. Rootcause is implementation of the ISPs... So, hard to say but cureently I dont like Raspbian...
Found a way: https://klipperscreen.readthedocs.io/en/latest/Hardware/#hardware-known-to-work
I'm working on it, but i already could rotate by 90 !
KlipperScreen documentation.
Klipperscreen just that simple π
ok it's working !!! omg. it's just on klipperscreen side but, it's enough.
i opened a bug issue on picamera2 by the way.
And again, thank you for your time !
I'm happy that it's working now. Hopefully they can identify the problem with the rpi-ft5406 driver.
hoepfully yeah !
oups another issue, was reinstalling al my thing, then my c922 didn't work, and notice that crowsnest was not available has service on the power on/off button upper right. so i reinstall it, but now cam V3 is gone again
run dmesg
Can you send your /boot/config.txt as well
You've got no more uncommented camera_auto_detect=1
crowsnest
ok
good cam on again, but then i don't know how to add c922 without having control on device id with spyglass... because unicam is in 2-3 and c922 is 0-1, i can control via crowsnest but not sypglass...
Use /dev/v4l/by-id/usb-046d_C922_Pro_Stream_Webcam_C42658AF-video-index0
it will be 0 no ?
For crowsnest you should use /dev/v4l/by-id/usb-046d_C922_Pro_Stream_Webcam_C42658AF-video-index0
because in crowsnest i can tell him which device is CAM1,2,3...
It's taking the first camera shown by libcamera-hello --list-cameras
oh yeah and it doesn't see USB cam right ?
As long as you don't find a usb cam using libcamera, I won't add choose device support
Yes
don't think so
yeah π , but i can't have it to display ... it seems crownest service is gone everytime
systemctl status crowsnest
oh wait i resinstall it clean
oh here we go π
via kiauh it doesn't work, but manually with sudo systemctl stop crowsnest.service cd ~/crowsnest make buildclean make build sudo systemctl start crowsnest.service
Like they stated it works
But in service control it's not here...
oh by the way, is there a way to have spyglass here too ?
Weird that it's not there.
About the spyglass integration I don't know either
after restart still not..
ok
i found something, it works when i install it, but as soon as i reboot, c922 is gone π
Can you open another post in #1036329187771957269 for that crowsnest issue? That someone else can help you on that
Open for that a post in #1036329187771957269 too, as it's another issue with crowsnest
Don't forget the camera_auto_detect
And make sure you have different ports for both cams
finally it works even after reboots. ahah
last thing, what are the parameters like crowsnest "v4l2ctl" ? and where to put them ?
got a new pi cam 3 and it does not work, too.... just no camera found... tried some cables... was from another shop... really annoying
but i didnt need a pi cam 2? just for clarification.... because i only habe a pi v3
Do you have another Pi? Maybe your Pi is damaged.
You could send the output of dmesg too. Maybe somethings there
Ok, no other pi then right?
no, no other pi... i am not a millionaire...
Can you send the output of dmesg?
And can you send a picture of how you have connected the module to the pi?
Wrong port.......
omg it was there in ssh.... then changed the cable and its gone... changed cable back and its gone... changed again, gone...
You are orientating the cable correctly? Not that you now accidentally flipped the cable ^^
now it works.... set up in klipper... just have to switch the cable for placing it in chamber...
it is somehow funny... i had like 4-5 pis already in the past... and lots of different pi cams.... and printed lots of cases for the pis with their cams.... and now i put this cable always in the wrong port.... and when you ask me for a photo, i do a photo, look at the photo and thought "there is a 2nd port, i think i put it always in the wrong port"....
it works yeah
ok a few questions... in webcam settings, i have to use /webcam/stream to show the cam... and in mobileraker there is no stream for the cam... in spyglass.cfg (do i have to include this somewhere?) i uncommented the /?action=stream but this changes nothing i think
You don't have to include the spyglass.conf anywhere. If you uncomment /?action=stream, you have to comment /stream afterwards that it takes the new one.
Mine is working on Mobileraker without any problems. Can you test it in your Smartphone Browser? (<ip-pi>:<port><url>, e.g. 192.168.0.20:8080/stream)
ah forgot to restart the service after changes
now it works in app from outside my lan
perfect
thank you
maybe update the tutorial with "check the port twice for camera cable" for the most dumb people like me π
Maybe ^^
But I should have asked for that the last time already ^^
I'm having issues trying to install spyglass. I have installed libcamera but when i try to run the script i get the following pi@printerpi:~/spyglass $ ./run.py -st /?action=stream -sn /?action=snapshot
Traceback (most recent call last):
File "./run.py", line 3, in <module>
from spyglass.cli import main
File "/home/pi/spyglass/spyglass/cli.py", line 10, in <module>
import libcamera
ModuleNotFoundError: No module named 'libcamera'
Am i missing something?
What os are you using? libcamera should be already installed in Bullseye and newer versions and we can only support Bullseye. Send the output of cat /etc/os-release
This error sounds like a python error and it sounds like libcamera isn't installed. Send the output of libcamera-hello
Even if you get libcamera running on a Buster OS, afaik there is no driver support for the module v3 on Buster images unless you build one yourself.
It's a buster version, I built the os using the mainsail os on the raspberry pi launcher. Would I need to do a fresh install or is there a way to update buster to bullseye?
There is a way but you have to make a fresh install sry for that. Manually updating doesn't install everything correct so it would be just a waste of time with maybe no result at the end.
How old is this installation if it's still Buster?
Nvm just realized that the MainsailOS Bullseye release was just at the end of last year
So it would be best to just use vanilla raspberry os and run kiluah?
No, you can still use MainsailOS. Like written in my last message there is a MainsailOS Bullseye release since the end of last year.
vanilla raspberry os with kiauh will just take longer than MainsailOS to setup everything
After installing MainsailOS you should read the pinned messages. Don't use raspi-config to deactivate legacy camera stack!!!!!
Ok so just fresh install mainsailos and use the pinned messages. Got it.
Didn't see the second message about the question with the v4l2-ctl we don't have the support merged on the main branch yet. The branch is called expand_camera_control_ability and offers the same possibilities as crowsnest and even live changing some of the parameters, like brightness or lens position.
oh ok thanks that's cool !
Also, picamera2 has replied to my issue post, this is not on their side.
Ok, good to know π
i reflashed my image and i am using raspberri pi os lite 64 bit.
i am now having a different error that may be fixable.
Do you have any time to troubleshoot?
Just change your url inside the spyglass.conf to the commented values inside the config. You can access it on the config section inside Mainsail or ~/printer_data/config/spyglass.conf. Then restart spyglass service with systemctl restart spyglass.
Alternative would be to change your urls used inside Mainsail to /webcam/stream and /webcam/snapshot.
The resource busy error just means the camera is already used by something else. In this case it would be spyglass. I'm wondering why it's working now
It is now working! thanks so much.
the only difference now is I didnt use mainsail OS 1.1.1.
I used raspi os lite 64 bit and kiuah and installed everything through that.
i first did klipper, moonraker, mainsail, klipperscreen, crowsnest, timelapse.
Then i decided to try this camera again and followed the pinned post and it worked.
Was your MainsailOS installation 32 or 64 bit?
I believe the first time i tried it was a 64 bit
when i tried a fresh install it was 32
my pi is a 3b v1.2
so excited to have it working btw. thanks so much for what you guys did with this project
If I get some time I will test around a bit with my pi3 and pi4, maybe I can replicate that issue. My guess would be something with 32bit but that wouldn't make any sense.
It doesnt make any sense that rpi is using v8+ kernel with 32bit userland, but they do.... Dont ask for things making any sense π€£
one odd thing I noticed is that when closed out of my SSH session, the camera would stop working. Only worked when i had SSH enabled.
Thats mormal behavior, therefor the service exist. Every command you are running will stop if you disconnect from ssh. Because your shell exits.
Is there something on the v4l-ctl flags that can be passed to hopefully make my camera look less worse?
As we don't know how your camera looks, the answer is maybe
Here's the image if you want, but I was mainly looking for something about the v4l flags that can be passed
You have hdr activated right?
it's a pi camera 3. I'm thinking I might have HDR enabled, but the crowsnest.conf doesn't have that listed
So you are using the dev branch of crowsnest?
But there is no such option anyway. You have to manually enable/disable it
There is a command but I have to seach for it first
is there a file other than crowsnest.conf that the command would be in?
crowsnest
Disable HDR with v4l2-ctl --set-ctrl wide_dynamic_range=0 -d /dev/v4l-subdev0
i don't think I have both, just the one
Was just wondering as the support of the v3 is still on the develop branch for crowsnest.
Could be something else as /dev/v4lsubdev0
After that restart crowsnest
i thought it was made for the pi cam 3. anyways, it turns out I'm on master. I should checkout develop?
The master branch isn't working with the v3
So you are using spyglass ig
yes. I got the two mixed up
crowsnest is the default way to stream your camera for mainsail. crowsnest doesn't support v3 yet. There comes spyglass to fill this gap
i have both on this pi
If you don't use any other cam on that pi. I would suggest to disable crowsnest with systemctl disable crowsnest
do I have to do anything in klipper configs after?
Nope.
To reenable it later you can use systemctl enable crowsnest
So back to your original problem. Stop spyglass with systemctl stop spyglass then run v4l2-ctl --set-ctrl wide_dynamic_range=0 -d /dev/v4l-subdev0 and then start spyglass with systemctl start spyglass
I guess HDR would never look good on this anyway
The problem is that it takes 4 pixels to create one subpixel
so your resolution gets divided by 4
Also there is no tuned config yet so it just produces bad results
and in the UI, that should be listed as UV4L-MJPEG?
What do you mean exactly?
You can access the stream with either UV4L-MJPEG or just MJPEG
Adaptive will be supported as soon as we hear back from the guy who created the PR for better URL parsing or as soon as I get some time to finish/fix it myself
the UV4L one is the only one that shows a picture
I also apparently have a Spyglass.conf file in my machine settings
Can you send your spyglass.conf? I think I had that once too but I can't remember why anymore
That's the config for the spyglass service that starts with your device
#### spyglass - Picamera2 MJPG Streamer
####
#### https://github.com/roamingthings/spyglass
####
#### This File is distributed under GPLv3
####
#### NOTE: Please ensure parameters are in capital letters and values in lowercase!
#### NOTE: Values has to be surrounded by double quotes! ("value")
#### NOTE: If commented out or includes typos it will use hardcoded defaults!
#### Running Spyglass with proxy or Standalone (BOOL)[default: true]
NO_PROXY="true"
#### HTTP Port to listen on (INTEGER)[default: 8080]
HTTP_PORT="8080"
#### Resolution (INTEGERxINTEGER)[default: 640x480]
RESOLUTION="1920x1080"
#### NOTE: the maximum supported resolution is 1920x1920 (recommended maximum 1920x1080)
#### Frames per second (INTEGER)[default: 15]
FPS="15"
#### Stream URL (STRING)[default: /stream]
##STREAM_URL="/stream"
#### NOTE: use format as shown below to stay MJPG-Streamer URL compatible
STREAM_URL="/?action=stream"
#### Snapshot URL (STRING)[default: /snapshot]
#SNAPSHOT_URL="/snapshot"
#### NOTE: use format as shown below to stay MJPG-Streamer URL compatible
SNAPSHOT_URL="/?action=snapshot"
#### Autofocus behavior (STRING:manual,continuous)[default: continuous]
AUTO_FOCUS="continuous"
#### Focal Distance (float:0.0)[default: 0.0]
#### NOTE: Set focal distance. 0 for infinite focus, 0.5 for approximate 50cm.
#### Only used with Autofocus manual
FOCAL_DIST="0.0"
#### Auto Focus Speed (STRING:normal,fast)[default: normal]
#### NOTE: Autofocus speed. Supported values: normal, fast.
#### Only used with Autofocus continuous
AF_SPEED="normal"
sorry, I forgot how to send a collapsed text snippet
I pulled the latest from main while we were talking, but I had not updated the config file
without. /?action=stream
/webcam/?action=stream would be correct
So just /webcam/?action=stream
nothing else
Then you can use the normal MJPEG
Can you send a screenshot of your mainsail webcam settings?
setting the url to http://klipper.local:8080/webcam/?action=stream shows the same thing
Only /webcam/?action=stream nothing before or after
shows the same image?
And uv4l-mjpeg does show you an image?
I get the same thing changing the url. uv4l-mjpeg shows me the image with the full url and just the parameter one you posted
How do you access the mainsail ui?
There was something similar earlier in this thread
so that gets me a video feed from the mjpeg-stream, however, it still appears as if the HDR stuff is on
I don't know how all that exactly works but it does have to do something with how you access the Web-UI and I gues your 81 port could mess something up
Did v4l2-ctl --set-ctrl wide_dynamic_range=0 -d /dev/v4l-subdev0 give any output?
or maybe reboot after changing it once
no output
Sry I can't remember anymore hoo to exactly enable or disable it and I can't try it right now. Here you can read for yourself: https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf
ok
That's the only thing about HDR in the manual
do you know how to stop that picamera2 service, or should that be stopped when spyglass is stopped?
That stops if spyglass is stopped
It's already a bit late for me. I will go to bed now. I can try it tomorrow and let you know how exactly it is done
ok, thank you
It's a bit weird and annoying to disable it again. First stop spyglass then run v4l2-ctl --set-ctrl wide_dynamic_range=0 -d /dev/v4l-subdev0. Then without starting anything directly reboot your pi. After that it worked again for me
Hi. I am trying to find a solution to the problem i have attaching two cameras to Raspberry Pi 4 with 4GB. i have attached my crowsnest configuration and the mainsail configuration for the two cameras. my issue that only one camera is showing at one time. i cannot get both of them working at the same time and i have no idea why. If anyone knows the reason, please let me know. i have attached as well the crowsnest log file for reference on the configuration i used. Thank you all
Please open a support post. Your question has nothing to do with raspberry camera module 3
hello to all, here, for two days I lost the signal of my picam module3. I checked things, I restarted the spyglass service but nothing helped!? can someone help me to check what is wrong?
There is something else using your camera, maybe spyglass blocking and wrong url?
I think you can't restart a stopped service so that's maybe the problem there
Can you send your spyglass.conf?
And the output of systemctl status spyglass after a reboot of your pi
Then send the output of ~/spyglass/run.py again
Any chance you are using the dev branch of crowsnest?
I don't understand...
Send the output of cd ~/crowsnest && git status
Run netstat -ntlp | grep LISTEN and send the output
Something else is using your camera module v3
Anything you installed recently?
journalctl -g spyglass
systemctl stop sypglass and then ~/spyglass/run.py again
Seems like it's trying continously to restart the service. I should write it down to fix that when I get enough time again to work on spyglass
Didn't look at the time sry...
Already a bit tired
And run.py still reporting resource busy right?
yes
v4l2-ctl --list-devices
libcamera-hello --list-cameras
I changed the camera cable this afternoon, because it didn't work...
Seems like this cable doesn't work too
Can you send the output of ~/spyglass/run.py again? That I can believe that this shows some weird error for that
Ok, could to know for the future that it reports that if nothing is connected ^^
Do you have some other cables or another pi to test?
and can you send a picture of the cable connected to the pi, that I can see the port?
I connect remotely from my workshop, I can do it tomorrow...
if you want, we leave for tomorrow, I thank you all the same for your help
Hi, I tested several cables and after 3 tries, I managed to get the camera to work! I have an installation with the raspicam cable which must be a little bent, so that was the problem! thanks for your help...ππ
90Β° is no problem for my cable. It's the one that came wit the cam
hello to all, I solved my cable problem, finally...
now i have printed a new mount for my raspicam and i have to rotate it 90Β°...in the klipper settings you can only rotate 180Β°!?
how do i turn it 90Β°?
Update to the newest version. Run cd ~/spyglass && make uninstall && git pull && make install. Backup your config before that you don't loose any settings. Inside the new config there will be a new section with exif rotation. There you can select a rotation that you need. The rotating is done by your browser so no overhead on the pi and if it's not working, your browser doesn't support it.
this:
Yes, I don't know where you copied that from but that's basically the mapping. So you can use h, mh, r180 and so on
should be r90 or r270
#### EXIF Orientation (STRING:h,mh,r180,mv,mhr270,r90,mhr90,r270)[default: h]
#### NOTE: Set the image orientation using an EXIF header.
#### h - Horizontal (normal)
#### mh - Mirror horizontal
#### r180 - Rotate 180
#### mv - Mirror vertical
#### mhr270 - Mirror horizontal and rotate 270 CW
#### r90 - Rotate 90 CW
#### mhr90 - Mirror horizontal and rotate 90 CW
#### r270 - Rotate 270 CW
ORIENTATION_EXIF="h"
```That should be inside your config after the update
Thought that already but didn't think you would actually look at the code ^^
in config.txt?
That's spyglass.conf inside ~/printer_data/config or in mainsail the machine tab
The spyglass.conf is for the spyglass service
The thing that starts spyglass at startup
ok, i do that...
Restart spyglass after the change with systemctl restart spyglass. I don't know if mainsail restart it if you hit save & restart inside the editor of mainsail
It's just rotating the image
the sensor is in a portrait position now, so your image is portrait mode too ofc
Also there is a bug atm that doesn't allow no real resolution above 1920x1080
This bug isn't something we can fix at software level, that's something inside the driver itself
ok, I understand better...
You can try if 1080x1920 is working but it could be that it narrows down your fov (field of view)
Maybe 1920x1920 was working too without any problems but iirc it was cropping the image then
in spyglass.conf file?
Yes, if you want to use the service
If you are using ./run.py you have to set the specific parameters
sorry, but I don't understand what you mean in ./run.py...
There are two methods to use spyglass. The service and the ./run.py method. The service is the thing that starts automatically at startup if you have it installed with make install, this will be configured with the spyglass.conf. The ./run.py is something you can execute manually or start it with a job, for example cronjobs, and you have to start it with parameters like ./run.py -r 1920x1080 to change the default parameters.
ok, I work with the service, so I only modify the parameters in the spyglass.conf
But it does not change anything...
This seems like a nice bug, please send the config
I will look at it if I get some time
Seems like a bit shift somewhere maybe
Or it's just a problem with that low of a resolution
the 1920 as height seems to be capped at 1080
oh wait it'S 1920x1080?
and horizontal
Did you send it from the mainsail ui or inside the spyglass folder?
This picture doesn't look like anything from your config
Hi all! Just got a Raspberry pi camera module 3 and I already regret it as I see here.
I see you people have tried a ton to make it work, is there a simple way on which steps to follow? Thanks!
Just follow the pinned messages. The only problems occur with defective cables/cams and people that are using klipperscreen
Never had any problems with my cam, since developing spyglass
Except for disabling the HDR ^^
Thanks! Camera works, I mean I can get an image when issuing libcamera-still -o test3.jpg
Then there should be no problems, unless you want to use klipperscreen
Just saw your pinned post, I'll follow it ! No, I am building a V0.2 the small display is enough.
I have klipperscreen on my Trident, but my other printer has a USB camera
I think there were problems too, with the voron display
That's the reason I though it could work immediately
Oh crap
Well, let's try. What can go so bad?
The thing about the module v3 is that it uses a different camera stack (libcamera). The drivers are still bugged at some points (no resolution higher than 1920x1920) and sometimes your drivers can go bad somehow
I think it was just one setting for flipping the screen or something like that. You can search in this chat, maybe you can find it.
That's why we ALWAYS read before purchasing stuff. I already regret it π¦ Anyway let's be optimists....
I'll read the whole thread
You can read as much as you want, you won't find that many things on the 3d printing topic for the v3. Best source is this post ig
Most things are just repetitive. The voron display should be within the last 1 or 2 weeks
Yes, I meant I will read everything carefully. Your guide seems very detailed. I'll start from there and then I'll look into the thread. Many thanks mate!
I think this conversation was about the voron display
It was about a touchscreen that is using that guide: https://docs.ldomotors.com/en/guides/unpublished/Vertical_Flip_4
I donβt use this thankfully. Letβs start then!
Spyglass isn't that much actually. Just an example code of picamera2 that is using libcamera with some fancy code around it with a lot of work of roamingthings and some features from me. That's why this post is more like troubleshooting libcamera for the module v3 instead of spyglass itself
And I still don't know what is breaking the driver even after 2000+ messages
It's a solid try for sure, for a new animal. Time will make things more robust
Hopefully. I'm already looking forward to the bugfix for the resolution that we can use some resolutions higher than 1080p
Hope this is the right place to ask this, is it maybe already there and I've missed it or is there a reason that it wouldn't be of any use to use the hardware encoder in the various Pi boards to encode to x264 rather than mjpeg being streamed to Mainsail etc? From what I can tell from a brief look at the source Obico uses ffmpeg, or at least it tests to see if it can be set up from the camera feeds it can find
Are you talking about spyglass or crowsnest?
I'm currently trying to work out the best combination of running specific services on different machines so I can have multiple cameras per printer but not either be limited by wifi bandwidth or risk affecting Klipper itself
At the minute Crowsnest but before I started trying to set up some over-elaborate solution using multiple machines it seemed better to check I wasn't missing something obvious
Spyglass uses mjpeg as well doesn't it? I get why that is the default format, but wary of reinventing the wheel as I've done that in the past with these amazing ideas..
Then this is definitely the wrong place as this topic is only about the picam module v3 and therefore spyglass atm.
But I can still answer your question. Crowsnest is getting webrtc support in the near future. It's already on the develop branch.
The thing about ffmpeg is that it creates too much overhead sometimes so it isn't an optimal solution to just use ffmpeg
The PiCam module 3 was what made me start looking at alternatives to mjpeg tbh, well that and the Logitech C920 removing proper video encoding but I take your point, cheers!
Yeah that's what I suspected, it seemed that if it was a better solution then that's how it would already have been done
Also crowsnest is depending on ustreamer and I guess there were some problems piping the stream correctly. Spyglass also uses mjpeg as it's just a bare minimum project atm to get this module v3 to work.
The HDR capabilities of the Camera Module 3 could be really useful if the libraries don't cause it to all go a bit wrong as is often the case unfortunately
New version will use camera-streamer and is getting webrtc support with it.
3MP isn't that great either, even if the library would be better
That will definitely be a better solution than ffmpeg, I'm just so used to going straight to it because most machines have the spare power to run it without causing problems. The HDR functionality I'm thinking could make some machine learning stuff more useful, especially with the google Coral now seeming to be much more easily available and in m.2 form as well as usb
I know it's unlikely to really be of much use beyond spaghetti detective but x264 seems it could save filling up hard disks on the NAS storing data for it to churn through
anyway that's OT, cheers π
I followed the pinned instructions, but I get this for my Pi Cam Module 3 Wide... tried multiple ribbon cables, any ideas?:
Since it says 'pipeline handler in use by another process' there seems to be another application (in the background) that is using the camera. Did you already check this?
I donβt know what else could be using the camera. What could the culprit be? I have a fresh mainsailOS install from less than a month ago, running a Voron V0.2, and no camera is set up on Mainsail yet. Any guidance on what could be using it?
Did you install spyglass as a service already? Or just downloaded and run ./run.py?
I should change the wording of the pinned messages.
installed as a service, yes
and restarted, etc
I don't have a camera set up in Mainsail when I get the "resource busy" error, but if I do try to add I see this:
Then edit the spyglass.conf that you can find in the machine tab inside mainsail to the url you want and then restart spyglass with systemctl restart spyglass. Then you should be able to add it with the desired url
Default url is /stream and /snapshot. I will change it in a few weeks with some other improvements but I don't have time to do so atm.
Yup, I'm a dummy and missed that part, changing the URLs works
It's a bit weird atm tbh
It doesn't help that my home time always involves near-constant demands from a 4 year old, so my attention is rather fractured much of the time. I appreciate the help!
Whoop
does anyone know if there is a known issue with spyglass and klipper screen? I installed klipper screen and now my picamv3 no longer shows up in mainsail.
Yes, basically half of this thread is about klipperscreen and spyglass
Most of the times a fresh installation can help and you shouldn't use dtoverlay=vc4-fkms-v3d
I assume these issues also make klipper screen not work?
Where do you disable dtoverlay=vc4-fkms-v3d?
/boot/config.txt
thanks
You need either dtoverlay=vc4-kms-v3d or dtoverlay=vc4-fkms-v3d and the second one can break spyglass
Success! My cam works again! thanks dude.
Np π
I'm not sure if this is an issue with Mainsail or not, but the webcam image keeps dropping to a gray box, despite the direct URL showing video just fine
Have you a screenshot of that? And maybe the output of journalctl -g spyglass?
Does it stay at the gray box or does it get back to the cam?
it flashes in and out for a bit, but is mostly on the gray box
the contents of the journalctl -g spyglass is a bunch of lines that say "Boot" and then a long hex value. Is that normal?
if I turn the light off, the webcam preview box works fine
So it only happens with lights on? Then it might be more like flash banging the cam somehow
that's what I would imagine.
But doesn't make sense if it's just mainsail
Here's the journal file. It's not just hex values, that was just the beginning, and I didn't read through the whole thing when I first ran the command
I thought that should show the connect and disconnect messages too. Didn't look into the code for a while now as I didn't have any time to do something for spyglass
Can you stop the service and start spyglass manually?
how do you intend to start spyglass manually? Not using systemctl?
~/spyglass/run.py
ok
You might have to run ~/spyglass/run.py -st /?action=stream depending on what url you have set inside mainsail
Then keep it running until the bug appears and see if there is something like WARNING:root:Removed streaming client ('127.0.0.1', 45646): [Errno 32] Broken pipe on your terminal
could it be something in the service definition?
You could send your config
I do see the error message, but I haven't noticed any grey boxes
Putting it in the background counts too
ok\
Mainsail will always unload the stream as soon as it's not on the screen anymore. Then this error message will appear
did you want me to send the spyglass.conf in the klipper config directory?
Yes
It shouldn't be anything inside there and the service overall shouldn't be any problem
by default, it's at 720p. I restarted it and bumped it up to 1080p, and the flickering came back
So it might be either, a wifi bandwidth issue, maybe a processing problem with your pi or maybe a bad cable?
could be. Its a Pi 3B
Then it shouldn't be a problem with the cpu. Can you look at your cpu usage, with something like htop?
across the 4 cores, its only about 10% on each
I really think it's some wifi bandwidth issue. The screen turns grey as soon as there aren't any images on that url. So it might be that it skips some frames and turn grey then. On the browser tab you can't see it as it will just stay frozen shortly and then continue
ok. Maybe I'll run an ethernet cable over and see what happens then
Hey, is there a timeline for when Spyglass will be merged into Crowsnest? Or will it always be its own thing?
We don't know yet. Atm I don't think it will get merged as there will be an alternative to spyglass merged into crowsnest as soon as they will fix a bug with udev currently inside debian. It's already on the dev branch
This alternative has some nice features but needs to build for a while and building can be hard some times, that's one reason why we developed spyglass and because that alternative wasn't that good 3 months ago ^^
Spyglass doesn't need to build something, as all requirements are already installed on the pi.
If camera-streamer does the job as intended, maybe there isnt a need for spyglass, if users are not happy with the results, I will work further on spyglass integration. Crowsnest was intended to be only a wrapper script for various backends. If mjpg-streamer would be activly developed I would even that providing, but its old and nobody takes care of, so I dropped it.
Only problem I've had I believe is down to mjpeg flooding the wifi connection of Pis, any other issue has always been related to weird behaviour of the camera firmware itself (logitech usually). BTT's documentation for I think one of their Manta boards when using a CM4 links users to instructions on how to set up and test raspi-still so I wouldn't be surprised if camera issues suddenly increase. It's possible it does actually use it as I've never used a CM4 but it it'd be an odd choice
I've had the grey screen but been able to resolve it by temporarily switching between options and hitting Update a couple of times, I always had issues getting the Pi to reliably release the camera without forcing it manually (which is what I assumed was happening)(
Come to think of it I've not tried it yet on the Pi 2 B+, it never had those issues for me so I would use it as a camera streamer separately. I'll maybe see if I can recreate that similar grey screen on there compared to the Pi Zero 2 and CB1 with CSI and usb
Did this solve your problem?
I haven't gotten around to it.
Yes, on RPI0 it takes some time, but doing make -j1/-j2 makes it always to succeed. The spyglass is way more lightweight since it uses preinstalled packages, btw. awesome work on it π
Crowsnest installer does this, based on memory as you suggested π
<512 -j1 <1024 -j2 rest -j4
So does the new Crowsnest version work with the Pi CM3 now, or do we have to stick with Spyglass?
Please dont mix up names, this might confuse unexperienced peops. CM3 stands for Compute Module 3 not camera module 3 as you might have meant. Yes, Raspicam v3 is now fully supported by crowsnest using camera-streamer
As Kwad already said. Crowsnest finally got camera-streamer, with camera module v3 support, integrated. This got all the features, only exif rotation missing afaik (no 90Β° and 270Β° rotations possible π’), that spyglass got and even more, e.g. webrtc.
You can stay on spyglass if you want, but I personally recommend to switch, especially if you got bandwidth problems, as webrtc is a lot better for that.
If you switch, you should run cd ~/spyglass && make uninstall first. After that you have to follow the instructions provided by meteyou in the announcements channel #announcements message to update crowsnest succesfully.
Sorry about that, didn't even occur to me about the CM3 acronym, but makes total sense.
I played with exif rotation, but decided against as I cannot force h264 displey sei to do the same π¦
Im just going to add this is here as ive been searching a while trying to figure it out. I just installed the newest crowsnest to use with my pi cam 3, I would get no display and tested all resolutions etc. The log showed it saw the camera and everything but like this person commented in github changing the device to "device: /base/soc/i2c0mux/i2c@1/imx708@1a" solved it https://github.com/mainsail-crew/crowsnest/issues/113
Will update the docs this week for that. Turns out I hadnt done enough of it. So please be patient π
@woven viper the camera-streamer does partial match, so for most people it might be enough to specify device: i2c0mux and it will try to open any CSI camera as long as there's one
Oh nice good to know, will play with it. Thanks
I've been really busy in the last weeks. Glad to see that there's now a good integration in crowsnest. Great work!
Thank you for this
Is there any setting to enable autofocus (and other function) on the picam v3 on the last crownest?
Set v4l2ctl: AfMode=2 inside your crowsnest.conf
Thanks!
Are there other features that can be enabled?
Access http://<ip-of-your-pi>:<port>/option
Works fine!
What are the other options and optimal settings that can be used?
How did you configure them?
I didn't dive into setting up optimal parameters. I didn't have time in the last 3 months to look into that.
You should be able to configure them exactly as the AfMode one. Like I said, I didn't fiddle around with them yet
I prefer manual lens position over autofocus as last time I tested autofocus it was garbage if the toolhead was inside the picture
Trying to do this has caused me to not have an image..
[05/29/23 00:04:23] crowsnest: INFO: Found 1 total available Device(s)
[05/29/23 00:04:24] crowsnest: Detected 'libcamera' device -> /base/soc/i2c0mux/i2c@1/imx708@1a
[05/29/23 00:04:24] crowsnest: Try to start configured Cams / Services...
[05/29/23 00:04:27] crowsnest: INFO: Configuration of Section [cam 1] looks good. Continue ...
[05/29/23 00:04:29] crowsnest: ... Done!
[05/29/23 00:04:30] crowsnest: V4L2 Control: Handling done by camera-streamer ...
[05/29/23 00:04:30] crowsnest: V4L2 Control: Trying to set: AfMode=2
[05/29/23 00:04:30] crowsnest: Starting camera-streamer with Device /base/soc/i2c0mux/i2c@1/imx708@1a ...
Maybe it was wrong, let me check real quick, haven't set it and just wrote it out of my head
Set: /option?name=value
CAMERA Properties:
- property: SensorSensitivity (00000009, type=5): 2.000000
- property: ScalerCropMaximum (00000008, type=7): (0, 0)/4608x2592
- property: ColorFilterArrangement (0000000a, type=3): 0
- property: PixelArrayActiveAreas (00000007, type=7): [ (16, 24)/4608x2592 ]
- property: PixelArraySize (00000005, type=8): 4608x2592
- property: Rotation (00000002, type=3): 180
- property: Location (00000001, type=3): 2
- property: UnitCellSize (00000004, type=8): 1400x1400
- property: Model (00000003, type=6): imx708
CAMERA Options:
- available option: Sharpness (00000013, type=5): [0.000000..16.000000]
- available option: AwbEnable (0000000c, type=1): [false..true]
- available option: Brightness (00000009, type=5): [-1.000000..1.000000]
- available option: AfWindows (00000020, type=7): [(0, 0)/0x0..(65535, 65535)/65535x65535]
- available option: AeExposureMode (00000005, type=3): [0..3]
- available option: AfSpeed (0000001e, type=3): [0..1]
- available option: AfTrigger (00000021, type=3): [0..1]
- available option: AeConstraintMode (00000004, type=3): [0..3]
- available option: AfMode (0000001c, type=3): [0..2]
- available option: ExposureTime (00000007, type=3): [13..112015443]
- available option: AfPause (00000022, type=3): [0..2]
- available option: NoiseReductionMode (00000027, type=3): [0..4]
- available option: AeEnable (00000001, type=1): [false..true]
- available option: FrameDurationLimits (00000019, type=4): [17849..112075593]
- available option: ColourCorrectionMatrix (00000015, type=5): [-16.000000..16.000000]
- available option: ScalerCrop (00000016, type=7): [(0, 0)/128x128..(0, 0)/4608x2592]
- available option: ExposureValue (00000006, type=5): [-8.000000..8.000000]
- available option: AwbMode (0000000d, type=3): [0..7]
- available option: AfMetering (0000001f, type=3): [0..1]
- available option: AnalogueGain (00000008, type=5): [1.000000..16.000000]
- available option: ColourGains (0000000f, type=5): [0.000000..32.000000]
- available option: Contrast (0000000a, type=5): [0.000000..32.000000]
- available option: AeMeteringMode (00000003, type=3): [0..3]
- available option: Saturation (00000011, type=5): [0.000000..32.000000]
- available option: LensPosition (00000023, type=5): [0.000000..32.000000]
- available option: AfRange (0000001d, type=3): [0..2]
SNAPSHOT Options:
- available option: compressionquality (009d0903, type=1): [1..100]
VIDEO Options:
- available option: videobitratemode (009909ce, type=3): [0..1]
0: Variable Bitrate
1: Constant Bitrate
- available option: videobitrate (009909cf, type=1): [25000..25000000]
- available option: sequenceheadermode (009909d8, type=3): [0..1]
0: Separate Buffer
1: Joined With 1st Frame
- available option: repeatsequenceheader (009909e2, type=2): [0..1]
- available option: forcekeyframe (009909e5, type=4): button
- available option: h264minimumqpvalue (00990a61, type=1): [0..51]
- available option: h264maximumqpvalue (00990a62, type=1): [0..51]
- available option: h264iframeperiod (00990a66, type=1): [0..2147483647]
- available option: h264level (00990a67, type=3): [0..15]
0: 1
1: 1b
2: 1.1
3: 1.2
4: 1.3
5: 2
6: 2.1
7: 2.2
8: 3
9: 3.1
10: 3.2
11: 4
12: 4.1
13: 4.2
14: 5
15: 5.1
- available option: h264profile (00990a6b, type=3): [0..4]
0: Baseline
1: Constrained Baseline
2: Main
4: High
Looks correct
But it could be that you don't have to pass that exact thing. I have to test it by myself to find the correct one
/option still tells me "No option passed" so could be that
Nope, you can change your settings with that without the need of restarting crowsnest, but it won't save them that way
For me it's working
I removed it, restarted, and now I have an image, this time in focus, so it did someting
And now it worked.. Technology, I swear
Another thing. Is there a command to show available resolutions on the Cam 3? The ones from the guide show me some crazy resolutions
What guide? And I think you should be able to use any resolution you want. But I don't know if the bug with the 1920x1920 limit got already fixed
It will just crop your image according to the resolution you are using
https://crowsnest.mainsail.xyz/configuration/cam-section#resolution
This one gives me 45 results that are all 16376x16376
Log file has nada on the Cam 3
Yeah, I know that's why I got surprised for a moment
Doesn't seem like you can get anything good. libcamera is showing some wrong values too
I have the feeling the Cam 3 is a proper pain for you guys
The thing is that the raspi foundation did a really bad job on giving details about the usage and documentation. Best source is this: https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf
Considering how hard it is to find any proper info on it
I'm using raspberry pi cam v1.3 and I reinstall mainsail os version MainsailOS-buster-lite-0.7.1 but the camera doesn't work does anyone know how to make picam work?
No, libcamera is proper pain for me at spaces where the sun never shines...
Please see latest announcement. You have to use legacy/v3 branch or reflash the sdcard. But tbh buster has reached end of life and we are not supporting ot anymore. I try to support 1.x.x (bullseye) MainsailOS as long as possible but even that is going to be outdated. In a few days debian will release debian 12 bookworm and I bet raspios will release then also. So, I have to fix the whole range of issues with v4 of crowsnest, but I think it will not take a long time till MainsailOS 2.0.0 will be there...
Good morning,
I am using this post to discuss the problems I am having with a raspberry pi camera 3.
After many tests, none of the settings that can be entered in /option have any effect, I am applying/trying them in the crowsnest.conf in v4l2ctl:
I have been looking at the official documentation and you can also check the settings with.
cd ~/crowsnest
tools/dev-helper.sh -c
well, this command doesn't show me any settings...
I don't know if it's a bug, I don't know if camera v3 currently doesn't support any kind of setting. Let's see if you can help me.
The dev-helper.sh doesn't work for the module v3 as the v4l2-ctl endpoint doesn't work for that module. The easiest option to show all the options is the /option endpoint. Other option would be to stop crowsnest and run python3 -c "from picamera2 import Picamera2; Picamera2().camera_controls", but this would show the same results
To test if you set everything correct, try out v4l2ctl: brightness=-1 or v4l2ctl: brightness=1. There you should hopefully see an effect. If not, send your log
@timber junco what do you try to set?
Good afternoon. both AfMode and AfRange have no effect, 0. And of course I want to try to set the camera to focus where I want, but there is no way.
Even LensPosition does not seem to have any effect.
Seems to work for me.
I try to focus on that part, the one in the red box, and there is no way. It's probably my fault that I don't know how to do it, but after trying and trying I don't notice any change in the image.
I played with that also and to me it seems there is a misinterpretation how this works. The lens is built from a specific focal distance to infinity. So it can 'sharpen' the image if a Object is closer to the lens, but it can not 'zoom' to an Object in the distance. Try it yourself. Put something really near infront of the lens. See if you can get a sharp image with that parameters.
As an example in a Voron V0 with camera mounted on the back panel you could get a crisp image, but not on a V2 top panel mount seeing the first layer in detail...
For rough lens-position estimates you can have a look at the pinned messages. There is a message of Samuel235 that made some testing on that
Oh, cool, would say that underlines pretty well what I said..
thank you for your answers, I will continue testing.
@wet lynx How can I see the posted messages?
@timber junco I can manual focus with AfMode=manual and setting LensPosition on raspi cam 3
Voron 0.2 with RPI Cam v3. This is running develop branch of camera-streamer.
There's also AfWindows to define in a camera resolution a focus window if you wish.
AfRange does impact the preference of focus, for me on Voron 0 the macro works best.
Top right corner of your chat. The pin
Hi all, I'm total noob with Pi, but I'm running Klipper on my Flsun super racer and Mainsail - I'm struggling to setup Pi cam v3. Any good soul who could guide me?
Have a look at https://crowsnest.mainsail.xyz/faq/how-to-setup-a-raspicam
Thank you, but already tried this - I still get
pi@cerulean stormos:~ $ libcamera-hello --list-cameras
[0:00:47.081250137] [1777] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3406-e96d0201
No cameras available!
that's by boot/config.txt
lcd_rotate=2
camera_auto_detect=1
dtoverlay=vc4-kms-v3d
Send a log
you mean crownest.log?
yes
Read the link again
wrong device path
Oh wait device doesn't get detected
send /boot/config.txt
I get the problem now
You are using crowsnest v3
For the module v3 you need crowsnest v4
How can I tell which crowsnet I'm running? I followed this https://crowsnest.mainsail.xyz/faq/upgrade-from-v3-to-v4 already
There is a huge different between Crowsnest v3 and v4. Unfortunately, it also means that there are major breaking changes, and you'll need to do some manual steps to upgrade.
I'm pretty sure you didn't follow that. If you would have followed it completely, you would have gotten an error
Run cd ~/crowsnest && git status. Then the output would either contain master or legacy/v3
master would be v4 and the other v3
thank you, I will check it again now
You have to update to bullseye
buster don't support v4
That's why it's impossible that you followed the tutorial completely without any errors
So update all your important things and make a fresh install with the newest Mainsail version
how can I update to bullseye and keep Klipper setup, mainsail ect?
Only way, if you don't have much linux knowledge and still want support from us, is a fresh installation
Backup your configs and paste them over after the update
There are ways around it but as wrote here #chat message We won't support you in doing that and after that
thanks, I will check them out
Hi guys. I am trying to setup a Raspberry Camera 3 via Crowsnest but I don't have much luck. So far I used Spyglass and it worked fine but I thought Crowsnet would be better.
So, here is what I am doing:
First of all, camera is detected fine.
``nikos@Proteus:~$ libcamera-hello --list-cameras
Available cameras
0 : imx708_wide [4608x2592] (/base/soc/i2c0mux/i2c@1/imx708@1a)
Modes: 'SBGGR10_CSI2P' : 1536x864 [30.00 fps - (0, 0)/0x0 crop]
2304x1296 [30.00 fps - (0, 0)/0x0 crop]
4608x2592 [30.00 fps - (0, 0)/0x0 crop]``
Then I use this crowsnest.conf:
``[crowsnest]
log_path: /home/nikos/printer_data/logs/crowsnest.log
log_level: verbose # Valid Options are quiet/verbose/debug
delete_log: false # Deletes log on every restart, if set to true
no_proxy: false
[cam 1]
mode: camera-streamer # ustreamer - Provides mjpg and snapshots. (All devices)
# camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only)
enable_rtsp: false # If camera-streamer is used, this enables also usage of an rtsp server
rtsp_port: 8554 # Set different ports for each device!
port: 8080 # HTTP/MJPG Stream/Snapshot Port
device: /base/soc/i2c0mux/i2c@1/imx708@1a # See Log for available ...
resolution: 1536x864 # widthxheight format
max_fps: 15 # If Hardware Supports this it will be forced, otherwise ignored/coerced.
#custom_flags: # You can run the Stream Services with custom flags.
#v4l2ctl: # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of.``
Did you stop spyglass?
Pinned messages or #1064270770114670673 message
No problem
If I update crowsnest do I need to re-disable the service afterwards? Just wanna make sure it's not gonna break my spyglass picam v3
Why do you want to update crowsnest if you want to disable it again afterwards?
If you follow the correct update procedure for crowsnest, as written in #announcements, you have to disable it again. Just updating through the update manager of mainsail, shouldn't re-enable it, but it will break crowsnest.
But you don't need to update if you don't want to use it.
You don't even need it installed then.....
Cool so I can just uninstall it then.
I'm still struggling with picam3. Can anybody help me?
If you give some informations, maybe
i use crowsnest
v4.0.2-2-g8b54eae, OS: Raspbian GNU/Linux 11 (bullseye)
Distro: MainsailOS 1.2.0 (bullseye)
i dont use spyglass
Set delete_log: true and log_level: debug. Then send a new log
Also try out to change dtoverlay=vc4-fkms-v3d to dtoverlay=vc4-kms-v3d in your /boot/config.txt
You got klipperscreen?
I heared <dtoverlay=vc4-kms-v3d> cause no touch bug
Then it might not work correctly anymore
yes. ok i know.... i hope that will fix...TT
Sometimes the cam works with fkms, but I can't say when it works and when not
π it's ok i don't use actually kilpper screen... just seeing.. thank u very much
Hey don't know if it's the right spot. First thanks for spyglass, but now I succesfull switched to the new "stock" for v3... one question... I use daylight on a stick and cam shows pulsing... can i somehow set custom flags or something to another Hz? or any suggestion?
Someone else asked about that too. You can try to change your fps and it might get better. On older cameras you got something to change between 50hz and 60hz and that solved that problem too, but it seems like it's not in libcamera like you can read here: https://github.com/raspberrypi/picamera2/issues/609
I think you might be able to reproduce that behaviour of changing between 50hz and 60hz with adjusting your exposuretime, as that seems to just lock the exposure time to something specific, like you can read here: https://forums.raspberrypi.com/viewtopic.php?t=269938
I can't help you with that in more detail, as I don't have that flickering light problem and can't fiddle around to find a solution.
hi. can i adjust manuel focus?. and which parameters i need to add to crowsnest.conf?
I'm using v4l2ctl: autofocus-mode=manual, lens-position=4.5 and for some lens-position values you should have a look at the pinned messages
thank you ^^
hi
Jun 20 08:47:28 mainsailos spyglass[805]: WARNING:root:Removed streaming client ('127.0.0.1', 54592): [Errno 32] Broken pipe
anyideai why?
basically after ian update the camera is not screaming :S the crowncamera (usb) the pi camera is streaming
any clue and tk for exelent job π
WARNING:root:Removed streaming client ('127.0.0.1', 54592): [Errno 32] Broken pipe
This just means, you closed the stream
So what camera isn't streaming?
the usb one
i will try Tk π
After that update you can even use the picamera with crowsnest
YESS YESSSS @wet lynx you are GODDD for mee in camares of my voron _:*P
one more question , i try this config but no result π the camera still make auto focus any sugestion?
in the logs of crownnest
[06/20/23 14:12:24] crowsnest: focus_absolute 0x009a090a (int) : min=0 max=831 step=1 default=0 value=0 flags=inactive
when i try to change the value the camera wtops streaming
This error doesn't have to do anything wwith the module v3, please open a new post and send your whole log, with the problem
this worked for me, many thanks! I just need to figure out how to get it in focus now!
For reference: This is inside the docs now too: https://crowsnest.mainsail.xyz/faq/how-to-setup-a-raspicam
I just read your message again. For manual focus v4l2ctl: autofocus-mode=manual, lens-position=4.5 should work. For lens-position values, have a look at the pinned messages
Hi all.
I have an annoying problem with the pi camera 3 with raspberry Pi3 B+: the video stream "sobbing".
The video appears for about 5 seconds, stuck for a second and resumes for another 5 seconds, all this continuously (loop). As resolution I set 1280x720 @15fps and camera-streamer, v4l2ctl: autofocus-mode=manual, lens-position=6.08.
Is there anything I can do to improve the streaming-video fluidity?
What service do you use? webrtc, mjpg, adaptive?
Webrtc
iirc, ayu said something about the buffer frames in such a context, so it could be that your connection isn't stable/fast enough, so you get this "sobbing"
Is there any test I could do?
Sry but I can't help you with that
Turns out the default choosen format 'mjpg' isnt always the best choice please try to use YUYV format.
Thanks, is this right?
custom_flags: --camera-type=libcamera
custom_flags: --format=YUYV
Only use one custom_flags and separate the values by a single space
For reference:
https://crowsnest.mainsail.xyz/configuration/cam-section#custom_flags
So custom_flags: --camera-type=libcamera --camera-format=YUYV should be correct
Please all at one line and seperated by ,
As always Mr Yel is dope in terms of reaction speeds. So, I am out for now π
I can't get any picture from my viron using pi3b and picamera, installed klipper via the piimager type app and updated klipper within itself, is there an image available with v4 already installed ??
MainsailOS
In the download section ?
In the pi imager
There is no download section on this server
In the pi imager it's located at: Other specific-purpose OS->3D printing->Mainsail OS
Oh I see, that's where I got my original image , does that one now have v4 as standard so the picam will work ( I have just got to the point my voron 0.1 is able to move during my build )
That image got v4 installed, yes
For Raspi setup, please have a look at:
https://crowsnest.mainsail.xyz/faq/how-to-setup-a-raspicam
Thank you π
Anyone can you help me with cam module 3?
I'm trying to set focus to be only in area of printing:
v4l2ctl: AfRange=1, AfSpeed=1, AfMode=2, AfWindows=(0, 0)/65535x23059
I'm trying to set focus to be only on bottom part of the screen
mode: camera-streamer # ustreamer - Provides mjpg and snapshots. (All devices)
# camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only)
enable_rtsp: false # If camera-streamer is used, this enables also usage of an rtsp server
rtsp_port: 8554 # Set different ports for each device!
port: 8080 # HTTP/MJPG Stream/Snapshot Port
device: /base/soc/i2c0mux/i2c@1/imx708@1a # See Log for available ...
resolution: 1920x1080 # widthxheight format
max_fps: 20 # If Hardware Supports this it will be forced, otherwise ignored/coerced.
#custom_flags: # You can run the Stream Services with custom flags.
v4l2ctl: AfRange=1, AfSpeed=1, AfMode=2, AfWindows=(0, 0)/65535x23059 #42476 # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of.```
this dont work with me π¦
[06/27/23 21:45:40] crowsnest: V4L2 Control: Handling done by camera-streamer ...
[06/27/23 21:45:40] crowsnest: V4L2 Control: Trying to set: AfRange=1, AfSpeed=1, AfMode=2, AfWindows=(0, 0)/65535x23059
[06/27/23 21:45:40] crowsnest: Starting camera-streamer with Device /base/soc/i2c0mux/i2c@1/imx708@1a ...
[06/27/23 21:45:40] crowsnest: ERROR: Start of camera-streamer [cam rpicam] failed!
I don't know why you are trying to use that flags
Set log_level: debug and delete_log: true and send a whole log. We can't read anything more than you out of Start of camera-streamer [cam rpicam] failed!
Most likely AfWindows=(0, 0)/65535x23059 will be wrong ig
I'm using Raspberry Pi Zero 2W with Cam3 module and it has stutters.
autofocus area
yes
this is clean log without custom_flags
So if you add custom_flags: --camera-type=libcamera --format=YUYV it doesn'T start and without it it starts?
Yes
Then send a log with it maybe, otherwise it's hard to find the problem with it
CAMERA: Missing 'key=value' for '0)/65535x20059' it's a wrong format, I didn't play with it yet, so no idea how it works
Fix your typ in ustom_flags
It should be camera-format not format
Don't delete old messages that got replied one please
ahh ok
And overall deleting messages isn't that nice, as it destroys chat flow
I tried to clean a bit
This thread got over 2700 messages, no need to clean it xD
The thing is, that it started already with YUYV before that, so you could try out --camera-format=MJPEG
still the same
Then you are out of luck for now
Then don't use webrtc
That got fixed in the last update of spyglass
I forgot something yesterday. Atm you can't set custom controls like AfRange=1, AfWindows=(0, 0)/65535x23059 in spyglass. This will be added in the next update. You can use the expand_camera_control_ability branch for that already but there are still a few things that need to be done on that branch
I'm having problems with a raspberry pi 3 and the ov5647 camera module, it's detected ok in the log and its set to the correct path in the conf but all I get is "connecting" ?????
I have set the mode to camera-streamer too
First of all, why are you writing in this post? This is an honest question, as this post is for camera module v3
Second, send your log please with delete_log:true and log_level: debug set in crowsnest.conf
Ahh ok , where am I supposed to post ??
Open a new post would be the correct way
Bit new to this
Best would be to open a post with that informations I requested
All good, but I'm sometimes curious as some people just post their questions somewhere, where they clearly don't belong to. Your case isn't that extreme as some others
For my Cam3 module, after last updates I went:
custom_flags: -camera-options=AfMode=2 -camera-options=AfRange=1 -camera-options=AfSpeed=1
AfMode = 2 - Autofocus
AfRange = 1 - Macro
AfSpeed = 1 - Fast focus
I still search how to convert the info for "AfWindows", which will gave us a window to focus over, not full screen.
I hope it helps others π
Any idea why Cam3 module chop from time to time on Raspberry Pi Zero 2W?
GPU mem is 128mb
Same thing you can see on the other printer with only Cam3 module.
We already saw this a few times on some people, but we never couldn't figure it out. Most likely it's something about the network (not stable enough) or maybe even your browser.
I could only reproduce it on a pi zero 2w but it's very inconsistent for me and we don't have any tools to debug it.
So I guess it might be either the wifi or the pi itself
WIfi router is just 1 meter from it.
My guess is the pi itself, but what's the problem.
Maybe for somereason it cant buffer the cam stream.
Well, as we noticed, compared to the past due klippers new(er) move queue devices like a RPI Zero2 pretty much on the edge of usability. Its not the CPU it self, it is probably the amount of RAM that might be the bottleneck here. What did happen if you lower resolution to a bare minimum? If your descriped issue is gone then, I would bet my a$$ of its the amount of RAM.
As a second test you could simply stop klipper and moonraker
I went for 1536x864, as libcamera-hello --list-cameras showed :
imx708 [4608x2592] (/base/soc/i2c0mux/i2c@1/imx708@1a)
Modes: 'SRGGB10_CSI2P' : 1536x864 [30.00 fps - (0, 0)/0x0 crop]
2304x1296 [30.00 fps - (0, 0)/0x0 crop]
4608x2592 [30.00 fps - (0, 0)/0x0 crop]
I may go for something like 1280 x 720 for the test
or even 960 x 647
This, "my router is directly next to it", doesn't make it better, if it's really an unstable network.
There could be some kind of interference for example, even if the router is directly next to it.
Mete told at some point about problems with a new iPhone for example. So after there was that new phone in his household there were problems whenever it came near his printer
But kwad is most likely right here
I test both resolutions and still choppy.
I will try stopping klipper and moonraker later, when I'm at home.
no i wonder between buying raspberry pi 4/5.
the router is good enough Asus rt-ac66u-b1 works good there.
I will check the speed from it later.
I can only say, don't buy a pi5. Way too powerful for this usecase and it's missing the hardware encoding for h264 and jpg. So there need to be an update for camera-streamer and it will completely run on the CPU.
If it's not beefy enough, the pi4 will be by far the better choice for camera streaming.
Also it doesn't have to be the router...
My pi 4 2m away with other stuff running, no problem. My pi zero 2w, 30cm away, only the stream running, sometimes choppy...so it's the pi itself, but if it's really the ram or network, is hard to say. As my ram isn't at it's limit iirc, it's most likely bad wifi connection, as it simply doesn't have a powerful network chip
I tought about adding pigtail external antenna π€£
In this video we are modifying the new Raspberry Pi Zero 2 W board to replace the on board Wi-Fi antenna with an U.FL connector to allow the use of an external antenna.
Please note this modification is done at your own risk and will invalidate any warranty and RF compliance.
You can view more photos and information on https://www.briandorey....
Are those 2 cams both running on the same host?
Yes π
but htop dont show any high usage of ram or cpu or network
but I can show you same results from the other printer, which use only Cam 3 module. same setup pi Zero 2W
this just show how one cam works and the other dont
for me in first glance ot should work, as I have network bandwith to stream, based on Speedtest.
then CPU/MEMORY are not full. I only cant see GPU usage if needed.
Like i said, it still can be an unstable network. So if for example the timing get messed up or the data has to be retransmitted because it got corrupted. camera-streamer webrtc is overall not that reliable.
The GPU can ofc be the culprit too...
is there any other "service" to use to strike that out too?
You could try MediaMTX, that is a bit more reliable ig, but no guarantee. Also this doesn't use the GPU, so it's a lot heavier on the CPU.
OK, I will check on google how to set that up π
@wet lynx it works with MediaMTX
I will check the toll over the CPU as you said it's cpu intensive
I went even bigger bitrate, that give me 6MiB/s and didn''t chop, ram is OK, CPU is 50% usage π
It's not RAM,
not a network problem
CPU is in good shape.
now I think the GPU is not happy with camera-streamer webrtc way of work
Or it's just some camera-streamer problem, maybe...like I said the camera-streamer webrtc isn't that good implemented. Skipped frames of the cam can already completely fail the encoding.
I clearly have to say that we are very thankful for the implementation, and I think no one of us could do it better atm ^^
Yeah, I just check GPU mem usage with: sudo vcdbg reloc and for 100mb there is 98mb free
also I fucked up the pi config, and I reisntalled it π
I'm going trough video/camera options in a hope to find a suitable mode
[cam piCam]
mode: camera-streamer # ustreamer - Provides mjpg and snapshots. (All devices)
# camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only)
enable_rtsp: false # If camera-streamer is used, this enables also usage of an rtsp server
rtsp_port: 8554 # Set different ports for each device!
port: 8080 # HTTP/MJPG Stream/Snapshot Port
device: /base/soc/i2c0mux/i2c@1/imx708@1a # See Log for available ...
resolution: 1536x864 # widthxheight format
max_fps: 24 # If Hardware Supports this it will be forced, otherwise ignored/coerced.
custom_flags: -camera-options=AfMode=2, -camera-options=AfRange=1, -camera-options=AfSpeed=1, -camera-options=videobitratemode=1, -camera-options=videobitrate=50000, -camera-options=h264profile=2, -camera-option=h264level=11, -camera-options=h264minimumqpvalue=7, -camera-options=h264maximumqpvalue=10, -camera-stream.height=600, -camera-option=compressionquality=80 # You can run the Stream Services with custom flags. -camera-options=AfSpeed=1
#custom_flags: -camera-options=AfMode=0 -camera-options=LensPosition=11
#v4l2ctl: afmode=0, lensposition=10 # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of.
this way at least dont go choppy π
those settings give me stable 20fps and it's around 1.8-1.9Mbit/s
With adaptive your wifi is now the bottleneck π
That's the main point π
it doenst matter which URL you use: /webcam/webrtc or /webcam/?action=stream
I'm going through the options from 192.168.???.???:8080/option
Adaptive uses the snapshot url and then "asks" for snapshots at the given framerate. So at 15 target fps, it would try to ask 15 times a second for a new snapshot
Thank you for the tests, could you share your settings?
they are just above, updated with todays settings:
#1064270770114670673 message