Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mrj976 opened this issue Nov 7, 2019 · 3 comments
Open

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

mrj976 opened this issue Nov 7, 2019 · 3 comments

Comments

@mrj976
Copy link

mrj976 commented Nov 7, 2019

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)
@mikealeonetti
Copy link

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.

@ParfenovVS
Copy link

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

@alexcohn
Copy link

alexcohn commented Feb 4, 2020

This may be duplicate of #126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants