Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Forcing Android to use RTSP/AVP/TCP interleaved

I am using Android 4.1.2 on Galaxy S3. Currently android mediaplayer always tries RTSP UDP (RTP/AVP/UDP) method to connect with RTSP server.

If Android MediaPlayer does not receive the data on its UDP ports..it timesout and then tries RTSP TCP interleaved (RTP/AVP/TCP). This is fine but it introduces delay of 10 secs or so. I want to avoid this delay, and force Android MediaPlayer to always use RTSP TCP interleaved (RTP/AVP/TCP) for all or specific URL's.

I tried suggestion given in Here to send 461 or 400 error response code to SETUP request. But it seems mediaplayer does not care about the response, and sends SETUP command for both tracks, and then just hangs the connection.

How can I resolve this issue ?

like image 997
ext123 Avatar asked Mar 08 '13 07:03

ext123


1 Answers

I'm using VLC instead of the native one. Read the Living555 source code pls. You can specify the Transport: RAW/RAW/UDP field in the SETUP request to choose what protocal to use.

like image 141
01.sunlit Avatar answered Sep 20 '22 23:09

01.sunlit