I am using LibVLC version 3.0.0 to play incoming mpeg2ts stream over rtp on Android. The code is the following:
SurfaceView playerView; //Initialized somewhe
There is a way to reduce the delay from ~2sec to ~200ms
Solution:
ArrayList<String> options = new ArrayList<>();
options.add("--file-caching=2000");
options.add("-vvv");
LibVLC mLibVLC = new LibVLC(getApplicationContext(), options);
MediaPlayer mMediaPlayer = new MediaPlayer(mLibVLC);
Media media = new Media(mLibVLC, Uri.parse("rtsp://192.168.0.1:1935/myApp/myStream"));
media.setHWDecoderEnabled(true, false);
media.addOption(":network-caching=150");
media.addOption(":clock-jitter=0");
media.addOption(":clock-synchro=0");
mMediaPlayer.setMedia(media);
mMediaPlayer.play();
Hope this help you! =)