Skip to content

Commit

Permalink
[DEV] Set ffmpeg/ffprobe paths via ENV variable (#1060)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbannon authored Sep 25, 2024
1 parent 3fbdd26 commit a37d9ed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ytdl_sub/config/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ def _existing_path(*paths: str) -> str:
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")

Expand Down

0 comments on commit a37d9ed

Please sign in to comment.