]> git.parisson.com Git - telemeta.git/commitdiff
add thread parameter to transcode
authorGuillaume Pellerin <yomguy@parisson.com>
Fri, 28 Jun 2013 21:00:50 +0000 (23:00 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Fri, 28 Jun 2013 21:00:50 +0000 (23:00 +0200)
tools/scripts/transcode/transcode.py

index ad4e924b5bb2cfee3146152a720021ebc5350380..9d4f38e01c741a33f89cac777b1e17c92e590f99 100755 (executable)
@@ -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)
-