6

In my app I have a requirement to create a video from the screen activities programatically. (ie: I am running some animations for some time I need to convert these animations to a video, like video demos.)

I have been searching for this for the last week, but I haven't found any solution. I don't know whether it is possible in Android or not. If it is, please tell me the way or suggest me some links.

Cœur
  • 37,241
  • 25
  • 195
  • 267
raju
  • 1,254
  • 13
  • 18

2 Answers2

5

If you want to capture the screenshots from "within your activity", it is possible. Follow this post

Having grabbed the screenshoton a bitmap, you need to encode the frames to a video yourself.

Captured bitmap --> JNI (Native-bitmap) --> feed input buffer to a native encoder (ffmpeg) --> save to file

Community
  • 1
  • 1
peasea
  • 346
  • 2
  • 4
  • Hi peasea thanks for your valuable answer. now i took the screen shots and saving to the sd card. i dont know how to encode the frames ta a video. If possible can you provide the links or code – raju Dec 30 '11 at 05:07
  • [Here's](http://stackoverflow.com/questions/8632607/how-to-save-the-mjpeg-stream-as-3gp-or-mp4-format-video-files-to-the-sdcard-in-a) a similar thread running. You guys may collaborate :) – peasea Dec 30 '11 at 06:37
-2

This project will meet your request Android-MJPEG-Video-Capture-FFMPEG It is just to convert jpegs into a movie file by ffmpeg bin