Is it possible to create video file from BitmapDat

2019-03-03 12:31发布

Basically I'd like to know if there are any libraries out there that lets me create a video file in the flash runtime. I know such a process would take a lot of resources, but I would still like to know if it was possible?

I would guess it could work like just passing it a bitmapdata for each frame.

1条回答
smile是对你的礼貌
2楼-- · 2019-03-03 12:58

Try this. Usage:

var myWriter:SimpleFlvWriter = SimpleFlvWriter.getInstance();
myWriter.createFile(myFile, 320,240, 30, 120);
myWriter.saveFrame( myBitmapData1 );
myWriter.saveFrame( myBitmapData2 );
myWriter.saveFrame( myBitmapData3 ); // etc.
myWriter.closeFile();
查看更多
登录 后发表回答