Files
kakisalmi/readme.md
T
2026-06-29 09:51:27 +03:00

1.9 KiB

rembg_for_video

Uses ffmpeg-python and rembg to attempt removal of a background from a video file.

Based on project rembg_from_video by seth-tribbey

Installation:

For Newer Architecture (GeForce 1600+ Series)

python -m venv .venv
pip install -r requirements.txt

For Pascal Arhitecture (GeForce 1000 Series)

python3.12 -m venv .venv
pip install -r requirements(3.12).txt

Script for fixing the cudnn path on Linux:
export LD_LIBRARY_PATH=/path/to/kakisalmi/.venv/lib/python3.12/site-packages/nvidia/cudnn/lib:$LD_LIBRARY_PATH

 

Usage:

python .\rembg_video.py [-h] [--help] [-o] [--model] [--workers] [--smooth] [--smooth-workers] [--buffer-size] input
<style> table { border-collapse: separate; border-spacing: 0; border-radius: 5px; overflow: hidden; } th, td { border: 1px solid #a0a0a0; padding: 8px 10px; border-radius: 8px; text-align: center; } td:first-child, th:first-child { text-align: center; } td:nth-child(2), th:nth-child(2) { text-align: left; } </style>
Optional Arguments:
-oOutput path
-h --helpShow help
--modelChoose model for rembg
--workersNumber of concurrent process workers
--smoothSize of window for temporal smoothing
--smooth-workersNumber of CPU threads for temporal smoothing
--buffer-sizeSet size of processing buffer
Positional Arguments:
inputInput Video