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

Progress stuck at 51% #47

Closed
karanpratapsingh opened this issue Aug 1, 2019 · 3 comments
Closed

Progress stuck at 51% #47

karanpratapsingh opened this issue Aug 1, 2019 · 3 comments

Comments

@karanpratapsingh
Copy link

karanpratapsingh commented Aug 1, 2019

onProgress is struck at 51% any help?

I am trying to do a light compression via this library, Thanks

new Mp4Composer(input, pathOutput)
                .size(480, 640)
//                .fillMode(FillMode.PRESERVE_ASPECT_FIT)
                .videoBitrate(2000000)
//                .filter(new GlWatermarkFilter()) // filter cho man hinh video
                .listener(new Mp4Composer.Listener() {

                    @Override
                    public void onProgress(double progress) {
                        Log.d("PROGRESS COMPRESSION", "onProgress = " + progress);
                        sendEvent(getReactApplicationContext(), "proGress", progress);
                    }

                    @Override
                    public void onCompleted() {
                        event.putString("path", pathOutput);
                        promise.resolve(event);
                    }

                    @Override
                    public void onCanceled() {
                        Log.d("Destroy", "onCanceled");
//                        processing.invoke("Falied");
                    }

                    @Override
                    public void onFailed(Exception exception) {
                        event.putString("path", "");
                        promise.resolve(event);
                    }
                })
                .start();

LOG:

-01 20:07:00.952 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.5
2019-08-01 20:07:01.146 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.5037244050436803
2019-08-01 20:07:01.228 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.504452661703318
2019-08-01 20:07:01.341 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.5059096268881526
2019-08-01 20:07:01.394 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.5081010457460086
2019-08-01 20:07:01.506 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:01.895 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:02.036 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:02.986 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:03.113 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:03.944 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:04.083 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:04.918 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:05.049 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:06.003 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:06.139 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:06.920 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:07.047 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:07.975 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:08.110 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:09.040 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:09.169 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:09.956 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:10.086 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:10.956 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:12.781 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
2019-08-01 20:07:12.925 28375-30607/com.d.app D/PROGRESS COMPRESSION: onProgress = 0.509558269139734
@karanpratapsingh
Copy link
Author

downgraded to 2.2.1

@Sdghasemi
Copy link

@karanpratapsingh We're experiencing the same issue here. Can you explain what exactly did fix your problem? Can't find version 2.2.1 anywhere.

@karanpratapsingh
Copy link
Author

@Sdghasemi add this to android/app/build.gradle

 implementation 'com.github.MasayukiSuda:Mp4Composer-android:v0.2.1'

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

2 participants