Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed Up FFmpeg #899

Merged
merged 1 commit into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down