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.94k stars 598 forks source link

When I deploy webrtc to another machine, the video cannot be previewed normally #585

Open x876609353 opened 1 year ago

x876609353 commented 1 year ago

After I use docker to deploy locally, the webpage can preview the video normally, but after I use another machine to deploy webrtc-streamer in the same way, I cannot preview the video locally using a browser to access. I confirmed that the camera, server, and local network are all interoperable, and there is no abnormal information on the browser and server. The following is the log after the server receives the request:

Details

Version:v0.8.0/Linux-x86_64 civetweb@v1.16 webrtc@b3e7b6e-dirty live555helper@28ba966 { "urls" :  { "./webrtc-streamer" :  { "video" : "./webrtc-streamer" } } }Logger level:4 HTTP Listen at 0.0.0.0:8000  Requested URL : rtsp://---/h264/ch33/sub/av_stream  Requested URL : rtsp://----/h264/ch33/sub/av_stream Start playing sink for "audio/PCMA" subsession markerSize:0  Requested URL : rtsp://---/ch33/sub/av_stream Start playing sink for "video/H264" subsession markerSize:4  Requested URL : rtsp://----@10.160.100.71:554/h264/ch33/sub/av_stream Close session: video/H264 Close session: audio/PCMA

This problem has been bothering me for several days. Can anyone help me?

mpromonet commented 1 year ago

Hi,

You might increase log level to get more information about your problem.

Best Regards Michel

x876609353 commented 1 year ago

I solved it by starting the container on the server side using --network host, which may be a problem with the IP address mapping of docker containers, but I don't understand that when they are all deployed locally, there is no problem, and docker deployment is also used locally

mpromonet commented 1 year ago

Hi,

I guess the ICE gathering is using different interfaces ?

Best Regards, Michel.