IRIS / iris /pipeline /ffmpeg.py
CompleteKris's picture
Bundle IRIS core for Space build
b2300e2
Raw History Blame Contribute Delete
483 Bytes
from __future__ import annotations
import shutil
def resolve_ffmpeg_executable() -> str:
executable = shutil.which("ffmpeg")
if executable:
return executable
try:
import imageio_ffmpeg
return imageio_ffmpeg.get_ffmpeg_exe()
except Exception as exc:
raise RuntimeError(
"ffmpeg is required for video processing. Install ffmpeg on PATH or install "
"the Python package 'imageio-ffmpeg'."
) from exc