From 1f2a268bd33339a5375bffb77a27871213261a13 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Thu, 30 Sep 2021 02:15:33 +0530 Subject: [PATCH] [embedsubtitle] Fix error when duration is unknown --- yt_dlp/postprocessor/ffmpeg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py index ad330ab8e..058926929 100644 --- a/yt_dlp/postprocessor/ffmpeg.py +++ b/yt_dlp/postprocessor/ffmpeg.py @@ -545,7 +545,7 @@ def run(self, information): return [], information filename = information['filepath'] - if self._duration_mismatch( + if information.get('duration') and self._duration_mismatch( self._get_real_video_duration(information, False), information['duration']): self.to_screen(f'Skipping {self.pp_key()} since the real and expected durations mismatch') return [], information