A feature-rich command-line audio/video downloader
[embedsubtitle] Fix error when duration is unknown
pukkandan1f2a268bd333
diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.pyindex ad330ab8e5..058926929f 100644--- a/yt_dlp/postprocessor/ffmpeg.py+++ b/yt_dlp/postprocessor/ffmpeg.py@@ -545,7 +545,7 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):return [], informationfilename = 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