From 6057163d978cde4c0a09fdf561f70a6d49c7c60e Mon Sep 17 00:00:00 2001 From: kikuyan Date: Mon, 21 Jun 2021 20:20:43 +0200 Subject: [PATCH] =?UTF-8?q?[postprocessor/ffmpeg]=20Show=20ffmpeg=20output?= =?UTF-8?q?=20on=20error=20(refs=20#22680)=20(#29=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …336) --- haruhi_dl/postprocessor/ffmpeg.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/haruhi_dl/postprocessor/ffmpeg.py b/haruhi_dl/postprocessor/ffmpeg.py index a0542bc44..67b7b2269 100644 --- a/haruhi_dl/postprocessor/ffmpeg.py +++ b/haruhi_dl/postprocessor/ffmpeg.py @@ -231,7 +231,10 @@ class FFmpegPostProcessor(PostProcessor): stdout, stderr = p.communicate() if p.returncode != 0: stderr = stderr.decode('utf-8', 'replace') - msg = stderr.strip().split('\n')[-1] + msgs = stderr.strip().split('\n') + msg = msgs[-1] + if self._downloader.params.get('verbose', False): + self._downloader.to_screen('[debug] ' + '\n'.join(msgs[:-1])) raise FFmpegPostProcessorError(msg) self.try_utime(out_path, oldest_mtime, oldest_mtime)