Android LibVLC options do not work
Asked Answered
R

0

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?

Rm answered 9/8, 2018 at 17:58 Comment(2)
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 ! autovideosinkRm
https://mcmap.net/q/747110/-reduce-delay-when-playing-rtp-stream-with-libvlc-on-android, it works for meDetached

© 2022 - 2024 — McMap. All rights reserved.