bravobit / FFmpeg-Android

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

java.io.IOException, Permission denied #165

Open GunaseelanArumaikkannu opened 3 years ago

GunaseelanArumaikkannu commented 3 years ago

java.io.IOException: Cannot run program "/data/user/0/packagename/files/ffmpeg": error=13, Permission denied

sertanta commented 3 years ago

I have the same error. The error occurs if you change on Build.gradle file targetSdkVersion 29 From Android Q onwards, you cannot execute binaries in your app's private data directory. See https://stackoverflow.com/questions/60370424/permission-is-denied-using-android-q-ffmpeg-error-13-permission-denied Please, fix it

GunaseelanArumaikkannu commented 3 years ago

Hi Sertanta, As we are forcing to set targetSdkVersion 29, this is very serious bug which should be fixed ASAP. Maybe the maintenance team have different perspective. But I wanted to give update with Android Q as well, so I moved to https://github.com/tanersener/mobile-ffmpeg, and it is working well for me.

shiv71 commented 3 years ago

@Brianvdb @stanvanheumen @joshuapinter Google is forcing the developers to update to target level 29. Could you guys look into a proper fix for this issue? I am also facing the same issue java.io.IOException: Cannot run program "/data/user/0/packagename/files/ffmpeg": error=13, Permission denied

We are stuck at this point. we do not want to move to another library. Please fix it.

alexcohn commented 3 years ago

@shiv71 See https://github.com/bravobit/FFmpeg-Android/pull/130. I know that it's easier to simply add implementation 'nl.bravobit:android-ffmpeg:1.1.7' to your dependencies, but if you download the library from https://github.com/alexcohn/FFmpeg-Android/tree/pull_request_Q, it will simply work with targetSdkVersion 29. If you want better support, migrate to https://github.com/tanersener/mobile-ffmpeg or some other library that offers ffmpeg as library, not executable.

namdhis commented 3 years ago

@shiv71 See #130. I know that it's easier to simply add implementation 'nl.bravobit:android-ffmpeg:1.1.7' to your dependencies, but if you download the library from https://github.com/alexcohn/FFmpeg-Android/tree/pull_request_Q, it will simply work with targetSdkVersion 29. If you want better support, migrate to https://github.com/tanersener/mobile-ffmpeg or some other library that offers ffmpeg as library, not executable.

Hi @alexcohn. Does the librarry from https://github.com/alexcohn/FFmpeg-Android/tree/pull_request_Q support for Android 64 bit?

alexcohn commented 3 years ago

@namdhis No, the way I package this is not compatible with the current Google Play Store requirement to have 64-bit binaries for any app. But as I explained elsewhere, you can simply copy the 32-bit binaries (ffmpeg and/or ffprobe) to src/main/jniLibs/arm64-v8a before you build the APK, and everything will just work (at least for now, it can break in the future when Android arm64 drops its support for 32-bit binaries).

BilalAsif25 commented 3 years ago

So i guess there is still no solution yet in premises of this library, Sad to see maintainers are not maybe looking into this anymore. If anyone still has it fixed help me out , my target is to run this library on android 29, 30 and release for 64 bit support in play store.

dev-violet commented 3 years ago

I have tried with the other one mentioned above, https://github.com/tanersener/mobile-ffmpeg , but seems like it is less efficient especially in the output video size. Still waiting this library to support sdk 29 so badly

alexcohn commented 3 years ago

 @dev-violet what parameters did you use for video compression? There is not expected to be any difference in video size, unless you rely on a codec that is not included.