SiliCompressor icon indicating copy to clipboard operation
SiliCompressor copied to clipboard

How to control compression level to keep quality?

Open EgyptianM opened this issue 5 years ago • 5 comments

The compression affects quality too much, is there any way to select compression level to preserve video quality?

EgyptianM avatar Nov 06 '18 13:11 EgyptianM

I am also looking forward to be able to select the compression level to improve the quality. They talked about an update where this parameter could be modified :)

jkydevelopment avatar Nov 06 '18 19:11 jkydevelopment

you can get the width and height of video using val retriever = MediaMetadataRetriever() retriever.setDataSource("path of your video file") val width = Integer.valueOf(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH)) val height = Integer.valueOf(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT)) and you can give it the bit rate as 2160000 filePath = SiliCompressor.with(mContext).compressVideo("source", "destination",width,height,2160000)

you can change in quality using bit rate

MahmoudAbdelaalMahmoud avatar Feb 11 '19 14:02 MahmoudAbdelaalMahmoud

这个比特率项目中默认是450000,那它是按照什么规律来计算呢?

wyun2016 avatar Jun 26 '19 13:06 wyun2016

@MahmoudAbdelaalMahmoud Can give me the bitrate chart by quality level

prasad456 avatar Nov 23 '19 15:11 prasad456

@MahmoudAbdelaalMahmoud Can give me the bitrate chart by quality level

There is no such chart which will define a quality of the video. Its all just trial and error

saran2020 avatar Dec 23 '19 14:12 saran2020