Issue #2201 invalid

--max-quality not very useful if some formats are not desired

Anonymous created an issue

The version of mplayer that I'm stuck with is incompatible with some formats, e.g. 34 and 6. I would prefer to eliminate those formats from the candidate list and still use the implied -b instead of limiting the max-quality to 5. I've run out of synonyms for avoid/blacklist/shun/refrain/prevent etc to pick a usable single letter parameter, so it's somewhat awkwardly implemented as an extension to --max-quality instead.

Comments (3)

  1. Anonymous

    --- youtube-dl Sat Sep 25 19:08:14 CEST 2010 +++ youtube-dl-2010-08-04 Sat Sep 25 19:06:18 CEST 2010 @@ -189,7 +189,7 @@ forcetitle: Force printing title. simulate: Do not download the video files. format: Video format code. - format_limit: Highest quality format to try or list of formats not to try + format_limit: Highest quality format to try. outtmpl: Template for output names. ignoreerrors: Do not stop on download errors. ratelimit: Download speed limit, in bytes/sec. @@ -897,15 +897,8 @@ if 'fmt_url_map' in video_info: url_map = dict(tuple(pair.split('|')) for pair in video_info['fmt_url_map'][0].split(',')) format_limit = self._downloader.params.get('format_limit', None) - if format_limit is not None: - if format_limit in self._available_formats: - format_list = self._available_formats[self._available_formats.index(format_limit):] - else: - format_list = self._available_formats - print >>sys.stderr, u'\nWARNING:',format_list,'\n' - for limit in format_limit.split(','): - del format_list[format_list.index(limit)] - print >>sys.stderr, u'\nWARNING:',format_list,'\n' + if format_limit is not None and format_limit in self._available_formats: + format_list = self._available_formats[self._available_formats.index(format_limit):] else: format_list = self._available_formats existing_formats = [x for x in format_list if x in url_map] @@ -2130,7 +2123,7 @@ video_format.add_option('--all-formats', action='store_const', dest='format', help='download all available video formats', const='-1') video_format.add_option('--max-quality', - action='store', dest='format_limit', metavar='FORMAT', help='highest quality format to download or list of formats not to try') + action='store', dest='format_limit', metavar='FORMAT', help='highest quality format to download') video_format.add_option('-b', '--best-quality', action='store_true', dest='bestquality', help='download the best video quality (DEPRECATED)') parser.add_option_group(video_format)

  2. Anonymous

    Sorry, the above is a _reverse_ patch, and I can't attach stuff here. If you need a 'proper' patch for this trivial enhancement, I think I'll have to open a new issue.

  3. Log in to comment