1

I have a Adobe Air program that simulates a drum. When user hit the keyboard, it will translate to a drum hit and animation will be played on screen. This program is intented for Windows platform, not mobiles.

Now I want to be able to record the whole song including the animation, and export it to a video file that can be uploaded to Facebook or Youtube. I have a two ideas in my mind right now:

1.) Record the screen real time when the user is playing the drum.

2.) Save all the keystroke in file, say, XML file. After finished playing, I will read the XML and render the movie according to the keystroke time, by creating a MovieClip programmatically and insert the animation needed.

However, I do not see any API available that allows me to generate a video file based on my MovieClip or animations..

What will be the best option to do it, or is it even possible to generate a video file in run-time? I would very much like to provide details about what I have tried, but sorry I could not find a single topic on this and I have no where to start.

Lawrence Choy
  • 6,088
  • 1
  • 20
  • 30
  • There aren't any libraries or APIs available for doing this so far as I know. Believe you would have to interface with something like ffmpeg to do the video encoding for you (could potentially investigate using AIR/NativeProcess to get a communication bridge to ffmpeg setup). My guess is you'd want to just have the AIR app generate PNGs in a folder, then use ffmpeg afterwards to stitch them all together, in terms of creating the audio track I wouldn't know really where to start. – shaunhusain Feb 16 '13 at 06:12

1 Answers1

0

First that is the code to export it into an flv file

http://www.zeropointnine.com/blog/simpleflvwriteras-as3-class-to-create-flvs/

And then that is the api to upload the video on facebook http://developers.facebook.com/docs/reference/api/video/

Nicolas Sleiman
  • 124
  • 1
  • 8