3fde5f919c6529b80c9a8fe42fe65424e970b893
Upscale
Automatically upscale and interpolate video files.
Table of Contents
Usage
- Preparing video file (MKVToolNix)
- Make sure video file does NOT have an image attachment
- Video file should have ONE
ass
subtitle file - Name video file similar to the following:
Your Title - 01.mkv
- Place
.mkv
file inside0-Source
folder - Execute
python Start.py
Configuration
The Start.py
file has two options INSIDE, edit in text editor:
INTERPOLATE_4K
:True
orFalse
(wether or not 4k48fps should be outputted)MAX_INPUT_WIDTH
:'720'
(downscales the video to this width, as 1080p upscaling would be insane)
Stats
Real-ESRGAN
Input | Output | VRAM | RAM | GPU | FPS | OS |
---|---|---|---|---|---|---|
1280x720 | 2120x2880 | ~4.4GB | ~1,8GB | 3090 (@360W) | ~13.56fps | Windows |
RIFE
Input | Output | VRAM | RAM | GPU | FPS | OS |
---|---|---|---|---|---|---|
1080p@23.976 | 1080p@47.952 | ~6.6GB | ~4.0GB | 3090 (@360W) | ~60fps | Windows |
2160p@23.976 | 2160p@47.952 | ~19.4GB | ~8.0GB | 3090 (@360W) | ~18fps | Windows |
SVT-AV1
Settings: CRF 26, Preset 6. See encodeCDN.py.
Input | RAM | FPS | CPU | OS |
---|---|---|---|---|
1920x1080 | ~3.9GB | ~76fps | Ryzen 7900x (@130W) | Windows |
3840x2160 | ~12.3GB | ~35fps | Ryzen 7900x (@130W) | Windows |
Requirements
- OS: Windows or Linux
- Python: >=3.12 (Windows) or Python 3.13 (Linux)
- RAM: Min: 16GB - Recommended: 32GB
Requirements for 1080p, 1080p@48, 4k
- GPU: NVIDIA GPU with 8GB+ of VRAM
Requirements for 4k48fps
- GPU: NVIDIA GPU with 24GB of VRAM
- RAM (Linux): 48GB (there is a memory leak in VapourSynth)
Installation
Windows
- Download and install Python 3.12 - Check option to add to path
- Download and install Imagemagick - Check option to install legacy tools (Required for creating player previews
thumbs.vtt
andsprite.jpg
) - Download and install MKVToolNix - Add to system path environment manually
- Download ffmpeg - Either place it inside the MKVToolNix install directory or create a new directory somewhere and add it to system path environment
- Download and install VapourSynth R72 - Check options to install vsrepo, avisynth support not required
- Install
vsrepo
packages, in Terminal (cmd, NOT Powershell!)::: FFmpeg Source Plugin vsrepo.py install ffms2 :: (optional) Miscfilters Plugin, used for scenedetection in vsrife :: Unsure if it even works vsrepo.py install misc
- Install
pip
packagespip install packaging setuptools wheel pip install pymediainfo python-dateutil pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126 pip install vsrealesrgan vsrife
- Install models used by
vsrealesrgan
andvsrife
python -m vsrealesrgan python -m vsrife
Arch Linux
Sadly there is some sort of memory leak in vsrife or vapoursynth under Linux.
If you have 32GB of RAM it should suffice for everything EXCEPT 4k48p, there you probably need 48GB or 64GB of RAM.
# System Packages
sudo pacman -S python vapoursynth ffms2 ffmpeg mkvtoolnix-cli mediainfo imagemagick
# Setup virtual environment (in upscale dirctory)
python -m venv .venv
source .venv/bin/activate
# Install pip dependencies
pip install typing-extensions packaging setuptools wheel
pip install pymediainfo python-dateutil
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
pip install vsrealesrgan vsrife
# Install models
python -m vsrealesrgan
python -m vsrife
Description
Languages
Python
99.9%