]> jfr.im git - yt-dlp.git/commitdiff
Support environment variables in `--ffmpeg-location`
authorpukkandan <redacted>
Fri, 16 Sep 2022 12:54:29 +0000 (18:24 +0530)
committerpukkandan <redacted>
Fri, 16 Sep 2022 16:07:37 +0000 (21:37 +0530)
Closes #4938

yt_dlp/__init__.py

index 87d431c6e0faccea783f9f305dd182813a20dc7b..cab2dd62f95f8b42954f294529895b5a881916c1 100644 (file)
@@ -920,6 +920,7 @@ def _real_main(argv=None):
     # 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:
+        opts.ffmpeg_location = expand_path(opts.ffmpeg_location)
         FFmpegPostProcessor._ffmpeg_location.set(opts.ffmpeg_location)
 
     with YoutubeDL(ydl_opts) as ydl: