VideoScripy

Collection of video processes such as Optimize, Upscale and Interpolation.


Keywords
ffmpeg, upscale, interpolate, video, process, dash-plotly, python, video-interpolation, video-processing, video-upscaling, webui
License
MIT
Install
pip install VideoScripy==0.0.1

Documentation

drawing VideoScript & WebUI

VideoScript 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/mkv videos.

VideoScriptWebUI 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

Embedded version

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

Installation

  1. Download and extract the Embedded release

Usage

  • Run the RUN.bat to launch WebUI

Self setup version

Need to install Python dependencies, add tools to PATH manually.
Advantage : Freedom

Installation

  1. Download and extract the SelfSetup release

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

  3. Install dependencies

    pip install -r requirements.txt
  4. Add tools to PATH

    Below tools are included in self setup release :

    FFmpeg full build for hardware acceleration.

    Real-ESRGAN-ncnn-vulkan for video upscaling.

    Ifrnet-ncnn-vulkan for video frame interpolation.

    Important

    Make sure to add

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

    in the environment variable PATH

Usage

  • VideoScript.py

    Run the script on where videos are located and follow the command line indication

  • VideoScriptWebUI.py

    Run the script, a web page should be opened automatically, select a process, select a path where videos are located, SCAN then RUN. The processed videos are under a folder of selected path example ./upscaled.

Processes Description

  • optimize

    Reduce the video biteRate in order to gain storage space.
    The processed videos will have a bitRate = width * height * quality, which 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

    Recover old video from 360p to 4K, enhance video quality.
    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 "_upscaled_frame" wasn't deleted.

  • interpolate

    Increase video frame rate (FPS), smooth video motions.
    Begin with a transformation of video to image frames, then interpolate between frames, finally reassemble to video.

  • merge

    Merge all video, including each of its audio and subtitle by option, into mkv. Then use media player as PotPlayer to switch between video/audio/subtitle.

Credits

This project relies on the following software and projects.

TODO list

  • ✅ stdout to Dash
  • ✅ alive-progress ANSI Escape Code "?25l" render problem
  • ✅ License
  • ✅ Favicon
  • ✅ Embed release
  • ✅ Stop upscale and interpolate process
  • ✅ Get video walk optimize
  • ✅ Arrange process select UI
  • ✅ Better row height
  • ✅ Select / Unselect all videos
  • ✅ Sort video by properties
  • Better hevc_nvenc parameters
  • Gif to explain processes, tooltip on process dropdown
  • Log ?