]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Merge remote-tracking branch 'aft90/merge-output-format'
authorPhilipp Hagemeister <phihag@phihag.de>
Sat, 10 Jan 2015 00:59:14 +0000 (01:59 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Sat, 10 Jan 2015 00:59:14 +0000 (01:59 +0100)
Conflicts:
youtube_dl/YoutubeDL.py

1  2 
youtube_dl/YoutubeDL.py

index e34b36016e72e87653ba76e99f1ebcc37d937d48,6d5c401dfa3418350d03105e3efe537cecc7d911..61675d8ec8d7e6c2b7a3bb143dfcb3355bd1fe0a
@@@ -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
                                                    '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