I am using JCodec library to convert a list of bitmap images into a mp4 file. Everything works fine but the generated mp4 file plays the first image correctly and the rest of the images don't get rendered properly.
here is my encoder code
private class Encoder extends AsyncTask<File, Integer, Integer> {
private static final String TAG = "ENCODER";
protected Integer doInBackground(File... params) {
SequenceEncoder se = null;
Bitmap[] arrayOfBitmap = {bmp, bmpdef};
try {
se = new SequenceEncoder(new File(params[0].getParentFile(),
"jcodec_enc.mp4"));
for (int i = 0; i < arrayBitmap.length; i++) {
se.encodeImage(arrayBitmap[i]);
}
se.finish();
} catch (IOException e) {
Log.e(TAG, "IO", e);
}
return 0;
}
@Override
protected void onProgressUpdate(Integer... values) {
progress.setText(String.valueOf(values[0]));
}
}
Please help me where am making the mistake