Can't use RTSP with UDP connection
Opened this issue · 2 comments
mvdberge commented
Error in Web GUI: "server wants to use the UDP transport protocol"
The RTSP client is fixed to TCP connections, see this line:
agent/machinery/src/capture/gortsplib.go
Line 83 in 3f29d1c
I think this line could just be deleted, as the documentation of gortsplib says that it has an automatism to choose the right transport variant (see https://github.com/bluenviron/gortsplib/blob/2c05e2d3ea16ae15d2bbc5846c6d823e3bcaed39/client.go#L228C1-L231C22):
// transport protocol (UDP, Multicast or TCP).
// If nil, it is chosen automatically (first UDP, then, if it fails, TCP).
// It defaults to nil.
Transport *Transport
cedricve commented
I believe we might need an additional header to set/force TCP or UDP, but setting it to auto can give unwanted experiences. Let me know what you think @mvdberge
cedricve commented
We'll add a method to choose for UDP, TCP or Auto