From: Guillaume Pellerin Date: Fri, 28 Jun 2013 21:00:50 +0000 (+0200) Subject: add thread parameter to transcode X-Git-Tag: 1.4.5~7 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=ca883ea69e78f718eee0bb611f3a2cf7861c1c22;p=telemeta.git add thread parameter to transcode --- diff --git a/tools/scripts/transcode/transcode.py b/tools/scripts/transcode/transcode.py index ad4e924b..9d4f38e0 100755 --- a/tools/scripts/transcode/transcode.py +++ b/tools/scripts/transcode/transcode.py @@ -18,10 +18,11 @@ class Logger: source_format = 'webm' preview_tc = '00:00:05' +threads = 4 ffmpeg_args = {'mp3' : '-i %s -vn -acodec libmp3lame -aq 6 -ac 1', 'ogg' : '-i %s -vn -acodec copy', - 'mp4' : '-i %s -vcodec libx264 -r 24 -b 512k -threads 6 -acodec libfaac -ar 48000 -ab 96k -ac 1', + 'mp4' : '-i %s -vcodec libx264 -r 24 -b 512k -threads ' + str(threads) + ' -acodec libfaac -ar 48000 -ab 96k -ac 1', 'png' : '-ss ' + preview_tc + ' -i %s', } @@ -44,4 +45,3 @@ for root, dirs, files in os.walk(root_dir): logger.logger.info(command) if not '--dry-run' in args: os.system(command) -