GithubHelp home page GithubHelp logo

RTSP-H265拉流问题 about lal HOT 4 CLOSED

q191201771 avatar q191201771 commented on July 20, 2024
RTSP-H265拉流问题

from lal.

Comments (4)

q191201771 avatar q191201771 commented on July 20, 2024

这几个问题我都尝试修复了,请拉取最新代码测试,谢谢。

from lal.

ourfor-pp avatar ourfor-pp commented on July 20, 2024

@q191201771
拉取新的代码进行测试,尝试后发现以下问题

1.拉取无音频H265的流失败

日志

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/[email protected]/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/[email protected]/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

DEBUG问题定位

base_in_session.go 119行,136行 猜测判断有误

if strings.HasSuffix(uri, s.sdpLogicCtx.AudioAControl) 

image

尝试修改测试:

if s.sdpLogicCtx.AudioAControl !="" && strings.HasSuffix(uri, s.sdpLogicCtx.AudioAControl) 

修改后,持续拉流成功,但是生成的out.flv文件VLC无法解码
image

from lal.

q191201771 avatar q191201771 commented on July 20, 2024

你后面提交的那个bug,对应的修复方法是对的,我已经做了相应修改并提交到master分支了。

vlc播放不了H265的flv文件,应该是vlc不支持,你可以用支持H265 flv的ffmpeg试试。

from lal.

q191201771 avatar q191201771 commented on July 20, 2024

这个问题之前已经修复了,这个issue先关闭了。
有需要可以随时打开或者创建新的issue,感谢。

from lal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.