mpromonet / webrtc-streamer

WebRTC streamer for V4L2 capture devices, RTSP sources and Screen Capture
https://webrtcstreamer.agreeabletree-365b9a90.canadacentral.azurecontainerapps.io/?layout=2x2
The Unlicense
2.8k stars 581 forks source link

web player could not start but keep waiting #638

Open shaojun opened 8 months ago

shaojun commented 8 months ago

Describe the bug this is my server side running info, every time I freshed the client machine's browser page, the line of Requested URL :......Start playing sink ... will be printed:

aaaa@aaaa:~/Download/webrtc-streamer-v0.8.4-Linux-armv7l-Release$ ./webrtc-streamer -C config.json
Version:v0.8.4/Linux-armv7l civetweb@v1.16 webrtc@507f1cc-dirty live555helper@0e74999
{
        "urls" :
        {
                "Ele" :
                {
                        "video" : "rtsp://aaa:aaa@192.168.177.3:554/h264/ch2/main/av_stream"
                }
        }
}Logger level:4
HTTP Listen at 0.0.0.0:8000
 Requested URL : rtsp://aaa:aaa@192.168.177.3:554/h264/ch2/main/av_stream
Start playing sink for "video/H264" subsession

and this is my web browser that opened web page: /html/webrtcstreamer.html?video=Ele, but it's keep rolling: image

and this is the browser's debug console info, can see the oniceconnectionstatechange state: checking lasted for seconds, then always turn to disconnected:

image

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

mpromonet commented 7 months ago

Hi,

It seems ICE negociation fails, you may try to use another STUN server that the default stun.l.google.com:19302. You may try to use the internal one adding -S argument.

Best Regards, Michel.

stlobe commented 7 months ago

Hi Michel, I'm having the same problem. However, this problem occurs with some Internet service providers. I tried setting up a STUN server and setting the server to DMZ, but I still have this issue. Do you have any ideas?

mpromonet commented 7 months ago

Hi @stlobe

You may try to use a TURN server https://gabrieltanner.org/blog/turn-server/ or others.

Best Regards, Michel.

stlobe commented 7 months ago

Thanks Michel, I figured out it was a udp port issue. I tried adding udp scopes on both internal and external firewalls and it works now.