Recording High Quality Flash Video Over Slow Internet Connections Part 1
This post is the first part out of a 3 part series on how to record high quality flash video over the Internet. We’ve learned a lot while doing video recorders for our clients and while developing the AVRecorder bundle and we would like to share some of that knowledge with the community!
At the end of this 3 part series you will be able to record DVD like videos over the Internet using a simple audio video recorder made in Flash or Flex Builder (as2 or as3).
So, Part 1: In the client swf application use a big buffer on the outgoing stream.
All flash video recording applications are made out of 2 parts: the client side application, (a swf file embedded in a HTML page) and the media server application which can be Flash Media Server, Red5 or Wowza.
By the client application I mean the swf that gets embedded in the website, the actual recording application developed in Flash or Flex Builder that people will see and use.
The buffer is where the audio and video data are stored before they are sent to the media server, and it needs to be as big as possible to ensure that all the data captured from the web cam and mic are sent to the media server instead of being dumped (which is what happens over slow connections if you’ve got a small buffer)!
On a high-speed connection, the buffer size is not a concern because data is sent almost as quickly as Flash Player can capture it.
When recording video over slow connections the buffer behaves just like a funnel! If a user is trying to record a 500Kbits/s video over a 300Kbits/s connection with the media server, the data that can not be sent as soon as it is captured and some of it (about 200kb every second in this case) is stored in the buffer until its time comes to travel to the media server. The bigger the buffer, the more data can be stored in it! As soon as the buffer fills, all the data in it will be dumped by the Flash Player, so you want to be sure you have a big buffer.
I typically use buffers about 60 or more seconds for recording applications, you can go even higher if the recording application might be used for recording long movies!
To set a big buffer on the publishing/outgoing stream in the client swf you use:
- in as2 this function : NetStream.setBufferTime(60)
- in as3 this property : NetStream.bufferTime = 60
This is it! The next part will cover waiting for all the audio and video data to be sent to the media server before you display any success/ok message to the user!
Update: Part 2 can be accessed here: http://www.avchat.net/blog/?p=33
Even later update: Part 3 is now available: http://www.avchat.net/blog/?p=27

Features
Buy Now!
February 10th, 2009 at 13:11
Great!!!! Waiting for next part!!!!!!
February 23rd, 2009 at 13:20
[...] This is part 2 of our 3 part series on recording high quality Flash video over slow connections. [...]
March 1st, 2009 at 9:46
hi
April 2nd, 2009 at 15:39
[...] This post is part 3 of our 3 part series on recording high quality Flash video over slow connections. [...]