开发者

How to save video stream from webcam as an image instead of an flv video file using flash?

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 fra开发者_JAVA技巧me every 2 seconds?


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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜