ossrs / srs-gb28181

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

m3u8文件没有生成,无法播放 #58

Open zzgghhzzgghh opened 2 years ago

zzgghhzzgghh commented 2 years ago

注意:提问前,请先看FAQ(Please read FAQ before file an issue) https://github.com/ossrs/srs/issues/2716

描述(Description)

描述你遇到了什么问题(Please description your issue here)

配置好后,运行的结果: { "code": 0, "data": { "channels": [ { "id": "44030700991327000005@44030700991327000005", "ip": "xx.xx.xx.xx", "rtmp_port": 1935, "app": "live", "stream": "44030700991327000005@44030700991327000005", "rtmp_url": "rtmp://xx.xx.xx.xx:1935/live/44030700991327000005@44030700991327000005", "flv_url": "http://xx.xx.xx.xx:8080/live/44030700991327000005@44030700991327000005.flv", "hls_url": "http://xx.xx.xx.xx:8080/live/44030700991327000005@44030700991327000005.m3u8", "webrtc_url": "webrtc://xx.xx.xx.xx:1985/live/44030700991327000005@44030700991327000005", "ssrc": 2752523, "rtp_port": 9000, "port_mode": "fixed", "rtp_peer_port": 15060, "rtp_peer_ip": "yy.yy.yy.yy", "recv_time": 1658311316, "recv_time_str": "2022-07-20T10:01:56.650" } ] } }

上面的 "rtmp_url": "rtmp://xx.xx.xx.xx:1935/live/44030700991327000005@44030700991327000005", "flv_url": "http://xx.xx.xx.xx:8080/live/44030700991327000005@44030700991327000005.flv", 没有问题,可以播放。 就是"hls_url": "http://xx.xx.xx.xx:8080/live/44030700991327000005@44030700991327000005.m3u8" 不能播放,m3u8文件不存在。

  1. SRS版本(Version): srs-gb28181

  2. SRS的配置如下(Config): push.gb28181.conf 修改了host地址

重现(Replay)

重现Bug的步骤(How to replay bug?)

  1. push.gb28181.conf 修改host地址为srs服务器IP,运行srs
  2. 配置海康摄像机
  3. 打开SRS控制台,预览视频,选择GB28181项,查询所有通道,得到结果: { "code": 0, "data": { "channels": [ { "id": "44030700991327000005@44030700991327000005", "ip": "xx.xx.xx.xx", "rtmp_port": 1935, "app": "live", "stream": "44030700991327000005@44030700991327000005", "rtmp_url": "rtmp://xx.xx.xx.xx:1935/live/44030700991327000005@44030700991327000005", "flv_url": "http://xx.xx.xx.xx:8080/live/44030700991327000005@44030700991327000005.flv", "hls_url": "http://xx.xx.xx.xx:8080/live/44030700991327000005@44030700991327000005.m3u8", "webrtc_url": "webrtc://xx.xx.xx.xx:1985/live/44030700991327000005@44030700991327000005", "ssrc": 2752523, "rtp_port": 9000, "port_mode": "fixed", "rtp_peer_port": 15060, "rtp_peer_ip": "yy.yy.yy.yy", "recv_time": 1658311316, "recv_time_str": "2022-07-20T10:01:56.650" } ] } }

期望行为(Expect)

描述你期望发生的事情(Please describe your expectation)

m3u8文件能生成,能正常播放。