FFmpeg-Android
FFmpeg-Android copied to clipboard
android Q run error error=13, Permission denied
Cannot run program "/xxx/ffmpeg": error=13, Permission denied i had do many test : at the android 9 is ok , but android 10 is error. i think google change the "Runtime" user permission . Can you fix this ?
did you find a solution for this issue ?
Duplicate of #126
did you got the solution for this one @whwei2008
Is there any solution for this? This is extremely significant.
If we can't work around this, then ffmpeg is mostly dead on Android.
cc @Brianvdb
@AdityaAnand1
Is there any solution for this? This is extremely significant.
See https://github.com/bravobit/FFmpeg-Android/pull/130
Its been almost 8 months, is this still not fixed yet ?
@BilalAsif25 I am still waiting and finding...
Apparently in Android that does not allow to execute the FFmpeg codes. Try this: Change your API to 28
Or if you need to keep running your app with API> = 29, try using this library: MobileFFmpeg
Important: If you are going to use READ or WRITE permissions, don't forget to use android:requestLegacyExternalStorage="true" in your android manifest.
Right now we can't upload to play store console if we set API Back to 28 from 29 , otherwise use the library as mentioned by @cirilobido
Create a new resources directory in main in below hierarchy-
main
---> resources
---> lib
---> arm64-v8a
---> ffmpeg
---> armeabi-v7a
---> ffmpeg
---> x86
---> ffmpeg
and to modify two methods of FIleUtils class
static File getFFmpeg(Context context) {
File folder = context.getFilesDir();
return new File(folder, FFMPEG_FILE_NAME);
}
static File getFFprobe(Context context) {
File folder = context.getFilesDir();
return new File(folder, FFPROBE_FILE_NAME);
}
to
static File getFFmpeg(Context context) {
File folder = new File(context.getApplicationInfo().nativeLibraryDir);
return new File(folder, FFMPEG_FILE_NAME);
}
static File getFFprobe(Context context) {
File folder = new File(context.getApplicationInfo().nativeLibraryDir);
return new File(folder, FFPROBE_FILE_NAME);
}
and also remove ffmpeg from assets. Use the branch https://github.com/vijay-pal/FFmpeg-Android/tree/AndroidQ
Create a new resources directory in main in below hierarchy-
main ---> resources ---> lib ---> arm64-v8a ---> ffmpeg ---> armeabi-v7a ---> ffmpeg ---> x86 ---> ffmpeg
and to modify two methods of FIleUtils class
static File getFFmpeg(Context context) { File folder = context.getFilesDir(); return new File(folder, FFMPEG_FILE_NAME); } static File getFFprobe(Context context) { File folder = context.getFilesDir(); return new File(folder, FFPROBE_FILE_NAME); } to static File getFFmpeg(Context context) { File folder = new File(context.getApplicationInfo().nativeLibraryDir); return new File(folder, FFMPEG_FILE_NAME); } static File getFFprobe(Context context) { File folder = new File(context.getApplicationInfo().nativeLibraryDir); return new File(folder, FFPROBE_FILE_NAME); }
and also remove ffmpeg from assets. Use the branch https://github.com/vijay-pal/FFmpeg-Android/tree/AndroidQ
tried this on R android 11 still not working