From: Philipp Hagemeister Date: Sat, 10 Jan 2015 00:59:14 +0000 (+0100) Subject: Merge remote-tracking branch 'aft90/merge-output-format' X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=45598f15788568a8432da19544e5bdc390032aca;p=youtube-dl Merge remote-tracking branch 'aft90/merge-output-format' Conflicts: youtube_dl/YoutubeDL.py --- 45598f15788568a8432da19544e5bdc390032aca diff --cc youtube_dl/YoutubeDL.py index e34b36016,6d5c401df..61675d8ec --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@@ -203,6 -203,6 +203,7 @@@ class YoutubeDL(object) Progress hooks are guaranteed to be called at least once (with status "finished") if the download is successful. ++ merge_output_format: Extension to use when merging formats. The following parameters are not used by YoutubeDL itself, they are used by @@@ -909,18 -909,10 +910,23 @@@ 'contain the video, try using ' '"-f %s+%s"' % (format_2, format_1)) return ++ output_ext = ( ++ formats_info[0]['ext'] ++ if self.params.get('merge_output_format') is None ++ else self.params['merge_output_format']) selected_format = { 'requested_formats': formats_info, 'format': rf, - 'ext': self.params['merge_output_format'] if self.params['merge_output_format'] is not None else formats_info[0]['ext'], + 'ext': formats_info[0]['ext'], + 'width': formats_info[0].get('width'), + 'height': formats_info[0].get('height'), + 'resolution': formats_info[0].get('resolution'), + 'fps': formats_info[0].get('fps'), + 'vcodec': formats_info[0].get('vcodec'), + 'vbr': formats_info[0].get('vbr'), + 'acodec': formats_info[1].get('acodec'), + 'abr': formats_info[1].get('abr'), ++ 'ext': output_ext, } else: selected_format = None