Flash player slowing encoding quality after a while

We are using flash player to publish a RTMP stream to wowza. We are using h.264 settings. Everything seems to work fine. We are just recording this stream on the server side using the built in “record” mechanism. However after 4 minutes of recording the quality of the video degrades…i mean the video is not smooth or rather the frame rate drops…Any clue as to why it should only happen after a while. To me it looks like configuration in the flex application that we need to be doing. Any clues.

This could be an issue with available bandwidth vs stream bitrate, Wowza will try to drop frames to keep the stream as close to real-time as possible. A quick test would be to test playback locally with the example player the ships with Wowza, [install-dir]/examples/LiveVideoStreaming/FlashRTMPPlayer/player.html and see if stream quality is sustained.

You might also try these settings in your app:

camera.setMode(320, 240, 15, false);

camera.setQuality(0, 90);

camera.setKeyFrameInterval(30);

You want high-quality and low-bandwidth, which are competing goals, and with the built-in Flash encoder options are limited.

Publishing a stream from a Flash based application and playing it back in a Flash based client works. But the defaults for video is Sorenson Spark and NellyMoser audio which are not supported in non-Flash clients and will need to be Transcoded.

To make the video quality better you can follow this guide to set the video to H.264.

And if you want to play back the stream in non-Flash based clients you will need to change the audio from Nellymoser to Speex in your Flash application, and use the Wowza Transcoder to transcode the audio from Speex to AAC audio. again, this article explains these steps:

How to set up a Flash application to publish H.264 video and Speex audio to Wowza Transcoder AddOn

Salvadore

If you are posting results to http or database, that is probably where the problem is.

Richard

I would want to add one more observation to this. We started displaying the loopback video while publishing the same. The loopback video by itself seem to degrade (i mean if i have some movements in the frame like someone walking behind… it is smooth in the first 4 minutes and after that it is not smooth movements) which points to the fact that flash itself is not sending the right video ruling out the possibility of problems on the wowza server end.

If i stop the recording and start it again (i have a start and stop button on the page) the flash video is not smooth right from the start. However if i refresh my webpage completely the loopback again is good for about 4-5 minutes. This increses my suspicion on something in the flash player that is not right or the net stream properties are not set etc. But i am not sure what exactly is the problem.

This could be an issue with available bandwidth vs stream bitrate, Wowza will try to drop frames to keep the stream as close to real-time as possible. A quick test would be to test playback locally with the example player the ships with Wowza, [install-dir]/examples/LiveVideoStreaming/FlashRTMPPlayer/player.html and see if stream quality is sustained.

You might also try these settings in your app:

camera.setMode(320, 240, 15, false);

camera.setQuality(0, 90);

camera.setKeyFrameInterval(30);

You want high-quality and low-bandwidth, which are competing goals, and with the built-in Flash encoder options are limited.

Publishing a stream from a Flash based application and playing it back in a Flash based client works. But the defaults for video is Sorenson Spark and NellyMoser audio which are not supported in non-Flash clients and will need to be Transcoded.

To make the video quality better you can follow this guide to set the video to H.264.

And if you want to play back the stream in non-Flash based clients you will need to change the audio from Nellymoser to Speex in your Flash application, and use the Wowza Transcoder to transcode the audio from Speex to AAC audio. again, this article explains these steps:

How to set up a Flash application to publish H.264 video and Speex audio to Wowza Transcoder AddOn

Salvadore

Got this resolved. The slow down was because we are running a timer to collect statistical information. Stopped the timer and everything was resolved. BTW will a timer have such an impact on the performance.