aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorkikuyan <[email protected]>2021-06-21 01:58:19 +0900
committerGitHub <[email protected]>2021-06-20 23:58:19 +0700
commit3a7ef27cf306a0a8f79ebd78ae60329c53080d14 (patch)
tree291135674c6053a2566c6b151ebbc52ae1d8bd69
parenta7f61feab2dbfc50a7ebe8b0ea390bd0e5edf77a (diff)
downloadyoutube-dl-3a7ef27cf306a0a8f79ebd78ae60329c53080d14.tar.gz
youtube-dl-3a7ef27cf306a0a8f79ebd78ae60329c53080d14.zip
[postprocessor/ffmpeg] Show ffmpeg output on error (refs #22680) (#29336)
-rw-r--r--youtube_dl/postprocessor/ffmpeg.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py
index 5f7298345..9f76c9d4e 100644
--- a/youtube_dl/postprocessor/ffmpeg.py
+++ b/youtube_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)