+ help=(
+ 'Convert the subtitles to another format (currently supported: %s) '
+ '(Alias: --convert-subtitles)' % '|'.join(FFmpegSubtitlesConvertorPP.SUPPORTED_EXTS)))
+ postproc.add_option(
+ '--convert-thumbnails',
+ metavar='FORMAT', dest='convertthumbnails', default=None,
+ help=(
+ 'Convert the thumbnails to another format '
+ '(currently supported: %s) ' % '|'.join(FFmpegThumbnailsConvertorPP.SUPPORTED_EXTS)))
+ postproc.add_option(
+ '--split-chapters', '--split-tracks',
+ dest='split_chapters', action='store_true', default=False,
+ help=(
+ 'Split video into multiple files based on internal chapters. '
+ 'The "chapter:" prefix can be used with "--paths" and "--output" to '
+ 'set the output filename for the split files. See "OUTPUT TEMPLATE" for details'))
+ postproc.add_option(
+ '--no-split-chapters', '--no-split-tracks',
+ dest='split_chapters', action='store_false',
+ help='Do not split video based on chapters (default)')
+ postproc.add_option(
+ '--remove-chapters',
+ metavar='REGEX', dest='remove_chapters', action='append',
+ help='Remove chapters whose title matches the given regular expression. This option can be used multiple times')
+ postproc.add_option(
+ '--no-remove-chapters', dest='remove_chapters', action='store_const', const=None,
+ help='Do not remove any chapters from the file (default)')
+ postproc.add_option(
+ '--force-keyframes-at-cuts',
+ action='store_true', dest='force_keyframes_at_cuts', default=False,
+ help=(
+ 'Force keyframes around the chapters before removing/splitting them. '
+ 'Requires a reencode and thus is very slow, but the resulting video '
+ 'may have fewer artifacts around the cuts'))
+ postproc.add_option(
+ '--no-force-keyframes-at-cuts',
+ action='store_false', dest='force_keyframes_at_cuts',
+ help='Do not force keyframes around the chapters when cutting/splitting (default)')
+ _postprocessor_opts_parser = lambda key, val='': (
+ *(item.split('=', 1) for item in (val.split(';') if val else [])),
+ ('key', remove_end(key, 'PP')))
+ postproc.add_option(
+ '--use-postprocessor',
+ metavar='NAME[:ARGS]', dest='add_postprocessors', default=[], type='str',
+ action='callback', callback=_list_from_options_callback,
+ callback_kwargs={
+ 'delim': None,
+ 'process': lambda val: dict(_postprocessor_opts_parser(*val.split(':', 1)))
+ }, help=(
+ 'The (case sensitive) name of plugin postprocessors to be enabled, '
+ 'and (optionally) arguments to be passed to it, seperated by a colon ":". '
+ 'ARGS are a semicolon ";" delimited list of NAME=VALUE. '
+ 'The "when" argument determines when the postprocessor is invoked. '
+ 'It can be one of "pre_process" (after extraction), '
+ '"before_dl" (before video download), "post_process" (after video download; default) '
+ 'or "after_move" (after moving file to their final locations). '
+ 'This option can be used multiple times to add different postprocessors'))