f0e / blur

Add motion blur to videos
368 stars 23 forks source link
ffmpeg motion-blur video video-processing video-rendering

Blur

Blur is a program made for easily and efficiently adding motion blur to videos through frame blending.

Features

The amount of motion blur is easily configurable, and there are additional options to enable other features such as interpolating the video's fps. This can be used to generate 'fake' motion blur through frame blending the interpolated footage. This motion blur does not blur non-moving parts of the video, like the HUD in gameplay footage.

Sample output

600fps footage, blurred with 0.6 blur amount

60fps footage, interpolated to 600fps, blurred with 0.6 blur amount

As visible from these images, the interpolated 60fps footage produces motion blur that is comparable to actual 600fps footage.

Installation

To install blur for Windows, just download and run the installer. Other operating systems are not currently supported.

For manual installation, see manual installation

Usage

  1. Open the executable and drag a video file onto the console window, or directly drop video files onto the executable file.
  2. A config file will be generated in the video's directory, which can be modified to suit your needs.
  3. The program will process the inputted video according to the configuration file located in the same folder as the video, and will output the blurred version to the same directory with " - blur" appended.

The program can also be used in the command line, use -h or --help for more information.


Config settings explained:

blur

interpolation

rendering

timescale

filters

advanced rendering

advanced blur

advanced interpolation

manual svp override

You can customise the SVP interpolation settings even further by manually defining json parameters. see here for explanations on settings

these options are not visible by default, add them to your config and they will be used.

Recommended settings for gameplay footage:

Most of the default settings are what I find work the best, but some settings can depend on your preferences.

blur amount

For 60fps footage:

intent amount
Maximum blur/smoothness >1
Normal blur 1
Medium blur 0.5
Low blur 0.2-0.3

To preserve your old blur amount when changing framerate use the following formula:

[new blur amount] = [old blur amount] × ([new fps] / [old fps])

So normal blur at 30fps becomes 0.5, etc.

interpolated fps

Results can become worse if this is too high. In general I recommend around 5x the input fps. Also SVP seems to only be able to interpolate up to 10x the input fps, so don't bother trying anything higher than that.

Notes

Limiting smearing

Using blur on 60fps footage results in clean motion blur, but occasionally leaves some smearing artifacts. To remove these artifacts, higher framerate source footage can be used. Recording with software such as OBS at framerates like 120/180fps will result in a greatly reduced amount of artifacting.

Preventing unsmooth output

If your footage contains duplicate frames then occasionally blurred frames will look out of place, making the video seem unsmooth at points. The 'deduplicate' option will automatically fill in duplicated frames with interpolated frames to prevent this from happening.

Frameserver output

Blur supports rendering from frameservers. This means you can avoid having to run blur on your input videos when video editing. When rendering, simply output (make sure your project is high framerate) to the frameserver and then drag the generated AVI into blur. Note that some video editing software might limit the maximum project framerate.


Manual installation

Note: I don't suggest manual installation due to the large amount of dependencies. If possible, stick to using the provided installer.

Requirements

VapourSynth plugins

  1. Download the latest release or build the project.
  2. Install Python
  3. Install FFmpeg and add it to PATH
  4. Install the 64-bit version of VapourSynth
  5. Install the required VapourSynth plugins