0

I am creating an Android app that aims to combine a video and images into a video file and save that video into the gallery.

I have looked around and seems like I have stepped into the dark side of android, where its not as easy as .addFrame (Android animation).

After searching I got so confused at what options I have to accomplish said task..

So can someone please give me the best option to my situation that ad hears at least a bit with the following:

  • I would rather much use only Java to accomplish this. 3rd party libs are welcome, it's just that I saw people use NDK and I would really much rather stay out of there..

  • It needs to be able to do what I specified above, take a video files and images and combine them into a video.

It would be awesome if you can also provide and example or guide..

Thanks..

Amit Assaraf
  • 512
  • 11
  • 34
  • To clarify, it sounds like you want something like ffmpeg for android, that doesn't require the Android NDK. Correct? – RichS Mar 29 '14 at 20:31
  • Yes, Some kind of library that can accomplish that.. If that exists :D – Amit Assaraf Mar 29 '14 at 20:33
  • Ok, I just stumbled on this. Never heard of it before. MediaMuxer: http://developer.android.com/reference/android/media/MediaMuxer.html ... will this do what you want? – RichS Mar 29 '14 at 20:35
  • No.. this won't cut it.. – Amit Assaraf Mar 30 '14 at 16:30
  • I saw jcodec, it looks good but no docs anywhere.. – Amit Assaraf Mar 30 '14 at 16:32
  • Is there no way to take a video from gallery and 2 photos and combine those into a video? How do the video editing apps do it? – Amit Assaraf Mar 30 '14 at 16:42
  • I thought you could use MediaCodec to read in the images, convert them to the appropriate format and combine them with the video using MediaMux. It seems like this has been discussed recently. See: http://stackoverflow.com/questions/21262797/converting-images-to-video?lq=1. It sounds possible, not sure how easy it is. – RichS Mar 30 '14 at 22:34
  • I don't understand.. there is no proper explanation there.. I really need help! I have been stuck for so long on this! – Amit Assaraf Mar 31 '14 at 13:10
  • jcodec seems perfect but there are not docs anywhere! can anyone show me an example how to accomplish this or at least point me to some docs – Amit Assaraf Mar 31 '14 at 14:41
  • Never mind, I have tried Jcodec.. not only its slow, it has very limited functionality.. – Amit Assaraf Mar 31 '14 at 15:56

1 Answers1

0

I finally managed to compile FFmpeg.. Seems like the way to go.

Amit Assaraf
  • 512
  • 11
  • 34