#crowsnest

65 messages ยท Page 1 of 1 (latest)

scenic urchin
#

I can't get crowsnest to display images from either webcam connected to the Pi Zero connected to my printer.
Attached are screenshots of my crowsnest.cfg and webcam settings in mainsail.
If it's relevant, both cameras are connected to the Pi via a USB hub. One camera is an old 2mp Trust webcam, while the other is a two year old GoPro Clone.
My Pi is setup with the following config.txt settings:

gpu_mem=16
arm_freq=1085
#arm_freq=1095 for my other unit with heatsink
gpu_freq=530
#gpu_freq=550 for the unit with a heatsink.
over_voltage=2
core_freq=515
sdram_freq=533
over_voltage_sdram=1

chrome oxide
#

Fix your tags #readme

#

port 8079? Then you have to set http://<ip.of.your.pi>:8079/webrtc as your stream url

#

/webcam is for port 8080
/webcam2 is for port 8081
...

#

If that doesn't help send a crowsnest.log. It's possible that you made an update recently too and therefore broke camera-streamer

scenic urchin
#

I updates crowsnest.cfg and the settings as shown in the attached images but no change.
I suspect something is wrong with my crowsnest install as the crowsnest.log hasn't updated since 3:30am this morning in spite of delete_log: true

chrome oxide
#

After your change of the config you can again use /webcam/webrtc. Just for the 8079 port you would have needed the full address

#

Your issue is also related to building camera-streamer manually. The underlying package libcamera got an update and that breaks the manually compiled version of camera-streamer. So this issue can happen again.
To fix it run:

cd ~/crowsnest
make update
scenic urchin
#

Thanks I'll do that shortly.
Just to be clear on your first point, do I change the URL Stream text to literal "/webcam/webrtc" or "/GoProClone/webrtc" for the first cam? Accordingly do i use "/webcam1/webrtc" or "/Microdia/webrtc" for the second?

chrome oxide
#

/webcam/webrtc literally

scenic urchin
#

So using SSH and the KIAUH script rather than Mainsail Update Manager is what broke libcamera?

chrome oxide
#

Nope

#

Package update

#

*system package

scenic urchin
#

Forgive me being a noob... but "sudo apt update && sudo apt upgrade -y" broke it?

chrome oxide
#

Yes

#

Like I described above libcamera was updated => camera-streamer broke
That's dumb but atm we cannot do anything about this

scenic urchin
#

If I update the system in future, to be sure nothing is broken should I use KIAUH script to reinstall each package or is there a better method to safety check a system update?

chrome oxide
#

Tbh, I don't know how kiauh updates ^^
I already asked the dev about it.
Overall it should be fine to update with kiauh and with the update manager inside Mainsail. Just don't update the system packages.
If you want to check the upgradable packages, you can run apt --upgradable or something like that. It's always written at the end of sudo apt update
If it list libcamera, you have to rebuild camera-streamer/run the command I sent.

#

After looking at your log again, you should update the device paths.
Use the /dev/v4l paths listed inside the log. Your cams are not at /dev/video1 and /dev/video2. Those /dev/video paths can also change after reboots

scenic urchin
#

Gr8.. I'll do as you advise.

chrome oxide
#

Another thing:

/dev/v4l/by-id/usb-0c45_USB20_Camera-video-index0 -> /dev/video2
Supported Formats:
        [0]: 'BA81' (8-bit Bayer BGBG/GRGR)
        Size: Discrete 160x120
        Size: Discrete 320x240
        Size: Discrete 640x480
        Size: Discrete 1280x1024
        [1]: 'S920' (GSPCA SN9C20X I420)
        Size: Discrete 160x120
        Size: Discrete 320x240
        Size: Discrete 640x480
        [2]: 'JPEG' (JFIF JPEG, compressed)
        Size: Discrete 160x120
        Size: Discrete 320x240
        Size: Discrete 640x480
```This device doesn't have a MJPG encoder. I don't know if it will work without that. Send the output of `v4l2-ctl --list-devices`
#

And to the camera-streamer thing. Just check your log. If it says ERROR: Start of camera-streamer [cam Microdia] failed! it's most of the times that problem with an updated libcamera. Another error leading to that output would be wrong custom_flags or wrong v4l2ctl parameters

scenic urchin
#

I was testing both cams, but only need one to track my print status in Obeco. usb-0c45_USB20_Camera-video-index0 is a very old webcam I had lying around and at under 2mp I'm not sure it'll be high enough resolution for such a task. IAE I'll probably stick with the GoProClone and forego having to diagnose issues with the old camera.

#

My Pi is still updating, but I'll send the results of "v4l2-ctl --list-devices" shortly.

chrome oxide
#

Oh it's a pi zero 2 right?
It could hang at ~84% if you are unlucky

#

If it does, you should stop all services:

sudo systemctl stop klipper
sudo systemctl stop moonraker
sudo systemctl stop crowsnest
```and then try again
scenic urchin
#

Wow, you are amazing! I just checked the update and it's slowed almost to a halt at 85%, yet the mainsail interface is still updating so I'll just wait. I have a small overclock on the PiZ so I hope it will help push it to completion.

#

pytho@CTCi3ProB:~/crowsnest $ v4l2-ctl --list-devices
General Image Device: General I (usb-20980000.usb-1.2):
/dev/video1
/dev/video2
/dev/media0

USB20 Camera (usb-20980000.usb-1.3):
/dev/video0

#

I'm just waiting for my Pi to reboot to ensure all these changes have been applied.

#

Still not working. attached are images of updated crowsnest.cfg and webcam settings.

scenic urchin
scenic urchin
#

Could this be caused by the gpu_mem=16 or could it need custom_flags: or v4l2ctl: settings?

chrome oxide
#

And I already told you that that cam will make trouble

#

Set log_level: debug and send a new log

scenic urchin
#

Should I single out the GoProClone to test this with instead of the old cam?

chrome oxide
#

Yes, please

#

I looked again at the device. This is a Pi zero one?

#

Is this running only a cam?

#

I don't know if it's that capable tbh.

scenic urchin
#

It is now

chrome oxide
#

The gpu_mem at 16 can be an issue. You might want to play around with that value

chrome oxide
#

Does it work?

#

Don't forget to use /webcam/?action=stream and service mjpg inside Mainsail

scenic urchin
#

Set gpu_mem to 128 and rebooted

#

I'm hoping the gpu_mem was not enough to display an image

chrome oxide
#

It might be the CPU overloaded ๐Ÿคทโ€โ™‚๏ธ

scenic urchin
#

No luck I'm afraid... here's the settings for webcam

scenic urchin
#

I think I need to ask Father Xmas for a better Pi ๐Ÿ˜€

chrome oxide
chrome oxide
scenic urchin
#

Both Klipper and Cam. Does the webcam string need to be "/webcam1/?action=stream"?

chrome oxide
#

Does the webcam string need to be "/webcam1/?action=stream"?
Yes

#

Both Klipper and Cam
You won't finish even one print if the cam is running

#

I already had problems with just running klipper on the pi zero 1. It's just not powerful enough

#

So father Xmas will be your hero here ^^

scenic urchin
#

Well at least the config and settings are now correct. Thanks for doing that for me.
Would the Zero 2 be adequate as I imagine the Pi 4 would be overkill if it's coping with just the Klipper ecosystem and a webcam?

chrome oxide
#

Just a webcam he said ๐Ÿ˜‚

#

The pi zero2 can be enough. There are quite some people out there with that setup according to the github issues.
The pi3 is the same chip but with more ram and an usb hub directly integrated.
But a pi zero2 should be enough as long as it stays at one cam.

#

I myself use a pi4, but I also use a picam and those really need some CPU power to run good