aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-01-18 20:42:51 -0800
committerPhilipp Hagemeister <phihag@phihag.de>2014-01-18 20:42:51 -0800
commitdfa50793d8541ff2c5603f7c3b727c0f6e551d8d (patch)
tree92aa91f28a4e3469b7513e46e74bd62439818b8d
parente2b944cf4342a1920da4ec99e2d0e5f5dcf11cc1 (diff)
parent58c3c7ae38b9c0f5837595eb4027bd2650ae4e09 (diff)
Merge pull request #2153 from jaimeMF/ffmpeg-merger-check-install
Don’t try to merge the formats if ffmpeg or avconv are not installed
-rw-r--r--youtube_dl/YoutubeDL.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index d40314ee5..a0ab89b3d 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -908,6 +908,14 @@ class YoutubeDL(object):
if info_dict.get('requested_formats') is not None:
downloaded = []
success = True
+ merger = FFmpegMergerPP(self)
+ if not merger._get_executable():
+ postprocessors = []
+ self.report_warning('You have requested multiple '
+ 'formats but ffmpeg or avconv are not installed.'
+ ' The formats won\'t be merged')
+ else:
+ postprocessors = [merger]
for f in info_dict['requested_formats']:
new_info = dict(info_dict)
new_info.update(f)
@@ -916,7 +924,7 @@ class YoutubeDL(object):
downloaded.append(fname)
partial_success = dl(fname, new_info)
success = success and partial_success
- info_dict['__postprocessors'] = [FFmpegMergerPP(self)]
+ info_dict['__postprocessors'] = postprocessors
info_dict['__files_to_merge'] = downloaded
else:
# Just a single file