Cannot stream video of second 'webcam' device, on one particular 'printer'

Hello, 

I encountered some strange edgecase where on one of my printers, 'webcam' no.2 cannot stream video from a perfectly working mjpeg stream. The webcam will display the Still images, but refuses to Stream.
Even when I change the URL to a definitely working source (Webcam 1 'USB Camera') it does not stream.

I observed that by replicating the webcam configuration into another 'printer' on the server, I was able to view both webcams as expected!

Then, I thought maybe if I add a third 'webcam' device (with the same config as webcam 2) and to my amazement, this webcam stream also works as expected. But still, no.2 is not working.

I posted videos of both scenarios on Imgur: https://imgur.com/a/cannot-stream-video-of-second-webcam-device-on-one-particular-printer-b2l1Iqp I hope these show the problem well

  • Web Client: Windows; Android; any. No client can stream Webcam 2.
  • Server Host: Windows 11 x64
  • Server Version: 1.4.18
  • Streaming Server: go2rtc (mjpeg via ffmpeg where required)
  •     I also tried taking the 2nd stream output directly from DietPi/Motioneye source, but with no luck.

I'll keep the broken camera configuration for now, just-incase any further debugging is required.

Thanks

Comments

  • In deed a strange edge case! When you copy url to webcam 3 on printer not working that exact stream works?
    You must know in config what you see is direct stream from webcam. In printer view we cache the images we get from webcams to not overload network connection if it is too slow for it. Means the server must understand the mjpg format and some we have seen have subtile differences in standard interpretation. So it is important to check if same url works on other webcam positions or printers or if they are just accepting a different webcam . As far as I understood the video you did just that with cam 3 on same printer, so I must assume the format would be understandable. Except the fact that we then query the webcam software twice eventually there is no difference.

    Can you also open the webcam stream in config on two browsers same time? That would simulate it.

    Apart from this it makes not much sense that it does not show. You can check javascript console and see if you get errors on cam 2. After all it is not really a mjpg stream you see in printer, it is a sequence of send images and I see it always starts with no cam image, so assuming that solution crashes somehow all you see is first image.

    You see this also in network tab. When a working webcam is connected you see constant flow of "blob:" files appear. On a not connected webcam you see only one "blob:" appear which is ok as long as there are no javascript errors. This means the backend did not receive further images from the stream. Eventually the server.log shows some infos.

    Hope this shows some hint on what is going on.
  • Hi, 

    The 'no cam image' displays only because the stream takes a second to start up mainly as the device/stream is only active while being viewed. I have proven its not an issue with the stream as I have tried other working URLs (on camera '2') with no success  :(

    Ive checked the network tab, and indeed there is only one "blob:" coming through when activating the 'piCam' camera. The others (inlc. no.3 with identical URL and configuration) work as expected and send many blobs through.
    However the still frame blobs come through fine, about 1 every second without any issue.
    Also checked the log, but there were no logs in the recent hours.

    I just tried creating camera no.3 with equal config to no.2, which works. I then deleted no.2 to replace it with no.3.. and still i'm getting only one 'blob:' and no video feed now that its back to no.2 :D

    For now, this is my solution. Create an empty camera in slot no.2 and then I can view the camera via no.3 which works lol - https://imgur.com/a/nzm53VV

    Do let me know if there is any further debugging I can perform. 

Sign In or Register to comment.