Page 1 of 1

LibVlc Lag on video Playback

Posted: 24 Jun 2017 11:22
by pecana
Hello, I am facing some issue using libvlc on Android (even the official VLC player give me the same issue) on my Android TV BOX Beelink GT1 s912 - Octa-Core
The video keep lagging every second :

Please see here a few second demostration:

https://goo.gl/9Aifce

How can this be solved ? Is there some settings or options i can try ? I almost try everything but without solving the issue.
Any ideas is accepted :-)

Thank you

Re: LibVlc Lag on video Playback

Posted: 28 Jun 2017 15:39
by pecana
Nobody has an idea ?

Re: LibVlc Lag on video Playback

Posted: 03 Jul 2017 09:16
by pecana
Just few more information:

With a stream type like this the playback is laggy :

Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720, 50 tbr, 90k tbn, 180k tbc
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 130 kb/s

But with a stream like this everything run smoothly:

Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo

do you think the stream is the cause of the problem ?

Re: LibVlc Lag on video Playback

Posted: 03 Jul 2017 14:37
by Jean-Baptiste Kempf
Logs?

Re: LibVlc Lag on video Playback

Posted: 04 Jul 2017 11:09
by pecana
Logs?
I will activate the log from vlc and send it.
Is there a way to save a verbose log from libvlc on android so i can also reproduce the problem and save the log on my test app ?

Thank you

Re: LibVlc Lag on video Playback

Posted: 04 Jul 2017 11:48
by pecana
Currently I am using this parameters, let me know if something is completly wrong or unused:

--no-avcodec-fast
--http-reconnect
--avcodec-skiploopfilter
-1
--no-audio-time-stretch
--skip-frames
--no-drop-late-frames
--avcodec-dr
--no-keyboard-events
--no-mouse-events
--preferred-resolution=-1
--clock-synchro=-1
--clock-jitter=0
--hdtv-fix
--avcodec-skip-frame
0
--avcodec-skip-idct
0
--android-display-chroma
RV32
--subsdec-encoding

--freetype-rel-fontsize=10
--freetype-color=16777215
--freetype-background-opacity=0
--dvbsub-position=4
--sub-autodetect-file
--stats
--audio-resampler
ugly
--network-caching=400
--file-caching=400
--live-caching=400
--disc-caching=400
--sout-mux-caching=400
-vvv

Thanks

Re: LibVlc Lag on video Playback

Posted: 05 Jul 2017 09:19
by pecana
Logs?
Here the log file from vlc:

test with mkv
https://pastebin.com/Z6HVThs3

test with mpegts
https://pastebin.com/qdTW3X3n

Please help and let me knw if you see something interesting :-)

As you can see you can also find the error i reported on another post :

Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[18,tid=16277,Native,Thread*=0xe0bf9200,peer=0x330900a0,"mediacodec_jni"]

Thank you

Re: LibVlc Lag on video Playback

Posted: 06 Jul 2017 22:45
by pecana
Any help ? :-(

Re: LibVlc Lag on video Playback

Posted: 11 Jul 2017 11:02
by tguillem
Hello!

--network-caching=400
--file-caching=400
--live-caching=400
--disc-caching=400
--sout-mux-caching=400

Could you replace 400 by 3000 ? Mediacodec, the hw decoder needs a long input cache.
If it's still not working, could you try without any LibVLC options ?
If it's still not better, could you send us the video sample ?

Re: LibVlc Lag on video Playback

Posted: 15 Jul 2017 23:23
by pecana
Hello!

--network-caching=400
--file-caching=400
--live-caching=400
--disc-caching=400
--sout-mux-caching=400

Could you replace 400 by 3000 ? Mediacodec, the hw decoder needs a long input cache.
If it's still not working, could you try without any LibVLC options ?
If it's still not better, could you send us the video sample ?
Hello I'll give it a try, by the way the log are from the vlc android application with the default option.
I will make some tests and send you the video sample as soon as possible.

Thank you !

Re: LibVlc Lag on video Playback

Posted: 14 Apr 2022 12:20
by peterpet
Hello!

--network-caching=400
--file-caching=400
--live-caching=400
--disc-caching=400
--sout-mux-caching=400

Could you replace 400 by 3000 ? Mediacodec, the hw decoder needs a long input cache.
If it's still not working, could you try without any LibVLC options ?
If it's still not better, could you send us the video sample ?
Hello I'll give it a try, by the way the log are from the vlc android application with the default option.
I will make some tests and send you the video sample as soon as possible.

Thank you !

Hi, i have the same problem now, did you fix that problem somehow ?