1.9 KiB
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
| Optional Arguments: | |
|---|---|
| -o | Output path |
| -h --help | Show help |
| --model | Choose model for rembg |
| --workers | Number of concurrent process workers |
| --smooth | Size of window for temporal smoothing |
| --smooth-workers | Number of CPU threads for temporal smoothing |
| --buffer-size | Set size of processing buffer |
| Positional Arguments: | |
|---|---|
| input | Input Video |