At A Glance Main Projects Tutorials Resume

Contact


Email: palen1c at gmail.com




Experiences Using Flash Media Server in the Amazon Cloud For Recording on the Flash Platform

Fri, 7 Sep 2012 19:48:46 EST

Flash Media Server 4.5 default home page.
I have been fortunate lately to get to work on a really neat project that utilizes many aspects of Amazon Cloud services for recording over the Flash platform. Adobe has partnered with Amazon to allow users of Amazon web services to quickly fire up instances of Flash Media Server for development or production purposes.

Price

For short term use, compared to the traditional FMS licenses; the Amazon solution is a bargain. For extended use periods it's still a decently expensive endeavor if you're just experimenting. I recently had to run an instance on my own dime for some weekend testing. Here is how the real-world fees broke down:
  1. One Time Charge to Fire things up: $5.00
  2. $0.430 per Large instance-hour (you're forced to run a minimum of a large instance) 123 hrs (5 days): $52.89
  3. Pro-rated recurring ($5) monthly charge: $3.71
  4. Bandwidth costs Up and Down under 1 Gig so: $0.01
TOTAL: $61.61

Setup and Usage

Flash Media Server terminal ascii art.
Getting things rolling for streaming or recording is a pretty quick process. Customizing the out of box experience requires proficient command line Linux experience in the Red Hat/Centos usage paradigm. All FMS servers in the Amazon cloud run on Centos.

FMS instances do not allow their boot partitions to be backed by persistent storage. Amazon calls this EBS. If the boot partitions were able to be backed by EBS it would allow them to be started and stopped without loosing everything on the core OS. EBS volumes can only be mounted as extra drives on the FMS images offered on Amazon.

If a developer would like a FMS instance to start with the same configuration as previous working instances, the most likely way to do it would be to create a specially crafted Amazon compatible start up script for the instance.

Experience

There were a few specific FMS recording configuration settings that needed to be handled for the Amazon cloud vs a test server that was implemented on a Windows 2008 Server Rackspace host.

1. Metadata Latency Issues. I think this is a FMS 4.5 bug; but special consideration had to be taken around the metadata during recording. I had to send metadata right away from the client and also configure longer wait periods on the FMS server or else we would constantly end up with recordings with broken metadata.

2. This particular experience requires php alongside Adobe FMS HTTP dynamic streaming built into Flash Media Server. Adobe uses a bundled version of Apache with special modules to achieve HTTP Dynamic streaming for devices like IOS. If you try and port these special modules to the Centos core PHP/Apache install you'll be met with failure every time on FMS 4.5. Conversely it was impossible on the Centos platform to install the correct php modules into the FMS Apache instance to allow php interpretation from the FMS version of Apache. In this particular scenario we ended up running two instances of Apache. The built in Apache for HTTP dynamic streaming over a port other than 80, and the Centos version of Apache and PHP for normal web http and php based script execution. I did a ton of library tracking on the Adobe provided Apache modules to try and get them to work on their Centos distribution with another version of Apache, but it was impossible. I was able to easily get it to work on a Windows platform using PHP and Flash Media Development Server. On Linux I think the problem originates with incompatible libraries on a Centos 64bit system and the Adobe provided FMS Apache solution on their Amazon Linux distribution. I have not tested the newest FMS 5 version under these circumstances.

3. Not particularly related to the Amazon Cloud, but buffering a recording on FMS 4.5 will not drop audio. For this particular project, I was able to set the buffer time very high and preserve full video and audio data over slow connections! This is ideal behavior compared to the scenarios I have had to go through in the past with older versions of Red5. To be fair it could have also been past versions of AIR and Flash Player that caused audio drop.

Charles Palen has been involved in the technology sector for several years. His formal education focused on Enterprise Database Administration. He currently works as the principal software architect and manager at Transcending Digital where he can be hired for your next contract project. Charles is a full stack developer who has been on the front lines of small business and enterprise for over 10 years. Charles current expertise covers the areas of .NET, Java, PHP, Node.js, Javascript, HTML, and CSS. Charles created Technogumbo in 2008 as a way to share lessons learned while making original products.

Comments

No one has posted any comments yet, be the first

Comments are currently disabled.


Techno Gumbo RSS Feed

Related Links