Video Quality lost
when I am uploading video from my react native app then it was going to reduce the quality of the video.
👋 @alihussainkabri Thanks for opening your issue here! If you find this package useful hit the star🌟!
That's the goal of the package... If you reduce the size of your video/image a bit of the quality will be lost. if you think your video quality is too low, simply reduce the compression level It's not an issue, you can close it
How can i reduce that can you give me snippet of the code
On Tue, 21 May 2024 at 4:56 PM, serolgames @.***> wrote:
That's the goal of the package... If you reduce the size of your video/image a bit of the quality will be lost. if you think your video quality is too low, simply reduce the compression level It's not an issue, you can close it
— Reply to this email directly, view it on GitHub https://github.com/numandev1/react-native-compressor/issues/278#issuecomment-2122416134, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDLZVLTLUQI25RJSTJ5M6TZDMVN5AVCNFSM6AAAAABEXWTYN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRSGQYTMMJTGQ . You are receiving this because you were mentioned.Message ID: @.***>
This is a code I made to use compression in percent :
const videoCompressionLevel = 40;
const originalVideoMetada : VideoMetada = await getVideoMetaData(result.assets[0].uri) as VideoMetada;
const targetBitrate : number = Math.round((originalVideoMetada.size) / ((originalVideoMetada.duration / 60) * 0.0075) * (1 - (videoCompressionLevel / 100)))
const compressedVideo = await VideoCompressor.compress(
result.assets[0].uri,
{
progressDivider: 20,
maxSize: 1920,
bitrate: targetBitrate,
compressionMethod: "manual",
downloadProgress: (progress) => {
console.log('downloadProgress: ', progress);
},
},
(progress) => {
console.log('Compression Progress: ', progress);
}
);
``` if this fits your needs, don't forget to close the issue
I have tried putting different values of Bitrate but I am getting the same Output every time
you need to put compressionMethod: "manual". I tried the way, I got different outputs but the quality is not good any any output.
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.