#Issues with Pi Camera after fresh install and BTT PITFT50

70 messages Β· Page 1 of 1 (latest)

gaunt flower
#

Hey all πŸ‘‹

I had been using MainsailOS for a while and decided to restart with a fresh image to update to bullseye after attempting a manual update and failing.

I have been able to get my config updated but after the re-image I have not been able to restore the webcam to a functional state.

I was initially using a PiCamera v1 but I have switched to a spare PiCamera v2 in an attempt to see if the module and or cables had issues but I am still struggling to get that working as well. I have tried using the legacy mode as well per some of the troubleshooting guides and that did not work either.

I have also removed and rebuilt crowsnest as I had seen that had fixed others issues but I am still stuck.

Maybe related, I am also using a BTT PITFT50 V1.0 and I needed to comment out dtoverlay=vc4-kms-v3d the boot config in order for the touch to work correctly:

# Enable DRM VC4 V3D driver
#dtoverlay=vc4-kms-v3d
#max_framebuffers=2

Anything I overlooked?

gaunt flower
#

Even if I am using an imx219 now?

spiral lotus
gaunt flower
#

This seems strange to me:

[04/21/24 13:13:59] crowsnest: DEBUG: camera-streamer [cam 1]: device/v4l2/buffer_list.c: SNAPSHOT:output:mplane: Requested resolution=1920x1080 is unavailable. Got 1920x1088.
[04/21/24 13:13:59] crowsnest: DEBUG: camera-streamer [cam 1]: device/buffer_list.c: SNAPSHOT:output:mplane: Using: 1920x1056/YUYV, buffers=3, bytesperline=3840, sizeimage=3.9MiB
.......
[04/21/24 13:13:59] crowsnest: DEBUG: camera-streamer [cam 1]: device/device.c: CAMERA: Setting frame interval_us=0 for FPS=15
[04/21/24 13:14:00] crowsnest: DEBUG: camera-streamer [cam 1]: [0:00:38.204669463] [1081] ERROR V4L2 v4l2_videodevice.cpp:1906 /dev/video0[23:cap]: Failed to start streaming: Input/output error

Why is it pulling /dev/video0 instead of /dev/video31?

#

I can try legacy mode again I guess...

#

libcamera is able to see the device at the moment:

$ libcamera-hello --list-cameras
Available cameras
-----------------
0 : imx219 [3280x2464] (/base/soc/i2c0mux/i2c@1/imx219@10)
    Modes: 'SRGGB10_CSI2P' : 640x480 [30.00 fps - (0, 0)/0x0 crop]
                             1640x1232 [30.00 fps - (0, 0)/0x0 crop]
                             1920x1080 [30.00 fps - (0, 0)/0x0 crop]
                             3280x2464 [30.00 fps - (0, 0)/0x0 crop]
           'SRGGB8' : 640x480 [30.00 fps - (0, 0)/0x0 crop]
                      1640x1232 [30.00 fps - (0, 0)/0x0 crop]
                      1920x1080 [30.00 fps - (0, 0)/0x0 crop]
                      3280x2464 [30.00 fps - (0, 0)/0x0 crop]
spiral lotus
#

Why is it pulling /dev/video0 instead of /dev/video31?
No idea, but it doesn't matter. Failed to start streaming: Input/output error is the problem with the klipperscreen

spiral lotus
#

It's seeing it, but it cannot use it. Why? Because of the DSI screen

#

Just trust my intuition, I'm supporting that for over one year now and it's really annoying

gaunt flower
#

πŸ₯³ FINALLY!!!!!

#

I had to switch it to MJPEG in the webcam settings as well but I finally have output.

#

Now to put all of the cables back in their place make sure that it still works.

spiral lotus
gaunt flower
#

I wonder why it was not working last night. Maybe it was because I tried this before rebuilding crowsnest.

#

mode: camera-streamer

spiral lotus
spiral lotus
gaunt flower
#

πŸ€” it works if the webcam is MJPEG but not WebRTC

spiral lotus
#

How should a webrtc service, work with a mjpg stream?

#

It's like, if you want to order something in a language the waiter cannot understand

gaunt flower
#

But the legacy stack is working with mode: camera-streamer in the config unless it is silently falling back to the old method.

spiral lotus
#

You are the service and the waiter is the url

spiral lotus
gaunt flower
#

No, I get this, but that is not how the config is setup.

spiral lotus
#

Send your log

spiral lotus
#

You have to talk to the waiter, that can understand you. For webrtc it would be /webcam/webrtc

gaunt flower
#

Wait, could the URL have been my problem then?

spiral lotus
#

Nope

#

It might have been a problem too, but the error in the log is clear

gaunt flower
spiral lotus
#

You can try if you want, but I can already predict the outcome ^^

spiral lotus
# gaunt flower Attached.

Oh, you are right. It's working πŸ€”
Never got the legacy stack working with camera-streamer πŸ˜‚

gaunt flower
#

🀣

spiral lotus
#

But still:

device/links.c: CAMERA:capture:buf0: Capture image is outdated. Skipped. Now: 668012711, vs 632498588.
device/links.c: CAMERA:capture:buf1: Capture image is outdated. Skipped. Now: 668013130, vs 632565242.
device/links.c: CAMERA:capture:buf0: Capture image is outdated. Skipped. Now: 668032885, vs 632631897.
device/links.c: CAMERA:capture:buf1: Capture image is outdated. Skipped. Now: 668055095, vs 632698551.
device/links.c: CAMERA:capture:buf0: Capture image is outdated. Skipped. Now: 668055567, vs 632765206.
device/links.c: CAMERA:capture:buf1: Capture image is outdated. Skipped. Now: 668056459, vs 632831861.
device/links.c: CAMERA:capture:buf0: Capture image is outdated. Skipped. Now: 668057029, vs 632898516.
device/links.c: CAMERA:capture:buf1: Capture image is outdated. Skipped. Now: 668057726, vs 632965170.
device/links.c: CAMERA:capture:buf0: Capture image is outdated. Skipped. Now: 668058319, vs 633031825.
device/links.c: CAMERA:capture:buf1: Capture image is outdated. Skipped. Now: 668076731, vs 633098480.
#

So it's possible that it might lag at some point

gaunt flower
#

Well, I can switch to mode: ustreamer as well.

spiral lotus
#

Did you try webrtc?

#

Maybe it was only webrtc with problems πŸ€·β€β™‚οΈ

gaunt flower
#

I'm trying now. It would be nice if the UI warned that was an incorrect setting.

spiral lotus
#

How should it do that?

gaunt flower
spiral lotus
#

It's impossible to check an url, if it's correct, as it might be possible that someone got a weird reverse proxy setup and put their webrtc under a different path

#

The only check is image or no image

gaunt flower
spiral lotus
#

But that's nothing the ui has to tell you, as you can see it on your own

gaunt flower
spiral lotus
#

Client removed: Remote description has no ICE user fragment.
That seems weird πŸ€”

#

camera-streamer isn't logging something special, so it's possible that it simply doesn't work, for whatever reason. I don't think that you local installation is bad somehow

gaunt flower
spiral lotus
#

I might test it tomorrow

spiral lotus
#

Those are hacky workarounds, for something that doesn't make sense.
If we think that further:
If there now would be ?action=stream you would print some kind of message with "this url is wrong check the docs". Now someone deletes only a few letters and maybe writes ?action=webrtc. There is now no message. So that means it's working? Ofc not, but some users, might think that

gaunt flower
#

πŸ€·β€β™‚οΈ It was just an idea.

#

Maybe the ?action= is a better key. I know very little about what the different URL formats are supposed to be but guidance for inexperienced users would be nice.

spiral lotus
#

So the better solution would be to check for /webcam, then you got the problem with some weird reverse proxy maybe.
I think you get what I mean. I appreciate your intention to help, but it's sometimes not as easy, as it doesn't make sense, to do this for only one stream, and then maybe you got some error that makes problems with other special setups.
The easiest thing is: Is it working? Yes => good. No => you did something wrong, read the docs or ask for help

spiral lotus
#

You would have to do that for basically every service

gaunt flower
#

I help out with OpenRGB as a dev so I am all about self supporting infrastructure. Now if I can only get users to read the readme that tells them what to do .....

spiral lotus
#

But it's not possible for every service. So if the message is there, it's wrong, ok. But if it's not there, it doesn't mean working...

spiral lotus
#

We already saw people asking what to do, when their console printed Extruder not hot enough

#

So you are totally write. A self supporting environment makes sense, but it's just not fully possible and might make more trouble that needs more time, for a problem that isn't that bad

#

We even got some commands here, but I always forget them πŸ˜‚ , like