2

I am working with streaming RTSP using LibVLC. I have it working where I can view the stream, but the latency is set to the default ~2seconds.

On the Ubuntu Desktop I can launch vlc with the following options to improve the latency greatly:

$ vlc -vvv rtsp://192.168.2.1:1234 --network-caching=50 --clock-jitter=0 --clock-synchro=0

however, when I add these options to LibVLC, there is no positive effect:

ArrayList<String> options = new ArrayList<>();
options.add("-vvv");
options.add("--network-caching=50");
options.add("--clock-jitter=0");
options.add("--clock-synchro=0");

mLibVLC = new LibVLC(this, options);

Is there something I'm missing?

DMacAttack
  • 183
  • 10
  • 1
    I ended up switching to using a gstreamer native library. VLC notoriously does not honor the latency (aka VLC caching). Even Desktop VLC seems to only use TCP RTSP, and doesnt drop packets. Dont use it for RTSP. For those wondering, this gstreamer pipeline is what I ended up using: gst-launch-1.0 rtspsrc location=rtsp://192.168.2.1:1234 latency=300 ! decodebin ! autovideosink – DMacAttack Mar 06 '20 at 13:59
  • https://stackoverflow.com/a/41961321/10751265, it works for me – necip Dec 07 '20 at 09:41

0 Answers0