From 5078927c394901744eb339a304ad9b1fc77811fe Mon Sep 17 00:00:00 2001 From: Next Alone <12210746+NextAlone@users.noreply.github.com> Date: Sat, 30 Mar 2024 01:56:10 +0800 Subject: [PATCH] fix: webm background in saving Thanks to @Yife_Playte. Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com> --- .../src/main/java/xyz/nextalone/nnngram/utils/MessageUtils.kt | 2 +- gradle/libs.versions.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/MessageUtils.kt b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/MessageUtils.kt index 06cd67d28..e58a853e2 100644 --- a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/MessageUtils.kt +++ b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/MessageUtils.kt @@ -887,7 +887,7 @@ class MessageUtils(num: Int) : BaseController(num) { if (File(outputPath).exists()) { File(outputPath).delete() } - val cmd = arrayOf("-y", "-i", path, "-vf", "colorkey=0x000000:0.1:0.1,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse", outputPath) + val cmd = arrayOf("-y", "-vcodec", "libvpx-vp9", "-i", path, "-lavfi", "split[v],palettegen,[v]paletteuse", outputPath) FFmpeg.executeAsync(cmd) { executionId, returnCode -> if (returnCode == RETURN_CODE_SUCCESS) { MediaController.saveFile(outputPath, activity, 0, null, null, callback) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a0d233e42..fc0feb4be 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -73,7 +73,7 @@ ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "kto ktor-client-encoding = { module = "io.ktor:ktor-client-encoding", version.ref = "ktor" } ktor-client-contentNegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" } ktor-serialization-json = { module = "io.ktor:ktor-serialization-kotlinx-json-jvm", version.ref = "ktor" } -ffmpeg = { module = "com.arthenica:mobile-ffmpeg-min", version = "4.4.LTS" } +ffmpeg = { module = "com.arthenica:mobile-ffmpeg-video", version = "4.4.LTS" } lottie = { module = "com.airbnb.android:lottie", version = "4.1.0" } [plugins]