Skip to content

Using enhancr: Interpolation

mafiosnik edited this page Dec 30, 2022 · 7 revisions

Upon opening your project for the first time, you will be greeted by the elegant workspace provided by enhancr. By default, the program will launch on the interpolation tab as it is the first tab within the GUI. This is followed by the upscaling and restoration tabs.

Input video

To interpolate a video in enhancr, you have the option to drag and drop a file from your file explorer onto the GUI, or click on the designated area next to the text. This will trigger a prompt from your operating system to select a video. Simply navigate to the desired location and open the file:

After selecting a video, enhancr will display a preview thumbnail along with some information about the file directly below the preview. This allows you to confirm that the correct video has been chosen before proceeding.

Output video

The output location is where the processed video will be saved, though it may not be immediately visible while the video is being processed due to enhancr's caching feature. When you click on the area next to the text, your operating system will prompt you to select a save location and name for the output file.

ffmpeg parameters

This line is used to edit the parameters for encoding the video. If you are not familiar with encoding, we recommend using the presets provided in the codecs box to find a suitable option for your needs.

For those who are comfortable with editing the encoding parameters, it is worth noting that they follow the standard FFmpeg syntax. However, it is important to remember that audio is simply copied or "muxed" from the input video, so audio-specific parameters may not be necessary or applicable.

Output video container

This dropdown menu allows to select which container you would like your output video to use. Default should be .mkv as it supports most codecs, however if you need to use another one then feel free to change it.

For those who may be unfamiliar with video containers, here is a brief explanation:

A video container, also known as a wrapper or file format, is a type of file that contains both audio and video data, as well as metadata such as subtitles and other information. The video container acts as a "wrapper" around the video and audio content, similar to how a container would hold and protect items being transported.

Just as there are different types of containers for transporting different types of items (e.g. a cardboard box for fragile items, a suitcase for clothing), there are also different types of video containers for storing and transporting different types of video and audio content. Some common examples of video containers include MP4, MOV, WEBM and MKV. Each container has its own set of features and limitations, and is often associated with specific types of video and audio codecs (compression and decompression algorithms).

In most cases, the MKV container will suffice, as it supports a wide range of codecs and is unlikely to cause errors when it comes to outputs. However, if you need to share a video file online, such as by embedding it in a Discord message, you may need to use a container like MP4 or WEBM. Be sure to use codecs that are compatible with these containers and the platform on which you will be hosting the video.

Engine

This is where Enhancr really shines, offering a range of engines for you to choose from, including CAIN and RIFE. You may notice that each engine has different labels, such as NCNN and TensorRT.

In short, NCNN is compatible with all graphics cards, while TensorRT is only compatible with Nvidia cards. However, TensorRT has the advantage of allowing you to generaate an engine file for your specific graphics card, which significantly speeds up AI processes. However, it does require some initial training time to generate an engine file. It's also worth noting that certain engines using TensorRT may require you to train separate engine files for specific resolutions, as they do not support dynamic shapes. While this process is only required once for each resolution, it is worth considering when deciding which engine to use.

Model

This dropdown allows you to choose the model used by the interpolation AI. However there is no definitive "best" model, so feel free to try them out and see which ones work best for you.

If you do not know what a model is:

A model is a representation of a process or system that has been learned from data. A model is used to make predictions or decisions based on new, unseen data.

To train a model for video frame interpolation, a large dataset of videos with known intermediate frames is used to teach the model how to generate new frames that match the content and motion of the existing ones. The model is then fine-tuned and tested on additional data to ensure that it is able to generate high-quality intermediate frames.

Every model is trained with different data and parameters, hence each model has different strenghts and weaknesses.


E N H A N C E

In addition to a few additional settings that can be accessed from the settings page, you may add a video to the queue by clicking on the designated button. If you wish to add multiple videos to the queue, simply repeat the same steps for each video. Once you are satisfied with the contents of your queue, click the "Enhance video(s)" button to initiate processing.