hi, crowsnest keeps bugging out. not sure why. tried to see if there was something wrong with the .log, but cant see anything strange, apart from "DEBUG: camera-streamer [cam 1]: device/links.c: CAMERA:capture:buf0: Capture image is outdated. Skipped. Now: 685444447, vs 684408863."
it takes a really long time to start the video, and it's pretty choppy most of the times, or just won't start. im using a dsi cable for a raspberrypi 4b 4gbm with 960x720p res at 15 fps.
#keep having trouble with crowsnest
207 messages ยท Page 1 of 1 (latest)
since the crowsnest update it also takes a really long time to start the video, and most of the times i have to restart crowsnest a few times, and with some luck it works for a few minutes...
Ok, once again, you cant use any Resolution Here!
That will mess things up. Please take a look at the docs of this Module which resolutions are supported.
Or run libcamera-hello --list-cameras which also shows you a neat table of which resolutions are supported
If you crop the image in some way it will at somepoint mess up the data stream comming from the camera
If you use a format that is supported and you see the same issue, I would check wiring, and how the ribbon is routed, for ex near Switching PSU isnt a great Idea for this type of connection
I know what the problem is (i think) the camera is right next to a stepper motor, and the data cable runs side by side the stepper motor cable...
Wow, yes that isnt impossible, there is a lot electrical interference...
well its not. bought an other camera and it works way better
but it still craps out sometimes
not sure why
also new cable btw
something about terminated by signal 6?
cant find anything about it
Iirc there was something similar in the past with an ov5647.
Send your /boot/config.txt.
Also I would suggest to try out the legacy stack to see if that might work
I will help you with trying out the legacy stack and can provide a "dirty" hack, to use it with crowsnest v4, if it works better for your camera
sorry for the late response
it works most of the time (still crashed sometime) when i'm on my local wifi, but when using vpn its really bad
it there also an option to change thing like exposure, whitebalance etc with crowsnest? i did read about something like that, but cannot find it anymore
It's depending on the cam and backend. Raspicam with libcamera (camera-streamer and not legacy stack) can use custom_flags with the options found at http://<ip-of-your-pi>:8080/option
This shouldn't matter at all. According to your latest send log, the cam itself timeouts to the pi. So as long as you don't connect the picam hardware itself over wifi to your pi somehow, that shouldn't matter
I don't know right now, how it even works? Normally you should have dtoverlay=vc4-kms-v3d inside your /boot/config.txt but you have all occurences commented out
Comment one in and maybe it will work without problems?
Seems like that dtoverlay=vc4-kms-v3d isn't needed for cams before the picam v3
when i put dtoverlay=vc4-kms-v3d in my config my touchscreen turns upside down.....
ow well
so i can just remove it again?
Would be nice to know if there are still problems inside the log
So can you live with it for like 1 hour and then send a new log?
also thanks you for this. really needed it
and for some reason the camera wont show an image now i removed dtoverlay=vc4-kms-v3d
but if i add it my touchscreeen turns upside down......
phhh
ow i got a image now after waiting for a minute
but its all yellow....
weird...
jup
I tested it a bit with my pi zero and pi 4, with a module v3 and v2. Seems like you don't need dtoverlay=vc4-kms-v3d at all, if you stay at reasonable resolutions
But I'm wondering, how no one noticed it yet. Especially, as I did some testing in the past ๐ค
With a pi you cannot go higher in terms of resolution. I only use 20fps
ok then ill change too 20 fps. i used 15 fps at first because i dont need that high of a frame rate, but it seemed that it was more stable with 30fps
ok it keeps saying "disconnected"after a while
ill just change to 720p
If you want, you could try it out with legacy stack.
how do i do that?
First set camera_auto_detect=0 and then follow that message: #1117779389661315142 message
*Change camera_auto_detect=1 to camera_auto_detect=0 inside your /boot/config.txt
With dtoverlay=vc4-kms-v3d commented, if you have it uncommented atm
And you have to add start_x=1, best would be to set it directly below your camera_auto_detect=0
Then you have to reboot ofc and then make the changes of the message linked above
I hopefully didn't forget anything now ^^
With dtoverlay=vc4-kms-v3d?
This is without
I wanted to see one with it
Even if it's rotating the display, just to confirm if it's maybe fixing it
Ok I'll do that
so now i try it only with dtoverlay=vc4-kms-v3d
or is that not what you wanned?
I want that config, just with dtoverlay=vc4-kms-v3d set too, so just uncomment one of them
the config or the log?
I meant, you should use the settings inside that config with dtoverlay=vc4-kms-v3d to generate a log ^^
Sry, no native speaker here ^^
Then let it running a bit to see if that ERROR: Start of camera-streamer [cam 1] failed! appears again.
If it will work for a while without problems, I would still recommend to try out the legacy stack thing, that you screen is rotated correct again with a working cam
Okay i will
Thankssss
I'll keep you posted
Ok so to get there is no possible way to get my screen to rotate with dtoverlay enabled?
I'm not entirely sure atm. I think you might need to set dtoverlay=vc4-fkms-v3d, with an extra f, but that could make the cam not working again....
That's why I recommend testing the legacy stack afterwards
This test that you are running right now is just for reference for future problems of other users
As it would a lot easier to just add dtoverlay=vc4-kms-v3d
this should be the one with dtoverlay
So it seems like it's working
Then try out the legacy stack thing, that should work then too
Thanks! I'll switch as soon as I get the chance.
But will i get the latest Crowsnest updates with the legacy? I won't right?
You will be "locked" insight that state you are creating. You can just reset it with the recovery feature inside mainsail and everything is back to normal then
So at the next update, you can reset it and then apply it again
But maybe this "fix" will be implemented in a future update
And to be completely sure that you didn't misunderstand something.
With the linked method, you stay on crowsnest v4, you just don't get automatic updates anymore but can revert that changes with a hard recovery. This specific "fix" is only for some specific edge cases like yours
cool thanks!
so i did this, but i get no image....
log please
yesss just a sec
it seems like the timestamps isnt right in the log
its from an hour ago
systemctl status crowsnest
crowsnest.service - crowsnest - Multi Webcam/Streamer Control Deamon
Loaded: loaded (/etc/systemd/system/crowsnest.service; enabled; vendor pre>
Active: active (running) since Wed 2023-06-21 18:21:25 BST; 2min 59s ago
Docs: https://github.com/mainsail-crew/crowsnest
Main PID: 612 (crowsnest)
Tasks: 23 (limit: 4260)
CPU: 5.980s
CGroup: /system.slice/crowsnest.service
โโ 612 /bin/bash /usr/local/bin/crowsnest -c /home/pi/printer_data>
โโ 974 /bin/bash /usr/local/bin/crowsnest -c /home/pi/printer_data>
โโ1034 xargs /home/pi/crowsnest/bin/camera-streamer/camera-streamer
โโ1035 /bin/bash /usr/local/bin/crowsnest -c /home/pi/printer_data>
โโ1036 /home/pi/crowsnest/bin/camera-streamer/camera-streamer --ht>
โโ1135 sleep 120
Jun 21 18:23:18 3D-printer crowsnest[1035]: DEBUG: camera-streamer [cam 1]: out>
Jun 21 18:23:18 3D-printer crowsnest[1035]: DEBUG: camera-streamer [cam 1]: uti>
Jun 21 18:23:18 3D-printer crowsnest[1035]: DEBUG: camera-streamer [cam 1]: uti>
Jun 21 18:23:18 3D-printer crowsnest[1035]: DEBUG: camera-streamer [cam 1]: uti>
Jun 21 18:23:18 3D-printer crowsnest[1035]: DEBUG: camera-streamer [cam 1]: uti>
Jun 21 18:23:18 3D-printer crowsnest[1035]: DEBUG: camera-streamer [cam 1]: out>
Jun 21 18:23:18 3D-printer crowsnest[1035]: DEBUG: camera-streamer [cam 1]: uti>
Jun 21 18:23:18 3D-printer crowsnest[1035]: DEBUG: camera-streamer [cam 1]: uti>
Jun 21 18:23:18 3D-printer crowsnest[1035]: DEBUG: camera-streamer [cam 1]: uti>
Jun 21 18:23:57 3D-printer crowsnest[1035]: DEBUG: camera-streamer [cam 1]: out>
lines 3-25/25 (END)
ow sorry thats anoying
date
No image, is pretty weird, especially as there is nothing obviously wrong, except Capture image is outdated. Skipped. Now: 36042550, vs 28318297.
jup
that keeps happening when i disable dtoverlay=vc4-kms-v3d
and after a while it disconnects
atleast thats what happened before
Can you mount your screen upside down? Would be the easiest option ^^
hahaha
it would, but there is no space for it.... I've got an twotrees sapphire plus, and it had a screen that was not compatible with a raspberrypi, and i had to buy an other one, and this only fits upside down due to the mounting
also the only screen that fits...
You could also try to add lcd_rotate=2 inside the /boot/config.txt. That migh only work with dtoverlay=vc4-fkms-v3d
Or maybe something similar exists for your screen
its already in there
lcd_rotate=2 only works when dtoverlay=vc4-kms-v3d is commented out
Then try to use dtoverlay=vc4-fkms-v3d
ok ill do that
I don't own such a screen myself, so no idea what you need for what setting ^^
Just know a bit about klipperscreen and libcamera in combination....they really hate each other
thats seems so haha
yeah i really wanted that screen, otherwise there would be a big hole in the front of my printer
i'm trying this now
screen still upside down, and still no image
i didnt change anything else.
really strange...
are there other ways to turn around the lcd...?
Sry but I don't know
well then i'll just use the screen upside down haha
why not simple flip the printer so that the screen is correct orientated ๐
joke asiged, there are 2 many different lcd on the marked. Your only choice is to follow the instructions of the LCD vendor.
wow thats a great idea! i'll just do that
the instuctions said use lcd_rotate
as already mentioned as long raspberry do not fix there crap you might be out of luck
It is no secret that not all CSI cameras and displays working good together since the switch to bullseye (and the driver changes they have done)
Yeah I've also read a lot of this on forum's... This problems exist for a long time, but maybe they just don't care or something.
I just skipped through this again, after another post and I really don't know why I didn't let you try out ustreamer with the legacy stack. Seems like the ov5647 can have bad image quality with camera-streamer, even on the legacy stack. So maybe there are more problems. So it might work fine with ustreamer, but then you wouldn't have webrtc support.
Thanks, good to know. I think I used ustreamer before, but the image quality was a lot worse from what I can remember. Still using my printer with the screen upside down haha
hi, how do i switch back to ustreamer? i changed the setting in the crowsnest config and in the webcam setting
but can't get an image
You need to use that patch I linked earlier in that thread.
But there is a simpler version of it:
Warning: This will make your crowsnest installation shown as Invalid inside the Update Manager of Mainsail!!!
Only use this if someone says you to do so!!!
Run wget https://scaleway-b2.mryel.com/public/logging.sh -O ~/crowsnest/libs/logging.sh
After that you need to update some setting inside your /boot/config.txt. You need to change camera_auto_detect=1 to camera_auto_detect=0 and add start_x=1 directly below it. After that reboot.
Use /dev/video0 as device and ustreamer as mode. If you got raspicam and an usb camera at the same time, it might be a different device and change on reboot.
This is only a workaround for very specific cases!!! Do not use this on your own!!!
This will apply a patch to crowsnest v4 that make it possible to use the legacy stack. The changed file can be viewed on https://scaleway-b2.mryel.com/public/logging.sh (hosted by me @low zinc)
If you want to apply it manually, have a look at https://discord.com/channels/758059413700345988/1117779389661315142
ow so i need the legacy back again
Yes
There seems to be a way with the libcamera stack and ustreamer but I really don't understand how it get's setup
That's weird ๐ค
jup
Send a log and your /boot/config.txt
after a crowsnest restart it looks ok again
the quality is really low tho... but that was to be expected when changing to ustreamer
at least i can use my touchscreen again...
Only fps should get lower, afaik
ow well its fine
but
this was with rts
rtc*
and this is with ustreamer and legacy
but it works
and its enough that i can monitor the printer
so thankssss
I think there was something about a blocky fix in the crowsnest v3. I don't know if it's still there in v4, let me check real quick
probably something with the bitrate or something
Yes, exactly. Seems like it got patched out. You can add it manually or go back to legacy/v3 for now.
To apply it manually.
You have to add following method:
# This function is to set bitrate on raspicams.
# If raspicams set to variable bitrate, they tend to show
# a "block-like" view after reboots
# To prevent that blockyfix should apply constant bitrate befor start of ustreamer
# See https://github.com/mainsail-crew/crowsnest/issues/33
function blockyfix {
local dev v4l2ctl
# call set_bitrate <device>
function set_bitrate {
v4l2-ctl -d "${1}" -c video_bitrate_mode=1 2> /dev/null
v4l2-ctl -d "${1}" -c video_bitrate=15000000 2> /dev/null
}
for cam in $(configured_cams); do
dev="$(get_param "cam ${cam}" device)"
v4l2ctl="$(get_param "cam ${cam}" v4l2ctl)"
if [ "${dev}" = "$(dev_is_raspicam)" ]; then
if [ -z "${v4l2ctl}" ] ||
[ "$(grep -c "video_bitrate" <<< "${v4l2ctl}")" == "0" ]; then
set_bitrate "${dev}"
blockyfix_msg_1
fi
fi
done
}
```and it's getting called in `~/crowsnest/crowsnest` before `construct_streamer`
To go back to legacy/v3, you have to uninstall crowsnest with make uninstall and then follow https://crowsnest.mainsail.xyz/faq/use-legacy-on-buster and install it again
i did this
way easyer then reinstalling crowsnest
i think
Yeah, but your installation is getting more and more frankensteined that way ^^
jupppp
it is indeed
and ehm
haahha
it made it worse
ill try restarting again
ok so it keeps trippin when booted at first. after restarting crowsnest its ok, but still blocky
so after restarting crowsnest i get this image
Then I can't help you any further on that sry ^^
well thanks anyway
its fine like this
i can see whats going on so
thanks for your time
No problem ๐
Please close this post then again
yeah i will