aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-05-12 19:08:32 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-05-12 19:08:32 +0200
commitfb2f83360cc48b2b2fbc27c268437688094032b6 (patch)
tree472b47990cc2064f7060b4a01a4b3086283280b0 /youtube_dl
parent3c5e7729e1ec3663f6cf2894b6e0474d76f2b206 (diff)
FFmpegPostProcessor: decode stderr first and then get the last line (closes #837)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/PostProcessor.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/PostProcessor.py b/youtube_dl/PostProcessor.py
index 0c6885dda..8868b37af 100644
--- a/youtube_dl/PostProcessor.py
+++ b/youtube_dl/PostProcessor.py
@@ -85,8 +85,9 @@ class FFmpegPostProcessor(PostProcessor):
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout,stderr = p.communicate()
if p.returncode != 0:
+ stderr = stderr.decode('utf-8', 'replace')
msg = stderr.strip().split('\n')[-1]
- raise FFmpegPostProcessorError(msg.decode('utf-8', 'replace'))
+ raise FFmpegPostProcessorError(msg)
def _ffmpeg_filename_argument(self, fn):
# ffmpeg broke --, see https://ffmpeg.org/trac/ffmpeg/ticket/2127 for details