I am having a problem. I did all the process to add a new cam but I cannot see the second cam. I only see the first one I plug in the Raspberry. I even try to change the option to (OPTION="--http-listen=0.0.0.0").
Can someone help me out?
I create a new image in my SD card using the new_stack as in the video. But before I was using the stable version
I added the 2 camera files and assigned different ports (doing sudo add-usb-camera )
even if I do ps -aux | grep camera I see both cameras working + I tried OPTION="--http-listen=0.0.0.0" and OPTION=--http-listen=0.0.0.0
but when I insert the AP address + port I don't see the image coming from the second cam I plug in, whatever it is. 8080 or 8081. It is like it is not listening to all the ports.
should I empty the sd card and do the configuration from scratch?
I edited that file.
I set the port for both cameras, one 8080 and the other 8081.
The for the one in port 8081 I add the option to listen to all interfaces using “—http-listen=0.0.0.0”.
Everything looks set up correctly, but then it only shows the stream of one camera and the other gives me a server error
I did:
http://IP_OF_YOUR_PI/webcam/?action=stream
And I see the 2default cam in 8080.
when I did:
http://IP_OF_YOUR_PI:8081/webcam/?action=stream or http://IP_OF_YOUR_PI:8081/?action=stream
it gave me "server error"
The problem is that if I unplug the 'default' cam (the first I pluged in) in port 8080, and I do http://IP_OF_YOUR_PI:8081/?action=stream I can see the stream from the second cam.
If you are not using a Raspberry Pi camera, which apparently you don't have, that libcamera.conf file should NOT be there -OR- you cannot use port 8080 for any of your USB cameras since that is grabbed by libcamera.conf.
Ok, thank you, I'll try to delete libcamera.conf and let you know.
But it look strange, because I changed its port from 8080 to 8082, so I had 8080 and 8081 free for my usb cams.
In fact when I plug in only webacm_albi (the one in port 8081) I can see the stream.
OR
If I plug in only webacm_edu (the one in port 8080) I can see the stream.
BUT
I can't when I try http:///webcam/?action=stream http://:8081/webcam/?action=stream I don't see the second one I pluged in.
I'LL TRY TO DELETE ALL FILES IN /boot/camera-streamer/ AND DO FROM SCRATCH THE NEW FILES FOR MY 2 WEBCAMS AND LET U KNOW... what do u think?
Are you sure? /webcam/ would be running it through haproxy (normally on port 80), proxied to 8080, whereas using the port number goes straight to the streamer so you can skip the /webcam/ prefix. If you have made changes to haproxy then ok, but this is definitely not standard.
Yes, that is what I am using for four cameras on different ports.
All work in Multicam and directly accessing the URL.
No changes to haproxy.cfg at all.
The first raspicam does appeared proxied from 80 to 8080 by default, but both /?action=stream and /webcam/?action=stream work for all of the cameras.
This exists in haproxy.cfg but that is what came with the image and is the only entry there about the cameras. I don't recall making any changes and the file dates correspond to the original installation.
frontend public
bind :::80 v4v6
bind :::443 v4v6 ssl crt /etc/ssl/localcert.pem
option forwardfor except 127.0.0.1
use_backend webcam if { path_beg /webcam/ }
use_backend webcam_hls if { path_beg /hls/ }
use_backend webcam_hls if { path_beg /jpeg/ }
default_backend octoprint
backend webcam
http-request replace-path /webcam/(.*) /\1
server webcam 127.0.0.1:8080
errorfile 503 /etc/haproxy/errors/503-no-webcam.http
That was in response to Charlie's comment.
You should not need to make any changes to this file if you are using an unmodified image with the latest camera stack and have not restored a prior backup.
So this should not apply to your installation, though feel free to compare your file entries to the above.