3

I had an confusion of which I searched but didn't get any answer.

I am streaming a video file using RTSP over HTTP tunneling then when I see the wire-shark to see the packets source and destination and protocol I saw a UDP protocol although i am using RTSP over HTTP tunneling.

Can any one tell me why don't I see the TCP protocol instead of UDP protocol for packets being sent from source to destination?

vipw
  • 7,593
  • 4
  • 25
  • 48
Ajinkya
  • 1,701
  • 4
  • 25
  • 42

3 Answers3

2

RTSP sets up RTP streams for streaming the video and audio. They are probably being sent over UDP instead of tunneling over the existing TCP connection.

Just because RTSP is being tunneled over HTTP doesn't guarantee that the RTP streams will be configured to use the same socket. It's up to the client to request the transport, but you can change the server to only support the interleaved transport. See this answer https://stackoverflow.com/a/3536969/759140

Community
  • 1
  • 1
vipw
  • 7,593
  • 4
  • 25
  • 48
  • sir i am using 2 live555 programs "testMpeg2transportstreamer" in test directory of live 555 and proxy server in proxy server directory of live 555,to the proxy server program i am giving the url of "testMpeg2transportstreamer" rtsp server and now can i send the C->A: SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0 CSeq: 1 Transport: RTP/AVP/TCP;unicast;client_port=3056-3057 to "testMpeg2transportstreamer" from proxy server please guide – Ajinkya Jan 09 '13 at 10:44
  • You'll probably want to use interleaved (section 10.12 in rfc 2326) – vipw Jan 09 '13 at 12:15
  • sir but the biggest problem is how to send the SETUP request from proxy server to testMpeg2transportstreamer – Ajinkya Jan 09 '13 at 12:25
  • sir i made a setup command from the client to server the setup command is like this Sending request: SETUP rtsp://192.168.15.192:8554/STREAMERUltra/track1 RTSP/1.0 CSeq: 4 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 Received 84 new bytes of response data. Received a complete SETUP response: RTSP/1.0 461 Unsupported Transport CSeq: 4 Date: Thu, Jan 10 2013 06:32:42 GMT and receive the shown response but didn't get any stream can you guide firther – Ajinkya Jan 10 '13 at 06:35
  • It appears your RTSP server doesn't support interleaved transport. – vipw Jan 10 '13 at 07:33
  • sir can you tell me one thing that rtsp over http tunnelling mean all packets will be sent using tcp? – Ajinkya Jan 10 '13 at 08:21
  • @Ajinkya it definitely does NOT mean that. It only means that the RTSP packets will be sent over the HTTP connection. The data packets will be sent using RTP. They will be sent according to the Transport header of the SETUP message. – vipw Jan 10 '13 at 10:34
  • so wireshark will show UDP as a protocol for the packets being sent – Ajinkya Jan 10 '13 at 12:27
  • is there any way to sent the tear down request from proxy server to back end server – Ajinkya Jan 17 '13 at 15:03
  • please reply this query sir http://stackoverflow.com/questions/14752569/live-media-proxy-server-issue-or-am-i-doing-wrong – Ajinkya Feb 08 '13 at 05:56
  • sir please reply on this http://stackoverflow.com/questions/14811574/has-anyone-succeedded-in-streaming-rtsp-packet-using-tcp-through-live-555-librar – Ajinkya Feb 11 '13 at 12:33
1

RTSP is a network control protocol. According to Wikipedia,

The default port for the RTSP protocol is 554 for both UDP (deprecated and very rarely used) and TCP transports.

Conclusion: UDP or TCP will be used, depends on which server you use and settings.

Raptor
  • 53,206
  • 45
  • 230
  • 366
  • we are using RTSP over HTTP Tunnelling then why wireshark shows the UDP protocol – Ajinkya Jan 08 '13 at 13:36
  • 1
    RTSP over HTTP tunneling doesn't mean TCP will be used. As TCP has more overheads than UDP, real time streaming will prefer to use UDP as less traffic will be made. By the way, why do you want to use TCP ? Try blocking UDP of port 554 and see if LIVE555 will switch to TCP. – Raptor Jan 09 '13 at 02:49
  • how to block UDP of port 554 please guide – Ajinkya Jan 09 '13 at 07:59
  • it's a firewall setting. depends on which firewall you use. – Raptor Jan 09 '13 at 08:25
  • i am using in built firewall in window 7 – Ajinkya Jan 09 '13 at 08:36
  • run `firewall.cpl` . Deny Outbound UDP at port 554 in your LIVE555 machine. – Raptor Jan 09 '13 at 08:37
  • sir what i want is when i stream the video from my streamer it should show that tcp packets are being sent to the destination instraed od UDP in wireshark – Ajinkya Jan 09 '13 at 08:39
  • sir if i did "run firewall.cpl . Deny Outbound UDP at port 554 in your LIVE555 machine" then there is no streaming – Ajinkya Jan 09 '13 at 09:41
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/22444/discussion-between-ajinkya-and-shivan-raptor) – Ajinkya Jan 09 '13 at 10:15
  • sir if RTSP over HTTP tunneling doesn't mean TCP will be used then whats the use of RTSP over HTTP tunneling and wht will it do? – Ajinkya Jan 10 '13 at 08:29
  • is there any way to sent the tear down request from proxy server to back end server – Ajinkya Jan 17 '13 at 15:04
  • plz reply on this sir http://stackoverflow.com/questions/14752569/live-media-proxy-server-issue-or-am-i-doing-wrong – Ajinkya Feb 08 '13 at 05:56
  • please reply on this http://stackoverflow.com/questions/14811574/has-anyone-succeedded-in-streaming-rtsp-packet-using-tcp-through-live-555-librar – Ajinkya Feb 11 '13 at 12:32
0

Very true but if you specify to use tcp-transport in ffmpeg it should use TCP if the server is configured for it.

If you don't specify any transport option, new versions of ffmpeg will try UDP, if that fails it will retry the connect or TCP.

Michelle Cannon
  • 1,341
  • 8
  • 8