Recording High Quality Flash Video Over Slow Internet Connections Part 2
Monday, February 23rd, 2009This is part 2 of our 3 part series on recording high quality Flash video over slow connections.
As explained in the first part, a big buffer should be used in the recorder flash app so that the video and audio data has where to wait before its turn comes to travel to the media server.
When the user stops the recording (by pressing a STOP button for example) most probably there still is some audio & video data in the buffer, data that has not been sent yet to the media server.
Part 2: wait for the audio and video data to reach the media server before we display any SUCCESS message to the user
Otherwise you will most probably end up with videos with missing endings and frustrated users.
Heres how stopping a recording unfolds in our flash video recorder:
- STOP button is pressed (or recording time limit is reached)
- we stop capturing data from the cam and mic
- we display a SAVING VIDEO message until the buffer is empty (all the data in the buffer is sent to the server)
- when the buffer reaches 0 we finally display the recording saved properly success message.
In code (as2) Step 2 translates in ns.attachAudio(null) followed by ns.attachVideo(null).
Step 3 and 4 (detecting when all the data has reached the media server ) can be done in several ways but we listen for a NetStream.Buffer.Empty or NetStream.Record.Stop net status event fired while ns.bufferLength == 0 .
In as3 the procedure should be similar.
In part 1 we’ve talked about using a big buffer on the client side.

Features
Buy Now!