21

Is there a way to interpolate frames with ffmpeg? and not just copy them. I tried slowmovideo and boy it is slow. I used Twixtor in vegas and hated it. I gave megui and could not get it properly set up.

So is there a way to interpolate with ffmpeg??

bad_coder
  • 643
  • 1
  • 7
  • 16
Levan
  • 1,119
  • 5
  • 13
  • 16
  • 1
    The [framerate filter](http://ffmpeg.org/ffmpeg-filters.html#framerate) does some simple interpolation, but probably not what you're looking for. – llogan Nov 25 '15 at 18:46
  • Yes a bit more advanced feature would be nice – Levan Nov 25 '15 at 21:33
  • 3
    FFmpeg recently got its own [minterpolate](https://ffmpeg.org/ffmpeg-filters.html#minterpolate) filter. – Gyan Sep 19 '16 at 14:47

3 Answers3

30

Yes, there is a way. Since November 2016, the libavfilter library has a video filter called minterpolate, which performs motion interpolation.

Example usage:

ffmpeg -i input.lowfps.hevc -filter "minterpolate='fps=120'" output.120fps.hevc

Peter Bašista
  • 449
  • 5
  • 7
  • 2
    Just like any other ffmpeg video filter, e.g. `ffmpeg -i input.hevc -filter "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1'" output.hevc`. The filter's documentation contains the description of the available parameters and their values. – Peter Bašista Mar 05 '17 at 19:58
  • 9
    This command didn't work for me until I specified `-filter:v` instead of just `-filter` – colton7909 Mar 10 '19 at 17:05
  • 3
    Yes, that is true. If there are some non-video streams in the input file, the `minterpolate` filter needs to be restricted to a single video stream by using the `:v` stream specifier. If the input file contains multiple video streams, it is necessary to restrict the filter to a single video stream by using a stream specifier similar to `:v:0`. – Peter Bašista Mar 12 '19 at 11:30
7

Have a look at this AI project with impressive results: http://jianghz.me/projects/superslomo/

It has a Python implementation which can accelerate using CUDA. https://github.com/avinashpaliwal/Super-SloMo

There's also an easy tutorial for that Python impl, with honest examples. https://www.youtube.com/watch?v=mXwXtIiOjRA

Ondra Žižka
  • 740
  • 3
  • 10
  • 24
3

You can use Butterflow as it uses ffmpeg https://github.com/dthpham/butterflow

It's a command-line tool that can:

Increase a video's frame rate by rendering new frames based on motion (pixel-warping + blending). Make smooth motion videos (simple blending between frames). Leverage new frames/increase in frame rates to make fluid slow motion videos.

  • 1
    Please read [How do I recommend software](https://meta.superuser.com/questions/5329/how-do-i-recommend-software-in-my-answers/5330#5330) for some tips as to how you should go about recommending software. You should provide at least a link, some additional information about the software itself, and how it can be used to solve the problem in the question. – DavidPostill Sep 19 '16 at 15:12