package com.ubt.jimu.utils.videoUtil; import android.os.Environment; import android.util.Size; import com.ubt.jimu.blockly.feature.audio.AudioParams; import com.ubt.jimu.utils.Md5Utils; import java.io.File; /* loaded from: classes2.dex */ public class CompressUtil { public static String a(String str, int i) { File file = new File(str); if (!file.exists()) { return ""; } String a = a(); File file2 = new File(a); if (!file2.exists()) { file2.mkdir(); } return a + File.separator + "jimu_ubt_" + Md5Utils.a(file.getName() + i, 8) + ".mp4"; } public static Size b(String str) { Size c; if ((str.endsWith(".mp4") || str.endsWith(AudioParams.gpp)) && (c = VideoUtils.c(str)) != null && c.getWidth() * c.getHeight() > 921600) { return new Size(1280, 720); } return null; } public static String a() { return Environment.getExternalStorageDirectory() + "/ubt_jimu_photos"; } public static int a(String str) { int a = VideoUtils.a(str); if (a > 2097152) { return 2097152; } return a; } }