Open pz-bottle opened 3 years ago
下面的是我的压缩代码 new Mp4Composer(videoPath, destPath) // .rotation(Rotation.ROTATION_90) // .size((width) 540, (height) 960) // .fillMode(FillMode.PRESERVE_ASPECT_FIT) // .filter(new GlFilterGroup(new GlMonochromeFilter(), new GlVignetteFilter())) // .trim((trimStartMs) 200, (trimEndMs) 5000) .listener(new Mp4Composer.Listener() { @Override public void onProgress(double progress) { Log.d(TAG, "onProgress = " + progress); }
@Override public void onCurrentWrittenVideoTime(long timeUs) { } @Override public void onCompleted() { Log.d(TAG, "onCompleted()"); runOnUiThread(() -> { ProDismiss(); File file = new File(destPath); if(file!=null){ videoFile = file; isComposerSuccess = true; } }); } @Override public void onCanceled() { Log.d(TAG, "onCanceled"); runOnUiThread(() -> { ProDismiss(); isComposerSuccess = false; }); } @Override public void onFailed(Exception exception) { Log.e(TAG, "onFailed()", exception); runOnUiThread(() -> { ProDismiss(); isComposerSuccess = false; }); } }).start();
压缩前的大小为8.5M,压缩后的视频大小还是8.5M。。。就很纳闷
下面的是我的压缩代码 new Mp4Composer(videoPath, destPath) // .rotation(Rotation.ROTATION_90) // .size((width) 540, (height) 960) // .fillMode(FillMode.PRESERVE_ASPECT_FIT) // .filter(new GlFilterGroup(new GlMonochromeFilter(), new GlVignetteFilter())) // .trim((trimStartMs) 200, (trimEndMs) 5000) .listener(new Mp4Composer.Listener() { @Override public void onProgress(double progress) { Log.d(TAG, "onProgress = " + progress); }
压缩前的大小为8.5M,压缩后的视频大小还是8.5M。。。就很纳闷