0
votes

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 RTSP protocol and therefore I am evaluating all possible routes I can take to solve this issue:

  1. Use Adobe Media Server to convert incoming RTSP stream to RTMP and then use Flash API (NetConnection & NetStream) directly.

  2. 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]

  3. Give up on RTSP and instead fetch JPEG/MJPEG sequence of images and display them in AIR relatively easily but with doubtful live performance. [due to JPEG/MJPEG refresh interval of IP camera and same interval separately in AIR]

  4. Use DirectShow Video Source Filter for JPEG and M-JPEG IP Cameras to process the JPEG/MJPEG stream, create a virtual Webcam device (the filter does this automatically) and then use Camera class to display the video feed in AIR.

  5. Use webcam 7 - 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.

Are there any better, easier options that might not require any third-party software?

EDIT:

In case anybody else bumps into same problem: As suggested by Rudolfs Bundulis, I decided to write a NativeProcess (ANE) that uses FFMPEG 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:

http://www.purplesquirrels.com.au/2013/02/converting-video-with-ffmpeg-and-adobe-air/ https://www.youtube.com/watch?v=6N7eN9wvAGQ

1
Hey. Sorry for waking up old thread, but did you ever got to a working solution? I'm in a need of a similar thing, to play multicasted/broadcasted video stream in as3 flash project. Do you have any further info about it? Is the ANE available anywhere to get? :) ThanksThat Marc
Hi, Unfortunately I don't have any code available but this tutorial should give you a basic idea http://www.purplesquirrels.com.au/2013/02/converting-video-with-ffmpeg-and-adobe-air/astralmaster

1 Answers

1
votes

Take the route described in option 2 - write a Adobe AIR native extension (ANE) that uses FFMpeg to handle the RTSP stream, decode it and pass the RGB data back to AIR for rendering. The hardest part would be compiling FFmpeg if you need cross platform functionality, however, since you mention DirectShow that is Windows only, then I assume you are bound to Windows. Zeranoe provides prebuild FFmpeg libraries for Windows, Stackoverflow has a lot of topics on decoding a stream using FFmpeg and then all you need is a callback to AIR and you're good.