vlc-example-streamplayer icon indicating copy to clipboard operation
vlc-example-streamplayer copied to clipboard

libvlc video output: picture is too late to be displayed (missing 30 ms)

Open RajivKulkarni707 opened this issue 5 years ago • 6 comments

I am using android studio 3.5.2 on Windows 10. Deploying this app to my Samsung Android Galaxy , Android version 6.0.1.

I am viewing from a stream created on another Android by "IP Webcam" server. It transmits rtsp live feed. There is about 3 seconds latency from the object appearing in front of Camera and the player displaying the new object. If I view the same url via it's web page, it shows it instantly, on the same Android where I am running this player. This proves that there no latency either on the server, nor network issues on the player side either. How can I eliminate the latency or the delayed response of the client? vlc_client.log MainActivity.txt

RajivKulkarni707 avatar Dec 24 '19 03:12 RajivKulkarni707

Hi, VLC is not a low latency player and you already set latency options to it. I recommend you try with other player. This could help you: https://github.com/bilibili/ijkplayer

pedroSG94 avatar Dec 26 '19 16:12 pedroSG94

Thanks Pedro. Please let me know, which project within this group ( list below) is suitable for playing low latency streaming rtsp feed.

Projects List is below:

jkplayer-arm64 ijkplayer-armv5 jkplayer-armv7a jkplayer-example ijkplayer-exo ijkplayer-java ijkplayer-x86 ijkplayer-x86 64

Thanks for your help! Rajiv Kulkarni

RajivKulkarni707 avatar Dec 26 '19 21:12 RajivKulkarni707

Doing it with VLC

brmonaghan avatar Dec 01 '20 00:12 brmonaghan

Can't upload the image for proof. sorry!

brmonaghan avatar Dec 01 '20 01:12 brmonaghan

how do i reduce the lag in my rtsp? i am using ArrayList options = new ArrayList<>(); options.add("--network-caching=20000"); options.add("--live-caching=20000"); options.add("--sout-mux-caching=20000"); options.add(":clock-jitter=0"); options.add(":clock-synchro=0"); below the vlcVideoLibrary.setOptions(Arrays.asList(options)); even tried to pass the options the vlcOptions.java file but not able to reduce the lag does anyone have an idea how to reduce lag to the minimum

AadityaRathod97 avatar Mar 24 '21 13:03 AadityaRathod97

Same issue here. I read that libvlc 3 performs better (see https://stackoverflow.com/questions/55900065/libvlc-picture-is-too-late-to-be-displayed-error-on-android). Is this true and is there a plan to update to use VLC 3?

Thanks

Update: I no longer care about this as I'm now using the official libvlc for Android. @pedroSG94 thanks for sharing your work though, it was very informative.

smartyw avatar Apr 20 '21 17:04 smartyw