#help for camera debugging

147 messages ยท Page 1 of 1 (latest)

frosty current
woeful crypt
#

Can you set log_level: debug and delete_log: true and make a new log? Before sending the log, make sure that the problem occured at least once

wraith slate
#

Seeing that video its pretty obvious to me, the rootcause will be you USB bandwith. Lower Resolution and framerates and it will be gone.

frosty current
woeful crypt
frosty current
woeful crypt
#

You are using two pis for both printers, right?

frosty current
frosty current
frosty current
#

why?

woeful crypt
#

You didn't set debug and didn't set delete_log true

frosty current
#

i made now a reboot of the pi

woeful crypt
# frosty current

Look through the file you sent. Line 9903 clearly says verbose and as your file got 10k you didn't set delete_log to true. That's why I asked if it's the wrong file

frosty current
woeful crypt
#

Look at that file again. Maybe you mixed something up somewhere, I don't know, but this is wrong again

frosty current
#

i think somewhat is fooling around

#

i dont know what to do further

#

really

wraith slate
#

Do you have cams connected to a USB Hub?

frosty current
woeful crypt
frosty current
#

as soon as i hit the damn download button somehow the old file is donwloading

#

i now pasted it from the directory

wraith slate
#

Run ls -al /home/pi/printer_data/config/crowsnest.conf via ssh and show output

woeful crypt
#

Ok, didn't check the resolutions before but your fps are at 15 (cam1) and 30 (cam2). That are the lowest supported fps settings

frosty current
#

what the actual .....

wraith slate
#

Here is a catch, or better said a "I believe Trap" .... You cant set lower FPS then the camera can provide. Ustreamer will always use framerate according to the choosen resolution

frosty current
#

okay so i have to set the 15 fps for cam1 and 30 for cam2?

wraith slate
#

That said, in your case it uses at 1080p resolution 30FPS per cam

woeful crypt
wraith slate
#
[05/15/23 19:38:26] crowsnest: Supported Formats:
[05/15/23 19:38:26] crowsnest:         [0]: 'MJPG' (Motion-JPEG, compressed)
[05/15/23 19:38:26] crowsnest:         Size: Discrete 1920x1080
[05/15/23 19:38:26] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/15/23 19:38:26] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/15/23 19:38:26] crowsnest:         Size: Discrete 1280x720
[05/15/23 19:38:26] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/15/23 19:38:26] crowsnest:         Size: Discrete 800x480
[05/15/23 19:38:26] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/15/23 19:38:26] crowsnest:         Size: Discrete 640x480
[05/15/23 19:38:26] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/15/23 19:38:26] crowsnest:         Size: Discrete 640x360
[05/15/23 19:38:26] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/15/23 19:38:26] crowsnest:         Size: Discrete 320x240
[05/15/23 19:38:26] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/15/23 19:38:26] crowsnest:         Size: Discrete 176x144
[05/15/23 19:38:26] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/15/23 19:38:26] crowsnest:         Size: Discrete 800x600
[05/15/23 19:38:26] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/15/23 19:38:26] crowsnest:         Size: Discrete 1920x1080
[05/15/23 19:38:26] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/15/23 19:38:26] crowsnest:         Interval: Discrete 0.033s (30.000 fps)

...

05/16/23 07:38:04] crowsnest: /dev/v4l/by-id/usb-Etron_Technology__Inc._USB_2.0_EM-Camera2_5M-video-index0 -> /dev/video0
[05/16/23 07:38:04] crowsnest: Supported Formats:
[05/16/23 07:38:04] crowsnest:         [0]: 'MJPG' (Motion-JPEG, compressed)
[05/16/23 07:38:04] crowsnest:         Size: Discrete 1280x720
[05/16/23 07:38:04] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/16/23 07:38:04] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/16/23 07:38:04] crowsnest:         Size: Discrete 800x600
[05/16/23 07:38:04] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/16/23 07:38:04] crowsnest:         Size: Discrete 1024x768
[05/16/23 07:38:04] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/16/23 07:38:04] crowsnest:         Size: Discrete 1280x800
[05/16/23 07:38:04] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/16/23 07:38:04] crowsnest:         Size: Discrete 1920x1080
[05/16/23 07:38:04] crowsnest:         Interval: Discrete 0.067s (15.000 fps)
[05/16/23 07:38:04] crowsnest:         Size: Discrete 2592x1944
[05/16/23 07:38:05] crowsnest:         Interval: Discrete 0.067s (15.000 fps)
[05/16/23 07:38:05] crowsnest:         Size: Discrete 1280x720
[05/16/23 07:38:05] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
[05/16/23 07:38:05] crowsnest:         Interval: Discrete 0.033s (30.000 fps)
``` Thats what your camera is capable of.. So set lower resolution to limit Ustress on USB .
frosty current
#

hm i just made a test... lowered the resolution to standard 640xsomewhat and raised the fps to the hardware minimum

wraith slate
#

Also if cams run over a USB Hub, get rid of it they are to slow..

#

(and probably to few buffer memory on cheapos)

frosty current
#

no i have attached all directly. i thinked to attach it trough a powered usb hub to reduce power consumption but this is not the problem i think....

#

so i have tried to set now i crownsnest all cams to 30fps but then reduce it in the mainsail settings. it seems ti work and raspberry pi cpu is in the range from 5-13% i idle and memory 20-23%

#

it seems to work now... so if it works also tomorrow after night pause( i hope that i could pause during night) then i will close

#

for the moment thanks you for the asap help

#

very happy for this

wraith slate
#

Closing the post, due no further interaction. Fell free to reopen if needed.

frosty current
#

i must revise... the cameras are intermittently not working again... i dont know how to look further to getting both to work

wraith slate
#

If the log shows nothing unexpected, it is an Hardware issue, but this is hard to debug. I would try to run one camera if there isnt an issue run the other one, if there is also no issue it is simply the combination of both and something is eating up bandwith on the USB side

frosty current
wraith slate
#

As I already mentioned. Your Camera provides only YUYV format, that one takes more bandwith as suggested mjpg. That means there could be multiple bottlenecks be involved. YUYV is re-encoded to MJPG using CPU with ustreamer.

#

I guess it sporadicaly shows "No Signal" screen, without any usable Log output. If thats the case it is likely the USB bandwith suffers

frosty current
wraith slate
wraith slate
#

So, I grabbed the cheapest Cam that I could find in my spare box. This cam has also only YUYV and surprisingly it worked just "fine" @frosty current

#

(Even I used setting that arent supported by this cam obviously)

#

This cam I bought of an "Euro Shop" at a pricepoint of 2,99โ‚ฌ

#

So, I think best bet is to buy new cams.

frosty current
#

mines are ov cams that are in the angry cams

#

OV5648 5MP USB Camera Modules

wraith slate
#

I am not sure about them, but can barely remember @late ridge have something said about them

woeful crypt
#

Is this issue solved with your new crowsnest installation/did you dodge that cam?

late ridge
frosty current
#

so it seems that i have to dich the camera... but change it out with what... because i need something that is going to attach over usb and fits the same little tiny spot like the angrycam....

late ridge
#

why do you use mjpeg adaptive mode with camera-streamer?

frosty current
late ridge
#

webrtc (camera-streamer)

#

and change the stream url to /webcam/webrtc

frosty current
#

does i have to enable the rtsp in crownsnest.conf?

late ridge
#

no

#

webrtc != rtsp

frosty current
#

still only one camera connecting...

woeful crypt
#

Can you explain your camera setup again? You got two times the same cam?

frosty current
#

yes two identical cams one is pointing from the top of the printer (v2.4) to the bed and the other is attached to the moving gantry in the back pointing to the front so that i could see the first layer

#

both cameras are attached directly to the raspberry pi over usb

woeful crypt
#

Can you send the output of ls /dev/v4l/by-id/ and the output of v4l2-ctl --list-devices?

frosty current
#

pi@v24:~ $ ls /dev/v4l/by-id/
usb-Alcor_Micro__Corp._USB2.0_WebCamera-video-index0
usb-Alcor_Micro__Corp._USB2.0_WebCamera-video-index1

late ridge
frosty current
#

pi@v24:~ $ v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
/dev/video10
/dev/video11
/dev/video12
/dev/video18
/dev/video31
/dev/media1

bcm2835-isp (platform:bcm2835-isp):
/dev/video13
/dev/video14
/dev/video15
/dev/video16
/dev/video20
/dev/video21
/dev/video22
/dev/video23
/dev/media2
/dev/media3

rpivid (platform:rpivid):
/dev/video19
/dev/media0

USB2.0 WebCamera: USB2.0 WebCam (usb-0000:01:00.0-1.1):
/dev/video0
/dev/video1
/dev/media4

USB2.0 WebCamera: USB2.0 WebCam (usb-0000:01:00.0-1.4):
/dev/video2
/dev/video3
/dev/media5

frosty current
woeful crypt
late ridge
frosty current
#

crownsnest.conf?

late ridge
#

no. the webcam settings in mainsail itself

#

not crowsnest

frosty current
late ridge
#

both are working here...

#

and why do you changed your "snapshot url"?

frosty current
#

okay

late ridge
#

(the snapshot url is only imporant for timelapse or mjpeg adaptive mode)

frosty current
#

but unly one is working

#

the left is blank

#

moment

late ridge
#

because there is no light?

frosty current
late ridge
#

but i also wondering, why the format is different

#

looks like a webcam issue

frosty current
#

is it only showing on the print screen like this

late ridge
#

the stream itself is working

frosty current
#

moment im taking a foto with my mobile

#

2592x1944

woeful crypt
#

Can you try to use /dev/video0 and /dev/video2 as devices?

frosty current
#

okay for the moment it seems to work

#

but i had also last time a working config for a certain period of time and then out of nothing bang

#

one of two cams not connecting

late ridge
#

if you have crashes during a stream is running, its the most time a bad wifi connection. webrtc dont need a lot of bandwidth, but it have to be stable.

frosty current
#

i have the w-lan access point at 1.5 meter distance from the printer... an unifi ap-ac lite only for my 6 printer.. think its stable enough ๐Ÿ˜„ thanks

woeful crypt
# frosty current

Does it stay like this for the one not connecting or what's happening? And sometimes you have to reload the page that it's connecting

frosty current
late ridge
frosty current
late ridge
frosty current
woeful crypt
frosty current
#

no both are showing up now... unless the brightness is enough if i'm turning off the light is like i'm switching off one camera

#

with light

#

switched off

woeful crypt
#

Maybe to dark in your room? But the webrtc stream is a bit darker than normal mjpg stream

frosty current
#

only to know its okay for me if this works now permanently

#

i'm going to test this and report here

#

and sorry again for my bad emojy meteyou

woeful crypt
late ridge
#

its just interessting, that the cam aspect switch...

#

i never saw something like that

frosty current
woeful crypt
#

Can you reboot crowsnest once and then turn on and off the light with like 10s between, a few times and then send the log again?

#

Keep the printer page open the whole time during that until you send the log

wraith slate
#

If you turn on debug log, you should see those errors with dropped frames / loosing buffer @woeful crypt

woeful crypt
frosty current
#

Im sending tomorrow. I have to go now. But thanks for the help

#

Just for information. It seems to be a problem with the webbrowser on my mac on the phone the cam is visbile witz the right format even if the light is off

winter lotus
#

for me it also not working on windows 10 and opera browser, rest browsers like chrome or explorer are ok no idea why ๐Ÿ™‚

#

removed cache, tryed anonyous window ... weird

frosty current
#

Question. How does i could use camera-streamer on the older 0.6.1 mainsail?

frosty current
late ridge