No such file or directory on android ffmpeg in api level 28
I use ffmpeg and its ok when i run it on android device with api level 25 but when i run it on device with api level 27 show "No such file or directory" error in my logcat.
My ffmpeg library: bravobit.nl.ffmpegandroid
Please help me.
My full logcat:
E/FFmpeg: Exception while trying to run: [/data/user/0/com.myapplication/files/ffmpeg, -i, /external_files/org_94594219219624692.mp3, -af, adelay=0|0, -preset, ultrafast, /external_files/vc1_94594219219624692.mp3]
java.io.IOException: Cannot run program "/data/user/0/com.myapplication/files/ffmpeg": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at nl.bravobit.ffmpeg.ShellCommand.run(ShellCommand.java:15)
at nl.bravobit.ffmpeg.FFcommandExecuteAsyncTask.doInBackground(FFcommandExecuteAsyncTask.java:43)
at nl.bravobit.ffmpeg.FFcommandExecuteAsyncTask.doInBackground(FFcommandExecuteAsyncTask.java:12)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:133)
at java.lang.ProcessImpl.start(ProcessImpl.java:128)
Have you tried the function to check to see if it's available first yet?
if (FFmpeg.getInstance(this).isSupported()) {
// ffmpeg is supported
} else {
// ffmpeg is not supported
}
When looking at the code, this seems to ensure that the ffmpeg executable is pulled from the resources. I wasn't expecting that one myself. I'm glad I looked.
The same problem. I am trying to use ffmpeg on Pixel 3a with Android 10 and compile version 28.
This may be duplicate of https://github.com/bravobit/FFmpeg-Android/issues/126