]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/__init__.py
[utils, cleanup] Consolidate known media extensions
[yt-dlp.git] / yt_dlp / __init__.py
index 5b9b3541cdbfea846723b7edbc67248974308d03..0bff4e7c8289cc9b73610e911a5b70eef85b2a63 100644 (file)
@@ -20,6 +20,7 @@
 from .options import parseOpts
 from .postprocessor import (
     FFmpegExtractAudioPP,
+    FFmpegPostProcessor,
     FFmpegSubtitlesConvertorPP,
     FFmpegThumbnailsConvertorPP,
     FFmpegVideoConvertorPP,
@@ -899,6 +900,11 @@ def _real_main(argv=None):
     if print_extractor_information(opts, all_urls):
         return
 
+    # We may need ffmpeg_location without having access to the YoutubeDL instance
+    # See https://github.com/yt-dlp/yt-dlp/issues/2191
+    if opts.ffmpeg_location:
+        FFmpegPostProcessor._ffmpeg_location.set(opts.ffmpeg_location)
+
     with YoutubeDL(ydl_opts) as ydl:
         pre_process = opts.update_self or opts.rm_cachedir
         actual_use = all_urls or opts.load_info_filename