ossrs / srs-gb28181

GB28181 server based on SRS
https://ossrs.net
MIT License
83 stars 41 forks source link

GB28181: 支持GB28181 RTP Proxy #2161 #22

Open winlinvip opened 2 years ago

winlinvip commented 2 years ago

我们有个应用场景,就设备推RTP流到流媒体服务器。 用ffmpeg的命令: ffmpeg -fflags nobuffer -rtsp_transport tcp -re -i rtsp://192.168.1.64/Streaming/Channels/1 -vcodec h264 -acodec aac -f rtp rtp://192.168.20.177:10001

或者 ffmpeg -re -i "e:\peiqi.mp4" -vcodec h264 -acodec aac -f rtp_mpegts rtp://192.168.20.177:10001

希望SRS能支持这个模式。

我看到ZLMediaKit有这个功能。 ZLM有2个HTTP接口,动态创建和关闭RTP服务端口, 也可以使用默认端口,通过SSRC来demux.

/index/api/openRtpServer 功能:创建GB28181 RTP接收端口,如果该端口接收数据超时,则会自动被回收(不用调用closeRtpServer接口) 例子:http://127.0.0.1/index/api/openRtpServer?port=10001&enable_tcp=1&stream_id=test

/index/api/closeRtpServer 功能:关闭GB28181 RTP接收端口 例子:http://127.0.0.1/index/api/closeRtpServer?stream_id=test