LibVlc Lag on video Playback

This forum is about all development around libVLC.
pecana
Cone that earned his stripes
Cone that earned his stripes
Posts: 145
Joined: 27 Dec 2015 20:30

LibVlc Lag on video Playback

Postby pecana » 24 Jun 2017 11:22

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

pecana
Cone that earned his stripes
Cone that earned his stripes
Posts: 145
Joined: 27 Dec 2015 20:30

Re: LibVlc Lag on video Playback

Postby pecana » 28 Jun 2017 15:39

Nobody has an idea ?

pecana
Cone that earned his stripes
Cone that earned his stripes
Posts: 145
Joined: 27 Dec 2015 20:30

Re: LibVlc Lag on video Playback

Postby pecana » 03 Jul 2017 09:16

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 ?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: LibVlc Lag on video Playback

Postby Jean-Baptiste Kempf » 03 Jul 2017 14:37

Logs?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

pecana
Cone that earned his stripes
Cone that earned his stripes
Posts: 145
Joined: 27 Dec 2015 20:30

Re: LibVlc Lag on video Playback

Postby pecana » 04 Jul 2017 11:09

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

pecana
Cone that earned his stripes
Cone that earned his stripes
Posts: 145
Joined: 27 Dec 2015 20:30

Re: LibVlc Lag on video Playback

Postby pecana » 04 Jul 2017 11:48

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

pecana
Cone that earned his stripes
Cone that earned his stripes
Posts: 145
Joined: 27 Dec 2015 20:30

Re: LibVlc Lag on video Playback

Postby pecana » 05 Jul 2017 09:19

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

pecana
Cone that earned his stripes
Cone that earned his stripes
Posts: 145
Joined: 27 Dec 2015 20:30

Re: LibVlc Lag on video Playback

Postby pecana » 06 Jul 2017 22:45

Any help ? :-(

tguillem
Developer
Developer
Posts: 87
Joined: 04 May 2015 16:38
VLC version: ALL
Operating System: Linux/WIndows/Mac OS

Re: LibVlc Lag on video Playback

Postby tguillem » 11 Jul 2017 11:02

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 ?

pecana
Cone that earned his stripes
Cone that earned his stripes
Posts: 145
Joined: 27 Dec 2015 20:30

Re: LibVlc Lag on video Playback

Postby pecana » 15 Jul 2017 23:23

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 !

peterpet
New Cone
New Cone
Posts: 4
Joined: 09 Mar 2017 15:13

Re: LibVlc Lag on video Playback

Postby peterpet » 14 Apr 2022 12:20

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 ?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 3 guests