Code Monkey home page Code Monkey logo

dain_cli's Introduction

Dain CLI

dain-cli is a pretty basic and straightforward CLI interface for both DAIN and RIFE algorithms.

Programs that allow these algorithms to run can be found here:

(massive thanks to nihui for providing pre-built binaries and fantastic work on cross-platform support)

Prerequisites

Before you run it, you'll need to have FFmpeg installed. On Linux and macOS, it's as easy as running a command, but for Windows, you'll have to install it manually.

Windows

  1. Download ffmpeg-*-win64-lgpl-*.zip from here.
  2. Extract it into a folder somewhere.
  3. Open the start menu and start typing Environment variables.
  4. Open the program, and in the bottom half of the window, double click on Path.
  5. Click on the Add button on the right side of the screen.
  6. Type in the ffmpeg location path.
  7. Click ok and restart your computer.

Usage

If you run the command without arguments, it'll show the usage.

$ dain-cli
dain-cli <input_video> <output_video> <framework> [<target_framerate>]
framework can be either `rife` or `dain`
Rife: Fast framework, but it can only double the framerate
DAIN: Very slow model, but it can set custom framerate
target_framerate: Only respected in DAIN, RIFE only does 2x on current framerate.
If not specified for DAIN, it defaults to 60.0

The command is split into 4 arguments.

input_video

Input video contains a path that's pointing towards the video you want to enhance.

output_video

Output video contains a path that's pointing towards the enhanced video destination.

framework

The framework currently has two different options to choose from:

  • DAIN
  • RIFE

Each of them has its pros and cons:

DAIN

  • is slow
  • increases FPS with better interpolation
  • can have custom FPS set

RIFE

  • much faster than DAIN
  • always only increments FPS by 2

target_framerate

Target framerate is currently only respected in DAIN, as RIFE always only doubles the FPS.

It's optional and, if left out, will default to 60.

Benchmarks

I've run few benchmarks on my system (r7 1800x and 5700XT; Arch Linux) on a 720p 10min video.

FRAMEWORK RATIO
DAIN 75x
RIFE 3.45x

Ratio being render_time/video_length

dain_cli's People

Contributors

mglolenstine avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.