AbedElazizShe / LightCompressor

A powerful and easy-to-use video compression library for android uses MediaCodec API.
Apache License 2.0
529 stars 116 forks source link

E/Compressor: Attempt to invoke interface method 'java.lang.Object java.util.Map.get(java.lang.Object)' on a null object reference #46

Closed engosamamohsen closed 3 years ago

engosamamohsen commented 3 years ago

VideoCompressor.start(volleyFileObject.getFile().getAbsolutePath(),volleyFileObjectCompress.getFilePath(), new CompressionListener() { @Override public void onStart() { Log.d(TAG,"onStart compress:"); }

                @Override
                public void onSuccess() {
                    // On Compression success
                }

                @Override
                public void onFailure(String failureMessage) {
                    Log.d(TAG,"failur:"+failureMessage);
                    // On Failure
                }

                @Override
                public void onProgress(float v) {
                    Log.d(TAG,"onProgress compress:");
                }

                @Override
                public void onCancelled() {
                    Log.d(TAG,"onCancelled compress:");
                }
            }, VideoQuality.MEDIUM, false, false);

implementation 'com.github.AbedElazizShe:LightCompressor:0.7.7'

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2"
AbedElazizShe commented 3 years ago

Thank you for openinig the issue. Could you please let me know what is the Android version and the device(s) you use for testing? An original sample video would be a great help too. Please post the full error log as it will give me more details on the potential causes. Thank you

AbedElazizShe commented 3 years ago

Will close this issue assuming you're not having the problem anymore, please feel free to re-open it.