Skip to content

About

Collection of video process module such as compression, upscale, interpolation and stream manipulation.

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Repository files navigation

drawing VideoScripy

English | 中文简体

Quality preserved, Storage saved.

Collection of video processing module such as compression, upscale, interpolation and stream manipulation.

demo.gif

Table of contents

Processing module

  • compress
    Reduce the video bitRate in order to gain storage space.

    Each video will have an attribute quality which is defined by this formular :

    $ bitRate = width * height * quality $

    For quality = 3,
    we have 6 000 Kbits/s bitRate for a 1080p (1920x1080) video,
    we have 24 000 Kbits/s bitRate for a 4K (3840x2160) video,

    I call 3 the standard quality as it ensures losseless visual quality for humain eyes for most of videos.

    For some anime video, quality = 1.5 is enough.

    demo_upscale_s

  • resize
    Reduce the video width and height.

    demo_upscale_s

  • gif Convert a video to an animated GIF. By default, the original dimensions and 10 FPS are used. Set either dimension to -1 to preserve the aspect ratio.

    GIF stores every frame without inter-frame compression, so a long, high resolution video produces a huge file. Four parameters control the size: output width x height, FPS, palette max colors (0-256, free entry) and dither. A GIF palette holds at most 256 colors, and fewer than 16 makes most videos look broken, so the STANDAR COLORS dropdown next to the input fills it with the standard palette sizes 16, 32, 64, 128 and 256. 0 or an empty input falls back to the full 256 color palette.

    The compression and speed scores below are shown next to the dither dropdown in the UI. compression rewards smaller files and speed rewards faster conversion, both out of 10. They were measured with this tool's own GIF pipeline on a 1080x1920 source rendered at 480px wide, 8 FPS with 128 colors, and confirmed on a synthetic 480x480 clip.

    dither compression speed note
    sierra2_4a 8 4 FFmpeg default, smooth gradients
    bayer 7 9 ordered pattern, fastest, largest files
    none 10 10 no dithering, smallest files, harsh bands
    floyd_steinberg 8 4 classic diffusion, fine grain
    sierra2 9 5 balanced diffusion, lighter than sierra2_4a
    sierra3 10 5 widest diffusion, best gradients, noisiest
    burkes 9 5 reduced Floyd-Steinberg, softer grain
    atkinson 10 6 light diffusion, crisp sparse detail
    heckbert 8 4 simple diffusion, moderate quality

    Measured on a 1080x1920, 2 minute source:

    width x height FPS max colors dither size
    1080x1920 (original) 10 256 sierra2_4a ~800 MB
    540x960 8 128 bayer ~170 MB
    360x640 8 64 none ~45 MB
  • upscale
    Increase video size by factor of 2,3 or 4 with AI, enhance video quality.
    It has the ability to start from last upscal progress if the "_upscaledx?_frame" folder isn't deleted.

    expand more Begin with a transformation of video to image frames, then upscale each frames, finally reassemble to video.

    Original : 266x200

    demo_upscale_s

    Upscal x2 : 532x400

    demo_upscale_b

    Upscal x3 : 798x600

    demo_upscale_b

    Upscal x4 1064x800

    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.

    interpolate 25fps -> 60fps

    demo_upscale_s demo_upscale_s

    (The 60fps gif may be slowed down due to markdown, use a proper viewer may solve the problem)

  • preview
    Generate a grid of images.

    3x2 grid of 2min countdown video

    demo_preview

  • frame
    Graph each frame's size of a video

    266x200 10s long 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.

    demo_upscale_s

Requirements

  • Windows OS
  • NVIDIA GPU for faster video process
  • Atleast 50 Go disk space free for Upscale process | 10 Go for Interpolate process
  • Python 3.13 (source setup only)
  • Tools

Embedded version

The portable release includes the Python runtime, Python packages, and tools. Python does not need to be installed on the target PC. Advantage : Beginner-friendly

Installation

Download the portable folder from the latest release, then run its launcher.

Usage

Run Run VideoScripyWebUI.bat. It starts the included Python runtime and opens the WebUI. No app-specific executable is required. NVIDIA GPU features require a compatible driver.

Self setup version

Download the source code, install Python and its dependencies, and place the tools in the project tools folder. The application adds those local tool folders to its own PATH when it starts; no system PATH changes are needed. Advantage : Freedom

Installation

  1. Download the source code and extract.

  2. Download and install Python 3.13 if you don't have it.

  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.
    NVEncC for GPU feature detection.

  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
    │   └───NVEncC
    │   │   │   NVEncC64.exe
    |...
    

Usage

Run python VideoScripyWebUI.py to open the Dash web UI. Running python VideoScripy.py directly initializes and scans the current folder for manual debugging; uncomment an operation call in its __main__ block to run one.

Credits

This project relies on the following software and projects :

Sounds come from :

About

Collection of video process module such as compression, upscale, interpolation and stream manipulation.

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages