[vlc-devel] mpeg1 audio streaming problem

Greg Farrell greg at gregfarrell.org
Mon Jun 26 12:40:42 CEST 2006


   we're experiencing problems streaming a MPEG1 Audio file from a 
Kasenna server
to vlc using the livedotcom library. The session is successfully created 
and data is received
and played. However after a duration the sound starts to break up and 
eventually drops out.

 From debugging VLC is appears that the audio data is being received 
very slightly slower than
VLC plays it. The input FIFO's start off with plenty of data but 
gradually move towards zero as
packets are added to and remove from them. The size of the udp caching 
parameter (the
pre-buffering of the stream) affects how the long it takes for vlc to 
start running out of data to play.

The larger the pre-buffering the longer it is before VLC runs out of 
data. This would appear
consistent with VLC receiving data more slowly than it is playing it.

Strangely enough changing the uds_config PACKET_SIZE config variable to 
a large value, 16384,
form it's usual value of 1316 causes vlc to run out of data much more 
quickly. Setting the
PACKET_SIZE variable to a smaller value, 512, causes vlc to play much 

VLC considers the received mpeg audio to have a rate of 44100, and can 
automatically handle some
minor up/down sampling but this is not enough to solve things. Playing 
the mp3 file directly from the
hard-drive through vlc works correctly. This uses the same mpeg decoding 
path, the difference
is the audio source is a file packetizer not a udp stream. Using the 
file source the audio FIFO's
remain full and do not slowly move towards empty.

In particular in aout_InputPlay() problems start to appear at:
if ( start_date != 0 && start_date < mdate() )
        /* The decoder is _very_ late. This can only happen if the user
        * pauses the stream (or if the decoder is buggy, which cannot
         * happen :). */

Does this mean packets really are arriving later than they ought to? It's an
almost empty 100mbit ethernet network which we can easily stream mpeg2 
video over.

Or do you have any other suggestions/advice please?

    thanks a lot,

This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list