chore: enhance Dockerfile and config to support conditional static ffmpeg import

This commit is contained in:
Anish Sarkar 2026-05-11 04:51:19 +05:30
parent 18de0136bc
commit efff7ab2a2
2 changed files with 18 additions and 4 deletions

View file

@ -473,10 +473,15 @@ def initialize_vision_llm_router():
class Config:
# Check if ffmpeg is installed
if not is_ffmpeg_installed():
import static_ffmpeg
allow_static_ffmpeg = (
os.getenv("SURFSENSE_ALLOW_STATIC_FFMPEG_DOWNLOAD", "TRUE").upper() == "TRUE"
)
if allow_static_ffmpeg:
import static_ffmpeg
# ffmpeg installed on first call to add_paths(), threadsafe.
static_ffmpeg.add_paths()
# ffmpeg installed on first call to add_paths(), threadsafe.
static_ffmpeg.add_paths()
# check if ffmpeg is installed again
if not is_ffmpeg_installed():
raise ValueError(