Closed james04gr closed 11 months ago
Hi @james04gr thank you for openning the issue and the provided samples. It's indeed very strange. i was able to compress video 1 ro 3.8MB on VERY_LOW quality. I will try to use the same device for testing as all my devices are pixles.
I will get back to you.
I have a Samsung S22 with Android 12 device. I use CameraX to record a video with my application. I set the VideoCapture like below
videoCapture = VideoCapture.Builder().apply { setAudioBitRate(44_000) setVideoFrameRate(30) setTargetResolution(Size(720, 1080)) setBitRate(50_000) setAudioChannelCount(1) }.build()
The captured video has duration 1minute and is about 9.5MB size. After the capture i compress the video with the below configuration
VideoCompressor.start( context = applicationContext, uris = uris, isStreamable = false, storageConfiguration = StorageConfiguration( isExternal = false ), configureWith = Configuration( quality = quality, isMinBitrateCheckEnabled = false, videoBitrate = null, disableAudio = false, keepOriginalResolution = false ), listener = object : CompressionListener { ...
As i can see in the OnSuccess callback, the output size is almost the same regardless of the quality i choose. Specifically i see that
Initial Video Size ~9.6MB (1.mp4) ULTRA_LOW quality ---> Compress Size 8494341 Bytes (8.49MB)
Initial Video Size ~9.5MB (2.mp4) VERY_HIGH quality ---> Compress Size 8499488 Bytes (8.49MB)
I attach the 2 videos in case you want to make some tests https://www.mediafire.com/file/pgfogpcyukqibqw/1.mp4/file https://www.mediafire.com/file/gb9ihpsfpzpk9vv/2.mp4/file
Why is this happening?