Support for RTSP over HTTP #2648
-
Hi, I'm looking for solutions to use YARP in contexts where supporting "RTSP over HTTP(S)" is a requirement. Some short background to this protocol. Apple first published a semi-official specification on how to traverse RTSP/RTP data RFC2326 over firewalls using HTTP tunnels. The specification is now part of ONVIF, a specification used by many IP camera manufactures and Video Management Systems. Basically the specification uses two long-lived GET and POST HTTP requests to stream media data and perform media control.
I was not able to get this working with YARP. It seems like the GET request gets stuck in a response-body-copying phase. Typically, there will be NO content data on the GET channel until both the GET and POST channels have been established and a "DESCRIBE" command has been posted on the POST channel. Is it a lost cause to try to get this playing? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
If the traffic is valid HTTP, I don't see why it couldn't work. The first spec you linked mentions
This is just wrong, doing so is a protocol violation, and won't work with ASP.NET/YARP. You should be able to check if something like that is happening by looking at a network trace for example. |
Beta Was this translation helpful? Give feedback.
-
I've been looking at this myself. I have a DVR which support ONVIF and exports all 32 chambers (coax) connected on it on the ONVIF response. However, the ONVIF client that I have (Ubiquiti Unifi Protect NVR) expect that each camera to have its own IP (yeah they are wrong and not 100% implementing ONVIF). So, what I was thinking of, is to have an application with YARP which would listen to multiple hosts (DNS, IP, URL path, whatever) and redirect It to a mapped channel on this single DVR, proxying and formatting the parameters in order to make this proxying. All we care right now is the camera feed. Will keep an eye here and report back what I've found while experimenting with YARP in this scenario. |
Beta Was this translation helpful? Give feedback.
Any luck with collecting network traces with & without the proxy?
You only have two ways of sending the request content -
Content-Length
, orchunked
.If you suspect chunking is the problem, lying about the content length is the only option. The
"Sent X request content bytes, but Content-Length promised Y"
are the errors I was referring to that you would always see if you do so, but they may be harmless in your case.