]> git.parisson.com Git - telecaster-server.git/commitdiff
fix print
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 22 Dec 2022 15:32:29 +0000 (16:32 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 22 Dec 2022 15:32:29 +0000 (16:32 +0100)
bin/remux_fix_media.py
bin/transcode_nonv.py
bin/transcode_nv.py

index 9784c406c6fa6e9ddff7ae1d0a9690ddaaa47b4c..f5693a688055a9ed8d7d709075ac29edb3149903 100644 (file)
@@ -28,7 +28,7 @@ class FixCheckMedia(object):
                     dir_files = os.listdir(root)
 
                     if not webm_fixed_log in dir_files:
-                        print source
+                        print(source)
                         self.fix_webm(source)
                         f = open(root + os.sep + webm_fixed_log, 'w')
                         f.close()
@@ -40,7 +40,7 @@ class FixCheckMedia(object):
                             dest_ext = os.path.splitext(file)[1][1:]
                             if dest_ext == 'mp3':
                                 dest = root + os.sep + file
-                                print dest
+                                print(dest)
                                 self.fix_mp3(source, dest)
                                 f = open(root + os.sep + mp3_fixed_log, 'w')
                                 f.close()
@@ -53,7 +53,7 @@ class FixCheckMedia(object):
         try:
             tmp_file = self.tmp_dir + 'out.webm '
             command = 'ffmpeg -loglevel 0 -i "'+ path + '" -vcodec libvpx -vb 500k -acodec libvorbis -aq 7 -f webm -y "' + tmp_file + '" > /dev/null'
-            print command
+            print(command)
             os.system(command)
             command = 'mv '  + tmp_file + path
             os.system(command)
@@ -65,12 +65,12 @@ class FixCheckMedia(object):
         try: 
             tmp_file = self.tmp_dir + 'out.webm'
             command = '/usr/local/bin/ffmpeg -loglevel 0 -i "' + path + '" -vcodec copy -acodec copy -f webm -y "' + tmp_file + '" > /dev/null'
-            print command
+            print(command)
             os.system(command)
             #ebml_obj = EBMLData(tmp_file)
             #offset = ebml_obj.get_first_cluster_seconds()
             command = '/usr/local/bin/ffmpeg -loglevel 0 -i "' + tmp_file + '" -vcodec copy -acodec copy -f webm -y "' + path + '" > /dev/null'
-            print command
+            print(command)
             os.system(command)
         except:
             pass
@@ -78,7 +78,7 @@ class FixCheckMedia(object):
     def fix_mp3(self, source, path):
         try:
             command = '/usr/local/bin/ffmpeg -loglevel 0 -i "'+ source + '" -vn -aq 6 -y "' + path + '" > /dev/null'
-            print command
+            print(command)
             os.system(command)
         except:
             pass
@@ -102,12 +102,12 @@ tmp_dir = sys.argv[-1]
 path =  os.path.abspath(__file__)
 pids = get_pids('python2.6',args=path)
 
-print datetime.datetime.now()
+print(datetime.datetime.now())
 if len(pids) <= 1:
-    print 'starting process...'
+    print('starting process...')
     f = FixCheckMedia(dir, tmp_dir)
     f.process()
-    print 'process finished.\n'
+    print('process finished.\n')
 else:
-    print 'already started !\n'
+    print('already started !\n')
 
index 4128b09e0af64369a17ae1ef6229d59c762638ee..ec450a354393e9daa07d593e377deabad85605f8 100644 (file)
@@ -54,7 +54,6 @@ class TelemetaTranscode(object):
                 ext = ext[1:]
                 date_dir = datetime.datetime.fromtimestamp(os.path.getmtime(path))
                 if ext in self.source_formats and date_dir > self.date_limit:
-                    print(date_dir)
                     for format, ffmpeg_args in self.dest_formats.items():
                         local_file = name + '.' + format
                         dest = os.path.abspath(root + os.sep + local_file)
index 35c27f8d5d7dbfa8df07e8787a9fcba688a36312..1c0161f0309aa7d63cad9e5d3c6be81f984a0d7c 100644 (file)
@@ -53,7 +53,6 @@ class TelemetaTranscode(object):
                 ext = ext[1:]
                 date_dir = datetime.datetime.fromtimestamp(os.path.getmtime(path))
                 if ext in self.source_formats and date_dir > self.date_limit:
-                    print(date_dir)
                     for format, ffmpeg_args in self.dest_formats.items():
                         local_file = name + '.' + format
                         dest = os.path.abspath(root + os.sep + local_file)