1 Reply Latest reply on May 27, 2008 11:22 AM by Dr. Fred Mbogo

    RTSP in AIR

      Hello everybody!
      I have one question.
      Is it possible to implement RTSP Server as AIR application (with using Flex) and RTSP Client as other AIR Application? This two app's will be runed on the same PC and one will act as Server and other as Client for playback of video files.
      Any Ideas?
        • 1. Re: RTSP in AIR
          Dr. Fred Mbogo
          It should be possible. The flash.net namespace has the networking facilities you will need, and AIR gives you local filesystem access for reading the raw video in. The main risk of failure, I would think, would come due to the interpreted nature of Flash: it might not have enough speed to deal with real-time video. The RTSP protocol is easy to speak, but it implies the use of RTP for the actual video transfer, and to construct the RTP packets, you have to "snoop" into the video data itself. A Flash application won't be able to do as much of that sort of work as an application compiled for the CPU would.

          But what I'm having the most difficulty understanding is, why would you want to do this?

          First of all, Flash has a perfectly usable video architecture already. You can choose from Sorenson Spark, On2 VP6, or MPEG-4 AVC (a.k.a. H.264) codecs. You can just read these files right off the disk and play them, no need for a server. Or, you can play them over HTTP or Adobe's own streaming video mechanism from another server. All of this comes for free in the Flash player, and thus in AIR.

          Second, if you were thinking of using some other video codec, you'd have to write the decoder in ActionScript, which is even harder, both computationally and engineering-wise as writing the RTP code. Depending on the resolution you want, it may not even be possible to do real-time decoding.

          Finally, why would you bother with a client-server architecture within a single machine? Why not just read the files straight off the disk?