INNER CODE UNIT · Java

getFitBitRate

microshow/RxFFmpeg · rxffmpeg/src/main/java/io/microshow/rxffmpeg/AudioVideoUtils.java:19

    public static int getFitBitRate(int wxh) {
        if (wxh <= 480 * 480) {
            return 1000 * 1024;
        } else if (wxh <= 640 * 480) {
            return 1500 * 1024;
        } else if (wxh <= 800 * 480) {
            return 1800 * 1024;
        } else if (wxh <= 960 * 544) {
            return 2 * 1024 * 1024;
        } else if (wxh <= 1280 * 720) {
            return (int) (2.5 * 1024 * 1024);
        } else if (wxh <= 1920 * 1088) {
            return 3 * 1024 * 1024;
        } else {
            return 3500 * 1024;
        }
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…