webrtc-streamer
webrtc-streamer copied to clipboard
How to specify to use public IP?
It only responds to the internal network IP, and there is no public network IP. How to specify the return to the public network IP?
Hi,
I guess you are running inside docker ?
In such a case you could run with --net=host
to allow STUN discovery to discover your public address.
Best Regards, Michel.
Hi, Yes,I'm running with docker, and I've used --net=host,But my network card is not configured with a public network IP,So can't get. It is currently impossible to specify an ip, right?
Best Regards, liangfj.
Hi,
You should be able to reach http server configuring your NAT, then STUN should server should detect your public ip.
Best Regards, Michel.
Hi, In some complex network situations, network access will be forwarded through multiple layers of servers, so the obtained server ip is incorrect. By the way, I would like to ask, how to specify the tcp protocol to pull the video stream instead of udp. Because the network is unstable, the udp pulls the video stream will lose frames, Hope to be able to pull video stream using tcp protocol.
Best Regards, liangfj.
Hi,
To use TCP streams, you may need to setup a Turn server instead of default stun.
Best regards Michel
Hi,
I'm facing the same problem on AWS EC2. The ICE candidates IP's are Docker Gateway IP and AWS Instance internal network IP. I'm deploying it with this command: docker run -d --name webrtc_streamer --network=host -v $PWD/config.json:/app/config.json mpromonet/webrtc-streamer:v0.6.1 -o -H 0.0.0.0:8080 -R 50000:59999 -S0.0.0.0:3478 -s$(curl -s ifconfig.me):3478
.
Best regards, Fabiano
Hi Fabiano,
Not sure that using internal STUN server is a good idea on a AWS EC2... why not using the default google STUN ? This link may help you https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Connectivity
Best Regards, Michel.
Hello Michel,
I'm configuring this environment in China. Almost all tests that we made indicates that users can't access cameras throught the webrtc by using google STUN. So this is the problem when using the default google STUN. The main ideia is consolidate the STUN service in a private scenario.
Since the AWS EC2 has no NAT configuration and none Firewall was set. I'm running out ideias for tests. Do you have any sugestions?
Regards, Fabiano.
Hi Fabiano,
If the firewall are openned, I don't understand why running with -S0.0.0.0:3478 -s$(curl -s ifconfig.me):3478
doesnot work. I made some tests but it is always working even when I publish no stun server or a bad address for it. It is possible that the stun configuration is no more working (or google stun is always used even when not present in ice servers?).
You may also try the embeded TURN server using -s- -T0.0.0.0:3478 -tturn:turn@$(curl -s ifconfig.me):3478
.
Best Regards, Michel.
@mpromonet when not present in ice servers it is only possible when you using same network with webrtc-streamer server. If you using internet you cant receive stream. I am facing the same issue. What new for fix this issue?
Hi @Nguyen-Thanh-Tung,
When webbrowser and webrtc-streamer are not on same network, you need either an STUN or a TURN. By default STUN server is stun.l.google.com:19302, but you can use another one.
Best Regards, Michel.