-
Notifications
You must be signed in to change notification settings - Fork 82
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
Using in android #76
Comments
Hi @Hosseinyzr , Honestly I've never checked it on android. But I'm also interested in this check and fixes (if they are required). Probably it works, since android is based on linux, but I'm not 100% sure. Denis. |
I tried to to this. and then:
but this is error:
note that I give the app read /write permision |
The error logs clearly says Permission denied. Try to check.
пт, 5 июн. 2020 г., 10:58 Hosseinyzr <[email protected]>:
… I tried to to this.
I downloaded on binary from here:
https://github.com/Khang-NT/ffmpeg-binary-android/releases
and then:
Path BIN = Paths.get(Environment.getExternalStorageDirectory().getPath());
Path VIDEO_MP4 = Paths.get(new File(Environment.getExternalStorageDirectory().getPath(),"2.mp4").getPath());
Path OUTPUT_MP4 =Paths.get(new File(Environment.getExternalStorageDirectory().getPath(),"out.mp4").getPath());
ProgressListener listener = new ProgressListener() {
@OverRide
public void onProgress(FFmpegProgress progress) {
//TODO handle progress data
}
};
FFmpegResult result = FFmpeg.atPath(BIN)
.addInput(UrlInput.fromPath(VIDEO_MP4))
.addOutput(UrlOutput.toPath(OUTPUT_MP4)
.copyAllCodecs()
)
// This is optional
.setProgressListener(listener)
.execute();
}
but this is error:
Caused by: java.lang.RuntimeException: Failed to start process.
at com.github.kokorin.jaffree.process.ProcessHandler.execute(ProcessHandler.java:87)
at com.github.kokorin.jaffree.ffmpeg.FFmpeg.execute(FFmpeg.java:161)
at com.example.ffmpegtest.MainActivity.onCreate(MainActivity.java:46)
at android.app.Activity.performCreate(Activity.java:7327)
at android.app.Activity.performCreate(Activity.java:7318)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3093)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3256)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1947)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7037)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Caused by: java.io.IOException: Cannot run program "/storage/emulated/0/ffmpeg": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)
at com.github.kokorin.jaffree.process.ProcessHandler.execute(ProcessHandler.java:83)
at com.github.kokorin.jaffree.ffmpeg.FFmpeg.execute(FFmpeg.java:161)
at com.example.ffmpegtest.MainActivity.onCreate(MainActivity.java:46)
at android.app.Activity.performCreate(Activity.java:7327)
at android.app.Activity.performCreate(Activity.java:7318)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3093)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3256)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1947)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7037)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Caused by: java.io.IOException: error=13, Permission denied
note that I give the app read /write permision
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#76 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIJ47E4P3KWUDF5EW2ZVT3RVCQRJANCNFSM4NTJHXEQ>
.
|
Yes, Actually it is about executable file... |
Hi, thank you for your lib.
can we use this lib in android?
for example using .so files instead of ffmpeg binary...
The text was updated successfully, but these errors were encountered: