4

I generally don't like to ask such "you figure it out for me" questions, but I suspect this one will be really simple for a C++ guru. I want to build ffmpeg for Android, and I'd like it to output an executable rather than a set of libraries.

We've been using the guardian project's build:

https://github.com/guardianproject/android-ffmpeg

It does produce what we want, but I've found tweaking it for different architectures to be, at best, unpleasant.

I've gotten this version to build:

https://github.com/appunite/AndroidFFmpeg

It does a nice job of slicing and dicing different architectures, but produces a jni version.

There is a long story as to why I want the exe, but I'll skip it for now. Is there a flag that needs to be flipped? Some path or other setting? I am at this point fully baffled.

Thanks in advance.

Kevin Galligan
  • 16,159
  • 5
  • 42
  • 62
  • https://github.com/halfninja/android-ffmpeg-x264/blob/master/Project/jni/Android.mk – Robert Rowntree Jun 22 '13 at 15:56
  • above is a good example of creating android ffmpeg execuatable from static libs. Guardian is a good, solid ffmpeg for android. – Robert Rowntree Jun 22 '13 at 15:57
  • 1
    Here's one good example on how to build and run FFmpeg binaries on Android: http://stackoverflow.com/questions/9605757/using-ffmpeg-with-android-ndk/9681231#9681231. – user2448027 Jun 24 '13 at 17:57
  • @user2448027 All of them are SO libraries. Kevin says executable; A command line ffmepg for ARM processors. – Dr.jacky Dec 07 '15 at 11:42

2 Answers2

1

Consider using scratchbox to statically cross-compile for ARM (and test) FFMPEG to your requirements on your desktop (still inside SB).
Once your happy, get enough space on your droid to keep the larger than otherwise binary and adb that exe up in there. Don't forget to chmod +x

mrmoje
  • 3,714
  • 3
  • 20
  • 18
1

This link I posted earlier in the comments has lots of general information about FFmpeg and Android. Then there is Estevex's tutorial on Android, FFmpeg and x264. In addition, here's Roman10's blog post about the subject.

When you manage to build the binaries, remember to set rights to the files (e.g. chmod 777 or chmod 775). The command to run FFmpeg is

Process p = Runtime.getRuntime().exec("/data/data/yourpackagename/files/ffmpeg")


Links

Some implementations:

Discussion:

Community
  • 1
  • 1
user2448027
  • 1,628
  • 10
  • 11