RtspClientSharp icon indicating copy to clipboard operation
RtspClientSharp copied to clipboard

Unsupported Transport Type

Open rossbuggins opened this issue 5 years ago • 4 comments

I'm running the Streaming video display demo and trying to connect to a locally hosted RSTP server. I'm using VLC as the server with:

VLC "MyFile.mp4" --sout=#transcode{vcodec=h264,scale=Auto,acodec=mp4a,ab=128,channels=2,samplerate=44100,scodec=none}:rtp{sdp=rtsp://MYLOCALIP:8996/go.mpg} :no-sout-all :sout-keep

However, I keep getting Bad Response Code: UnsupportedTransport

I'm using TCP in the settings in the demo code, as VLC only runs as a server in TCP transport type.

Another instance of VLC can connect to the RTSP stream ok.

Debugging, its at the point it sends a request message when setting up a channel of :

{SETUP rtsp://MYIP:8996/go.mpg/trackID=1 RTSP/1.0 CSeq: 3 User-Agent: RtspClientSharp Transport: RTP/AVP/TCP;unicast;interleaved=0-1

}

And the response is:

{RTSP/1.0 461 UnsupportedTransport CSeq: 3 SERVER: VLC/3.0.6 DATE: Mon, 21 Oct 2019 19:38:34 GMT CONTENT-LENGTH: 0 CACHE-CONTROL: no-cache CSEQ: 3 }

rossbuggins avatar Oct 21 '19 19:10 rossbuggins

By default VLC uses UDP transport for RTP. In theory there is an option to configure RTP protocol to TCP, but I can't make it work.

--sout-rtp-proto={dccp,sctp,tcp,udp,udplite} 
                                 Transport protocol
          This selects which transport protocol to use for RTP.

RandDruid avatar Oct 22 '19 05:10 RandDruid

on https://wiki.videolan.org/Documentation:Streaming_HowTo/Advanced_Streaming_Using_the_Command_Line/ it states

tcp, accept TCP connections at the specified IP address (dst=) and use RFC 4571 RTP framing, not implemented yet,

Can RtspClientSharp not deal with UDP for the RTP then?

rossbuggins avatar Oct 23 '19 18:10 rossbuggins

It can, but you should set RtpTransport to UDP. RTSP is always TCP. With UDP transport RtspClientSharp will send different SETUP message and VLC will accept it.

RandDruid avatar Oct 23 '19 18:10 RandDruid

Ok I’ll look again with it set to udp and trace through what goes on. Thanks

rossbuggins avatar Oct 23 '19 19:10 rossbuggins