diff --git a/shell_command.py b/shell_command.py index 79332ff..51309b5 100755 --- a/shell_command.py +++ b/shell_command.py @@ -230,18 +230,20 @@ def append_concat_filter(self, type, segments=[]): """Append a concat filter to the filters list""" - if (len(segments) > 1): - self.append_filter( - "{inspecs} concat=n={n}:v={v}:a={a} [{t}conc]".format( - inspecs=" ".join([s.output_stream_specifier() - for s in segments]), - n=len(segments), v=int(type == "v"), - a=int(type == "a"), t=type)) - elif (len(segments) == 1): - self.append_filter( - "{inspec} {a}null [{t}conc]".format( - inspec=segments[0].output_stream_specifier(), - a=type if type == "a" else "", t=type)) + # Ignore frame type. + if type in ["a", "v"]: + if (len(segments) > 1): + self.append_filter( + "{inspecs} concat=n={n}:v={v}:a={a} [{t}conc]".format( + inspecs=" ".join([s.output_stream_specifier() + for s in segments]), + n=len(segments), v=int(type == "v"), + a=int(type == "a"), t=type)) + elif (len(segments) == 1): + self.append_filter( + "{inspec} {a}null [{t}conc]".format( + inspec=segments[0].output_stream_specifier(), + a=type if type == "a" else "", t=type)) def build_complex_filter(self): """Build the complete complex filter.