commit 00dd9e6dce94dbb3b20174c879db98aa74c3f53c
parent ec15b2749851c4a8eb0b587e175e220d415aaa84
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date:   Fri, 21 Feb 2025 17:48:03 +0100

fix(app/ffmpeg): hardware acceleration

Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com>

Diffstat:
Mapp/src/main/kotlin/me/rhunk/snapenhance/download/FFMpegProcessor.kt | 5++---
1 file changed, 2 insertions(+), 3 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 @@ -115,7 +115,6 @@ class FFMpegProcessor( // load ffmpeg native sync to avoid native crash synchronized(this) { FFmpegKit.listSessions() } val globalArguments = ArgumentList().apply { - this += "-hwaccel ${if (ffmpegOptions.customVideoCodec.get().isNotEmpty()) "auto" else "mediacodec"}" //Use hwaccel If Available this += "-y" this += "-threads" to ffmpegOptions.threads.get().toString() } @@ -218,8 +217,8 @@ class FFMpegProcessor( AudioFormat.ENCODING_PCM_32BIT -> "s32le" else -> throw IllegalArgumentException("Unsupported audio encoding") } - globalArguments += "-ar" to args.audioStreamFormat!!.sampleRate.toString() - globalArguments += "-ac" to args.audioStreamFormat!!.channels.toString() + globalArguments += "-ar" to args.audioStreamFormat.sampleRate.toString() + globalArguments += "-ac" to args.audioStreamFormat.channels.toString() } } outputArguments += args.output.absolutePath