]> git.parisson.com Git - telemeta.git/commitdiff
fix script paths and args
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 23 Sep 2013 11:54:07 +0000 (13:54 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 23 Sep 2013 11:54:07 +0000 (13:54 +0200)
tools/scripts/transcode/remux_fix_media.py
tools/scripts/transcode/transcode.py

index c5691691ae0c42e65a28f6698f194eafe3bab2a9..3059973f0cf371e47aa62c410969006900ab54f8 100755 (executable)
@@ -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'
+
index 9d4f38e01c741a33f89cac777b1e17c92e590f99..32bd3f39cc1979ec5d794e8f219ba9edfa8ff810 100755 (executable)
@@ -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:]