From: Guillaume Pellerin Date: Mon, 23 Sep 2013 11:54:07 +0000 (+0200) Subject: fix script paths and args X-Git-Tag: 1.4.5~5 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=701b2115c8dc8170297e8c0f3d0f16e8b99a2b6b;p=telemeta.git fix script paths and args --- diff --git a/tools/scripts/transcode/remux_fix_media.py b/tools/scripts/transcode/remux_fix_media.py index c5691691..3059973f 100755 --- a/tools/scripts/transcode/remux_fix_media.py +++ b/tools/scripts/transcode/remux_fix_media.py @@ -6,9 +6,9 @@ from ebml.utils.ebml_data import * class FixCheckMedia(object): - def __init__(self, dir): + def __init__(self, dir, tmp_dir): self.dir = dir - self.tmp_dir = '/home/telecaster/tmp/' + self.tmp_dir = tmp_dir if not os.path.exists(self.tmp_dir): os.makedirs(self.tmp_dir) @@ -95,7 +95,8 @@ def get_pids(name, args=None): pids.append(proc.pid) return pids -dir = sys.argv[-1] +dir = sys.argv[-2] +tmp_dir = sys.argv[-1] path = os.path.abspath(__file__) pids = get_pids('python2.6',args=path) @@ -103,8 +104,9 @@ pids = get_pids('python2.6',args=path) print datetime.datetime.now() if len(pids) <= 1: print 'starting process...' - f = FixCheckMedia(dir) + f = FixCheckMedia(dir, tmp_dir) f.process() print 'process finished.\n' else: print 'already started !\n' + diff --git a/tools/scripts/transcode/transcode.py b/tools/scripts/transcode/transcode.py index 9d4f38e0..32bd3f39 100755 --- a/tools/scripts/transcode/transcode.py +++ b/tools/scripts/transcode/transcode.py @@ -20,10 +20,10 @@ 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 ' + str(threads) + ' -acodec libfaac -ar 48000 -ab 96k -ac 1', - 'png' : '-ss ' + preview_tc + ' -i %s', +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 ' + str(threads) + ' -acodec libfaac -ar 48000 -ab 96k -ac 1', + 'png' : '-ss ' + preview_tc + ' -i "%s"', } args = sys.argv[1:]