Quality loss on compression
Hello izzytwosheds,
Thanks for this great library, but we are facing some issues with the quality of compressed videos. I have few questions :
- If video is already compressed and user compress it again, then there is huge quality loss.
- Videos gets more pixelated when there is effects and transitions in video, Why ?
- What is the best bitrate for less quality loss.
I am attaching this links and videos are compressed with litr ;
https://khabriya.in/watch?code=KP0T3ZajdZ https://cdn.khabriya.in/file/quickfox/2022/01/video1641335028010/video_index0.ts
Please help on this.
for me 1400000 KEY_BIT_RATE works fine.
@dsandeep1414 what resolution and bitrate are you using? LiTr relies on hardware encoder on a device to encode video, it just passes parameters to it. The lower is bitrate for higher resolution, the more compression artifacts (pixelation) you are likely to get. For example, for 720p video I get decent quality at 4-5 Mbps bitrate, but it may degrade below that.
Hello @izzytwosheds
We are using this configuration 👍 public static final int DEFAULT_VIDEO_BITRATE = 1200000; public static final int DEFAULT_KEY_FRAME_INTERVAL = 2; public static final int DEFAULT_AUDIO_BITRATE = 128000;
But sometimes video resolution is very low. Is there any way to set compression factor according to resolution ?
1.2 Mbps for video seems pretty low, especially for higher resolution (720p+) video. I get decent quality for 720p videos at 3-5 Mbps, but not lower. Android cameras capture at much higher bitrate - 10-12 Mbps. LiTr doesn't set compression base on resolution, it expects clients to do that. You could probably adjust your bitrate by number of pixels on a video frame, to keep some level of "per pixel" quality.