X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2FYoutubeDL.py;h=dc8aa788cf3ba8830cfd97e192b2153a4573063d;hb=94a23d2a1ed94af8bb80898194f03c38a5dcdb1d;hp=d40314ee57e8c93cd4a4ae86509a976e412baf78;hpb=35aa7098cd22249e3ab446925a27c57572ff49d9;p=youtube-dl.git diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index d40314ee5..dc8aa788c 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -151,6 +151,7 @@ class YoutubeDL(object): bidi_workaround: Work around buggy terminals without bidirectional text support, using fridibi debug_printtraffic:Print out sent and received HTTP traffic + include_ads: Download ads as well The following parameters are not used by YoutubeDL itself, they are used by the FileDownloader: @@ -908,6 +909,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 +925,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