Closed jokay closed 3 years ago
Seems like the problem might originate from invalid characters in transport protocols (����) but it's not clear where do these come from.
@dorinclisu any idea on how I could further debug the issue?
This is the debug log if using VLC (where it works).
2021/06/17 07:12:11 I [0/0] rtsp-simple-server v0.16.2
2021/06/17 07:12:11 I [0/0] [RTSP] UDP/RTP listener opened on :8000
2021/06/17 07:12:11 I [0/0] [RTSP] UDP/RTCP listener opened on :8001
2021/06/17 07:12:11 I [0/0] [RTSP] TCP listener opened on :55555
2021/06/17 07:12:11 I [0/0] [RTMP] listener opened on :1935
2021/06/17 07:12:11 I [0/0] [HLS] listener opened on :8888
2021/06/17 07:12:12 I [0/0] [RTSP] [conn 192.168.1.10:41412] opened
2021/06/17 07:12:12 D [0/0] [RTSP] [conn 192.168.1.10:41412] [c->s] OPTIONS rtsp://192.168.1.100:55555/cam1 RTSP/1.0
CSeq: 2
User-Agent: LibVLC/3.0.12 (LIVE555 Streaming Media v2018.11.26)
2021/06/17 07:12:12 D [0/0] [RTSP] [conn 192.168.1.10:41412] [s->c] RTSP/1.0 200 OK
CSeq: 2
Public: DESCRIBE, ANNOUNCE, SETUP, PLAY, RECORD, PAUSE, GET_PARAMETER, TEARDOWN
Server: gortsplib
2021/06/17 07:12:12 D [0/0] [RTSP] [conn 192.168.1.10:41412] [c->s] DESCRIBE rtsp://192.168.1.100:55555/cam1 RTSP/1.0
Accept: application/sdp
CSeq: 3
User-Agent: LibVLC/3.0.12 (LIVE555 Streaming Media v2018.11.26)
2021/06/17 07:12:12 I [0/0] [path cam1] [rtsp source] started
2021/06/17 07:12:12 D [0/0] [path cam1] [rtsp source] connecting
2021/06/17 07:12:12 D [0/0] [path cam1] [rtsp source] c->s OPTIONS rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
CSeq: 1
User-Agent: gortsplib
2021/06/17 07:12:12 D [0/0] [path cam1] [rtsp source] s->c RTSP/1.0 401 Unauthorized
CSeq: 1
WWW-Authenticate: Digest realm="Login to 2K02A98PBA00001", nonce="ca1b61053e367c323cab5941f12cdddd"
2021/06/17 07:12:12 D [0/0] [path cam1] [rtsp source] c->s OPTIONS rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
Authorization: Digest username="user1", realm="Login to 2K02A98PBA00001", nonce="ca1b61053e367c323cab5941f12cdddd", uri="rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0", response="1b6564db36ed8f68595317b616bdc669"
CSeq: 2
User-Agent: gortsplib
2021/06/17 07:12:12 D [0/0] [path cam1] [rtsp source] s->c RTSP/1.0 200 OK
CSeq: 2
Public: OPTIONS, DESCRIBE, ANNOUNCE, SETUP, PLAY, RECORD, PAUSE, TEARDOWN, SET_PARAMETER, GET_PARAMETER
Server: Rtsp Server/3.0
2021/06/17 07:12:12 D [0/0] [path cam1] [rtsp source] c->s DESCRIBE rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
Accept: application/sdp
Authorization: Digest username="user1", realm="Login to 2K02A98PBA00001", nonce="ca1b61053e367c323cab5941f12cdddd", uri="rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0", response="66310152ee296f80a91c88c13417fd70"
CSeq: 3
User-Agent: gortsplib
2021/06/17 07:12:13 D [0/0] [path cam1] [rtsp source] s->c RTSP/1.0 200 OK
CSeq: 3
Cache-Control: must-revalidate
Content-Base: rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0/
Content-Length: 433
Content-Type: application/sdp
X-Accept-Dynamic-Rate: 1
v=0
o=- 2251971494 2251971494 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 96
a=control:trackID=0
a=framerate:25.000000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=640029;sprop-parameter-sets=Z2QAKaw0zgeAIn5cBbgICAoAAAfQAAGGodDAAQR4AAQR4XeXGhgAII8AAII8LvLhQAA=,aO48MAA=
a=recvonly
2021/06/17 07:12:13 D [0/0] [path cam1] [rtsp source] c->s SETUP rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0/trackID=0 RTSP/1.0
Authorization: Digest username="user1", realm="Login to 2K02A98PBA00001", nonce="ca1b61053e367c323cab5941f12cdddd", uri="rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0/trackID=0", response="1e15cb4bff52e2b591a22c1ddc4704f8"
CSeq: 4
Transport: RTP/AVP;unicast;client_port=14186-14187;mode=play
User-Agent: gortsplib
2021/06/17 07:12:13 D [0/0] [path cam1] [rtsp source] s->c RTSP/1.0 200 OK
CSeq: 4
Session: 33321649852;timeout=60
Transport: RTP/AVP/UDP;unicast;client_port=14186-14187;server_port=20620-20621;ssrc=522955AB
X-Dynamic-Rate: 1
2021/06/17 07:12:13 D [0/0] [path cam1] [rtsp source] c->s PLAY rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0/ RTSP/1.0
Authorization: Digest username="user1", realm="Login to 2K02A98PBA00001", nonce="ca1b61053e367c323cab5941f12cdddd", uri="rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0/", response="21fe5a5661414d3ef72ea7312cdbc567"
CSeq: 5
Session: 33321649852
User-Agent: gortsplib
2021/06/17 07:12:13 D [0/0] [path cam1] [rtsp source] s->c RTSP/1.0 200 OK
CSeq: 5
RTP-Info: url=trackID=0;seq=21931;rtptime=21931
Session: 33321649852
2021/06/17 07:12:13 I [0/0] [path cam1] [rtsp source] ready
2021/06/17 07:12:13 D [0/0] [RTSP] [conn 192.168.1.10:41412] [s->c] RTSP/1.0 200 OK
CSeq: 3
Content-Base: rtsp://192.168.1.100:55555/cam1/
Content-Length: 288
Content-Type: application/sdp
Server: gortsplib
v=0
o=- 0 0 IN IP4 127.0.0.1
s=Stream
c=IN IP4 0.0.0.0
t=0 0
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=640029;sprop-parameter-sets=Z2QAKaw0zgeAIn5cBbgICAoAAAfQAAGGodDAAQR4AAQR4XeXGhgAII8AAII8LvLhQAA=,aO48MAA=
a=control:trackID=0
2021/06/17 07:12:13 D [0/0] [RTSP] [conn 192.168.1.10:41412] [c->s] SETUP rtsp://192.168.1.100:55555/cam1/trackID=0 RTSP/1.0
CSeq: 4
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
User-Agent: LibVLC/3.0.12 (LIVE555 Streaming Media v2018.11.26)
2021/06/17 07:12:13 I [0/0] [RTSP] [session 3370654125] opened by 192.168.1.10:41412
2021/06/17 07:12:13 D [0/0] [RTSP] [conn 192.168.1.10:41412] [s->c] RTSP/1.0 461 Unsupported Transport
CSeq: 4
Server: gortsplib
2021/06/17 07:12:13 D [0/0] [RTSP] [conn 192.168.1.10:41412] [c->s] SETUP rtsp://192.168.1.100:55555/cam1/trackID=0 RTSP/1.0
CSeq: 5
Transport: RTP/AVP;unicast;client_port=37358-37359
User-Agent: LibVLC/3.0.12 (LIVE555 Streaming Media v2018.11.26)
2021/06/17 07:12:13 I [0/0] [RTSP] [session 883606015] opened by 192.168.1.10:41412
2021/06/17 07:12:13 D [0/0] [RTSP] [conn 192.168.1.10:41412] [s->c] RTSP/1.0 200 OK
CSeq: 5
Server: gortsplib
Session: 4076820959
Transport: RTP/AVP;unicast;client_port=37358-37359;server_port=8000-8001
2021/06/17 07:12:13 D [0/0] [RTSP] [conn 192.168.1.10:41412] [c->s] PLAY rtsp://192.168.1.100:55555/cam1/ RTSP/1.0
CSeq: 6
Range: npt=0.000-
Session: 4076820959
User-Agent: LibVLC/3.0.12 (LIVE555 Streaming Media v2018.11.26)
2021/06/17 07:12:13 I [0/1] [RTSP] [session 883606015] is reading from path 'cam1', 1 track with UDP
2021/06/17 07:12:13 D [0/1] [RTSP] [conn 192.168.1.10:41412] [s->c] RTSP/1.0 200 OK
CSeq: 6
Server: gortsplib
Session: 4076820959
2021/06/17 07:12:43 D [0/1] [path cam1] [rtsp source] c->s OPTIONS rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0/ RTSP/1.0
Authorization: Digest username="user1", realm="Login to 2K02A98PBA00001", nonce="ca1b61053e367c323cab5941f12cdddd", uri="rtsp://192.168.2.30:55555/cam/realmonitor?channel=1&subtype=0/", response="c73dfa2fc7255750783505154f0fcd29"
CSeq: 6
Session: 33321649852
User-Agent: gortsplib
2021/06/17 07:12:43 D [0/1] [path cam1] [rtsp source] s->c RTSP/1.0 0
2021/06/17 07:12:52 D [0/1] [RTSP] [conn 192.168.1.10:41412] [c->s] TEARDOWN rtsp://192.168.1.100:55555/cam1/ RTSP/1.0
CSeq: 7
Session: 4076820959
User-Agent: LibVLC/3.0.12 (LIVE555 Streaming Media v2018.11.26)
2021/06/17 07:12:52 D [0/1] [RTSP] [conn 192.168.1.10:41412] [s->c] RTSP/1.0 200 OK
CSeq: 7
Server: gortsplib
Session: 4076820959
2021/06/17 07:12:52 I [0/0] [RTSP] [session 883606015] closed
2021/06/17 07:12:52 I [0/0] [RTSP] [conn 192.168.1.10:41412] closed
2021/06/17 07:12:52 I [0/0] [RTSP] [session 3370654125] closed
Alright, so it looks like the invalid chars originate in ffmpeg when making the SETUP request (User-Agent: Lavfxx.xx.xxx). Can you share what version of fffmpeg you are running and the exact command?
I cannot replicate the issue with ffmpeg 4.1.6-1~deb10u1 and command ffmpeg -i rtsp://localhost:8554/test
.
And the logs look fine:
2021/06/17 10:26:35 D [0/0] [RTSP] [conn 127.0.0.1:55010] [c->s] SETUP rtsp://localhost:8554/test/trackID=0 RTSP/1.0
CSeq: 4
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
User-Agent: Lavf58.20.100
2021/06/17 10:26:35 I [0/0] [RTSP] [session 2602881891] opened by 127.0.0.1:55010
2021/06/17 10:26:35 D [0/0] [RTSP] [conn 127.0.0.1:55010] [s->c] RTSP/1.0 200 OK
CSeq: 4
Server: gortsplib
Session: 4281480099
Transport: RTP/AVP/TCP;unicast;interleaved=0-1;ssrc=24737E2D
Sorry, I just now realized you said you are using Kodi client.
Then it follows that this client is using ffmpeg library under the hood, patched in some (wrong) way. I would open an issue on https://github.com/kodi-pvr/pvr.iptvsimple and attach the following logs:
2021/06/12 19:48:04 D [0/0] [RTSP] [conn 192.168.1.10:55804] [c->s] SETUP rtsp://192.168.1.100:55555/cam1/trackID=0 RTSP/1.0
CSeq: 3
Transport: ����RTP/AVP/UDP;unicast;client_port=10542-10543
User-Agent: Lavf58.45.100
2021/06/12 19:48:04 I [0/0] [RTSP] [session 167815548] opened by 192.168.1.10:55804
2021/06/12 19:48:04 D [0/0] [RTSP] [conn 192.168.1.10:55804] [s->c] RTSP/1.0 400 Bad Request
CSeq: 3
Server: gortsplib
It might also be possible to workaround by patching the server but I cannot speak about that, waiting for @aler9's opinion.
if It helps I am also encountering this on KODI:
ERR: invalid transport header: protocol not found (-1RTP/AVP/UDP;unicast;client_port=12196-12197)
It did work once, I may test some previous releases to be able to determine until which release it worked.
No luck using ...
... not sure if any workaround (server-side) can work for this case.
I tested rtsp-simple-server with Kodi and PVR IPTV Simple Client and it works flawlessly.
I used:
Steps to reproduce:
1) download, configure and start rtsp-simple-server
2) install Kodi with sudo apt install kodi
3) install IPTV Simple Client with sudo apt install kodi-pvr-iptvsimple
4) create a m3u8 file with this content
```
#EXTINF:-1,hr-fernsehen HD
#EXTVLCOPT:network-caching=1000
rtsp://localhost:8554/stream
```
5) enable the IPTV Simple Client addon and configure it a) general -> location, select Local Path b) general -> M3U8 Play List Local Path -> choose the file created in the passage above
6) restart Kodi, open the channel
Please check the OS / Kodi / IPTV Simple Client version and architecture and update any outdated component. If there are no further problems, i'll close the issue in a couple of days.
@aler9 I use Kodi on an Nvidia Shield TV Pro (Android TV based OS, ARM CPU) so the result may be different.
As already mentionned it was working before and there were no configuration changes on the client side for about 10 months.
May be an update for Kodi or kodi-pvr-iptvsimple did break the functionality, who knows.
May be a server-side workaround on rtsp-simple-server could make it work again.
Auto-Updates on the Android TV system are enabled but beside this the possiblities are very limited.
Anyway feel free to close the issue if you don't see a possible server-side workaround or if the issue annoys you :wink:
Same issue and it would be very helpful if this could be fixed, as I am trying to leverage ffmpeg to create a montage view of 12 security cameras. Everything works great in vlc, but not so much in kodi.
I'm happy to reach out to the Kodi team, but don't know exactly what the correct transport header woud be. Thoughts?
ERR: invalid transport header: protocol not found (-1RTP/AVP/UDP;unicast;client_port=23722-23723)
Here's the client config: OS: Linux 5.12.13-arch1-2 #1 SMP PREEMPT Fri, 25 Jun 2021 22:56:51 +0000 GNU/Linux
Kodi Versions: local/kodi-addon-inputstream-adaptive 2.6.17-1 (kodi-addons kodi-addons-inputstream) local/kodi-addon-inputstream-rtmp 3.4.0-2 (kodi-addons kodi-addons-inputstream) local/kodi-addon-pvr-iptvsimple 7.6.5-1 (kodi) local/kodi-common 19.1-1 local/kodi-platform 20190726.809c5e9-23 local/kodi-x11 19.1-1 local/p8-platform 2.1.0.1-4
Anything that you can do is greatly appreciated.
The right Transport header is
RTP/AVP/UDP;unicast;client_port=23722-23723
It seems that the Kodi addon adds some random stuff to it as prefix. It's not a custom syntax (in this case it could have been supported), it's just random stuff (in one case it's -1, in another it's some random characters).
Therefore, it's not a server problem, and there's nothing that can be done about it here. Please contact the Kodi / iptv-simple-client team, or downgrade Kodi / iptv-simple-client and use the version i posted above.
FYi: opened a post on the kodi forum as a 1st step. https://forum.kodi.tv/showthread.php?tid=363330
Thanks again.
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?
0.16.2 (same for 0.16.3)
Which operating system are you using?
OS
Architecture
Describe the issue
Camera stream no longer available when requesting via Kodi PVR IPTV Simple Client.
VLC works perfectly.
Describe how to replicate the issue
Did you attach a network dump?
no
Debug Log
Couldn't find a way to make it work again.