diff --git a/README.md b/README.md index d5abb82..5322c26 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,14 @@ pip install -r requirements.txt For mask generation tools, additional dependencies (PyTorch, transformers, segment-anything-2, opencv) are installed into `~/.8cut/venv/` via the Settings dialog. +### Platform notes + +**Linux** — install libmpv via your package manager (`apt install libmpv-dev` / `pacman -S mpv`). + +**macOS** — install libmpv via Homebrew: `brew install mpv`. + +**Windows** — `python-mpv` requires `mpv-2.dll` in `PATH` or in the same directory as `main.py`. Download it from the [mpv Windows builds](https://sourceforge.net/projects/mpv-player-windows/files/libmpv/) page (pick the latest `mpv-dev-x86_64-*.7z`, extract `mpv-2.dll`). Also ensure `ffmpeg.exe` is in `PATH` (e.g. via [winget](https://winget.run/): `winget install ffmpeg`). + ## Usage ``` diff --git a/main.py b/main.py index 75f094f..5c40c39 100644 --- a/main.py +++ b/main.py @@ -103,7 +103,11 @@ _RATIOS: dict[str, tuple[int, int]] = { "1:1": (1, 1), } -_VENV_PYTHON = str(Path.home() / ".8cut" / "venv" / "bin" / "python") +_VENV_PYTHON = str( + Path.home() / ".8cut" / "venv" + / ("Scripts" if sys.platform == "win32" else "bin") + / ("python.exe" if sys.platform == "win32" else "python") +) _TOOLS_DIR = str(Path(__file__).parent / "tools")