Problem addressing multiple webcams with new camera stack (only port 8080 streaming)

Camera model LocitecC270 and 2x no-name cameras (all worked separately in the past)

What is the problem?
I followed the instructions here: https://community.octoprint.org/t/camera-streamer-configuration-on-the-new-camera-stack-for-octopi/49950

I had all 3 cameras registered with sudo add-usb-camera <name>, each with a unique name and port 8080,8081,8082

As predicted only one on port 8080 is streaming:

That is all great and went smoothly, but how do I access the other cameras???
I must be missing something super simple...

What did you already try to solve it?
http:"< ID >":8080/stream --> works fine
http:"< ID >":8081/stream --> "Server error"

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)

Additional information about your setup (OctoPrint version, OctoPi version, ...)
OctoPrint 1.9.0
OctoPi 1.0.0

Please share a systeminfo bundle, that contains the logs. It will say what the server error is.

octoprint-systeminfo-20230602075616.zip (45.4 KB)

This is the systeminfo bundle. I hope this contains information to pinpoint the problem.
Thanks for your help!
Best regards
Stephan

Meanwhile, I reverted back to the webcamd version of Octopi and Octoprint (0.18.0 and 1.9.0). I was able to get all three cameras working with the article Setting up multiple webcams.
Still, I was wondering what I missed using the new camera stack version...
Again, thanks for helping.
Stephan

in the new stack it's a matter of adding additional configurations. check out the Configuring multiple cameras section over here on the FAQ.

I did follow these instructions and have configured all three cameras without problems. But I seem to be able to only see the one on port 8080. How can I access the other cameras (the configuration files are there, showing ports 8081 and 8082).
Thanks

Sorry for missing replying to this one - can you make sure that you have updated the 'Pi Support' plugin, so that the system info bundle can capture the log files of the new camera stack as well? It should be version 2023.5.24.

After that is updated, with your multiple cameras setup, connected and configured as you want, share a new systeminfo bundle and hopefully the logs may shed some light on what is broken.

Hello Charlie. Thanks so much for your support. I have updated all the plugins, including the Pi Support plugin and created a new systeminfo bundle. It is attached to this message.
As before, all three cameras seem to be configured with their .conf files present in /boot/camera-streamer. Hope this helps to find a solution...
Best regards
Stephan
octoprint-systeminfo-20230605223156.zip (24.4 KB)

All three cameras are recognised by the system, so that's a good start.

Your 'oldCam' camera doesn't seem to support the YUVY capture mode, only providing JPEG mode. In the config file for that one, try switching FORMAT=YUVY to show FORMAT=JPEG.

Is it the C270 that is working?

I can't see anything obvious for the 'chinaCam' that is an error. Earlier today, I had an issue with my setup where it showed 'server error' when I booted my Pi on my second camera, with no obvious error in the logs. Running sudo camera-streamer-control restart fixed that one and both my cameras were back working again, so give that a try.

So, I changed the oldCam to JPEG. Nothing changed, however :confused:
You are correct, the logitech is the camera that works on port 8080. If I try the camera on 8081 (chinaCam) I get "Server Error", and if I try the camera on 8082 (oldCam) I get "Error: Connection failed". That is somehow strange...
I also tried to restart camera-streamer-control like you suggested. No change. Is there anything I can do (or provide any log) to get to the bottom of this?? Again, thank you so much for your effort.
Stephan

Just working through this myself, I needed to change the FORMAT to MJPEG in my case for my random brand of USB cam, had the same server error.
The other thing I changed the the resolution to one I knew the camera supported.

I have editied my haproxy.cfg to try and get the other camera visible under webcam2,

Good to know, that I am not alone in this.
I will try the MJPEG, but I am on vacation right now and I won't have an opportunity to investigate this further until next weekend...

Was there ever a solution to this?

I have a similar issue (I think):

Issue

I installed the new camera stack yesterday (did a new install and restored my OP backup). I also updated the system.

I am trying to use MultiCam. I have 2 cameras set up. One webcam connected through USB, and one camera connected directly to the camera port of a RP4.

Following the guide for the new stack, I configured the 2 seperate config files. I assigned port 8080 for the webcam and port 8081 for the other camera. But I only ever got the feed for the webcam (port 8080) using Classic Webcam.

Troubleshooting

Then I switched their ports in their respective config files, and this time I got the other camera to work (again using port 8080) on Classic Webcam.

So I came to the conclusion that only port 8080 was working. (I tried different 808+ ports and never got a feed).

Following another YouTube guide, I tried accessing the 2 seperate feeds on a new tab, using the paths http://octopi.local:8080/webcam/?action=stream and http://octopi.local:8081/webcam/?action=stream

but for some reason I never got a feed for neither one!(although I can still see the 8080 feed in Classic webcam in OPs UI).

Questions:

  • I don't know why I can't access the feeds (even the port that is working) in a seperate tab adding :8080 or 8081 to the urls as explained above.

  • I don't know why ports other than 8080 don't show video in classic webcam (I assume classic webcame by defaults only uses 8080?)

I'm not on expert on ports etc., but the general set up and accessing the feeds in seperate tabs looked pretty straight forward, so I can't find a solution on why this is happening, and where to start to have it work.

All info is appreciated,
Thank you

You can't access the feeds with the URLs you've written because they're not right. When you have the port, in this case 8080 or 8081, you should not have /webcam/ in the URL. The correct URLs to include the port would be:

If you cannot access the second camera but you can see from your logs (included in the systeminfo bundle as well) that the streamer is running, ensure that you have setup --http-listen=0.0.0.0 in the configuration as mentioned:

1 Like

Thank you! The "--http-listen=0.0.0.0" configuration did the trick. I'm a newbie with octoprint so I didn't know how important this is.