From ae5954fd09efe2d02a58df755e9fafc35a0eadbe Mon Sep 17 00:00:00 2001 From: Martin Ziegler Date: Mon, 1 Dec 2025 09:45:13 +0100 Subject: [PATCH] Minor bugfix --- backend/app/api/routes/settings.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/backend/app/api/routes/settings.py b/backend/app/api/routes/settings.py index 7ccfb6e62..bf9c2859b 100644 --- a/backend/app/api/routes/settings.py +++ b/backend/app/api/routes/settings.py @@ -1,4 +1,5 @@ import shutil +from pathlib import Path from fastapi import APIRouter, Depends from sqlalchemy.ext.asyncio import AsyncSession @@ -95,6 +96,21 @@ async def reset_settings(db: AsyncSession = Depends(get_db)): async def check_ffmpeg(): """Check if ffmpeg is installed and available.""" ffmpeg_path = shutil.which("ffmpeg") + + # If not found via PATH, check common installation locations + # (systemd services often have limited PATH) + if ffmpeg_path is None: + common_paths = [ + "/usr/bin/ffmpeg", + "/usr/local/bin/ffmpeg", + "/opt/homebrew/bin/ffmpeg", + "/snap/bin/ffmpeg", + ] + for path in common_paths: + if Path(path).exists(): + ffmpeg_path = path + break + return { "installed": ffmpeg_path is not None, "path": ffmpeg_path,