You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings, I've been trying to use this library's ffmpeg resources but it seems to be crashing. I am using a default activity to attempt to stream a randomly generated image, for the sake of testing I tried to simply call ffmpeg using an echo command. If I do something like: ProcessBuilder pb = new ProcessBuilder("echo", "Hello World!"); it will work without any issues. However, if I attempt to pass ffmpeg by doing: ProcessBuilder pb = new ProcessBuilder(ffmpeg, "Hello World!"); it gives me NullPointerException error, or whatever command I attempt to use with ffmpeg after I load it, it'll give me the same error. For instance, I tried converting some video by using this command: ProcessBuilder pb = new ProcessBuilder(ffmpeg, "-i", "/storage/emulated/0/DCIM/20220617_220627.mp4", "-c:v", "libx264", "-crf 19", "destinationfile.flv"); The same error happened. So, I suspect there is something wrong with my FFMPEG version, perhaps? I tried installing it following this link: #1117 (comment)
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.myapplication, PID: 18328
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapplication/com.example.myapplication.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4035)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4201)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2438)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8663)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Caused by: java.lang.NullPointerException
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1012)
at com.example.myapplication.MainActivity.onCreate(MainActivity.java:36)
at android.app.Activity.performCreate(Activity.java:8290)
at android.app.Activity.performCreate(Activity.java:8270)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4009)
The text was updated successfully, but these errors were encountered:
Greetings, I've been trying to use this library's ffmpeg resources but it seems to be crashing. I am using a default activity to attempt to stream a randomly generated image, for the sake of testing I tried to simply call ffmpeg using an echo command. If I do something like:
ProcessBuilder pb = new ProcessBuilder("echo", "Hello World!");
it will work without any issues. However, if I attempt to pass ffmpeg by doing:ProcessBuilder pb = new ProcessBuilder(ffmpeg, "Hello World!");
it gives me NullPointerException error, or whatever command I attempt to use with ffmpeg after I load it, it'll give me the same error. For instance, I tried converting some video by using this command: ProcessBuilder pb =new ProcessBuilder(ffmpeg, "-i", "/storage/emulated/0/DCIM/20220617_220627.mp4", "-c:v", "libx264", "-crf 19", "destinationfile.flv");
The same error happened. So, I suspect there is something wrong with my FFMPEG version, perhaps? I tried installing it following this link: #1117 (comment)this is the snippet that I am using:
My build.gradle:
It gives me the following error constantly:
The text was updated successfully, but these errors were encountered: