Adding performance tuning
This commit is contained in:
+3
-1
@@ -306,7 +306,9 @@ def build_ffmpeg_command(plan: RenderPlan, output_path: Path) -> list[str]:
|
||||
# Global thread limits before any -i. Without this, each format=rgba conversion
|
||||
# in the filter graph (one per video layer) spawns one swscaler thread per CPU core,
|
||||
# causing OOM on Apple Silicon where av_cpu_count() returns 10-11.
|
||||
cmd.extend(["-threads", "1", "-filter_threads", "1"])
|
||||
from .cache import get_ffmpeg_thread_count
|
||||
_tc = str(get_ffmpeg_thread_count())
|
||||
cmd.extend(["-threads", _tc, "-filter_threads", _tc])
|
||||
|
||||
# Resolve paths to absolute
|
||||
project_path = plan.project_path.resolve()
|
||||
|
||||
Reference in New Issue
Block a user