From c5207375caeed4d1fd5c29f3cb1f3bc617db0996 Mon Sep 17 00:00:00 2001 From: TheVisual <132447890+TheVisual@users.noreply.github.com> Date: Sun, 14 Apr 2024 11:36:44 -0500 Subject: [PATCH 1/3] FFMpeg + Dependencies Changes Bump guava -> 33.1.0-jre Bump compose-compiler->1.5.11 Bump kotlin -> 1.9.23 Bump compose-bom -> 2024.04.00 Bump ffmpeg-kit -> 6.0.LTS Bump material3 -> 1.2.1 Default -hwaccel mediacodec Change libx264 -> h264_mediacodec --- .../rhunk/snapenhance/download/FFMpegProcessor.kt | 4 ++-- gradle/libs.versions.toml | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/download/FFMpegProcessor.kt b/app/src/main/kotlin/me/rhunk/snapenhance/download/FFMpegProcessor.kt index 5013c2912..104dec7bd 100644 --- a/app/src/main/kotlin/me/rhunk/snapenhance/download/FFMpegProcessor.kt +++ b/app/src/main/kotlin/me/rhunk/snapenhance/download/FFMpegProcessor.kt @@ -115,7 +115,7 @@ class FFMpegProcessor( // load ffmpeg native sync to avoid native crash synchronized(this) { FFmpegKit.listSessions() } val globalArguments = ArgumentList().apply { - this += "-hwaccel auto" //Use hwaccel If Available + this += "-hwaccel mediacodec" //Use hwaccel If Available this += "-y" this += "-threads" to ffmpegOptions.threads.get().toString() } @@ -128,7 +128,7 @@ class FFMpegProcessor( val outputArguments = ArgumentList().apply { this += "-preset" to (ffmpegOptions.preset.getNullable() ?: "ultrafast") - this += "-c:v" to (ffmpegOptions.customVideoCodec.get().takeIf { it.isNotEmpty() } ?: "libx264") + this += "-c:v" to (ffmpegOptions.customVideoCodec.get().takeIf { it.isNotEmpty() } ?: "h264_mediacodec") this += "-c:a" to (ffmpegOptions.customAudioCodec.get().takeIf { it.isNotEmpty() } ?: "copy") this += "-crf" to ffmpegOptions.constantRateFactor.get().let { "\"$it\"" } this += "-b:v" to ffmpegOptions.videoBitrate.get().toString() + "K" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d21b87ddd..1f2ffb2c8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,12 +1,12 @@ [versions] -agp = "8.2.2" +agp = "8.3.2" apksig = "8.2.2" libsu = "5.2.2" -guava = "33.0.0-jre" +guava = "33.1.0-jre" jsoup = "1.17.2" -kotlin = "1.9.22" +kotlin = "1.9.23" kotlinx-coroutines-android = "1.8.0" -compose-compiler = "1.5.9" +compose-compiler = "1.5.11" activity-ktx = "1.8.2" androidx-documentfile = "1.1.0-alpha01" @@ -15,13 +15,13 @@ navigation-compose = "2.7.7" osmdroid-android = "6.1.18" recyclerview = "1.3.2" -compose-bom = "2024.02.01" +compose-bom = "2024.04.00" bcprov-jdk18on = "1.77" dexlib2 = "3.0.5" -ffmpeg-kit = "5.1.LTS" # DO NOT UPDATE FFMPEG-KIT TO "5.1" it breaks stuff :3 +ffmpeg-kit = "6.0.LTS" # DO NOT UPDATE FFMPEG-KIT TO "v6.0.3" it breaks stuff :3 gson = "2.10.1" junit = "5.10.2" -material3 = "1.2.0" +material3 = "1.2.1" okhttp = "5.0.0-alpha.12" rhino = "1.7.14" From 86afde3684b12d496d74db2b35561d1df3406647 Mon Sep 17 00:00:00 2001 From: TheVisual <132447890+TheVisual@users.noreply.github.com> Date: Sun, 14 Apr 2024 12:14:44 -0500 Subject: [PATCH 2/3] Update libs.versions.toml - Revert Everything non FFMPEG related * Bump ffmpeg-kit -> 6.0-2.LTS --- gradle/libs.versions.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1f2ffb2c8..0d6292fa9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,12 +1,12 @@ [versions] -agp = "8.3.2" +agp = "8.2.2" apksig = "8.2.2" libsu = "5.2.2" -guava = "33.1.0-jre" +guava = "33.0.0-jre" jsoup = "1.17.2" -kotlin = "1.9.23" +kotlin = "1.9.22" kotlinx-coroutines-android = "1.8.0" -compose-compiler = "1.5.11" +compose-compiler = "1.5.9" activity-ktx = "1.8.2" androidx-documentfile = "1.1.0-alpha01" @@ -15,13 +15,13 @@ navigation-compose = "2.7.7" osmdroid-android = "6.1.18" recyclerview = "1.3.2" -compose-bom = "2024.04.00" +compose-bom = "2024.02.01" bcprov-jdk18on = "1.77" dexlib2 = "3.0.5" -ffmpeg-kit = "6.0.LTS" # DO NOT UPDATE FFMPEG-KIT TO "v6.0.3" it breaks stuff :3 +ffmpeg-kit = "6.0-2.LTS" # DO NOT UPDATE FFMPEG-KIT TO "v6.0.3" it breaks stuff :3 gson = "2.10.1" junit = "5.10.2" -material3 = "1.2.1" +material3 = "1.2.0" okhttp = "5.0.0-alpha.12" rhino = "1.7.14" @@ -61,4 +61,4 @@ androidLibrary = { id = "com.android.library", version.ref = "agp" } kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } -[bundles] +[bundles] \ No newline at end of file From badd3df1b3f95d45eba0113767c35edd913c1969 Mon Sep 17 00:00:00 2001 From: TheVisual <132447890+TheVisual@users.noreply.github.com> Date: Sun, 14 Apr 2024 12:55:20 -0500 Subject: [PATCH 3/3] Update libs.versions.toml Remove old comment --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0d6292fa9..8666115e8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,7 +18,7 @@ recyclerview = "1.3.2" compose-bom = "2024.02.01" bcprov-jdk18on = "1.77" dexlib2 = "3.0.5" -ffmpeg-kit = "6.0-2.LTS" # DO NOT UPDATE FFMPEG-KIT TO "v6.0.3" it breaks stuff :3 +ffmpeg-kit = "6.0-2.LTS" gson = "2.10.1" junit = "5.10.2" material3 = "1.2.0"