# rembg_for_video Uses [ffmpeg-python](https://github.com/kkroening/ffmpeg-python) and [rembg](https://github.com/danielgatis/rembg) to attempt removal of a background from a video file. Based on project [rembg_from_video](https://github.com/seth-tribbey/rembg_from_video) by [seth-tribbey](https://github.com/seth-tribbey) ## Installation: ### For Newer Architecture (GeForce 1600+ Series) ```bash python -m venv .venv pip install -r requirements.txt ``` ### For Pascal Arhitecture (GeForce 1000 Series) ```bash 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 ```
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