jonataslaw / VideoCompress

Compress videos, remove audio, manipulate thumbnails, and make your video compatible with all platforms through this lightweight and efficient library.
MIT License
231 stars 280 forks source link

.bitRate() not working #210

Open 01000-you opened 1 year ago

01000-you commented 1 year ago

I added a case like this PR and set .bitRate() in DefaultVideoStrategy. However, the bit rate of the output file does not change. I want to compress it to an Instagram-like 720x720 video at around 600kbps.

8 -> {
                        videoTrackStrategy = DefaultVideoStrategy.Builder()
                                // .addResizer(AtMostResizer(720))
                                // .addResizer(ExactResizer(720,720))
                                // .bitRate(14400.toLong()) // not working
                                .bitRate(614400.toLong()) // not working
                                // .bitRate(204800) // not working
                                // .bitRate(1000) // not working
                                .frameRate(30)
                                // .frameRate(frameRate!!) // will be capped to the input frameRate
                                .build()
                    }

the bit rate of the output file is alway about 1500k regardless of the input bitrate value.

riveraj33 commented 1 year ago

Did you figure this one out?