Tourenathan-G5organisation / SiliCompressor

A powerful, flexible and easy to use Video and Image compression library for Android.
Apache License 2.0
1.38k stars 292 forks source link

Video Compressor Not Working at ALL #74

Open icangku opened 6 years ago

icangku commented 6 years ago
String file = null;
                           try {
                                file = SiliCompressor.with(getContext()).compressVideo(list.get(i).getOriginalPath(), Environment.getExternalStorageDirectory() + "/"+ URLUtil.guessFileName(String.valueOf(list.get(i).getOriginalPath()), null, null));
                            } catch (URISyntaxException e) {
                                e.printStackTrace();
                            }`

That's my code and when glide trying to get the picture is not working, but its working when I don't compress the video

Tourenathan-G5organisation commented 6 years ago

Hi @icangku How do you say that video compression is not working because you not able to get an image from the compressed file using Glide? I have seen in your code, are you passing the file absolutePath as parameter to the compression method?

icangku commented 6 years ago

yes, because its asking for path not file right? -How do you say that video compression is not working because you not able to get an image from the compressed file using Glide? this also yes

icangku commented 6 years ago
try {
                                String file = SiliCompressor.with(getContext()).compressVideo(list.get(i).getOriginalPath(), Environment.getExternalStorageDirectory().getAbsolutePath()+"/DCIM/Camera/"+list.get(i).getOrientationName());
                                videos.add(videos.size(), file);
                            } catch (URISyntaxException e) {
                                e.printStackTrace();
                            }

that's my latest code, still not working glide tells me that file not found

btw, i'm using the code in my fragment, is it influencing something

10-11 00:43:00.488 20629-20629/id.gis.collection V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@b4e6881 10-11 00:43:00.489 20629-20629/id.gis.collection V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@8fffd26 10-11 00:43:00.635 20629-20799/id.gis.collection E/WVMExtractor: Failed to open libwvm.so: dlopen failed: library "libwvm.so" not found 10-11 00:43:00.649 20629-20799/id.gis.collection I/ExtendedExtractor: ExtendedExtractor::create 0x0 10-11 00:43:00.719 20629-20799/id.gis.collection E/tmessages: colorFormat = 2130708361 10-11 00:43:00.724 20629-20801/id.gis.collection I/OMXClient: Using client-side OMX mux. 10-11 00:43:00.732 20629-20801/id.gis.collection E/ACodec: [OMX.qcom.video.encoder.avc] storeMetaDataInBuffers (output) failed w/ err -1010 10-11 00:43:00.732 20629-20801/id.gis.collection I/ExtendedACodec: setupVideoEncoder() 10-11 00:43:00.733 20629-20801/id.gis.collection W/ACodec: do not know color format 0x7fa30c04 = 2141391876 do not know color format 0x7f000789 = 2130708361 10-11 00:43:00.740 20629-20801/id.gis.collection I/ACodec: setupVideoEncoder succeeded 10-11 00:43:00.740 20629-20801/id.gis.collection I/ExtendedACodec: [OMX.qcom.video.encoder.avc] configure, AMessage : AMessage(what = 'conf', target = 1) = { int32_t height = 360 int32_t width = 640 int32_t bitrate = 450000 string mime = "video/avc" int32_t frame-rate = 25 int32_t i-frame-interval = 10 int32_t color-format = 2130708361 int32_t encoder = 1 } 10-11 00:43:00.743 20629-20801/id.gis.collection W/ACodec: do not know color format 0x7f000789 = 2130708361 10-11 00:43:00.770 20629-20807/id.gis.collection I/OMXClient: Using client-side OMX mux. 10-11 00:43:00.800 20629-20806/id.gis.collection I/MediaCodec: [OMX.qcom.video.decoder.avc] setting surface generation to 21124097 10-11 00:43:00.801 20629-20807/id.gis.collection I/ExtendedACodec: setupVideoDecoder() vpp-enable search is 0 and value is 0 10-11 00:43:00.805 20629-20807/id.gis.collection I/ExtendedACodec: Decoder will be in frame by frame mode 10-11 00:43:00.812 20629-20807/id.gis.collection D/SurfaceUtils: set up nativeWindow 0x556ab7b7c0 for 320x240, color 0x7fa30c04, rotation 0, usage 0x42002900 10-11 00:43:00.839 20629-20807/id.gis.collection D/SurfaceUtils: set up nativeWindow 0x556ab7b7c0 for 320x240, color 0x7fa30c04, rotation 0, usage 0x42002900 10-11 00:43:00.853 20629-20807/id.gis.collection W/ExtendedACodec: Failed to get Profile and Level from Component 10-11 00:43:00.853 20629-20807/id.gis.collection W/ExtendedACodec: Failed to get Entropy from Component

that's the error

Tourenathan-G5organisation commented 6 years ago

Hi @icangku Please check the example in the project app folder. It may give you a clearer view on how to use the library. Also, please make sure that the file path you are passing and the destination directory are valid.

icangku commented 6 years ago

I've tried also the example, that's why i commented here https://stackoverflow.com/questions/45785439/video-compression-using-silicompressor-in-android-not-working but its still not working

aniket-modkar commented 5 years ago

Use asyncTask