Skip to content

WebUI for hardware accelerated video optimizing, upscaling, interpolating processes

License

Notifications You must be signed in to change notification settings

luewh/VideoScripy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drawing VideoScripy & WebUI

VideoScripy is a collection of video processes including video Upscale and video frame Interpolation, it uses Python to generate FFmpeg, Real-ESRGAN and IFRNet command line script and performes serial processing on scanned mp4 videos with hardware acceleration.

VideoScripyWebUI is a local web user interface developed with Dash, it has the goal of enhancing user experience. demo.gif

⚠ Currently only compatible with Windows users who have Nvidia cards.

Table of contents

Requirements

  • Windows OS
  • NVIDIA GPU
  • Atleast 50 Go disk space free for Upscale process | 10 Go for Interpolate process
  • Python 3.10
  • Tools

Embedded version

Simplest. Python, Tools are already setup.
Advantage : Beginner-friendly

Installation

Download and extract the Embedded release

Usage

Run the RUN.bat

Self setup version

Need to download the source codes, install Python and its dependencies, download tools and include them to tools folder or add them to PATH.
Advantage : Freedom

Installation

  1. Download the source code and extract.

  2. Download and install Python 3.10 if you dont have.

  3. Install dependencies

    pip install -r requirements.txt
  4. Download tools

    FFmpeg full build for hardware acceleration.
    Real-ESRGAN-ncnn-vulkan for video upscaling.
    Ifrnet-ncnn-vulkan for video frame interpolation.

  5. Include tools

    Create a "tools" folder and place tools in like this:

    VideoScripy
    │   ...
    │   VideoScripyWebUI.py 
    └───tools
    │   └───ffmpeg-full_build
    │   │   │   ...
    │   │   └───bin
    │   │       │   ffmpeg.exe
    │   │       │   ffprobe.exe
    │   └───Real-ESRGAN
    │   │   │   ...
    │   │   │   realesrgan-ncnn-vulkan.exe
    │   └───Ifrnet
    │   │   │   ...
    │   │   │   ifrnet-ncnn-vulkan.exe
    

    Or add them in the environment variable PATH

    • <pathTo>\ffmpeg-full_build\bin
    • <pathTo>\Real-ESRGAN
    • <pathTo>\Ifrnet

Usage

Run the VideoScripyWebUI.py

Processes Description

  • optimize
    Reduce the video biteRate in order to gain storage space.

    expand more The processed videos will have a bitRate = width * height * quality, quality=3 is generally the lowest value before appearance of artifacts (bad images, blurry...). In other words, humain wont notice the visual difference between video of quality 3 and 6.
  • resize
    Reduce the video width and height.

  • upscale
    Increase video size by factor of 2,3 or 4 with AI, enhance video quality.

    expand more Begin with a transformation of video to image frames, then upscale each frames, finally reassemble to video. It has the ability to start from last upscal progress if the "_upscaledx?_frame" wasn't deleted.

    From 266x200 to 1064x800
    demo_upscale_s demo_upscale_b

  • interpolate
    Increase video frame rate (FPS), smooth video.

    expand more Begin with a transformation of video to image frames, then interpolate between frames, finally reassemble to video.
  • preview
    Generate a grid of images.
    3x2 grid of 2min countdown video : demo_preview

  • stream
    Merge selected stream of multiple videos into one video.
    And also modify metadata as tile and language.
    Then use media player as PotPlayer to switch between video/audio/subtitle.

Benchmarking

  • x3 Faster FFprobe by running it "asynchronously"

    ffprobe on 64 videos, ~2h long each
    Fast FFprobe

Credits

This project relies on the following software and projects :

Sounds come from :