Skip to content

Effort free video editing!

Run the motion filter graph on one thread

WyattBlue5fc86d4b8639
diff --git a/src/analyze/motion.nim b/src/analyze/motion.nim
index c6162c2d..b2e80797 100644
--- a/src/analyze/motion.nim
+++ b/src/analyze/motion.nim
@@ -77,6 +77,9 @@ proc createFilterGraph(timeBase: AVRational, pixFmtName: string,
if filterGraph == nil:
error "Could not allocate filter graph"
+ # The frame-threaded decoder already uses every core on camera footage, so
+ # filter slice threads only add contention and handoff overhead.
+ filterGraph.nb_threads = 1
# Create buffer source with proper arguments
let bufferArgs = cstring(