IP Camera to FMS Flash Video CODE

THE CODE;

[make sure you read the OVERVIEW first]

[EDIT : THIS CODE IS NO LONGER AVAILABLE]

You can choose which components to buy and download, for example if you are confident you can create the ramdrive and startup scripts yourself you can skip that step, further if you dont need the FrameGrabber MJPEG grabber (the bit that takes frames from the network cameras). I am charging 5 euros per script, and i offer my support for those who have purchased them.

the StartUp Scripts;

The startup scripts create the ramdrive in a specific location, and prepare (touch) the framebuffer files ready for camera frame data writes, then launch the python script(s) [one per camera] in a detached screen session.

the FrameGrabber;

Okay, so this is a multi-threaded Python 2.6 script which creates a httplib (socket) connection to the camera, using the type-URL (specific to camera model) to pull down MJPEG data, split it into its constituent JPEG’s (using the camera specific –boundary and content-length) and saves the frames to the ramdrive location.

This script takes the following command-line arguements;

MJPEG NETWORK CAMERA FRAME GRABBER

usage;
mjpeg [FILENAME] [cIP] [cPORT] [cTYPE] [cAUTH]

[FILENAME]
                The filename to save the frames to (should be a ramdrive for speed!)
[cIP]
                the cameras IP
[cPORT]
                the cameras PORT
[cTYPE]
                the cameras TYPE, one of these;
                        foscam
                        rovio
                        axis
                        ipela
                        ipelaptz
[cAUTH]
                optional BASIC HTTP Authentication;
                        Format: ‘username:password’

- This script requires a set of libraries be installed on your system;
- XCode
I have not worked out why exactly yet, but the below dont work until this is installed. Grab it from your original Apple CD for download it free from Apple.com. Its about 1.2gb, so do this first (and restart your computer after the installation is complete before continuing with the other libraries).
- PIL
I have run into problems with different versions of things, so here is the version i use and that i KNOW works : download it here.
- jpeg-6b
Again as above, different version makes different problems. Download my tested working version here.
It will not compile nicely on the first run, it will complain that it can not copy some files, follow those errors by simply creating the directory structure it is asking for.

The Camera Virtualizer ;

This is a QuickTime component and must be placed in the /Library/QuickTime/ folder. Following a system reboot this driver will now be instantiated and you will see ‘/tmp/framegrabber1′, ‘/tmp/framegrabber2′, ‘/tmp/framegrabber3′ available in your flash webcam selection dialogue box.

Once the FrameGrabber Python script is running succesfully, these virtual cameras will contain the live video from the Network Cameras.

[make sure you read the OVERVIEW first]

Comments

  • Alan Stankevitz says:
    7-06-10

    Hi,

    We are using a Windows 7 environment and are in need of sending a video stream from a Vivotek IP camera to Ustream which uses flash streaming media.

    Can you help?

    Alan

  • Alex says:
    7-06-10

    Hi Alan,

    I have not done this in Windows, although it is possible and there might already be some existing tools to do it, a virtual webcam in windows is a lot easier.

    I suggest you do it from a Macbook or a Mac Mini if you must (more reliable anyway :) ).

    To confirm though, this method is indeed compatible to Ustream and the like.

    Alex.

  • Tamas says:
    7-06-10

    I would like to buy this, but I cannot pay by SMS… Can i pay with credit card or bank transfer?

    Thanks

  • Tamas says:
    7-06-10

    Hi,

    The solution works great on Mac! I needed some help, but Alex was very helpful, thanks again!
    We’ve already configured a new type of camera too :)
    And i’m waiting for the Linux version ;-)

    Tamas

  • Johan Carlsson says:
    7-06-10

    I too got this working, the hard part being getting libjpeg compiled for 64-bits.

    Many tutorials out there doesn’t solve the real problem, but this one did (I complied PIL 1.1.7 for a ports installed Python 2.6 (64 bits).
    http://nyteshade.posterous.com/macos-x-106x-python27-and-pil

    Alex’s support and the code for tutorial is worth buying (saved me a lot of time) .

Post a comment