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?

user198729
  • 61,774
  • 108
  • 250
  • 348

1 Answers1

2

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
  • 19,975
  • 5
  • 50
  • 78