Anyway to generate a video?

I use OpenFL with lime somtimes just to make little simulations for myself. There are times when I would like to share a video of the simulation. Currently, I just have to run it in a window, and use screen capture. It would be neat if there was a way to generate video from my OpenFL based code. Does such a thing exist? If not, does anyone have any idea how difficult it may be to make a lime target that provides a renderer that just writes video?

If you just share it with your friends, why not download a screen recording software for recording?

I don’t intend to only share with my friends, and using screen recording, I have to render at normal speed. If I can render it directly to video, then, I can render it faster than running it in real time.

You can try sending raw bitmapdata to an ffmpeg process (pipe / stdin), or create haxe externs for ffmpeg cpp source, compile it into your app and send data directly to it producing a file output with the desired codecs.

2 Likes

I bet you could export to swf target and then use a simple loader in Adobe Animate to load it and then export to a QuickTime movie.

I don’t have Adobe Animate.

I suggest you write some extra code in your program that takes bitmap copies of your screens, saving to a file with ascending file name like f0001.jpg, f0002.jpg, etc., and then when you have 1000 frames, you and use various programs to convert those individual frames into a movie. Yes it is a lot of disk space, but it is only temporary. A movie after all is just a collection of frames. This won’t play sound effects but you probably don’t have any anyway.