Files
Conal Mullan 290d7d345b Adopt uv for Python dependency management (#33 rebased, thanks @AsharibAli) (#59)
* Adopt uv for Python dependency management

Replace manual pip/venv setup with `uv sync` (pyproject.toml + uv.lock),
and switch all tool invocations across docs, skills, commands, and
examples to `uv run`. Optional extras: --extra whisper, --extra modal.
tools/requirements.txt is kept as a pip fallback.

* FIX: bring uv migration current with main — post-June deps and docs

Adds websocket-client (60db websocket transport) to core deps and a
'youtube' extra for the google-* packages (tools/youtube_upload.py),
regenerates uv.lock, bumps pyproject version to 0.18.0, and converts the
51 'python3 tools/…' invocations added since the PR was opened (60db,
YouTube, Kiro docs, publish command) to 'uv run'. Verified with
uv sync --frozen --extra youtube; voiceover, sixtydb_tts, youtube_upload
and migrate_to_kiro all run through the project environment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Asharib Ali <asharibarain4@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-26 22:55:43 +01:00

3.3 KiB

Optional Components

Some toolkit features require additional software that isn't included by default. These optional components are:

  • Installed on-demand (not part of base toolkit)
  • Stored in ~/.video-toolkit/ (outside the project)
  • Only needed for specific use cases

Available Optional Components

Component Tool Purpose Size
ProPainter dewatermark.py AI video inpainting for watermark removal ~2GB

ProPainter (Watermark Removal)

ProPainter is an AI video inpainting model that can intelligently remove watermarks by reconstructing the underlying content.

Hardware Requirements

Hardware Status Notes
NVIDIA GPU (8GB+ VRAM) Supported Recommended, ~5-15 min per minute of video
Cloud GPU (RunPod, etc.) Supported Good alternative, ~$0.20-0.50 per video
Apple Silicon (M1/M2/M3/M4) Not supported MPS is too slow (40+ hours for short videos)
CPU only Not supported Impractical processing times

Why Apple Silicon Doesn't Work

ProPainter relies on optical flow (RAFT) which performs extremely poorly on Apple's MPS backend:

  1. MPS INT_MAX Limit: MPS cannot handle tensors > 2^31 elements, limiting chunks to ~32 seconds at 720p
  2. MPS Performance: Optical flow on MPS is orders of magnitude slower than CUDA
  3. Real-world result: 5 seconds of video takes 4+ hours on M1/M2/M3/M4

This is a PyTorch/MPS limitation, not something we can fix in the tool.

Installation

# Check current status
uv run tools/dewatermark.py --status

# Install ProPainter
uv run tools/dewatermark.py --install

This will:

  1. Clone ProPainter to ~/.video-toolkit/propainter/
  2. Create a Python virtual environment
  3. Install PyTorch and dependencies
  4. Download model weights (~2GB)

Usage

Remove watermark by specifying region:

uv run tools/dewatermark.py \
    --input video.mp4 \
    --region 1080,660,195,40 \
    --output clean.mp4

Use a custom mask image:

uv run tools/dewatermark.py \
    --input video.mp4 \
    --mask mask.png \
    --output clean.mp4

Finding Watermark Coordinates

Use the locate_watermark.py helper:

# Extract frames with coordinate grid
uv run tools/locate_watermark.py --input video.mp4 --grid --output-dir ./review/

# Verify a region across multiple frames
uv run tools/locate_watermark.py --input video.mp4 --region 1100,650,150,50 --verify

Cloud GPU Alternative

For users without NVIDIA GPUs, cloud services offer affordable processing:

Provider GPU Cost Processing Time
RunPod RTX 4090 ~$0.34/hr ~15-30 min for 3-min video
RunPod A100 ~$1.99/hr ~5-15 min for 3-min video
Vast.ai RTX 3090 ~$0.20/hr ~20-40 min for 3-min video

Both RunPod and Vast.ai have Python APIs for programmatic access.

Uninstalling

rm -rf ~/.video-toolkit/propainter

Future Optional Components

The optional components system is designed to support additional ML-based tools:

  • Video upscaling (Real-ESRGAN, etc.)
  • Audio enhancement (noise removal, etc.)
  • Scene detection (automatic scene splitting)

These will follow the same pattern: install on first use, stored in ~/.video-toolkit/.