title: Display RTSP stream in Adobe AIR
body: <p>I am working on a project that involves displaying video feed from an IP camera using Adobe AIR. I know that Flash does not have a native support of <code>RTSP</code> protocol and therefore I am evaluating all possible routes I can take to solve this issue:</p>
  
  <ol>
  <li><p>Use <a href="http://www.adobe.com/products/adobe-media-server-professional.html" rel="nofollow noreferrer">Adobe Media Server</a> to convert incoming RTSP stream to RTMP and then <a href="http://board.flashkit.com/board/showthread.php?799405-RESOLVED-AS3-Steam-RTMP-LIVE-video-WITHOUT-FLVPlayback-Component" rel="nofollow noreferrer">use</a> Flash API (<code>NetConnection</code> &amp; <code>NetStream</code>) directly.</p></li>
  <li><p>Write a custom class to fetch, decode and display the stream in adobe AIR. [I am unable to confirm if this is possible due to insufficient info on the net] </p></li>
  <li><p>Give up on RTSP and instead <a href="https://stackoverflow.com/questions/3848855/how-to-render-ip-camera-video-with-socket-by-actionscript">fetch</a> JPEG/MJPEG sequence of images and display them in AIR relatively easily but with doubtful <em>live</em> performance. [due to JPEG/MJPEG refresh interval of IP camera and same interval separately in AIR]</p></li>
  <li><p>Use <a href="http://alax.info/blog/1216" rel="nofollow noreferrer">DirectShow Video Source Filter for JPEG and M-JPEG IP Cameras</a> to process the JPEG/MJPEG stream, create a virtual Webcam device (the filter does this automatically) and then use <code>Camera</code> class to display the video feed in AIR.</p></li>
  <li><p>Use <a href="http://www.webcamxp.com/home.aspx" rel="nofollow noreferrer">webcam 7</a> - A software designed to handle RTSP, JPEG/MJPEG and other stream protocols for many camera brands/models. It installs a driver in system that creates a virtual camera, and that all the other applications can then use as a normal webcam. 
  Unfortunately this software is buggy and often becomes unstable (could be with my particular camera model only though) and might even crash.</p></li>
  </ol>
  
  <p>Are there any better, easier  options that might not require any third-party software?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>In case anybody else bumps into same problem:
  As suggested by Rudolfs Bundulis, I decided to write a <code>NativeProcess</code> (ANE) that uses <a href="http://ffmpeg.zeranoe.com/builds/" rel="nofollow noreferrer">FFMPEG</a> to fetch the RTSP stream data, transcode it, and feed it to Flash player.
  You might want to look at these for more specific steps:</p>
  
  <p><a href="http://www.purplesquirrels.com.au/2013/02/converting-video-with-ffmpeg-and-adobe-air/" rel="nofollow noreferrer">http://www.purplesquirrels.com.au/2013/02/converting-video-with-ffmpeg-and-adobe-air/</a> 
  <a href="https://www.youtube.com/watch?v=6N7eN9wvAGQ" rel="nofollow noreferrer">https://www.youtube.com/watch?v=6N7eN9wvAGQ</a></p>