diff --git a/twitch_utils/concat.py b/twitch_utils/concat.py
index 50583d5a..c27c0531 100755
--- a/twitch_utils/concat.py
+++ b/twitch_utils/concat.py
@@ -116,7 +116,7 @@ def render(self, path: str = 'full.mp4', container: str = 'mp4',
if path.endswith('.ts') or path == '-' and container == 'mpegts':
command += ['-copyts']
-
+
command += ['-f', 'concat', '-safe', '0', '-hide_banner',
'-i', map_file_name, '-c', 'copy']
@@ -145,8 +145,16 @@ def render(self, path: str = 'full.mp4', container: str = 'mp4',
def main(argv=None):
args = docopt(__doc__, argv=argv)
+ clips = []
+
+ for path in args['']:
+ try:
+ clips.append(Clip(path))
+ except Exception:
+ print(f'WARN: Clip {path} is corrupted, ignoring...')
+
try:
- timeline = Timeline([Clip(path) for path in args['']])
+ timeline = Timeline(clips)
except TimelineMissingRangeError as ex:
print(f'ERROR: Range {int(ex.start)}~{int(ex.end)} is not present in '
'provided files')