diff -r 821c02fa7070 -r f0c7db3b239d ts2mkv.py --- a/ts2mkv.py Sat Nov 25 12:24:17 2017 +0100 +++ b/ts2mkv.py Sat Nov 25 13:08:41 2017 +0100 @@ -231,6 +231,28 @@ # TODO: Old dreambox images did a file split: .ts .ts.001 .ts.002 etc. # Find all these files and join them! + inputs = [fn] + if os.path.splitext(fn)[1].lower() == '.ts': + for fpart in glob.glob(self.filename + '.' + ('[0-9]' * 3)): + fn = "\\'".join(p for p in fpart.split("'")) + fn = fn.replace(" ", "\\ ") + inputs.append(fn) + #inputs.append(shlex.split(fpart)) + + if len(inputs) > 1: + # use ffmpeg input concat function + # attention, ffmpeg doesnt like escape sequences + fn = "\"concat:" + \ + "|".join(inputs)\ + .replace('\ ', ' ')\ + .replace("\'", "'")\ + + "\"" + + idx = 0 + for tmp in inputs: + self.msg_prepare += "Input file #%i: %s\n" % ( + idx, os.path.basename(tmp)) + idx += 1 cmd = [ "ffmpeg",