Search Box


Thursday, January 31, 2008

Streams not being Saved or saved with zero file size.

I am currently playing around with Flash Media Server based applications using RED 5(Amazing tool I would say.) and encountered a very very strange Bug. When I tried to record voice over the web using my application url I found that a FLV file is being created but it does not appear to have a valid file size. I have been struggling over this from changing my code from AS3 - AS2 and vice versa but with no luck. But one thing that constantly came to my notice during this struggle was that in other applications (that came along with red 5 server as demo files ) whenever I tried to record my voice I was able to see a setting window invoked by the flash player asking for user's confirmation to allow data to be recorded. And in my application whenever i clicked record this setting window never showed. Maybe it was my bad luck that stopped me from thinking or analyzing in this line of thought i was busy thinking about other problems which resulted in failure to make my application work correctly until today morning when tried the red 5 applications native demo swf file to record my voice using my app's url. Amazingly my voice was starting to be recorded and i could see the flv's file size constantly increasing with voice data being stored.

I did not know why or how it occured to me but i once again opened my own application fla file and changed its stage size to 250 x 250 then published it to test.

Guess what happened ??? when i connected to the RED 5 server and clicked the record button i was able to see the flash setting window being opened asking for the request to allow my url to record data. And happily saw the size of flv file increasing being saved in my streams folder.

Concluding i guess it was the stage size that was giving problem all this time. My guess is that if the stage size needs to be big enough to accommodate the flash player setting box to be shown (in my case i found it to work perfectly with 250 x 250 px).


Ashok Srinivasan.