1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-30 14:15:13 +00:00

[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

@@ -4987,6 +4987,18 @@ def cli_configuration_args(argdict, keys, default=[], use_compat=True):
return [arg for args in arg_list for arg in args]
return default
def _configuration_args(main_key, argdict, exe, keys=None, default=[], use_compat=True):
main_key, exe = main_key.lower(), exe.lower()
root_key = exe if main_key == exe else f'{main_key}+{exe}'
keys = [f'{root_key}{k}' for k in (keys or [''])]
if root_key in keys:
if main_key != exe:
keys.append((main_key, exe))
keys.append('default')
else:
use_compat = False
return cli_configuration_args(argdict, keys, default, use_compat)
class ISO639Utils(object):
# See http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt