Video Quality lost
Opened this issue · 6 comments
alihussainkabri commented
when I am uploading video from my react native app then it was going to reduce the quality of the video.
github-actions commented
👋 @alihussainkabri
Thanks for opening your issue here! If you find this package useful hit the star🌟!
serolgames commented
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
alihussainkabri commented
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
<#278 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APDLZVLTLUQI25RJSTJ5M6TZDMVN5AVCNFSM6AAAAABEXWTYN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRSGQYTMMJTGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
serolgames commented
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
AryanGupta2002 commented
I have tried putting different values of Bitrate but I am getting the same Output every time
srinu6 commented
you need to put compressionMethod: "manual"
. I tried the way, I got different outputs but the quality is not good any any output.