2

我正在使用名为 JCODEC 的库来从位图的 ArrayList 创建 MP4 文件。目前,我正在转换 15 个位图,处理速度非常慢(每个位图 15 秒)。有没有办法让这个过程更有效率?这是代码:

            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();
                }
            }
4

0 回答 0