Developing Scalable Mobile Video Chat Applications

I’m making the assets and workbook from my lab at Adobe MAX available for download. The attached ZIP contains the following:

  • L2709_Presentation.ppt
  • L2709_Workbook.pdf
  • FlashP2PLib.fxpl
  • MAX2011MobileVideoChat.fxp
  • EyeChat.fxp
  • EyeChatDesktop.fxp

The last two projects are completed versions that you can use for testing or to skip ahead.

I plan to follow up with posts related to the P2P logic used in this sample application. Any questions, let me know. Thanks to all who attended!!


  1. Hi

    Some comment for the start of the FMS on AWS(dummies like me, read on):
    First i had to SSH into the system, edit the fms.ini in /opt/adobe/fms/conf/
    then do an ./adminserver start in /opt/adobe/fms

    But my question:
    What do i need to do / create the “gateway application”?
    do i need only to create the folder in Applications/ or do i need to place some other files like Application xml or main.asc which i honestly cannot find

  2. Hi Gergely,

    For the purposes of this demo, you shouldn’t have to modify the fms.ini. Which AMI did you use to launch your instance?

    Yes, creating the gateway application is as simple as creating a folder with the application’s name in /mnt/applications. Because we’re focusing on local multicast vs. unicast failover we don’t have to have an Application.xml or main.asc. I’ll revise the documentation to make those things a little clearer. Thanks…

  3. Hi Hassan, I’ve just implemented your example using FMS, but we have a problem with the audio echo over mobiles. Do you have any idea how to make the sound to a better qaulity and remove the echo ?

  4. I used the eastUS 4.0.3 image, and i see your point. But the first run of the sample is kind of diffcult for us, the questions will come from a Flash developer, im rather the server guy 🙂

  5. Hi Cris,

    The easiest thing to do would be to use the AEC feature introduced in FP 10.3/AIR 2.7 but unfortunately that only works for desktops. Until that changes, it’s best to rely on hardware that has AEC baked in and maybe explore an AIR native extension that would “enable” this functionality.

    BTW, is it all devices in general? Or, are there specific models you’re experiencing this issue with. Just asking because I’d like to poke Adobe about the importance of this feature for mobile…

  6. Hi,

    Is there a possibility to trow the audio to the server, and let only the video part be P2P, and ofcourse is there a way to achieve echo cancellation or sime kind of filtering on the server?

    I am reqlly curious how this was done in projects before Cirrus P2P

  7. Dear Hasan!

    My name is Martin and the Guys who contacted you in the past weeks regarding your article “scalable video chat solution” are colleagues of mine. Just to introduce us a little bit, we are a very, very little startup which will focus on web and mobile development in the future. Therefore our small team consist of 3 PHP colleagues 2 iPhone guys and one Flash developer as well as 2 system engineers for infrastructural demands.

    At first we like to thank you for your engagement and the patience you have with us. This leads us to the assumption that it make sense, to tell you our “whole story” with regard to our attempt to develop a working cross platform prototype of a video chat based on the Adobe integrated runtime.

    In the past 4 months we tried to gather information about what is possible and which approach could be the right one. Therefore we at first followed the development of Mark Doherty and his Radar app, thanks to the fact that he provided the sources for it.

    Based on that, we developed it a little bit further in order to find out which improvements seems to be possible to match a functionality which survives under real life conditions. If helpful, we gladly would like to share our relevant state of development with you, especially because it could draw a clearer picture of what we achieved so far (which is unfortunately not that much).

    In sum we have to conclude, that the given functionalities – even the ones of AIR 3.0 – are at least unsatisfactory. Because of that, we tried to achieve furthermore progress and spoke to several Adobe platform evangelists, directly with Adobe at IBC Amsterdam and to virtually anybody from whom we might suppose that he could be able to perform a meaningful contribution.

    Now – a few days ago – we found your article and decided to give it a try by following your guidelines by establishing the configuration described by you. The prerequisites we added was the application of:

    · Some Desktops and Laptops (as host for the desktop variant of the app)

    · HTC Desire HD, HTC Sensation

    · Samsung Galaxy SII

    · iPhone 4 as well as iPod Touch 5th generation with iOS 5 installed

    · And a lot of willingness as well as efforts to achieve our goal

    What we found out so far is the following:

    · The video part of the stream runs smoother than ever and in a much more “real-time manner” than the pure p2p approach from Mark

    · Unfortunately the audio part of the stream seems to not works out at all:

    o Android (HTC Sensation) – Android (HTC Desire HD): totally no sound, sometimes strange noise, seems that the microphone is addressed in a totally wrong way…

    o Android – iPhone: more likely but also noisy and with an inacceptable latency, up to one minute of delay

    o Android – Desktop: again more likely but also noisy and with an inacceptable latency, up to one minute of delay

    o iPhone – Desktop: the best result of a chat with a mobile device involved, but still interrupted audio and somehow “pumping”, similar to some kind of “noise gate” or extremely compressed sound, coming in “waves”

    o Desktop – Desktop: a Perfect video chat, smooth video, clear and understandable smooth audio – the way it should be…

    So – as you might imagine already – the now following next step is to allow us to kindly ask some questions regarding your experience with that topic, especially:

    · Where you able to demonstrate a working video chat at Adobe MAX, and if yes:

    o Which app hosts (devices) where involved?

    o Did you also discover audio problems and if yes what type of?

    o Where problems regarding increasing latency/delay in relation to the duration of already established connections?

    · What exactly is the contribution of FMS within your scenario? Of course we see that video is nearly perfect, and scalability can only be achieved by using such a setup, but are there possibly additional features on the server side which could be used to improve the sound quality?

    · Probably some kind of real-time stream processing which leads to a better solution?

    · Do you think that the new “native extensions” of AIR could be a promising alternative to concentrate on, in regard of the elimination of these problems?

    · Do you think that Adobe is aware of all the problem details actually?

    · If Adobe already knows all about the necessary further improvements of AIR, when would you expect the release of it?

    · And the last question – I really hope you don`t mind – who else – except you – could be of help regarding this video chat topic?

    I hope you do not find it too impudently to bother you in such a manner, but now slowly we have despaired already a little bit. We hope – by choosing this path – to get a little help which may leads us to new perspectives or ideas regarding this issue.

    Again, thanks for your time listening to us and hopefully you can find lacks in our conclusions we haven`t considered so far…

    Cheers and have a nice day,


  8. Hi Martin,

    Sorry for the delayed response but been doing a lot of moving around as of late. With regards to your tests, I’ve had similar results with remote connections. The best results whether remote/local being Atrix Desktop and Atrix Atrix. Haven’t added an iPhone 4 to my test kit yet so am unable to test that.

    In my sample application, FMS is purely a gateway demonstrating that basic chat can be achieved w/FMES on AWS. A more robust system could make use of 1 or more FMES instances to create a remote mesh “cluster” to help alleviate some of the inherent issues involved with doing P2P across the Net.

    The best person I can think of to talk to would be Adobe’s Michael Thornburg, the author of RTMFP. He definitely knows a lot on these subjects so I would seek him out or maybe Tom Krcha who may be a little more accessible.

  9. Thanks for the info, it works perfectly!!

    Just a warning, for the distracted people like me…

    If you leave the Amazon FMS service running for a month (even without using it),

    **IT’S GONNA COST YOU 145$!!!!

    I set it up for testing a month ago, then completely forgot about it (my mistake, but thought i would post it here for others) :\

Leave a Reply

Your email address will not be published. Required fields are marked *