aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/postprocessor/ffmpeg.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-03-27 04:52:11 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-03-27 04:52:11 +0530
commit5cf34021f502c56cb8436613400d7ef510f722cc (patch)
tree62e4d313735551dca1a13d8dda28af62ffbcfae8 /yt_dlp/postprocessor/ffmpeg.py
parent34baa9fdf050895c4a09107964d396079da5bb45 (diff)
downloadhypervideo-pre-5cf34021f502c56cb8436613400d7ef510f722cc.tar.lz
hypervideo-pre-5cf34021f502c56cb8436613400d7ef510f722cc.tar.xz
hypervideo-pre-5cf34021f502c56cb8436613400d7ef510f722cc.zip
[Concat] Ensure final directory exists
Fixes https://github.com/yt-dlp/yt-dlp/issues/3181#issuecomment-1079622589
Diffstat (limited to 'yt_dlp/postprocessor/ffmpeg.py')
-rw-r--r--yt_dlp/postprocessor/ffmpeg.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py
index 234ddeff0..ec618b040 100644
--- a/yt_dlp/postprocessor/ffmpeg.py
+++ b/yt_dlp/postprocessor/ffmpeg.py
@@ -1129,6 +1129,8 @@ class FFmpegConcatPP(FFmpegPostProcessor):
super().__init__(downloader)
def concat_files(self, in_files, out_file):
+ if not self._downloader._ensure_dir_exists(out_file):
+ return
if len(in_files) == 1:
if os.path.realpath(in_files[0]) != os.path.realpath(out_file):
self.to_screen(f'Moving "{in_files[0]}" to "{out_file}"')