python-for-android icon indicating copy to clipboard operation
python-for-android copied to clipboard

Problem with ffmpeg on Android

Open HugoAch opened this issue 5 years ago • 5 comments

I have developed an application that requires the ffmpeg module, but when I export the Android APK with buildozer [ffmpeg as a requirement] the module is not available. The app throws [Errno 13] Permission denied: ffmpeg.

Any suggestions?

HugoAch avatar Nov 01 '20 16:11 HugoAch

It sounds like Android is refusing to let the app execute a stand alone executable - this is the expected behavior of Android.

The recipe builds .so files, not an executable, see https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/recipes/ffmpeg/init.py line 84

Does the app try to execute a ffmpeg binary with exec() or something similar? Android does not allow that (and it is not in the build)

Usage questions are best directed to the user group https://groups.google.com/g/kivy-users

RobertFlatt avatar Nov 01 '20 21:11 RobertFlatt

Thank you for your response, you mentioned the key point: I needed to call the .so file, not an executable (I am not and experimented Android developer). Now, I have two different cases on ffmpeg calls in my Kivy app: desktop and android.

But nevertheless, the ffmpeg.so library is not built on buildozer, I had to call the silentlexx libffmpeg.so (previously I installed his app https://github.com/silentlexx/android_ffmpeg_buildtool)

HugoAch avatar Nov 02 '20 10:11 HugoAch

Kivy app: desktop and android.

Yes because the desktop is POSIX compliant and Android is not.

the ffmpeg.so library is not built on buildozer,

I see what you are saying but it exceeds my understanding.

RobertFlatt avatar Nov 03 '20 00:11 RobertFlatt

maybe you can use ffpyplayer, depends on your needs

oukiar avatar Feb 23 '21 08:02 oukiar

Did you figure it out , how to run ffmpeg in kivy Android app ?

purushottam858 avatar Sep 09 '21 04:09 purushottam858

Closing as no response

Julian-O avatar Nov 20 '23 01:11 Julian-O