xingshuangs / rtsp-websocket-server

rtsp-websocket-server,主要用于获取视频流,然后在web中呈现,目前支持RTSP视频流,支持海康、大华摄像头,RTSP + H264 + FMP4 + WebSocket + WEB
MIT License
50 stars 13 forks source link

是否支持海康的RTSP回放流播放 #4

Closed lmlate closed 6 months ago

lmlate commented 6 months ago

在使用海康回放流时出现空指针异常,url(rtsp://192.168.1.220:554/Streaming/tracks/201?starttime=20231106t063812z&endtime=20231106t064816z) 使用iot-communication运行DemoRtspFMp4ProxyTcpSync Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "this.data" is null at com.github.xingshuangs.iot.common.buff.ByteReadBuff.checkCondition(ByteReadBuff.java:130) at com.github.xingshuangs.iot.common.buff.ByteReadBuff.getBytes(ByteReadBuff.java:325) at com.github.xingshuangs.iot.protocol.rtsp.model.sdp.RtspTrackInfo.createTrackInfo(RtspTrackInfo.java:84) at com.github.xingshuangs.iot.protocol.rtsp.service.RtspNetwork.describe(RtspNetwork.java:328) at com.github.xingshuangs.iot.protocol.rtsp.service.RtspNetwork.doAfterConnected(RtspNetwork.java:175) at com.github.xingshuangs.iot.net.client.TcpClientBasic.getAvailableSocket(TcpClientBasic.java:168) at com.github.xingshuangs.iot.net.client.TcpClientBasic.connect(TcpClientBasic.java:140) at com.github.xingshuangs.iot.protocol.rtsp.service.RtspClient.start(RtspClient.java:78) at com.github.xingshuangs.iot.protocol.rtsp.service.DemoRtspTcpAuthenticator.main(DemoRtspTcpAuthenticator.java:68)

xingshuangs commented 6 months ago

理论上没有问题,得看实际内容 这地方确实兼容性有点差,后续考虑将这个地方调整下

lmlate commented 6 months ago

理论上没有问题,得看实际内容 这个地方兼容性有点差,后续考虑将这个地方调整下

它的回放 sps、pps不在sdp中,而是在rtp中传输中,目前应该是没有针对这种 合帧转封装成rtmp协议的处理

xingshuangs commented 6 months ago

恩,下个版本优化下,绕过sdp中的sps和pps

xingshuangs commented 6 months ago

在v1.5.1中进行了兼容