Skip to content

Commit

Permalink
Add a hardcoded path to ffmpeg/ffprobe in install_dir to fix macOS (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j authored Jan 22, 2025
1 parent 100f49c commit bce188d
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions src/tauon/t_modules/t_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7216,22 +7216,35 @@ def test_ffmpeg(self) -> bool:
return False

def get_ffmpeg(self) -> str | None:
path = user_directory / "ffmpeg.exe"
if msys and path.is_file():
return str(path)

# macOS
path = install_directory / "ffmpeg"
if path.is_file():
return str(path)

logging.debug(f"Looking for ffmpeg in PATH: {os.environ.get('PATH')}")
p = shutil.which("ffmpeg")
if p:
return p
p = str(user_directory / "ffmpeg.exe")
if msys and os.path.isfile(p):
return p
path = shutil.which("ffmpeg")
if path:
return path
return None

def get_ffprobe(self) -> str | None:
p = shutil.which("ffprobe")
if p:
return p
p = str(user_directory / "ffprobe.exe")
if msys and os.path.isfile(p):
return p
path = user_directory / "ffprobe.exe"
if msys and path.is_file():
return str(path)

# macOS
path = install_directory / "ffprobe"
if path.is_file():
return str(path)

logging.debug(f"Looking for ffprobe in PATH: {os.environ.get('PATH')}")
path = shutil.which("ffprobe")
if path:
return path
return None

def bg_save(self) -> None:
Expand Down

0 comments on commit bce188d

Please sign in to comment.