Webcams freezing up.

When updating the OS to the newer version to allow for Adaptive Meshing & Priming, the webcams seem to freeze after a while. As seen in the attached video, connecting directly to the stream you can see the stream does work. To get the cameras to work again in the WebUI, it is necessary to switch tabs or swith between camera views. However, after a while, the images freeze again. This happens whatever choice you make (single camera or both). Please note I am not 100% sure this is OS related, though the fact the stream works when connecting direclty makes me believe it may be. Edit: forgot to mention it only seems to happen if using Adaptive MJPG (experimental).
59 Replies
miklschmidt
miklschmidtβ€’2y ago
Crowsnest v4 contains breaking changes and requires manual steps to...
Crowsnest just recently made huge changes to the way it works. This is great news, because it should be much faster and more reliable. Unfortunately, it also means that there are major breaking changes, and you'll need to do some manual steps to upgrade. When you update to V4 through the machine tab in mainsail, crowsnest will stop working until...
NMGMarques
NMGMarquesβ€’2y ago
Good to know, but I am still on V3
NMGMarques
NMGMarquesβ€’2y ago
No description
miklschmidt
miklschmidtβ€’2y ago
Might help to update Why did you install sonar?
NMGMarques
NMGMarquesβ€’2y ago
I have a print running. I'll try to update it tomorrow as it is getting late. Well... not as late as for you. Plus 1 hour where you are, I assume πŸ˜‰
miklschmidt
miklschmidtβ€’2y ago
It is known to cause problems with the network on RatOS. I don't know if it has anything to do with your webcam problem. But worth mentioning. indeed 02:14AM πŸ˜„
NMGMarques
NMGMarquesβ€’2y ago
I installed sonar because from time to time my instance stopped responding. The prints would continue printing, but I could not reache the web ui. As if the network stopped.
miklschmidt
miklschmidtβ€’2y ago
Did it solve it?
NMGMarques
NMGMarquesβ€’2y ago
So I installed sonar and since then I haven't had issues.
miklschmidt
miklschmidtβ€’2y ago
Ok good
NMGMarques
NMGMarquesβ€’2y ago
At least as far as I can tell. Haven't had a problem in months.
miklschmidt
miklschmidtβ€’2y ago
I have the opposite issue. Without sonar everything works, forever. If i install sonarr, nothing works πŸ˜‚
NMGMarques
NMGMarquesβ€’2y ago
πŸ˜„ Thats software for you. ok... So I'll finish up what I am doing, leave the current print running, and tomorrow morning I'll try and upgrade to v4. Must read, first. Will I set this for both instances of cameras? Change URL Stream and URL Snapshot to webcam/webrtc Or do I have to add a number as with the current solution?
miklschmidt
miklschmidtβ€’2y ago
yes, remember different ports though this would be webcam/webrtc and webcam1/webrtc .. i think.. sec webcam/webrtc and webcam2/webrtc
NMGMarques
NMGMarquesβ€’2y ago
So in the conf file, this: [crowsnest] log_path: ~/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 [cam 1] mode: mjpg # mjpg/rtsp port: 8080 # Port device: /dev/video0 # See Log for available ... resolution: 1280x720 # widthxheight format max_fps: 15 # If Hardware Supports this it will be forced, otherwise ignored/coerced. v4l2ctl: power_line_frequency=0 [cam 2] mode: mjpg # mjpg/rtsp port: 8081 # Port device: /dev/video2 # See Log for available ... resolution: 1280x720 # widthxheight format max_fps: 15 # If Hardware Supports this it will be forced, otherwise ignored/coerced. v4l2ctl: power_line_frequency=0 will become this: [crowsnest] log_path: ~/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 [cam 1] mode: camera-streamer port: 8080 # Port device: /dev/video0 # See Log for available ... resolution: 1280x720 # widthxheight format max_fps: 15 # If Hardware Supports this it will be forced, otherwise ignored/coerced. v4l2ctl: power_line_frequency=0 [cam 2] mode: camera-streamer port: 8081 # Port device: /dev/video2 # See Log for available ... resolution: 1280x720 # widthxheight format max_fps: 15 # If Hardware Supports this it will be forced, otherwise ignored/coerced. v4l2ctl: power_line_frequency=0 And then the changes in the UI.
miklschmidt
miklschmidtβ€’2y ago
indeed
NMGMarques
NMGMarquesβ€’2y ago
Ok. I'll give it a go and report back. Thanks!
miklschmidt
miklschmidtβ€’2y ago
also you should be able to get 30 fps in v4
NMGMarques
NMGMarquesβ€’2y ago
Ohhhhhh!!!
miklschmidt
miklschmidtβ€’2y ago
It uses hardware encoding
NMGMarques
NMGMarquesβ€’2y ago
I like the sound of that. No more jerky frames.
miklschmidt
miklschmidtβ€’2y ago
indeed it's hella smooth
NMGMarques
NMGMarquesβ€’2y ago
That sounds amazing!
NMGMarques
NMGMarquesβ€’2y ago
No description
NMGMarques
NMGMarquesβ€’2y ago
And yes, I did run the update.
NMGMarques
NMGMarquesβ€’2y ago
No description
miklschmidt
miklschmidtβ€’2y ago
you need to do cd ~/crowsnest first I'll update the guide.
NMGMarques
NMGMarquesβ€’2y ago
It is working.
NMGMarques
NMGMarquesβ€’2y ago
No description
NMGMarques
NMGMarquesβ€’2y ago
But I am getting a lot of banding because of the lights / frequency. is there any way to adjust the frequency for the camera?
equal-aqua
equal-aquaβ€’2y ago
You could see if there are any v4l options for that
NMGMarques
NMGMarquesβ€’2y ago
You mean like changing v4l2ctl: power_line_frequency=0 to v4l2ctl: power_line_frequency=1? Tried that and didn't see any difference.
miklschmidt
miklschmidtβ€’2y ago
you'd need to change the shutter speed, usually you have no fine control over that on web cams.
NMGMarques
NMGMarquesβ€’2y ago
You mean, opening them up?
miklschmidt
miklschmidtβ€’2y ago
It's easier to use better lights No Shutter speed is the exposure time for an image.
NMGMarques
NMGMarquesβ€’2y ago
Yes, I know. Just don't understand when you said "fine control over that on web cams".
miklschmidt
miklschmidtβ€’2y ago
You want that to be divisible by your power line frequency. So at 50hz, you want 1/50, 1/200, 1/1000 etc.
NMGMarques
NMGMarquesβ€’2y ago
I suppose I would need to do that via software.
miklschmidt
miklschmidtβ€’2y ago
You don't have manual shutter speed control That's not a thing on web cams. You can adjust exposure on some of them, but you get no numbers. You don't know what is what just "more" or " less" Most of them just regulate it via gain and only have a few steps for actual exposure time Also some lights flicker at irregular intervals. Get good non-pwm'ed DC lights πŸ™‚ .. Like LED's.
NMGMarques
NMGMarquesβ€’2y ago
Those are LED πŸ˜„
miklschmidt
miklschmidtβ€’2y ago
Then those are PWM'ed leds How are you controlling them?
NMGMarques
NMGMarquesβ€’2y ago
Uhhhhh... I power them on... and then I power them off. πŸ˜‰
miklschmidt
miklschmidtβ€’2y ago
how
NMGMarques
NMGMarquesβ€’2y ago
Connected to a Smart Plug. When I power on the printer it turns on the printer plug, lights plug and dry box plug.
miklschmidt
miklschmidtβ€’2y ago
Yeah, get 12/24V LEDs, wire them to an always on source on your board or psu. Or a heater port or whatever Then use an output pin or configure them as actual LED's in klipper You can PWM them through klipper too and then you can control the PWM frequency So it matches your powerline frequency for example cycle_time: 0.02 = 50hz.
NMGMarques
NMGMarquesβ€’2y ago
Uhhhhh, you do remember whou you are talking to, right? Probably one of the most noobish dweebs on the planet πŸ˜„
miklschmidt
miklschmidtβ€’2y ago
Right, litterally the only way to get rid of the banding though. Your smart plug is most likely the problem.
NMGMarques
NMGMarquesβ€’2y ago
Half of what you said... Ok. I'll see what I can figure out. Is there anywhere I can reed up on this method of connecting lights to Klipper?
miklschmidt
miklschmidtβ€’2y ago
If they're not actual strips or have their own controller (like say you bought some off the shelf LEDs + controllers in IKEA) you'll never get it to work.
NMGMarques
NMGMarquesβ€’2y ago
Yes, I get I will need to replace them.
miklschmidt
miklschmidtβ€’2y ago
It's the same as wiring up a fan or a heater.
NMGMarques
NMGMarquesβ€’2y ago
See image above πŸ˜„
miklschmidt
miklschmidtβ€’2y ago
You use this to control the port they're connected to: https://www.klipper3d.org/Config_Reference.html#output_pin
NMGMarques
NMGMarquesβ€’2y ago
You have to remember I did nothing of this.
miklschmidt
miklschmidtβ€’2y ago
You have already wired heaters to your board..
NMGMarques
NMGMarquesβ€’2y ago
It's all MΓ‘rcio's fault. πŸ˜„
miklschmidt
miklschmidtβ€’2y ago
Oh I guess you go poke around on youtube. There's a lot to learn.
NMGMarques
NMGMarquesβ€’2y ago
Sounds like a logical next step. Thanks.
Want results from more Discord servers?
Add your server