tags:

views:

39

answers:

1

This will create an flv video file on flash media server:

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.publish("yourCamera", "record");
ns.attachVideo(Camera.get());

How can I generate an image for the current video frame every 2 seconds?

+2  A: 

If it is a timelapse (take a photo ever so often) you want to attach the Video to a camera, something like

video.attachCamera(Camera.getCamera());

Then draw the video as BitmapData on a TimerEvent firing listening to a Timer instance you define, and push it into an array

bmpData.draw(video);
arr.push(bmpData);

From here you can encode the bitmap data to a ByteArray of your choice of encoding (JPG,BMP)

phwd