[vlc-devel] Vlc / live555 problem with RTP packet bursts

Sampsa Riikonen sampsa.riikonen at iki.fi
Tue Sep 8 20:55:19 CEST 2015

Dear Vlc Developers,

I have the following problem, which has been reappearing & torturing me 
in one form or the other during the last six months by now ..
.. it is related to RTP packet bursts in H264 video streams.

First, two illustrative cases (A) and (B) and then some concrete questions.

A) The packets arrive directly from a camera to vlc, with some latency 
between them:

p0 [latency] p1 [latency] p2 [latency] p3 [latency] p4

The video visualizes in correct order and ok.

B) Now I use a proxy between the camera and vlc.

The proxy accumulates packets and after N packets have arrived, it 
floods them into a port where vlc is receiving them.
(vlc is given an input .sdp file where the h264 payload and port are 

I.e., in python, approximately:

for i in range(N):

.. which creates a zero-latency packet burst, i.e. when compared to case 
(1), there is no latency *between* the packets:

p0 p1 p2 p3 p4

In this case vlc displayes corrupted video and jitter occurs.  If frames 
should be shown in order 1,2,3,4,5,6,7 .., they are typically displayed 
for example 1,2,6,7,3,4,5, i.e. with "jitter"

C) Here we created situation (B) artificially, but it typically occurs 
in wifi, which tends to send packets over the air in large bursts

One can fix this problem to some extent (but not completely) by 
increasing the value of "--network-caching" .. But after experimenting a 
lot with this, I don't think it is an issue of a buffer underrun (i.e. 
cases when there is nothing for live555/vlc in the cache to consume).

So, the concrete questions:

- Could there be something in live555 and/or in vlc that can't handle 
packet bursts?  Any ideas of such a thing?
- Maybe the network buffers ("socket sizes") are too small, so:
- Where are the network buffer / socket sizes defined (i.e., 
socket.SO_RCVBUF) in live555 and/or in vlc and what are what are their 
default values?
- .. can they be tuned (are they tuned by vlc) ?



More information about the vlc-devel mailing list