0

I am unaware with ffmpeg, and wants to run ffmpeg command on android terminal. What are the basic steps to configure android so that it can run ffmpeg command through android application program?

Thanking you!...

2 Answers 2

2

Android supports Runtime.exec() and this is the best way to run an executable (e.g. ffmpeg) programmatically.

This is the same as running on the terminal, but slightly different from running on adb shell because the latter uses a system account. On a rooted device, you can run as superuser from Java, terminal, or from adb shell.

Note that you must deploy the binary (ffmpeg) somewhere on the internal storage. Android does not allow execution from /sdcard/.

You can find many downloads of ffmpeg for Android, and build the binary with the toolchain from Android NDK (must dowload and install it). On Windows, cygwin is required. I recommend static linking of libav libraries.

Note that it's also possible to build ffmpeg as a library, and call its main() in-process, using the same parameters as the conventional command line.

Sign up to request clarification or add additional context in comments.

Comments

1

Get FFmpeg executable binary and .so files from following link. They have given sample code that, how to capture video from images. I hope it will help you. Go through the link.

  1. They move the required library files into application package.
  2. Then they change the permission to access the package.
  3. Next they pass the arguments to run FFmpeg.

capture video from images

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.