2

I tried streaming on Google nexus S (2.3.7), HTC Desire (2.3.3), and Samsung Galaxy (3.2). And only Google Nexus has RTSP session timeout issue.

I read up on some threads about this problem. It seems like I'll have to send RTCP request every second to keep the session alive, or I'll just send RTSP "OPTION" request which will basically do nothing but keep alive for my app. Could anyone give me a head start on how to generate that request? I have no experience dealing with RTCP before.

Lobo
  • 4,001
  • 8
  • 37
  • 67
user766409
  • 31
  • 1
  • 3
  • I am also have the same problem with Galaxy Note (ICS 4.0.3) and VLC 2.0.2 , I've already read the answer of Reck Hou, but how do I send RTSP "OPTION" to the streaming server ? – hungson175 Jul 03 '12 at 14:32

1 Answers1

2

There are two ways to keep your RTSP connection alive.

  1. Use RTCP protocol, it should send a package within seconds.

  2. Use RTSP "OPTION" request, send this request every 50-60 seconds to keep alive.

I suggest you read some source code of RTSP library, such as "libnemesi"(implemented by C), it gives a good example for your problem.

https://github.com/syhou/Libnemesi-reborn

Shane Hou
  • 4,808
  • 9
  • 35
  • 50