Apps that target Android SDK 29 are not allowed to execute the ffmpeg binary from the app directory because that's not allowed anymore. An Error: Trim error: failed. java.io.IOException: Cannot run program "/data/user/0/appname/files/ffmpeg": error=13, Permission denied error is thrown when trying to execute ffmpeg commands.
In order to get execution permissions the binaries should be moved to the native library directory. To do so the binaries should be included in a library structure.
This library structure expects a binary for every ABI. Therefore new binaries are compiled (based on the original ffmpeg 3.5 build script and added. I wasn't able to compile the binaries with the original build script since system version requirements are unclear and caused errors. Instead of that the binaries included are compiled with mobile-ffmpeg and version 4.3.1. Instructions are in the README.
Apps that target Android SDK 29 are not allowed to execute the ffmpeg binary from the app directory because that's not allowed anymore. An
Error: Trim error: failed. java.io.IOException: Cannot run program "/data/user/0/appname/files/ffmpeg": error=13, Permission denied
error is thrown when trying to execute ffmpeg commands.In order to get execution permissions the binaries should be moved to the native library directory. To do so the binaries should be included in a library structure.
This library structure expects a binary for every ABI. Therefore new binaries are compiled (based on the original ffmpeg 3.5 build script and added. I wasn't able to compile the binaries with the original build script since system version requirements are unclear and caused errors. Instead of that the binaries included are compiled with mobile-ffmpeg and version
4.3.1
. Instructions are in the README.These separate binaries will increase the size of your app. Androids developers seem to be aware and advise you to look in to the App Bundle publishing format.