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

have problem with null rotation #31

Closed
mikkipastel opened this issue Oct 26, 2018 · 6 comments
Closed

have problem with null rotation #31

mikkipastel opened this issue Oct 26, 2018 · 6 comments

Comments

@mikkipastel
Copy link

Hello,

I have problem with user cannot upload video because application crash with this

Fatal Exception: java.lang.NumberFormatException: null
       at java.lang.Integer.parseInt(Integer.java:483)
       at java.lang.Integer.valueOf(Integer.java:611)
       at com.daasuu.mp4compose.composer.Mp4Composer.getVideoRotation(Mp4Composer.java:268)
       at com.daasuu.mp4compose.composer.Mp4Composer.access$200(Mp4Composer.java:25)
       at com.daasuu.mp4compose.composer.Mp4Composer$1.run(Mp4Composer.java:153)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
       at java.lang.Thread.run(Thread.java:762)

and this is my code in kotlin

Mp4Composer(input, output)
                .rotation(Rotation.ROTATION_270)
                .size(720, 1280)
                .videoBitrate(4000 * 1000)
                .listener(object: Mp4Composer.Listener {
                    override fun onFailed(exception: Exception?) {
                        listener.onFailureRotation()
                        Log.d("onFailed rotate", exception.toString())
                    }

                    override fun onProgress(progress: Double) {
                        Log.d("onProgress rotate", (progress*100).toString())
                    }

                    override fun onCanceled() {
                        Log.d("onCanceled rotate", "onCanceled")
                    }

                    override fun onCompleted() {
                        Log.d("onCompleted rotate", "onCompleted()")
                        listener.onSuccessRotation()
                    }

                }).start() 
@MasayukiSuda
Copy link
Owner

fixed

@mikkipastel
Copy link
Author

Hello, I try this for v0.1.8 with coding same README in kotlin code but have problem with some video

Fatal Exception: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
       at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java)
       at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:69)
       at com.daasuu.mp4compose.composer.Mp4Composer.getVideoResolution(Mp4Composer.java:283)
       at com.daasuu.mp4compose.composer.Mp4Composer.access$300(Mp4Composer.java:24)
       at com.daasuu.mp4compose.composer.Mp4Composer$1.run(Mp4Composer.java:153)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:784)

@MasayukiSuda
Copy link
Owner

please upload video.

@mikkipastel
Copy link
Author

Hello,

This is video file with problem https://drive.google.com/file/d/1HD6MmzHGTtci2HAU4uHwTlJR61de1jzX/view?usp=sharing

P.S. this is less video for have problem with use this library

@MasayukiSuda
Copy link
Owner

thx !

@MasayukiSuda MasayukiSuda reopened this Nov 1, 2018
@MasayukiSuda
Copy link
Owner

Please try.

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