I am using this library Android-MJPEG-Video-Capture-FFMPEG to and getting the frames with using the camera..I am Using below FFMPEG command for this
String[
I found the solution after applied lot of tricks.
public void myFunction(ShellCallback sc, String imgPath, String audioPath, String outPath) throws IOException, InterruptedException
{
Log.e("MyFunction","audioPath"+audioPath);
Log.e("MyFunction","imagePath"+imgPath);
ArrayList cmd = new ArrayList();
cmd = new ArrayList();
cmd.add(ffmpegBin);
cmd.add("-y");
cmd.add("-loop");
cmd.add("1");
cmd.add("-r");
cmd.add("1");
cmd.add("-i");
cmd.add(new File(imgPath).getCanonicalPath());
cmd.add("-i");
cmd.add(new File(audioPath).getCanonicalPath());
cmd.add("-acodec");
cmd.add("aac");
cmd.add("-vcodec");
cmd.add("mpeg4");
cmd.add("-s");
cmd.add("480x320");
cmd.add("-strict");
cmd.add("experimental");
cmd.add("-b:a");
cmd.add("32k");
cmd.add("-shortest");
cmd.add("-f");
cmd.add("mp4");
cmd.add("-r");
cmd.add("2");
File fileOut = new File(outPath);
cmd.add(fileOut.getCanonicalPath());
execFFMPEG(cmd, sc);
}
I hope this may help others.Thanks!