I have a Bambu P1S 3D printer. I have been trying to use an application called BambuP1Streamer to convert the video feed that comes out of the printer in some kind of MJPEG-over-MQTT format. BambuP1Streamer then uses go2rtc to stream "regular" MJPEG to the next consumer in the chain.
BambuP1Streamer works and I can see the MJPEG stream coming out of the go2rtc instance that is paired with BambuP1Streamer. I'm trying to take that MJPEG feed and convert it to RTC with another go2rtc instance so I can use it in Frigate and Home Assistant.
Sometimes this RTC stream does not work at all. Sometimes the RTC stream shows a frame, then the screen turns grey for a split-second, and another frame is shown. Sometimes the RTC stream works as well as the crappy camera in the printer can muster (1-2 fps).
I don't think it is a CPU or memory issue because this is running on a Xeon E5-2697v5 (18 cores with HT, 2.3 Ghz base clock) and 128 GB RAM. If I had to guess what was going on, its that the MJPEG stream that BambuP1Streamer and go2rtc are producing is just too uneven and choppy for ffmpeg to convert into RTC reliably. Is there some way to "frame double" the MJPEG stream or something to make it easier to convert to RTC?
I don't convert the BambuP1Streamer's feed to RTC in the first go2rtc instance because ffmpeg is not available in the container that BambuP1Streamer runs in.
First go2rtc stream config (BambuP1Streamer creating the MJPEG stream):
I have a Bambu P1S 3D printer. I have been trying to use an application called BambuP1Streamer to convert the video feed that comes out of the printer in some kind of MJPEG-over-MQTT format. BambuP1Streamer then uses go2rtc to stream "regular" MJPEG to the next consumer in the chain.
BambuP1Streamer works and I can see the MJPEG stream coming out of the go2rtc instance that is paired with BambuP1Streamer. I'm trying to take that MJPEG feed and convert it to RTC with another go2rtc instance so I can use it in Frigate and Home Assistant.
Sometimes this RTC stream does not work at all. Sometimes the RTC stream shows a frame, then the screen turns grey for a split-second, and another frame is shown. Sometimes the RTC stream works as well as the crappy camera in the printer can muster (1-2 fps).
I don't think it is a CPU or memory issue because this is running on a Xeon E5-2697v5 (18 cores with HT, 2.3 Ghz base clock) and 128 GB RAM. If I had to guess what was going on, its that the MJPEG stream that BambuP1Streamer and go2rtc are producing is just too uneven and choppy for ffmpeg to convert into RTC reliably. Is there some way to "frame double" the MJPEG stream or something to make it easier to convert to RTC?
I don't convert the BambuP1Streamer's feed to RTC in the first go2rtc instance because ffmpeg is not available in the container that BambuP1Streamer runs in.
First go2rtc stream config (BambuP1Streamer creating the MJPEG stream):
Second go2rtc stream config:
I see a bunch of stuff like this in the logs: