2 Replies Latest reply on May 29, 2009 11:25 AM by injpix

    Question about RTMP and AMF


      Hi! I'm considering the adoption of Flex in my organization and I'm reading some documents and material about it. I've read that Flex can have a nice boost in performance of large size transmition of information in relation to simple Ajax since Flex can make use of the RTMP proprietary protocol to send messages in AMF format (Instead of common XML ones of Ajax on HTTP). But I have a simple (and kinda dumb) question about how possibly this works: The Flash runtime communicates with the web-server which understands HTTP, using as a middle-man, the browser, which also sends HTTP requests. How is it possible then, to enable the so called publish-subscrible message exchange of the RTMP protocol in this configuration? Sorry If I said any misconceptions, I'm still learning


      Thank you!

        • 1. Re: Question about RTMP and AMF
          Michael Borbor Level 4

          you'll use RMTP to stream video, and audio. It's basically an open protocol if I'm not wrong,  or soon to be an open source protocol. AMF3 is another binary protocol that essentially converts your data to binary format and compress the data to about 1/6 of the original data size, which will give your app a boost in performance because data takes less time to go from point A to point B, and also a better bandwidth usage.


          Hope this helps.

          • 2. Re: Question about RTMP and AMF
            injpix Level 3

            I am pretty sure RTMP and AMF are not directly related.  RTMP (Real Time Messaging Protocol) can be used for, as Michael mentioned, to stream video and audio. FMS (Flash Media Server) can be configured to work with a HTTP web-server (e.g.: IIS, Apache, etc...) which will then, “...act as a progressive download server and as a streaming server.”  This is useful because, “you can write client-side ActionScript that serves video over HTTP if a client cannot use RTMP.”(see note 1)  For instance, if a company blocks all ports except port 80 (which is common), FMS can proxy HTTP connections to port 8134 (by default) which at this point, the web-server will handle.  The reason why FMS will need to proxy HTTP connections, is because any device cannot share a port with another that is on the same box.


            I hope this helps.  This is my first week (re)learning FMS and RTMP since 2004, so I hope that it is accurate.




            note 1:  if ActionScript does serve video over HTTP, I believe it will need to use RTMPT (Real Time Messaging Protocol Tunneling).


            some references :

            Configuring the HTTP Proxy(Flash Media Server)


            Installing the server