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):
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)