pedroSG94 / vlc-example-streamplayer

Example code how to play a stream with VLC
GNU General Public License v3.0
227 stars 93 forks source link

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

Open RajivKulkarni707 opened 4 years ago

RajivKulkarni707 commented 4 years ago

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

pedroSG94 commented 4 years ago

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

RajivKulkarni707 commented 4 years ago

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

brmonaghan commented 3 years ago

Doing it with VLC

brmonaghan commented 3 years ago

Can't upload the image for proof. sorry!

AadityaRathod97 commented 3 years ago

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

smartyw commented 3 years ago

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.