I have set up a RTSP server using VLC. then I write an app,this is my code:
package com.ashley.work;
import android.os.Bundle;
import android.app.Activity;
Android really only supports mpeg 4 encoded baseline profile with the MOOV atom set correctly. Newer devices support other methods (HLS & higher profiled mpeg4 types) but not all device will work that way. Your rtsp stream must be encoding using the base line profile.
If you open your RTSP stream in VLC and open your network stream and then MEdia Information you can see what codecs your stream is using for audio and video
Here is more definitive info on android and supported media : http://developer.android.com/guide/appendix/media-formats.html#recommendations