Wowza Community

Buffering Issue on Webcam Recording

We’re having a problem with webcam publishing taking very long to clear the client buffer. Our flash player is using a modified form of the web cam recorder example given with the Wowza installation. The quality is still set to camera.SetQuality(0, 88). We’ve played with these numbers (plus the buffering setting) and can occasionally hit it where our testers are all pleased with the results, but eventually something changes and the video becomes pixelated or the video becomes jerky. So we’re back to (0, 88) and things are fine. This afternoon though, I recorded a 40 second video that began filling the buffer immediately, so that at 40 seconds, there were 20 seconds of buffer filled. It then took almost 60 seconds to unload the buffer before receiving the NetStream.Unpublish.Success status and unpublishing.

My frustration is that I can’t seem to tune these settings so that everyone is happy. Our client bandwidth seems to be fairly decent (outbound speeds range from 350 Kb/s to 500 Kb/s). Mine is at 415 Kb/s and I just don’t get why the buffer fills and takes so long to unload.

When I analyze the stats on the published file, the datarate seems to be 410 Kb/s or so. I’ve read the manuals and am struggling to keep all our testers happy with the results. Is such a delay in unloading the buffer normal? Maybe I should just accept it and move on… :confused:

Any thoughts?

Thanks,

Dono.

The time it takes is most likely a factor of upload bandwidth. So large fluxuations in time are due to upload bandwidth glitches.

Quality settings between 80 and 95 seem to give the best results. What frame size are you using? Anything above 320x240 can cause issues on older machines.

Charlie

I really don’t know. I think all you can do is use the provided API with the force flag to true and see what happens. I have not found any other secret APIs or methods for gaining better control of the encoder settings.

Charlie

You may want to double check to see if the video being recorded is really 320x240. It might be better to do:

camera.setMode(320, 240, 20, true);

which I believe will try to force the frame size to 320x240. This may have been what is causing the bitrate to jump. By forcing the bitrate down it probably just kept the frame size larger and lower frame rate.

All of this camera setting stuff seems to differ based on the camera and driver on the local machine. It is tough to get right.

And yes we did not see a huge difference in quality settings between 88-95. We did see problem above 95.

Charlie

Thank you for your response, Charlie. We are indeed keeping our frame size at 320x240. The Flash code is a slightly modified form of the original webcam recorder in Wowza’s example directory–changes were mostly for passing in setting values as parameters.

Here are the settings for the camera. I understand what key frame intervals are in general, but I never could find that function documented in the Flash help for some reason.

camera.setMode(320, 240, 20, false);
camera.setQuality(_recordingBandwidth, _recordingQuality); // default is 0,88
camera.setKeyFrameInterval(20);
microphone.setRate(11);

I have revisited the problem video files and have noticed that the data rate for mine seem to have jumped from 415 Kb/s to 1045 Kb/s :eek: using the same settings (0,88). Today when I try to throttle the B/s using settings of (51000, 88) I get a much better Kb/s, but the frame rate averages a slow 6 to 8 fps. At one point a few weeks ago, I had good luck with the setting (51000, 0) – frame rate was good, and quality went down only for some testers. But then two days ago, testers started complaining about quality, stuttering, and long wait times on saving, thus we went back to (0,88). I clarified with our hosting company that our inbound speeds aren’t being throttled.

I’m really sorry–I guess this isn’t really a Wowza issue, is it? I don’t want to be a newbie burden on you, but am not having much luck finding resources that fit my problem. I’d be happy to seek help elsewhere if you could point me in the right direction. I do appreciate any feedback you can give me.

Thanks,

Dono.

P.S. Regarding the 80 to 95 quality settings you mentioned: I thought I read on one of your posts that anything over 88 generally produces results that aren’t significant enough to notice…?

Thank you. I had verified the dimensions (and have done so again) and they are at 320x240. Some of my testers do show different dimensions, so we’ll try it with the true setting and see how it goes. I do realize with the hundreds of variables (web cam, drivers, internet connection, server load, etc) that this may be a nearly impossible task. My frustration is that something changes for me (not my camera) which throws the settings out of whack. And it happens with our testers too at random intervals–even though our upload speeds aren’t that different.

Last question and then I’ll go bang my head against someone else’s door: is there a way in the Flash client to limit the bandwidth to 400 Kb/s and ‘request’ that the frame rate be as close to 20 as possible, with the understanding that pixelation may occur and quality will lower? Right now, B/s and quality seemingly override frame rate.

I think I may just have to provide a drop-down or a slider so testers can tune their client themselves… And maybe that’s what everyone else does, too.

Thanks for all your help, Charlie!

Dono.

Thanks so much, Charlie! I appreciate the information and feedback that I find in this forum. You guys are great…

Dono.