Page 1 of 1

How to modify the setting for late packet

Posted: 23 Sep 2013 10:48
by soho1001
Hi ,

When I check VLC source code,
I see the code segment below:

Code: Select all

if( !p_dec->b_pace_control && (p_sys->i_late_frames > 0) && (mdate() - p_sys->i_late_frames_start > INT64_C(5000000)) ) { if( p_sys->i_pts > VLC_TS_INVALID ) { msg_Err( p_dec, "more than 5 seconds of late video -> " "dropping frame (computer too slow ?)" ); p_sys->i_pts = VLC_TS_INVALID; /* To make sure we recover properly */ } block_Release( p_block ); p_sys->i_late_frames--; return NULL; }
It is vlc-2.0.8/modules/codec/avcodec/video.c, function DecodeVideo()
Why the time is 5 seconds? Is it possible to support configurable?
Because if I use WiFi 2.4G to play a live stream, it is very easily to get the message:
"more than 5 seconds of late video ->dropping frame (computer too slow ?)"
then video is freeze. It can not recover in case I see the message.
Is it possible to enable for configurable?

Re: How to modify the setting for late packet

Posted: 23 Sep 2013 19:07
by RĂ©mi Denis-Courmont
Because 5 seconds is far more than reasonable already.

Re: How to modify the setting for late packet

Posted: 24 Sep 2013 04:16
by soho1001
In open space, WiFi 2.4G may have heavy congestion that will cause the stream server can not send video + audio stream data on time. It may not get problem if user use ethernet to get video stream.
VLC client will get freeze easily in the condition.
Is it possible to open the option for configurable?
Such that user can set the properly value for the application that he use.

Re: How to modify the setting for late packet

Posted: 24 Sep 2013 09:59
by soho1001
Because 5 seconds is far more than reasonable already.
Hi ,

Because I test it by WiFi 2.4G open space, udp stream.
VLC may get rtp sequence misorder since udp pasket loss.
It is possible about udp packet loss when testing in WiFi open space.
If the inaccuracy about synchronization of video + audio can be enlarge, it may more make sense that the stream will not get freeze.
if the stream is freeze and VLC CAN NOT back to normal state, it seems more fragile.

Re: How to modify the setting for late packet

Posted: 03 Feb 2014 07:36
by alexkarnaukhov
Hi people,

I confirm this problem!

It`s very easy to put VLC in such laggy state with this messages about "slow CPU" when playing some rtsp stream over media with high packet loss, such is WiFi with a low signal.
And even if then you increase your wifi signal strenght (come closer to WiFi access point), VLC will not return to normal playing state. I tried to use libvlc in my program to catch some event, wich could indicate me about entering into this state, so I could restart stream, but with no success.
Another important thing is that such behaviour appears only with network-caching lower then <1 sec, but I really need to decrease latency as much as possible...

Can I do something to avoid this problem?