diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-09-17 10:14:44 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-09-17 10:14:44 +0530 |
commit | 2b24afa6d7f0ed09a663b4483d29f7c05258edfe (patch) | |
tree | 68372b00c077e772435361cd278b0434d7692748 /yt_dlp/__init__.py | |
parent | 3166e6840c7f7b1ea3984f0e40a892d87e690480 (diff) |
Improve 5736d79172c47ff84740d5720467370a560febad
Diffstat (limited to 'yt_dlp/__init__.py')
-rw-r--r-- | yt_dlp/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index cab2dd62f..29c467b0e 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -411,6 +411,9 @@ def validate_options(opts): if opts.download_archive is not None: opts.download_archive = expand_path(opts.download_archive) + if opts.ffmpeg_location is not None: + opts.ffmpeg_location = expand_path(opts.ffmpeg_location) + if opts.user_agent is not None: opts.headers.setdefault('User-Agent', opts.user_agent) if opts.referer is not None: @@ -920,7 +923,6 @@ 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: |