mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-04-29 22:24:35 +02:00
fix(app/ffmpeg): hardware acceleration
Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com>
This commit is contained in:
parent
ec15b27498
commit
00dd9e6dce
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user