You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"[rtsp source] ERR: invalid transport header: invalid source ()" failure when server is opening an RTSP stream from a camera introduced at 0.18.0.
#986
Closed
1 task done
pkerney opened this issue
Jun 10, 2022
· 3 comments
When using RTSP camera (the camera is a little old) the server used to be able to open the stream and proxy it. Some change introduced to version 0.18.0 now throws a "[rtsp source] ERR: invalid transport header: invalid source ()" and server will not proxy the stream.
The camera stream is being authenticated using digest authentication in the RTSP URI.
I went back through several of the releases and the issue appeared at the transition from 0.17.17 to 0.18.0.
Not sure if this is a bug or just an unsupported camera or a camera that doesn't return the correct information. Adding it as a bug because it used to work.
Obfuscated some of the parameters with XXXX, not sure which ones are important.
This is the server debug log of a failing open, a subset of a working open/proxy is further below.
pkerney@quartz:~/rtsp$ ./rtsp-simple-server rtsp-simple-server.yml.good
2022/06/10 13:34:11 INF rtsp-simple-server v0.18.0
2022/06/10 13:34:11 INF [metrics] listener opened on 127.0.0.1:9998
2022/06/10 13:34:11 DEB [path garage] created
2022/06/10 13:34:11 DEB path manager created
2022/06/10 13:34:11 INF [path garage] [rtsp source] started
2022/06/10 13:34:11 INF [RTSP] listener opened on :7554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
2022/06/10 13:34:11 DEB [path garage] [rtsp source] connecting
2022/06/10 13:34:11 INF [RTMP] listener opened on :1935
2022/06/10 13:34:11 INF [HLS] listener opened on :8888
2022/06/10 13:34:11 INF [API] listener opened on 127.0.0.1:9997
2022/06/10 13:34:11 DEB [path garage] [rtsp source] c->s OPTIONS rtsp://10.1.1.21/live/0/MAIN RTSP/1.0
CSeq: 1
User-Agent: gortsplib
2022/06/10 13:34:11 DEB [path garage] [rtsp source] s->c RTSP/1.0 200 OK
CSeq: 1
Cache-Control: no-cache
Content-Length: 0
Public: OPTIONS, DESCRIBE, SET_PARAMETER, SETUP, PLAY, PAUSE, TEARDOWN, GET_PARAMETER
Server: RtpRtspFlyer
2022/06/10 13:34:11 DEB [path garage] [rtsp source] c->s DESCRIBE rtsp://10.1.1.21/live/0/MAIN RTSP/1.0
Accept: application/sdp
CSeq: 2
User-Agent: gortsplib
2022/06/10 13:34:12 DEB [path garage] [rtsp source] s->c RTSP/1.0 401 Unauthorized
CSeq: 2
Server: RtpRtspFlyer
WWW-Authenticate: Digest realm="turing",nonce="b6d9516e9XXXXd69df3222"
WWW-Authenticate: Basic realm="/"
2022/06/10 13:34:12 DEB [path garage] [rtsp source] c->s DESCRIBE rtsp://10.1.1.21/live/0/MAIN RTSP/1.0
Accept: application/sdp
Authorization: Digest username="XXXX", realm="turing", nonce="b6d9516XXXX9df3222", uri="rtsp://10.1.1.21/live/0/MAIN", response="78acb1XXXX5c6e673"
CSeq: 3
User-Agent: gortsplib
2022/06/10 13:34:12 DEB [path garage] [rtsp source] s->c RTSP/1.0 200 OK
CSeq: 3
Content-Base: rtsp://10.1.1.21/live/0/MAIN
Content-Length: 493
Content-Type: application/sdp
Server: RtpRtspFlyer
v=0
o=RTSP 1659513XXXX16416 16595XXXX61809 IN IP4
s=RTSP Server
e=NONE
t=0 0
a=recvonly
a=x-dimensions:1920,1080
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=64002a;sprop-parameter-sets=Z2QAKqwsaoHgCJ+WbgICAgQ=,aO4xshs=
a=Media_header:MEDIAINFO=494D4B48010100000400010000000000000000000000000000000000000000000000000000000000;
a=appversion:1.0
b=AS:5000
a=control:rtsp://10.1.1.21/live/0/MAIN/trackID=0
2022/06/10 13:34:12 DEB [path garage] [rtsp source] c->s SETUP rtsp://10.1.1.21/live/0/MAIN/trackID=0 RTSP/1.0
Authorization: Digest username="XXXX", realm="turing", nonce="b6d9516XXXXd69df3222", uri="rtsp://10.1.1.21/live/0/MAIN/trackID=0", response="b3a04ae7XXXX9ee411e"
CSeq: 4
Transport: RTP/AVP;unicast;client_port=32560-32561;mode=play
User-Agent: gortsplib
2022/06/10 13:34:12 DEB [path garage] [rtsp source] s->c RTSP/1.0 200 OK
CSeq: 4
Cache-Control: no-cache
Server: RtpRtspFlyer
Session: 830717776
Transport: RTP/AVP/UDP;unicast;source=;client_port=32560-32561;server_port=3046-3047;ssrc=45dcb578
2022/06/10 13:34:12 INF [path garage] [rtsp source] ERR: invalid transport header: invalid source ()
^C2022/06/10 13:34:16 INF shutting down gracefully
2022/06/10 13:34:16 INF [path garage] [rtsp source] stopped
2022/06/10 13:34:16 DEB [path garage] destroyed (terminated)
2022/06/10 13:34:16 INF [API] listener is closing
2022/06/10 13:34:16 INF [RTSP] listener is closing
2022/06/10 13:34:16 DEB path manager is shutting down
2022/06/10 13:34:16 INF [HLS] listener is closing
2022/06/10 13:34:16 INF [RTMP] listener is closing
2022/06/10 13:34:16 INF [metrics] listener is closing
2022/06/10 13:34:16 INF waiting for external commands
pkerney@quartz:~/rtsp$
This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.
Which version are you using?
v0.17.17 -> 0.18.0 and higher
Which operating system are you using?
Describe the issue
When using RTSP camera (the camera is a little old) the server used to be able to open the stream and proxy it. Some change introduced to version 0.18.0 now throws a "[rtsp source] ERR: invalid transport header: invalid source ()" and server will not proxy the stream.
The camera stream is being authenticated using digest authentication in the RTSP URI.
I went back through several of the releases and the issue appeared at the transition from 0.17.17 to 0.18.0.
Not sure if this is a bug or just an unsupported camera or a camera that doesn't return the correct information. Adding it as a bug because it used to work.
Describe how to replicate the issue
VLC can open this URI.
Start rtsp-simple-server
Obfuscated some of the parameters with XXXX, not sure which ones are important.
This is the server debug log of a failing open, a subset of a working open/proxy is further below.
For a good session with v0.17.17 we get
Did you attach the server logs?
yes - inline above
Did you attach a network dump?
no
The text was updated successfully, but these errors were encountered: