[downloader/ffmpeg] Allow passing custom arguments before -i

Closes #686
This commit is contained in:
pukkandan
2021-08-24 03:15:44 +05:30
parent 91d4b32bb6
commit 330690a214
5 changed files with 34 additions and 27 deletions

View File

@@ -742,12 +742,13 @@ def parseOpts(overrideArguments=None):
metavar='NAME:ARGS', dest='external_downloader_args', default={}, type='str',
action='callback', callback=_dict_from_options_callback,
callback_kwargs={
'allowed_keys': '|'.join(list_external_downloaders()),
'allowed_keys': r'ffmpeg_[io]\d*|%s' % '|'.join(list_external_downloaders()),
'default_key': 'default',
'process': compat_shlex_split
}, help=(
'Give these arguments to the external downloader. '
'Specify the downloader name and the arguments separated by a colon ":". '
'For ffmpeg, arguments can be passed to different positions using the same syntax as --postprocessor-args. '
'You can use this option multiple times to give different arguments to different downloaders '
'(Alias: --external-downloader-args)'))