Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

视频压缩后文件大小没有变化 #104

Open
pz-bottle opened this issue May 28, 2021 · 0 comments
Open

视频压缩后文件大小没有变化 #104

pz-bottle opened this issue May 28, 2021 · 0 comments

Comments

@pz-bottle
Copy link

下面的是我的压缩代码
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。。。就很纳闷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant