From e2f7875324ea0052ebc0c5107bb7e5bad289b421 Mon Sep 17 00:00:00 2001 From: Quentin Theuret Date: Wed, 4 Mar 2015 17:03:00 +0100 Subject: [PATCH] [IMP] Add the possibility to define the number of threads used by ffmpeg --- converter/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/converter/__init__.py b/converter/__init__.py index 73430d7..e83d8d7 100644 --- a/converter/__init__.py +++ b/converter/__init__.py @@ -121,9 +121,12 @@ def parse_options(self, opt, twopass=None): else: format_options.extend(['-map', str(m)]) + thread_opt = [] + if 'threads' in opt: + thread_opt.extend(['-threads', str(opt['threads'])]) # aggregate all options - optlist = audio_options + video_options + subtitle_options + format_options + optlist = audio_options + video_options + subtitle_options + format_options + thread_opt if twopass == 1: optlist.extend(['-pass', '1'])