0

I want make a video from images. I see in some posts (Using FFmpeg with Android-NDK, Create a Video file from images using ffmpeg images-using-ffmpeg) That use command line, is the best choice?? it's possible?

How are build ffmpeg.so? How I can add to the project?

This is the command that pretenfi use:

ffmpeg -r 1 -pattern_type glob -i '*.jpg' out.mp4

thanks very much. I have 2 weeks search!

Sorry for my English.

Community
  • 1
  • 1
cjose3
  • 13
  • 1
  • 5

1 Answers1

0

Definitely, using command line is the simplest way. It's also most secure. The main drawback is that launching it every time is slower that with shared lib. In your case, you run time-consuming tasks relatively rarely, and the inputs and outputs are already on the file system, so with command line you will be served better.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
  • Thanks for responding. I attempt using the command line, but fails to generate the ffmpeg binary. I folow the step from http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/. Only generate shared libraries (libavformat, libavcodec, libswscale, libavutil). Meet some tutorial to generate the binary and install it on the app?. Excuse my English, Thanks. – cjose3 Oct 31 '13 at 18:03
  • I hope http://dl.dropboxusercontent.com/u/22605641/ffmpeg_android/main.html is enough. – Alex Cohn Nov 02 '13 at 13:35
  • Thanks again for responding. I followed the tutorial and achieve compile ffmpeg, we generated 4 folders: bin, lib, share, include. Based on your answer here http://stackoverflow.com/questions/17383552/how-to-package-native-commandline-application-in-apk, I must rename bin/ffmpeg to libffmpeg.so and, then copy it to the android project folder where you want to use?. I am very new in Android development and I'm a bit confused. Thank you. – cjose3 Nov 04 '13 at 21:21
  • 1
    With the typical project tree, you should copy `ffmpeg` (the executable) into `$(PROJECT_ROOT)/libs/armeabi/libffmpeg.so`, and then build the APK using Eclipse. When you install the APK on an ARM Android device, you will find the file in `/data/data/your.package.full.name/lib` directory, and you can invoke this binary using the full path (see e.g. http://stackoverflow.com/questions/9605757/using-ffmpeg-with-android-ndk) – Alex Cohn Nov 07 '13 at 09:57