diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-27 21:52:57 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-28 20:04:40 +0530 |
commit | 0a5a191a2a33e3b305aaf684576b7129ba5173a0 (patch) | |
tree | 5d09a835fa5c14f341b33db4fd4bd420b16f3807 /yt_dlp/downloader/external.py | |
parent | 4877f9055c68e5da7d91b03bfb384de79440dc89 (diff) |
Improve `--clean-infojson`
It should not removes fields that may be needed for `--load-infojson`.
Eg: `_ffmpeg_args`, `_has_drm`
Diffstat (limited to 'yt_dlp/downloader/external.py')
-rw-r--r-- | yt_dlp/downloader/external.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/yt_dlp/downloader/external.py b/yt_dlp/downloader/external.py index da38e502d..4fe56bb95 100644 --- a/yt_dlp/downloader/external.py +++ b/yt_dlp/downloader/external.py @@ -20,6 +20,7 @@ from ..utils import ( encodeFilename, handle_youtubedl_headers, remove_end, + traverse_obj, ) @@ -363,9 +364,11 @@ class FFmpegFD(ExternalFD): if not self.params.get('verbose'): args += ['-hide_banner'] - args += info_dict.get('_ffmpeg_args', []) + args += traverse_obj(info_dict, ('downloader_options', 'ffmpeg_args'), default=[]) - # This option exists only for compatibility. Extractors should use `_ffmpeg_args` instead + # These exists only for compatibility. Extractors should use + # info_dict['downloader_options']['ffmpeg_args'] instead + args += info_dict.get('_ffmpeg_args') seekable = info_dict.get('_seekable') if seekable is not None: # setting -seekable prevents ffmpeg from guessing if the server |