javascript - icecast audio.js play without buffering -
i have icecast setup running on server. clients connecting tags in web pages, either through html5 or flash. using audio.js accomplish (specifically, flash fallback).
the problem is, sound beingness played concurrently separately stream of images. (it's 10-fps jpeg stream.) need sound match much possible images. unfortunately, sound much 7 seconds delayed before starts playing.
some information:
the image stream cannot delayed match audio. sound must speed match images. the icecast server config has<burst-on-connect>
set 0 minimize latency. there no lag when playing via vlc (perhaps few hundred ms, acceptable). put way, when viewing images , playing sound via vlc, sufficiently aligned. unfortunately, using vlc not alternative in endgame.
since vlc has no lag, tells me web browser (chrome, firefox, ie) buffering sound before playing it.
the question: how prevent web browser buffering audio? want play has available. i'm using audio.js, other similar technologies acceptable.
additional information: i've set audio.js autoplay , preload=none.
thanks help!
a buffer always necessary. networks packet switched. info comes in chunks, not continuously. in fact, there many buffers:
capture buffer (at sound card) codec buffer (codecs work on chunk of samples @ time) network buffer server server-side buffer (typically large, 10+ seconds) network buffer client client buffer (typically 2-3 seconds) client codec buffer client sound device buffereach buffer adds latency, have noticed. buffer have command on server-side buffer, configured <burst-on-connect>
setting. setting size of buffer larger size, can fill downstream buffers quickly, enabling extremely fast start playback. have set zero, means downstream buffers can fill fast info comes in encoder.
client-side, have absolutely no command on buffering, , nor should you. clients free implement codec in whatever way choose. codecs can begin streaming right away, , others can't. devices have re-sample sound fit within playback, , others don't.
what sounds want synchronize video stream , sound stream. that, should streaming video stream begin with. video made maintain sound , video in sync. icecast supports streaming video in few formats.
javascript html5 audio latency icecast
No comments:
Post a Comment