Pure AS3 MJPEG streaming class
  • Any of you who own a IP webcam can now stream your MJPEG video right into your AIR application. I only say AIR because there is sandbox problem if you try to use this in your flash or flex application.

    I made this class from a flex component I found at http://www.alagad.com/go/blog-entry/viewing-mjpeg-streams-in-flex. The class I made now uses pure AS3 so that you can use flash or flex to make your AIR apt. This Class also has a dependency from a 3rd party class, but only if you need to login to see your stream. I have also changed a few things for proficiency and optimization from the older class.

    I have added an example fla with the dependency class if needed. AS3 mjpg – Zip Link

    If you found this helpful then please donate. Thanks.

    Share and Enjoy:
    • Digg
    • del.icio.us
    • Facebook
    • Google Bookmarks
    • Technorati
    • LinkedIn
    • RSS
    • Twitter

    February 10th, 2009 | Josh | 8 Comments | Tags: , , , ,

About The Author

Josh Chernoff

I'm a flash developer/designer currently living just out side of St. Louis. I have been working with Flash and AS3 since 2006. I have been recently learning about 3D modeling and motion graphics. Feel free to look at my portfolio to see what I have been up to. http://gfxcomplex.com/portfolio

8 Responses and Counting...

  • [...] approach, Andrei Thomaz´s port of the blobDetection-library from v3ga and Josh Chernoff´s version of the MJPEG streaming-component by Doug Hughe [...]

  • Hi,

    By using cross domain policy files, will it be possible to use this concept in flash.
    Any test server to test the above sample.

  • al

    Hi, this is very helpful, I have a project that I’m trying to do exactly this. The IP cameria I have is a Panasonic IP cam, specifically this model BB-HCM331A , I was wondering if you have any ideas on how I might be able to find out the path to the .cgi file for thie particular model, thx

    //var test:MJPEG = new MJPEG(“thepoolcam.dyndns.tv”, “/axis-cgi/mjpg/video.cgi”, 80);

  • al

    never mind, found this after some googling, used that path for my panasonic ip cam, worked perfectly, thanks so much!!!!!

    MJPEG Path

    The path to access the MJPEG stream. For e.g.:

    •/axis-cgi/video.cgi for Axis video cameras

    •/image for Sony video cameras

    •/nphMotionJpeg?Quality=Standard for Panasonic video cameras

    Picture Path

    The path to access the last image of the camera. For e.g.:

    •/jpg/image.jpg for Axis video cameras

    •/oneshotimage.jpg for Sony video cameras

    •/SnapshotJPEG?Quality=Standard for Panasonic video cameras

  • Using this class with a web camera attached to my PhidgetsSBC. Wireless video FTW!

    Thanks,
    Kevin Hoyt
    Adobe Systems, Inc.

  • d.y

    Unable to see video,
    I have D-Link and I’m using

    var cam:MJPEG = new MJPEG(“192.168.0.20″, “/video.cgi”);
    wrapper.addChild(cam);

    The camera is connected directly to my pc
    I’m using eclipse with flex plugin

    I can see the wrapper panel but not the video,

    any idea?

    thanks in advance
    D

  • Found the swf file on my axis 213ptz on the same folder of mjpeg:
    baseurl/mjpg/video.mjpg
    can be:
    baseurl/mjpg/video.swf
    and it works easy!

  • axis 206 + motion + your class and my life is beautiful!

    thank you very much!!!

Leave a Reply

* Name, Email, and Comment are Required