# HG changeset patch # User mdd # Date 1511899443 -3600 # Node ID ace8005f02cfdb51fbc8dd79be5df439583bf651 # Parent 82361ad7b3fe5e9daccc28bc6d5c018f2bf26aa6 finished ffmpeg status output diff -r 82361ad7b3fe -r ace8005f02cf ts2mkv.py --- a/ts2mkv.py Tue Nov 28 19:02:01 2017 +0100 +++ b/ts2mkv.py Tue Nov 28 21:04:03 2017 +0100 @@ -50,6 +50,7 @@ cpl = thread.compile_pattern_list([ pexpect.EOF, "frame= *(\d+)", + "(.+)\n", '(.+)' ]) percent = 0 @@ -58,7 +59,7 @@ while True: i = thread.expect_list(cpl, timeout=None) if i == 0: # EOF - print "the sub process exited" + print "\nffmpeg subprocess finished!" break elif i == 1: try: @@ -76,6 +77,9 @@ sys.stdout.flush() thread.close elif i == 2: + # normal newline line, just ignore them... + pass + elif i == 3: unknown_line = thread.match.group(0) sys.stdout.write(unknown_line) sys.stdout.flush()