FFmpeg-Android icon indicating copy to clipboard operation
FFmpeg-Android copied to clipboard

No such file or directory on android ffmpeg in api level 28

Open mrj976 opened this issue 6 years ago • 3 comments

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)

mrj976 avatar Nov 07 '19 08:11 mrj976

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.

mikealeonetti avatar Nov 21 '19 17:11 mikealeonetti

The same problem. I am trying to use ffmpeg on Pixel 3a with Android 10 and compile version 28.

parfenovvs avatar Dec 09 '19 14:12 parfenovvs

This may be duplicate of https://github.com/bravobit/FFmpeg-Android/issues/126

alexcohn avatar Feb 04 '20 06:02 alexcohn