Closed ourfor-pp closed 3 years ago
这几个问题我都尝试修复了,请拉取最新代码测试,谢谢。
@q191201771 拉取新的代码进行测试,尝试后发现以下问题
2020/12/28 10:09:12.731648 INFO [RTSPPULL1] lifecycle new rtsp PullSession. session=0xc000062820 - client_pull_session.go:96
2020/12/28 10:09:12.731648 DEBUG bitrate. rtsp pull=0kbit/s - pullrtsp.go:78
2020/12/28 10:09:12.731648 DEBUG [RTSPPULL1] > tcp connect. - client_pull_session.go:289
2020/12/28 10:09:12.735637 DEBUG [RTSPPULL1] > write options. - client_pull_session.go:306
2020/12/28 10:09:12.756580 DEBUG [RTSPPULL1] < read response. 200 - client_pull_session.go:314
2020/12/28 10:09:12.756580 DEBUG [RTSPPULL1] > write describe. - client_pull_session.go:328
2020/12/28 10:09:12.839359 DEBUG [RTSPPULL1] < read response. code=200, body=v=0
o=- 2252311042 2252311042 IN IP4 0.0.0.0
s=Media Server
c=IN IP4 0.0.0.0
t=0 0
a=control:*
a=packetization-supported:DH
a=rtppayload-supported:DH
a=range:npt=now-
m=video 0 RTP/AVP 98
a=control:trackID=0
a=framerate:25.000000
a=rtpmap:98 H265/90000
a=fmtp:98 profile-id=1;sprop-sps=QgEBAWAAAAMAsAAAAwAAAwBaoAWCAJBY2uSTL5A=;sprop-pps=RAHA8vA8kA==;sprop-vps=QAEMAf//AWAAAAMAsAAAAwAAAwBarAk=
a=recvonly
- client_pull_session.go:336
2020/12/28 10:09:12.839359 WARN [RTSPPULL1] audio unpacker not support yet. origin type=0 - base_in_session.go:88
2020/12/28 10:09:12.840357 DEBUG [RTSPPULL1] > write setup. - client_pull_session.go:384
2020/12/28 10:09:12.847338 DEBUG [RTSPPULL1] < read response. code=200, ctx={Version:RTSP/1.0 StatusCode:200 Reason:OK Headers:map[CSeq:3 Session:372861431965;timeout=60 Transport:RTP/AVP/UDP;unicast;client_port=30000-30001;server_port=20446-20447;ssrc=54DC8E1D x-Dynamic-Rate:1] Body:[]} - client_pull_session.go:392
2020/12/28 10:09:12.848336 DEBUG [RTSPPULL1] > write play. - client_pull_session.go:462
2020/12/28 10:09:12.881247 DEBUG [RTSPPULL1] < read response. 200 - client_pull_session.go:470
2020/12/28 10:09:13.731973 DEBUG bitrate. rtsp pull=216kbit/s - pullrtsp.go:78
2020/12/28 10:09:14.732303 DEBUG bitrate. rtsp pull=91kbit/s - pullrtsp.go:78
2020/12/28 10:09:15.732624 DEBUG bitrate. rtsp pull=294kbit/s - pullrtsp.go:78
2020/12/28 10:09:16.732949 DEBUG bitrate. rtsp pull=142kbit/s - pullrtsp.go:78
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x8b0fa0]
goroutine 20 [running]:
github.com/q191201771/naza/pkg/nazanet.(*UDPConnection).Write2Addr(0x0, 0xc000088400, 0x20, 0x20, 0xc000098c30, 0x0, 0x0)
E:/Develop/WorkSpace/go/pkg/mod/github.com/q191201771/naza@v0.16.0/pkg/nazanet/udp_connection.go:120 +0x40
github.com/q191201771/lal/pkg/rtsp.(*BaseInSession).handleRTCPPacket(0xc000120240, 0xc00014a600, 0x30, 0x5dc, 0xc000098c30, 0x0, 0x0)
E:/Develop/WorkSpace/go/src/Monibuca/lal/pkg/rtsp/base_in_session.go:312 +0x588
github.com/q191201771/lal/pkg/rtsp.(*BaseInSession).onReadRTCPPacket(0xc000120240, 0xc00014a600, 0x30, 0x5dc, 0xc000098c30, 0x0, 0x0, 0x0)
E:/Develop/WorkSpace/go/src/Monibuca/lal/pkg/rtsp/base_in_session.go:274 +0x1fb
github.com/q191201771/naza/pkg/nazanet.(*UDPConnection).RunLoop(0xc0001b4100, 0xc000182250, 0x0, 0x0)
E:/Develop/WorkSpace/go/pkg/mod/github.com/q191201771/naza@v0.16.0/pkg/nazanet/udp_connection.go:87 +0x248
created by github.com/q191201771/lal/pkg/rtsp.(*BaseInSession).SetupWithConn
E:/Develop/WorkSpace/go/src/Monibuca/lal/pkg/rtsp/base_in_session.go:130 +0x1c9
Debugger finished with exit code 0
base_in_session.go 119行,136行
猜测判断有误
if strings.HasSuffix(uri, s.sdpLogicCtx.AudioAControl)
尝试修改测试:
if s.sdpLogicCtx.AudioAControl !="" && strings.HasSuffix(uri, s.sdpLogicCtx.AudioAControl)
修改后,持续拉流成功,但是生成的out.flv文件VLC无法解码
你后面提交的那个bug,对应的修复方法是对的,我已经做了相应修改并提交到master分支了。
vlc播放不了H265的flv文件,应该是vlc不支持,你可以用支持H265 flv的ffmpeg试试。
这个问题之前已经修复了,这个issue先关闭了。 有需要可以随时打开或者创建新的issue,感谢。
使用pullrtsp.go与pullrtsp2pushrtmp.go两个demo进行测试
1.大华网络摄像头 H265的rtsp流拉流错误
日志:
原因初步定位
2.简单修改第一个问题后,尝试拉流,继续出现异常
日志
3.尝试H264的rtsp流,pullRtsp的demo未成功,flv文件为空
日志:
生成的文件只有flv的头信息,1kb
4.rtsp没有做保活,即每分钟发送rtsp保活请求,导致网络摄像头的rtsp自动断开
5.rtsp的setup请求异常
日志
经vlc抓包对比分析,定位问题如下
原
与vlc对比临时修正测试成功
附VLC播放抓包明细