mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-28 12:30:12 +02:00
feat: ffmpeg hardware acceleration (#899)
* Bump threads to 4 (20-30% CPU Increase) + Add -hwaccel auto flag
This commit is contained in:
parent
55d76d23a6
commit
7af0e1e558
@ -115,6 +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 += "-y"
|
||||
this += "-threads" to ffmpegOptions.threads.get().toString()
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import me.rhunk.snapenhance.common.config.FeatureNotice
|
||||
|
||||
class DownloaderConfig : ConfigContainer() {
|
||||
inner class FFMpegOptions : ConfigContainer() {
|
||||
val threads = integer("threads", 1)
|
||||
val threads = integer("threads", 4) // Bump Default Value to 4 Tested on Pixel 5 (Qualcomm Snapdragon 765G) Had no lag
|
||||
val preset = unique("preset", "ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow") {
|
||||
addFlags(ConfigFlag.NO_TRANSLATE)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user