From 8280ca5f789d8701104b8eb4a5af15192c078fa7 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 22 Apr 2024 13:05:27 +0200 Subject: [PATCH] fix log --- bin/mastering/mastering.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/mastering/mastering.py b/bin/mastering/mastering.py index c4fa659..4000e52 100755 --- a/bin/mastering/mastering.py +++ b/bin/mastering/mastering.py @@ -103,9 +103,17 @@ class TeleCasterMastering(object): def double_remux(self, path): filename, ext = os.path.splitext(path) tmp_file = self.tmp_dir + os.sep + 'out' + '.' + ext + command = 'ffmpeg -loglevel 0 -i "' + path + '" -vcodec copy -acodec copy -y "' + tmp_file + '" > /dev/null' + if self.verbose_mode: + print(command) + self.logger.logger.info(command) os.system(command) + command = 'ffmpeg -loglevel 0 -i "' + tmp_file + '" -vcodec copy -acodec copy -y "' + path + '" > /dev/null' + if self.verbose_mode: + print(command) + self.logger.logger.info(command) os.system(command) def touch_file(self, path): @@ -115,11 +123,8 @@ class TeleCasterMastering(object): def remux(self, file): log = file + '.log' if os.path.getsize(file) and not os.path.exists(log): - if self.verbose_mode: - print("remuxing", file) self.double_remux(file) self.touch_file(log) - self.logger.logger.info("remuxed", file) def transcode(self, file, offset=None): filename, ext = os.path.splitext(file) -- 2.39.5