Flash Media Server ::: Technical FAQ

Below are a number of frequently asked questions pertaining to Flash Media Server with answers:



Q1. What control do we have over the streaming quality? E.g., how does the server handle buffering, net congestion, etc.
A1. When streaming, the Flash Player client establishes a direct connection with the FMS server. This connection not only enables audio, video, and data to be streamed, but also enables remote calls and functions to be executed from client to server and vice versa. Using this architecture, coupled with a robust programming model on both the client and server, developers are able to control every aspect of video delivery experience.

For example, in a typical video on demand application the developer would probably want to perform the following functions:
a. Quickly show the first frame (or maybe a 5 second preview) of the video as a "thumbnail" in the player
b. Determine which port and protocol combo offer the best performance
c. Determine the bandwidth speed at which the user is connecting in order to serve up the appropriate size video with the appropriate buffer
d. Serve the video when the user requests it e. Monitor the progress of the video and ratchet it down to a lower speed if net congestion or similar decrease in the user connection speed occurs

The Flash Video Development Center contains the actionscript code for most of the features describe above.


Q2. When streamed, are FLV files served from server memory/cache or are they served from the hard disk every time?
A2. FMS caches video content so it can be served from the server memory. So, the first time the FLV is streamed, it will be read from the hard disk, but it will be available for subsequent delivery via cache. You can control the size of the cache in the server.xml config file.

When delivered via Origin-Edge server configuration, the video can be cached in memory, harddisk or both on the Edge Server.


Q3. Can you check the client download speed and serve up the right sized video? - BANDWIDTH DETECTION
A3. Yes you can. Use this Dynamic Bandwidth Detection code to determine the user's connection speed and then serve up the right video file (e.g., myvideo_40kbps.flv; myvideo_300kbps.flv; myvideo_700kbps.flv) based on the results.


Q4. Can I monitor the total video throughput being served by FMS and adjust the video streams (live or on-demand streams) based on this? - VIDEO THROUGHPUT CONTROL
A4. Yes you can. A use of this is to monitor the server and if traffic is starting to reach you license limit, lower the quality of the streams so you can add more people. To do this, use "getServerStats" and its return value "byte_out" to return the total video streamed by FMS.


Q5. If the user only has a 300kbps connection speed, can you stream video files that are encoded at a bit rate larger than 300kbps? - INTELLIGENT BUFFERING
A5. Yes you can, although you should use a buffer on the client to insure that frames won't be dropped during play back. The buffer size you need to use will be a function of the length of the video, the encode bitrate of the video and the difference between the users connection speed and the encode bitrate of the video. I.e., the larger the video bitrate is over the connection speed and the longer the video is, the higher of a buffer you will need to use.


Q6. If I'm delivering a 500kbps video, is there any way that I can monitor the performance of the playback and scale the video down to 300kbps if the client bandwidth is too small? - QoS MONITORING
A6. Yes, you can do this with the Flash Media Server. It will require you to encode the video into separate files for each bitrate (e.g., 500kbps, 300kbps). Once you do this you can have your Flash based video player monitor the buffer and if you start seeing stutters in the video, switch the video down to the lower bitrate but start playing it at the exact same point you left off when playing the higher bitrate video.


Q7. Is there any way to drop frames in the video if the bandwidth is not large enough to accomodate the video?
A7. Yes, you can do this when streaming. In fact, unlike progressive download where the video will just stop playing, Flash Media Server will do this automatically. While this is a decent strategy for times where the client bandwidth is temporarily disrupted, it's not an effective way to handle situations where you know the client bandwidth will be lower than the video bit rate. For these situations, use the solutions outlined above (bandwidth detection, buffering, QoS monitoring) instead.



Q8. What are the administration, operational, and monitoring capabilities of FMS?
A8. FMS 1.5 runs two primary services - the actual FMS service as well as an administration service. The administration service provides key operational, monitoring, and administrational capabilities via two mechanisms:

1. UI - the Admin service has a UI that you use to monitor the server. The UI is installed as part of the normal FMS installation. After you install FMS, go to "Start > Programs > Macromedia > Macromedia Flash Media Server MX > Adminstration Console" to run the Admin Console.

2. APIs - In cases where the layout of, or the information presented in, the Admin console is not adequate, customers can make their own Administration tools via a robust server admin API that is available in FMS 1.5.

Here is the FMS Admin API documentation.


Q9. I want to monitor multiple servers at the same time, or I need functionality that isn't in the standard FMS Admin Console - can I make a custom app for monitoring FMS server(s)?
A9. Yes, many customers do this to monitor exactly what they want. We have a full FMS Admin API that you can use to create a customized admin and monitoring app for your FMS server(s).


Q10. I'm planning on running a large cluster of FMS servers. Is there a way to monitor and adminstrate all the clusters from a single application/UI?
A10. Yes you can do this, but you would need to build the application/UI using the FMS Admin APIs. Many customers have done this. In fact, you can use Flex and make it a nice UI that updates in real-time.


Q11. How long does it take to build a custom monitoring and adminstration application and what are the skill sets involved?
A11. The time to build one depends on the feature and functionality you want to build in and how well your developer understands FMS. The skill set that is required is a deep knowledge of programming with Flash and FMS.



Q12. What is the capacity (e.g. number of concurrent users, bandwidth etc.) of the platform and what are the hardware and OS requirements for running the server?
A12. The server capacity is documented here.


Q13. What are the bandwidth limits for a Professional Edition license of FMS?
A13. There are no bandwidth license limits. Only a 100 simultaneous user limit. There are no restrictions on the size of the video other than what your server hardware can support.


Q14. How many STREAMS am I limited to with FMS?
A14. The Professional Edition enables 100 simultaneous stream. You can "stack" Professional Editions on the same machine to increase the capacity. Stacking two Pro Editions would get you 200 simultaneous streams, and so forth. If you need over 1,000 simultaneous streams, contact your Macromedia Sales Rep to inquire about Origin and Edge Server deployments.


Q15. For our VIDEO ON DEMAND system, how many servers do we need to stream X concurrent streams at Y Mbps per stream?
A15. You need: X / 100 Professional Edition licenses. The size, bitrate, or length of the video are irrelavant.


Q16. For our VIDEO COMMUNICATIONS/CHAT system, how many servers do we need to support Z chat rooms, with X people in each chat room, assuming with Y Mbps per stream?
A16. You need: Z * X / 100 Professional Edition licenses.


Q17. For DATA APPLICATIONS, how many servers do we need to support an application that has X people connected to it?
A17. You need: X / 100 Professional Edition licenses.


Q18. What happens when you hit the capacity ceiling on FMS?
A18. FMS periodically checks the capacity of the system on regular intervals. During the check, if the # of simultaneous user capacity ceiling is hit the FMS admin API sends a notification and the server will refuse to add any new connections. Note - FMS will not kick anyone off.

Let's go through a real world example, ACME Media Company has a Video on Demand app streaming video with the FMS Pro Edition (100 simultaneous connections). They currently have 100 people watching the video. FMS, doing its periodic check, sees that the # of simultaneous users is at the ceiling and sends out the notification via the API. If someone else tried to watch the video at that point, FMS wouldn't let them connect to the server.

So, how is 101th end user notified when they try to watch that video and can't? I don't know, you tell me. You're the developer of your application, FMS gave you the notification that Mr. 100 just joined and no one else can. What are you going to do with that notification? You send people a "Sorry, server is full" note when they try to connect. Or maybe you want to boot someone who's been hogging the system off the app. It's up to you.



Q19. Tell me about scaling FMS apps?
A19. The best way to scale applications with FMS is to deploy in an Origin - Edge architecture.


Q20. Do I have to use Origin and Edge Servers to deploy FMS across multiple servers or can I deply my app across multiple Professional Editions that are on multiple servers?
A20. You can deploy your application across multiple Pro Editions on multiple servers. This article will provide you some assistance in doing so:
Developing Scalable FMS Apps white paper. However, it's much easier (especially for one-way apps) to do so via Origin and Edge Servers.


Q21. How do I run my On-Demand Video Streaming application so it runs across multiple servers?
A21. Using Origin and Edge Server licenses, here's how you do it:

a.) Create and deploy your FMS VoD app (server scripts) on your FMS Origin Server
b.) Set-up and configure your Edge Servers.
c.) Use a hardware load balancer - or write a small little round-robin FMS "load balancing" app (i.e., assuming 3 FMS Edge Servers, it would do this: client 1 connects to FMSEdge1; client 2 to FMSEdge2; client 3 to FMSEdge3; client 4 to FMSEdge1; client 5 to FMSEdge2, client 6 to FMSEdge3; client 7 to FMSEdge1, etc...). Connect each client to this load balancing app and have it will spread the client load across your Edge servers. Read the Clustering Reverse Proxies documentation for FMS for more info.

Q22. How do I run my Live Video Webcast application so it runs across multiple servers?
A22. Same as above. Also check out the Clustering FMS for Live Webcasts white paper.

Q23. How do I run my Live Video Chat application so it runs across multiple servers?
A23. This is a little more involved than scaling one-to-many video streaming applications because in most cases to reduce latency you'll want to insure that the two (or more) people who are communicating are on the same server. But it's just software, we can make it do anything. So do this:

a.) Deploy your FMS Video Chat app (server scripts) to all of your FMS Origin Server
b.) Write a small little round-robin FMS "load balancing" app as suggested in the Q above. However, instead of loadbalancing incoming clients, you load balance rooms - i.e., assume 3 FMS Edge servers and two people go chat in "chat room": Assign chatroom1 to FMSEdge1; chatroom2 to FMSEdge2; chatroom3 to FMSEdge3; chatroom4 to FMSEdge1; chatroom5 to FMSEdge2, chatroom6 to FMSEdge3; chatroom7 to FMSEdge1, etc...). Read the Clustering Reverse Proxies documentation for FMS for more info.


Q23. Tell me about server stability and uptime.
A23. FMS is a very stable product that is able to run for long periods of time without need for a reboot. Our QA team conducts full longevity testing with each release.


Q24. Reading through these whitepapers and FAQs, and testing my application, I've found that my app requires 1,600Mbps of video throughput and FMS on my hardware can output 400Mbps. Therefore I need 4 unlimited capacity FMS servers. How many should I get for backup?
A24. A general rule of thumb is to run your servers at 50% of capacity. That way, up to half of your cluster can go down and you can still perform. So, in this case you should get 8 unlimited capacity servers and spread the traffic over all of them. Half of them could go down and you could still run your app. Of course you should always consider your specific situation and alter accordingly.



Q25. How can I provide authenticated access to streams - e.g., enable our single sign on to work with Flash video?
A25. There are a number of ways you can authenticate users prior to delivering content streamed with FMS 1.5. Below are a couple of strategies:

1. Authenticate at the SWF level: Authenticate users via your normal authentication process (e.g., your single sign-on process) and then once the user passes authentication, serve up the SWF file which streams the video content to the user. Benefit: it fits within your existing workflow, requires NO changes, and yet authenticates before serving up content.

2. Authenticate at the stream level: Serve up the SWF file with no protection, but authenticate the user when they connect to the server and request a stream. You can do this by passing the username/password info in the net connect - e.g., nc.netConnect("rtmp://server/app/instance", username, password) - and then have a server side function in FMS which takes that information and, via Flash Remoting, authenticates it against your normal backend system. How do you get the UN/PW info - important for single sign-on apps? There are a couple of methods:

i. When you initially capture the end-users un/pw info, do so via a Flash app and store that info in a local shared object (LSO) before passing it on to your app server. The LSO info can then be passed along with the net connect.

ii. use a method like this http://www.the-stickman.com/tutorials/f4cookie.shtml to get cookie info into Flash.

Note: the O'Reilly book Programming Flash Media Server devotes an entire chapter to authentication for FMS apps.


Other Questions

Q26. What are the system requirements for FMS?

A26. The system requirements for FMS can be found here on the Macromedia website. You may ask, does the FMS run on Fedora, SuSE or other versions of Linux that aren't listed in the above link? We have heard that some customers have success running FMS on other versions of Linux such as Fedora, SuSE, and even Debian or Mandrake, however, these platforms are not "officially supported" by Macromedia. If you call in for tech support on these, you will be out of luck.

Q27. I've read the system requirements, but let me hear it from you, what hardware should I run on?
A27. Buy a Dual Xeon, 2GHz, 2GB RAM server running Windows 2003. Why a dual over a quad? Because dual CPUs have a better price/performance than quads or higher. Why Windows over Linux? Because chances are your server administrator already knows Windows and your app developer won't make simple mixed case file errors.


Q28. Can I customize FMS, does it have an API?
A28. Yes, FMS can be customized to enable you to create multiple different types of uses. In fact, FMS is in essence just a bunch of APIs. Here are the FMS APIs.


Q29. I want to set up a cluster of FMS servers to serve up a lot of on-demand video streams and integrate the reporting into my back-end systems, what do I need to do? Assume I know nothing about Flash.
A29. Here is our suggested process.


Q30. Can you recommend a good FMS development company to work with for my FMS app?
A30. Yep, call: Will Law (wlaw at hostcast . com) at HostCast or Glen James (gjames at newyyz . com) at New Toronto Group or Allen Ellison (allen at architekture . com) at Architekture.


Q31. If someone is viewing video (example 256kb stream) with a connection speed of 256kb, theoretically everything should be ok. What happens if someone else starts an internet application (example: a file pull using FTP) that slows down the server-side connection?

A31. The great thing about Flash Media Server is that you can build in continuous bandwidth monitoring. What that means is that there is a connection between the server and user that dynamically check themselves and if it gets to slow (i.e. 256kb isn’t fast enough) it goes to a lower stream (i.e. 100kb stream). This is a new feature built into FMS2.



Q33. I'm new to FMS, have created an FMS app, it intially works really well for a while but then it just stops - what gives?
A30. Let me guess, you are using the free Developer Editing right? You are hitting the 10 connection capacity limit of the free Dev Edition. Put it on a Pro Edition and you'll be fine.









This site maintained by Chris Hock. If you have comments, feedback or would like to be a contributor, contact chock at adobe dot com. This site kindly hosted by the fine folks at (media temple).