ffmpeg-android-java icon indicating copy to clipboard operation
ffmpeg-android-java copied to clipboard

java.io.IOException: Cannot run program "/data/user/0/com.zhou.ffmpegdemo/files/ffmpeg": error=2, No such file or directory

Open zhjjoy opened this issue 6 years ago • 9 comments

java.io.IOException: Cannot run program "/data/user/0/com.zhou.ffmpegdemo/files/ffmpeg": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:983) at java.lang.Runtime.exec(Runtime.java:691) at java.lang.Runtime.exec(Runtime.java:559) at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10) at android.os.AsyncTask$2.call(AsyncTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:133) at java.lang.ProcessImpl.start(ProcessImpl.java:128) at java.lang.ProcessBuilder.start(ProcessBuilder.java:964) at java.lang.Runtime.exec(Runtime.java:691)  at java.lang.Runtime.exec(Runtime.java:559)  at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10)  at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38)  at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10)  at android.os.AsyncTask$2.call(AsyncTask.java:305)  at java.util.concurrent.FutureTask.run(FutureTask.java:237)  at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)  at java.lang.Thread.run(Thread.java:761)

zhjjoy avatar Jul 20 '17 09:07 zhjjoy

I have this problem, too

faith-hb avatar Jul 29 '17 01:07 faith-hb

I have this problem too

amintabar avatar Oct 03 '17 19:10 amintabar

same problem here

doomers avatar Oct 25 '17 12:10 doomers

@zhjjoy @faith-hb @amintabar @doomers please have a look at the "Load binary" paragraph here http://writingminds.github.io/ffmpeg-android-java/

matteinn avatar Nov 22 '17 10:11 matteinn

I'm facing the same issue. Anyone found a solution for this?

channae avatar Mar 19 '18 12:03 channae

@channae FFmpeg needs to be initiliazed before use it calling ffmpeg.loadBinary..... then you will be able to do ffmpeg.execute(.....

andrey2ag avatar Mar 21 '18 19:03 andrey2ag

What is the best place to call ffmpeg.loadBinary? Shall I call it in the application class as it is an one time process. @andrey2ag

Sp4Rx avatar Apr 15 '19 11:04 Sp4Rx

@channae FFmpeg needs to be initiliazed before use it calling ffmpeg.loadBinary..... then you will be able to do ffmpeg.execute(.....

very nice

faith-hb avatar May 16 '19 06:05 faith-hb

What is the best place to call ffmpeg.loadBinary? Shall I call it in the application class as it is an one time process. @andrey2ag

Yes, Absolutely.

pratikbutani avatar Nov 08 '19 09:11 pratikbutani