File dir = new File("/mnt/sdcard");
Process process = Runtime.getRuntime().exec("ffmpeg -f image2 -i img%4d.png video.mp4", null, dir);
when i try this line in android,i get environment and working directory null error in android. But when i try that line in java,it worked perfectly.but in android,it has some problem.
i get environment and working directory null
It will return null because there is not path like /mmt/sdcard instead use /mnt/sdcard.

It will be best if you use Environment.getExternalStorageDirectory().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With