bravobit / FFmpeg-Android

FFMpeg/FFprobe compiled for Android
https://bravobit.nl/
MIT License
733 stars 172 forks source link

android Q run error error=13, Permission denied #140

Open sirius770 opened 4 years ago

sirius770 commented 4 years ago

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 ?

salahhammouda commented 4 years ago

did you find a solution for this issue ?

joshuamking-driveclutch commented 4 years ago

Duplicate of #126

gowthami77 commented 4 years ago

did you got the solution for this one @whwei2008

Aditya94A commented 4 years ago

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

alexcohn commented 4 years ago

@AdityaAnand1

Is there any solution for this? This is extremely significant.

See https://github.com/bravobit/FFmpeg-Android/pull/130

BilalAsif25 commented 3 years ago

Its been almost 8 months, is this still not fixed yet ?

Ravipatel401 commented 3 years ago

@BilalAsif25 I am still waiting and finding...

cirilobido commented 3 years ago

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.

ppranav164 commented 3 years ago

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

vijay-pal commented 3 years ago

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

proyo-code commented 3 years ago

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