]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/downloader/external.py
Improve `--clean-infojson`
[yt-dlp.git] / yt_dlp / downloader / external.py
index da38e502db80eb842adadc9c575cf87f609f706d..4fe56bb957368b8fa9416798be981a777aae7a40 100644 (file)
@@ -20,6 +20,7 @@
     encodeFilename,
     handle_youtubedl_headers,
     remove_end,
+    traverse_obj,
 )
 
 
@@ -363,9 +364,11 @@ def _call_downloader(self, tmpfilename, info_dict):
         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