Closed maulikdadhaniya closed 4 years ago
Thank you for raising this issue. Could you please let me know what is the device you're using and which Android version?
I using Samsung Galaxy M31 (Android 10) and xiaomi MI Redmi 3s (Android 6) both device getting black video in output.
I will look into the issue. Do you see any errors at logcat?
I got this error in Compressor.kt object file
Thank you for sharing this. Does it fail with any video? Would you mind sharing one of these videos as I never encounter the problem before and it can be tricky to fix without recreating the issue.
fail with all video. yaa sure i will share video on your mail id. Thank you
Thank you. Could you please post from where you're calling VideoCompresor.start()?
Here selectedVideoPath is my selected video path.
It's not showing much, just ensure your code is not running on a thread that has a looper!
My Code in Seperate thread Please look shared image
Could you please try to use the sample app and let me know if it working there, and please send me one of these videos. It may be related to codecs.
in sample app , working fine , but when i used lib , display black video. Yaa sure i send video in few minutes.
I sent mail with atteched video please check it out
Received, thanks. Since it is working with sample app, most probably the compression is fine. I will create a testing app later today and try to identify the possible cases leading to such an issue. Will update you. Thank you for your help
Your welcome , Please let me know . Thank you.
and one more thing i tell you i use Fragment.
Could you please try to remove runOnUiThread and everything inside onProgress() and try again? I believe that piece of code is what causing the issue
will check in minutes
Hi mp4 generate sucessfully , but now i try to open that file it display Can't play this file from FileManager
Would you mind sharing the code again, showing the entire function when the compression code is added and from where that function is called.
Does the issue still happening? Did you figure out a solution ? And did you try the sample app?
Yes still issue. yes also try in sample app it work perfectly but in my code its not work like sample app
Thank you. If it works fine in the sample, then you're implementatin is not correct. Try to play around, create a playground app, test the compression there and try to identify why it's not working in your app. If by any chance your project is available on Github, you can share it and I will help you fix the issue. Wll close this by now.
i try this library , when i try to compress video that output will only black screen video. here is my code