Gurpreets11
Gurpreets11

Reputation: 2351

Android: How to make video from set of images

I'm creating an app in android. In this app i've to create a video file(mp4, 3gp) from the images that are stored in the sdcard of the device. Is there any solution for this in android or we have to use any another api for this.

Thanks in advance

Upvotes: 1

Views: 1860

Answers (2)

Droidman
Droidman

Reputation: 11608

Android does not provide any built-in APIs which would allow to create video files from single frames. Consider using Sony Vegas or Adobe After Effects instead.

However you can emulate the video effect in an ImageView (not really a viable solution indeed, but would do in some simple cases). For that you would need to create an array containing your frames and loop through the array using a CountDownTimer or similar. Setting the next frame in the ImageView with of a tick rate of 40ms would correspond to a frame rate of 25 FPS. You could also provide background sounds using MediaPlayer or SoundPool.

Upvotes: 1

eGregory
eGregory

Reputation: 121

You can use MJPEGgenerator.java to create an AVI from a set of jpg images

Upvotes: 0

Related Questions