jPlayer with Live Streams - is there a buffer delay?

1,101 views
Skip to first unread message

Chris

unread,
Jan 15, 2014, 7:22:23 PM1/15/14
to jpl...@googlegroups.com
One of the problems we encountered with trying to play live Icecast streams with the HTML 5 Audio Player (i.e not using WebAudio API) is an initial 4-5 second delay while the audio player buffers the stream.  We therefore encountered that the playback of the stream was always behind from the actual audio playback by a few seconds.

Does jPlayer fix/resolve this issue and, if so, how so?

Thanks.

Mark Panaghiston

unread,
Jan 16, 2014, 7:52:37 AM1/16/14
to jpl...@googlegroups.com
The browser will always buffer a little media before playing. The jPlayer Flash solution buffers 3 seconds worth. The HTML5 browser tends to buffer between 1 and 3 seconds.

If you look at your icecast config, there is an option to burst on connect, so the user gets those 3 seconds very quickly and play beings just like any other piece of media would. There will still be a latency between the live recording and the browser playing the sound.

Chris

unread,
Jan 16, 2014, 12:03:42 PM1/16/14
to jpl...@googlegroups.com
Mark,

Thanks for the reply.

When you refer to 'latency', are you referring to the inherent latency involved with Icecast converting and streaming the audio and the end-user/client receiving and playing the audio?

Other than the above latency, do you have any reason to believe that what the user hears through the HTML5 Audio Player via Icecast be anymore 'latent'?  I.e. will the buffered audio stream be "near real-time"?

I'll look into the burst mode with Icecast.

Thanks.

Mark Panaghiston

unread,
Jan 16, 2014, 1:00:38 PM1/16/14
to jpl...@googlegroups.com
I mean the latency you described, plus the buffer added on to it... The burst just fills up the buffer fast, and then it starts playing from (for example) 3 seconds ago.

Chris

unread,
Jan 16, 2014, 1:43:48 PM1/16/14
to jpl...@googlegroups.com
Is there any way to skip ahead by three seconds once the buffer is filled?

Or will the audio buffer always be behind by ~3 seconds?

Thanks.

Mark Panaghiston

unread,
Jan 16, 2014, 4:41:19 PM1/16/14
to jpl...@googlegroups.com
With the HTML solution, you could try looking at the media's buffered TimeRanges information and see if you could jump ahead a few seconds to the bleeding edge of the data. You might just end up dropping back again though if there is a blip in the network traffic. That is what the buffer is there for after all, to improve the playback quality.

With the Flash solution, you could change the buffer size in the source and compile it again.

Why is the real-time so important to you?
On most streaming systems, anything under 30 seconds latency is considered ok and about 2 seconds is around the best you'll get.
Reply all
Reply to author
Forward
0 new messages