RTSPtoWebRTC
RTSPtoWebRTC copied to clipboard
h264 other stream support
in this system, we just can play the normal h264 stream like I p p p I,in some situations,we get stream like i slice i slice i slice ...do you want to figure them? i just write a version including this under test
Yes, needed for WebRTC as you've confirmed.
It seems possible its not needed, but then you need to figure out how to expose all the ports needed by WebRTC -- not sure how tractable that is.
@allenporter thanks for your reply.
I think if we use --network=host
, we can use docker host ip to access the WebRTC endpoint.
Will do a research on it and post the result here :).
try add to compose.yml ports like this:
- 0.0.0.0:50000-50009:50000-50009/udp
and add min max webRTC ports into config.json
"webrtc_port_max": 50009,
"webrtc_port_min": 50000
example compose.yml:
services:
RTSPtoWeb:
image: ghcr.io/deepch/rtsptoweb
container_name: camera-server
ports:
- 0.0.0.0:8089:8083
- 0.0.0.0:50000-50009:50000-50009/udp
- 0.0.0.0:5541:5541
example config.json:
{
"channel_defaults": {},
"server": {
"debug": true,
"http_debug": false,
"http_demo": true,
"http_dir": "web",
"http_login": "demo",
"http_password": "demo",
"http_port": ":8083",
"https": false,
"https_auto_tls": false,
"https_auto_tls_name": "",
"https_cert": "server.crt",
"https_key": "server.key",
"https_port": ":443",
"ice_credential": "",
"ice_servers": [],
"ice_username": "",
"log_level": "debug",
"rtsp_port": ":5541",
"token": {
"backend": "http://127.0.0.1/test.php",
"enable": false
},
"webrtc_port_max": 50009,
"webrtc_port_min": 50000
},
"streams": {
"test": {
"channels": {
"0": {
"debug": true,
"url": "<url_to_rtsp_stream>"
}
},
"name": "test"
}
}
}
try add to compose.yml ports like this:
- 0.0.0.0:50000-50009:50000-50009/udp
and add min max webRTC ports into config.json
"webrtc_port_max": 50009, "webrtc_port_min": 50000
example compose.yml:
services: RTSPtoWeb: image: ghcr.io/deepch/rtsptoweb container_name: camera-server ports: - 0.0.0.0:8089:8083 - 0.0.0.0:50000-50009:50000-50009/udp - 0.0.0.0:5541:5541
example config.json:
{ "channel_defaults": {}, "server": { "debug": true, "http_debug": false, "http_demo": true, "http_dir": "web", "http_login": "demo", "http_password": "demo", "http_port": ":8083", "https": false, "https_auto_tls": false, "https_auto_tls_name": "", "https_cert": "server.crt", "https_key": "server.key", "https_port": ":443", "ice_credential": "", "ice_servers": [], "ice_username": "", "log_level": "debug", "rtsp_port": ":5541", "token": { "backend": "http://127.0.0.1/test.php", "enable": false }, "webrtc_port_max": 50009, "webrtc_port_min": 50000 }, "streams": { "test": { "channels": { "0": { "debug": true, "url": "<url_to_rtsp_stream>" } }, "name": "test" } } }
This didn't work for me, did you manage to get it working?
When I looked into the SDP header it returns
a=candidate:3306701121 1 udp 2130706431 172.20.0.2 50004 typ host
a=candidate:3306701121 2 udp 2130706431 172.20.0.2 50004 typ host
So its not even on the correct IP range...
Is there any updates on this ,or is there a way to know all the ports used by WebRTC?
Is there any updates on this ,or is there a way to know all the ports used by WebRTC?
If you are running your docker on windows then no it doesn't seem possible. I had to run mine thru docker via WSL.
Try to restart container after change in confing.json. Even that, I recommend using mode type "host".
Is there any updates on this ,or is there a way to know all the ports used by WebRTC?
If you are running your docker on windows then no it doesn't seem possible. I had to run mine thru docker via WSL.
I am using WSL2 instead of Windows. Is there a way to run WebRTC without type "host" and only exposing the necessary ports?