AbedElazizShe / light_compressor

A powerful and easy-to-use video compression plugin for Flutter.
MIT License
59 stars 32 forks source link

Support for custom frame rate #12

Closed juanmartin8a closed 2 years ago

juanmartin8a commented 3 years ago

videos with I high fps are huge in size for example 60 fps. The file size would be smaller with a lower frame rate.

Tom3652 commented 2 years ago

I was going to ask how is the bitrate lowered ? Because when i compress my videos and if the video contains a "zoom" gesture, the resolution is very low

Can we know about the thresholds of the "very_high", "high", "medium", "low", "very_low" please ? And what does "MinBitRateEnabled" mean please ?

Does the compression work with multiple files at the same time ? (It seems so so far in my app but i want to be sure) For example with 3 videos of 2min each, does it automatically queue the compressions ?

Thanks a lot for your work @AbedElazizShe

AbedElazizShe commented 2 years ago

@juanmartin8a the support for custom framerate is added. If you don't pass one, the framerate of the original video will be chosen instead or 30 if there is any issues. Please close the issue if it works fine with you.

AbedElazizShe commented 2 years ago

@Tom3652 it is lowered by reducing the bitrate with a factor based on the quality, for instance, bitrate 0.6 for very_high and 0.1 for very_low

isMinBitRateEnabled was renamed to isMinBitrateCheckEnabled, the library checks if the bitrate is 2mbps or less, it will stop compression. Usually it could be this low if it was compressed before, just to avoid this from happening.

I don't believe multiple videos will work at the moment, I may add support later, for now, you should wait for one compression's results before starting another.

Thank you, please let me know if you have further questions or feature request.

Tom3652 commented 2 years ago

Thanks for the reply and the explanations !