[DEV] Set ffmpeg/ffprobe paths via ENV variable (#1060)

This commit is contained in:
Jesse Bannon 2024-09-24 22:13:22 -07:00 committed by GitHub
parent 3fbdd26257
commit a37d9ed10e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,8 +23,12 @@ if IS_WINDOWS:
MAX_FILE_NAME_BYTES = 255
else:
DEFAULT_LOCK_DIRECTORY = "/tmp"
DEFAULT_FFMPEG_PATH = _existing_path("/usr/bin/ffmpeg", "/usr/local/bin/ffmpeg")
DEFAULT_FFPROBE_PATH = _existing_path("/usr/bin/ffprobe", "/usr/local/bin/ffmpeg")
DEFAULT_FFMPEG_PATH = os.getenv(
"YTDL_SUB_FFMPEG_PATH", _existing_path("/usr/bin/ffmpeg", "/usr/local/bin/ffmpeg")
)
DEFAULT_FFPROBE_PATH = os.getenv(
"YTDL_SUB_FFPROBE_PATH", _existing_path("/usr/bin/ffprobe", "/usr/local/bin/ffmpeg")
)
MAX_FILE_NAME_BYTES = os.pathconf("/", "PC_NAME_MAX")