-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Transport header does not contain interleaved IDs" with specific TCP client #1650
Comments
I will be getting access to such a system later today. Would you consider dealing with this issue then? |
Hello, send server logs with |
Thanks. Will do when I get some fresh ones. |
Sent it |
So this error message "Transport header does not contain interleaved IDs" does have its origin in gosrtplib (https://github.com/bluenviron/gortsplib). https://github.com/bluenviron/gortsplib/blob/main/client.go#L1410 gosrtplib obviously unconditionally expects the
This is not the case from the Genetec. According to the RFC https://www.rfc-editor.org/rfc/rfc2326.html#section-12.39 the parameter is mandatory for TCP, not UDP. It separates the various streams (0 for Audio and 1 for Video in the above case). |
Hello, Regarding UDP, handshake between the NVR and the server is working as expected, but communication can't be established because UDP only works when server and client are on the same LAN. Regarding TCP, please test this nightly release and let me know if it fixes the issue. If it doesn't, provide server logs with the [link removed] |
Are you sure with this
And in fact - it works, even though the server is somewhere at AWS and my client is here. The FFPLAY command line is
In addition, I'm perfectly able to establish a TCP RTP session with this SETUP sequence:
The matching FFPLAY command line is this:
Thanks for the code provided. I will let you know. I saw that you made a PR to the gortsplib, so I'm sure it will work. But isn't this PS: I also asked ChatGPT on this (is interleaved mandatory?), the answer was long, but yes :) OK, ChatGPT could perhaps easily be convinced to claim the contrary, but I don't want to make you weakening a lib, just because the client fails to match the standard |
I noticed that you have renamed your product meanwhile. I made kind of a quick hack by keeping the old server name and log file name, but just adjusting the service entry by replacing rtsp-simple-server by mediamtx. That seems to work. |
UDP also works when the server has a public IP, like an AWS elastic IP. The issue is not the handshake, that happens by using a TCP session, but the streaming, which happens through UDP packets. If there's a NAT/firewall in between, there's a high probability that these UDP packets get their source port changed or get blocked. Anyway, the topic of this issue is the ability to support TCP readers that don't provide interleaved IDs in requests. For any other question, you can open additional issues or discussions. Regarding standards and specifications, there are a lot of RTSP devices that don't follow rules and can't be changed since they are embedded hardware. Supporting or not supporting them depends on evaluating whether the change required for them to work impacts other devices or has security implications. Just test the nightly release and report whether the fix is enough to solve the issue. |
Sure. I was just stumbling over that In another UDP case the client did setup And this was the result from AWS to me: I don't see the problem here with NAT. But agreed, this is another party. |
I can confirm the workaround works for audio and video. Thanks for having done that. Any time frame for a new release? |
added in MediaMTX v0.22.1 |
Perfect. Thank you very much. |
BTW: FYI. The Genetec UDP issue is a missing UDP hole punching, which is done by VLC and Co. Will most likely not work in all cases, but in many. But here 2 times 4 bytes are sufficient to make the way free for the RTP from the server downstream. We could show that by using "nc" as a side process to fire up these packets. |
@neilyoung the server performs UDP hole punching too, in the same exact way |
I will forward this info to Genetec. Hoping they consider to adopt. |
Out of curiosity: Could you provide me a code link, where exactly the server is doing this? It could help me in my discussion with Genetec |
A small clarification: when i said that "the server performs UDP hole punching" i meant that MediaMTX performs UDP hole punching when reading a stream from a RTSP camera or from a RTSP client. It's the reader that must implement UDP hole punching. In your case it's the Genetec NVR that must implement UDP hole punching. here's the code: |
Yes. Thanks. I’m aware of the roles. Thanks for the link. I already digested my results and will forward it to Genetec in the hope that they’ll fix it. I also already tested several other clients, namely FFPLAY, GStreamer and VLC and they are all doing this UDP hole punching in one way or another. And also the mandatory interlaced info element for TCP/TLS is sent by them. So the ball is in the field of Genetc. I hope they’ll see that too. At least you have saved our solution by enabling TCP with them for our clients. This was a boss move. 😀. Thanks again. I love your project. |
This issue is being locked automatically because it has been closed for more than 6 months. |
Which version are you using?
v0.21.1
Which operating system are you using?
Describe the issue
Customer (Australia) uses "Genetec Video System to receive the RTSP". They are unable to receive video via TCP using this system. UDP is reported to work. VLC and FFPLAY is reported to work too. With the Genetec system sometimes the DESCRIBE request is answered with "BAD REQUEST", sometimes "OK". Even in OK case there is no video (flowing).
The only indication that something is wrong: I see a lot of traces of this kind in the RTSP server log:
Describe how to replicate the issue
Replication difficult, I also don't have that "video system". I just have the Wireshark traces taken by them.
Did you attach the server logs?
No
Did you attach a network dump?
I have that, but I would not like to publish it here. Can provide it using a private dropbox link, if I would have a way to securely communicate that.
Sorry for the "no-information". Hoping we could get in touch with this.
The text was updated successfully, but these errors were encountered: