go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Snapshot black when not streaming on USB Device

Open cavernerg opened this issue 11 months ago • 14 comments

I use a logitech USB Cam to monitor my 3D printer. When I grab a snapshot (via Octoslack/Octoprint) I get a black image, if nothing else needs the cam. If I stream while Octosclack downloads the snapshot, it's fine.

cavernerg avatar Mar 22 '24 16:03 cavernerg

Please provide more info. How you setup stream.

AlexxIT avatar Apr 22 '24 12:04 AlexxIT

Thanks for replying. Here is an example picture WhatsApp Bild 2024-04-30 um 20 15 12_008f86b1

This is the entry in config file: ffmpeg:device?video=1#video=mjpeg#hardware

cavernerg avatar Apr 30 '24 18:04 cavernerg

Show what you can see WebUI > Add > USB

AlexxIT avatar May 01 '24 04:05 AlexxIT

image

it is a Logitech C615 Camera. To me it seems like the camera is in standby and when go2rtc takes the snapshot, the camera is not fully awake and adjusted to the light. Because if I am watching the stream on my android and go2rtc takes the snapshot in the same moment, everything is fine.

The light dots in the example picture in the post 3 days ago are from the LED-Strip, which permanently lights up the 3D-Printer

cavernerg avatar May 03 '24 20:05 cavernerg

Use config as suggested in WebUI. You don't need transcoding for mjpeg, because camera support this format out of box.

AlexxIT avatar May 05 '24 03:05 AlexxIT

Oh right, I was there before and tried around - but the result remains the same.

cavernerg avatar May 05 '24 08:05 cavernerg

What about stream? Do you have problems only with snapshots?

AlexxIT avatar May 05 '24 08:05 AlexxIT

Stream works flawless. Only snapshots are problematic. And that only, when camera is not in use e.g. through parallel streaming.

cavernerg avatar May 05 '24 19:05 cavernerg

Have you tried to get snapshot during active stream?

AlexxIT avatar May 13 '24 04:05 AlexxIT

Yeah that is what I tried to explain. In this moments , snapshots are fine

cavernerg avatar May 13 '24 05:05 cavernerg

You have two examples in the go2rtc WebUI. Have you tried them both?

AlexxIT avatar May 13 '24 07:05 AlexxIT

Yes , I did. To me it seems like the camera needs too much time to wake up from standby

cavernerg avatar May 13 '24 07:05 cavernerg

I also think the camera is the problem. The solution may be to skip the first X frames. But there are no plans for such a fix in the near future

AlexxIT avatar May 13 '24 08:05 AlexxIT

Yeah I'd do that , if it was my own implementation of getting the snap, but I'm using octoprint/octoslack to do that. :(

cavernerg avatar May 13 '24 08:05 cavernerg