I am using the library called JCODEC in order to create an MP4 file from a Bitmap's ArrayList. Currently, I am converting 15 Bitmaps and the processing is really slow (15 seconds per Bitmap). Are there any ways to make this process more efficient? Here is the code:
SequenceEncoder encoder = new SequenceEncoder(file);
for (Bitmap bm: last15shots) {
try
{
Picture x = BitmapUtil.fromBitmap(bm);
encoder.encodeNativeFrame(x);
publishProgress("Adding frame no#" + last15shots.indexOf(bm));
} catch (Exception e)
{
e.printStackTrace();
}
}