Topic: Netstream buffer / latency

I am attempting to play a live video feed (FLV through a netstream) but running into a lag problem. The longer the widget runs, the worse the lag gets, seemingly without bound. Measuring the lag by looking at NetStream.bufferLength, when the widget starts there is only about 0.08 seconds in the buffer but if I leave it running for several hours it builds up to over 200 seconds which I am surprised the chumby even has enough memory to hold. Using setBufferTime on the NetStream doesn't seem to have any effect. I don't think this can be a CPU issue as running top over ssh on the chumby shows flash player only consuming about 10% CPU. The exact same widget works fine when run on my mac. Has anyone seen something like this before or know of a fix?


The code for my widget is below:

var nc:NetConnection = null;
var nsPlay:NetStream = null;                      

// create a connection to the wowza media server
nc = new NetConnection();
nc.connect("rtmp://localhost/videochat");
        
// get status information from the NetConnection object
nc.onStatus = function(infoObject)
{
    trace("nc: "+infoObject.code+" ("+infoObject.description+")");
}
        
// create a new NetStream object for video playback
nsPlay = new NetStream(nc);
        
// trace the NetStream status information
nsPlay.onStatus = function(infoObject)
{
    trace("nsPlay: "+infoObject.code+" ("+infoObject.description+")");
}
        
nsPlay.onMetaData = function(infoObject:Object) 
{
    trace("onMetaData");
    // print debug information about the metaData
    for (var propName:String in infoObject)
    {
        trace("  "+propName + " = " + infoObject[propName]);
    }
};    

// function to monitor the frame rate and buffer length
function updateStreamValues()
{
    if (nsPlay != null)    {
        trace(nsPlay.time + " secs;\t" + nsPlay.currentFps +" fps;\t" + nsPlay.bufferLength +" secs");    }
}

setInterval(_root, "updateStreamValues", 500);

// set the buffer time to zero
nsPlay.setBufferTime(0);
        
// subscribe to the named stream
nsPlay.play("user_cam");
        
// attach to the stream
videoRemote.attachVideo(nsPlay);

Where videoRemote is the movie clip object on the stage.