<p>Newer ffmpeg since version 4.1 includes new <a href="https://ffmpeg.org/ffmpeg-filters.html#tmix" rel="nofollow noreferrer">tmix</a> video filter that mixes N adjacent frames together using weights. </p>

<p>Now it is possible to do exactly what you have suggested: take an animation rendered with a N times higher framerate, merge every N frames together and lower framerate N times down to normal one, dropping out extra frames.</p>

<p>Here's a script I created to test this flow:</p>

<pre><code>#!/bin/bash

let WIDTH=640
let HEIGHT=480

let MID=$WIDTH/2

let BUFFER=16
let FRAMERATE=30

let XRATE=$BUFFER\*$FRAMERATE

let DURATION=8
let FPERIOD=$XRATE\*$DURATION


ffmpeg \
  -filter_complex \
  " \
    color=white:${WIDTH}x${HEIGHT}:d=$DURATION:r=$XRATE,format=rgb24[bg];  \
    color=black:8x${HEIGHT}:d=$DURATION:r=$XRATE,format=rgb24[bar];  \
    [bg][bar]overlay=x='$MID + $MID * sin(8 * PI * n / $FPERIOD)':y=0:format=yuv444,format=yuv420p[motion]; \
    [motion]tmix=frames=$BUFFER \
  " \
  -c:v libx264  \
  -r $FRAMERATE  \
  -an  \
  -hide_banner \
  -y  \
  output.mp4
</code></pre>

<p>It creates an 8-seconds long animation of a black bar running left-right in a sine speed motion. See it <a href="https://youtu.be/dfJilRiDap4" rel="nofollow noreferrer">on YouTube</a>.</p>

<p>Thanks <a href="https://superuser.com/users/114058/gyan">Gyan</a> for <a href="https://superuser.com/a/1352740/127090">the tip</a> on achieving smooth animation by forcing full chroma sampling.</p>

CC BY-SA 4.0
2019-03-18T07:48:41.293Z
Excellent! I found a work-around within Premiere, but it was pretty tedious: split the frames into groups (for example, 0, 1, 2, 3, 4), and overlay them at alpha 20%, 25%, 33%, 50%, and 100%. Yours looks much better if I need to do this again. (And isn't there a badge for a good answer to an old question? )
Steve
CC BY-SA 4.0
2019-03-18T06:38:39.040Z
2019-03-18T10:52:09.647Z
2019-03-18T10:52:09.647Z
Serge
<p>I can't test the ffmpeg method below now but it notionally does what you ask:</p>

<p>Let's say your source is 25 fps.</p>

<pre><code>ffmpeg -i in.mp4 -vf minterpolate=50,tblend=all_mode=average,framestep=2 out.mp4
</code></pre>

CC BY-SA 3.0
2017-04-12T06:36:45.997Z
I'm looking at the manual, and I can see what some of this means: -i for the input file name, -vf to define a filtergraph, and no prefix for the output file name. But I'm not clear which of `minterpolate`, `tblend`, `all_mode`, `average`, and `framestep` are keywords. None of them show up on https://ffmpeg.org/ffmpeg.html . I'll test and tinker, but I need to generate an oversample file for the testing first.
Steve
CC BY-SA 3.0
2017-04-12T06:54:36.823Z
minterpolate, tblend and framestep are [filters](https://ffmpeg.org/ffmpeg-filters.html). The first does the oversampling. The 2nd, the blended frames, and 3rd reduces the stream back to 25 fps.
Gyan
CC BY-SA 3.0
2017-04-12T20:46:39.123Z
That's a big help. That list of filters is not linked in context on https://ffmpeg.org/ffmpeg.html – only in the "see also" section at the end, where I didn't know to look for it.
Steve
CC BY-SA 3.0
2017-04-15T15:36:12.900Z
I tried a test case, and got the error message: "[Parsed_minterpolate_0 @ 0000000001fa9000] Failed to configure input pad on Parsed_minterpolate_0
Error opening filters!" (The long hex number changes each time I run it.) Web searches for "Failed to configure input pad" have been unhelpful so far.
Steve
CC BY-SA 3.0
2017-04-15T15:58:16.803Z
Need to see full console output. The hex numbers is the address of the filter in memory. Ignore that. Add `-report` and run. Share the report.
Gyan
CC BY-SA 3.0
2017-04-15T19:47:26.850Z
The actual clip is 1800 frames at 50 frames per second, or 36 seconds. I want to downsample that 36-to-one, so that it's just 50 frames, one second. But I used the exact command line you gave (except adding `-report`), along with `minterpolate=25` and `100`. This is the log file for `minterpolate=50`:
http://steve98052.powweb.com/debug/ffmpeg-20170415-121855.log
Steve
CC BY-SA 3.0
2017-04-12T05:26:18.013Z
2017-04-12T05:26:18.013Z
Gyan
<p>I am doing an animation, and if I do things the easy way, fast moving objects end up jerking across the screen, rather than appearing to move smoothly – in other words, I have a temporal aliasing problem. One possible solution is to oversample the animation and blend the frames back together at the output frame rate.</p>

<p>To illustrate, at 24 frames per second:</p>

<pre><code>frame
  0    **
  1        **
  2            **
  3                **
 ...                   **
</code></pre>

<p>Oversampled at double speed (though realistically I'd probably oversample quite a bit more than double):</p>

<pre><code>frame
  0    **
 0.6     **
  1        **
 1.5         **
  2            **
 2.5             **
  3                **
 3.5                 **
 ...                   **
</code></pre>

<p>Blended back to 24 frames per second (all mixed with the background):</p>

<pre><code>frame
  0    ****
  1        ****
  2            ****
  3                ****
 ...                   ****
</code></pre>

<p>The problem with oversampling is that if I just use Premiere Elements 14, if I take the oversampled clip and slow it back down to regular speed, it appears to just skip frames rather than blending them.</p>

<p>This seems like something that ffmpeg probably does, but I've barely started trying to understand it, and my reading of the documentation, tutorials, and the forum messages that have turned up with web searches hasn't been enough to figure out what switches would do the job.</p>

<p>So, questions:</p>

<ol>
<li>Is there an option in Premiere Elements 14 to blend frames from an oversampled clip, rather than just skipping frames?</li>
<li>If ffmpeg is the smart way to do this, what kind of switches do I need to use to get the job done?</li>
<li>Is there some other reasonably easy-to-use software that could do the frame blending instead of skipping them? (And if so, how do I use that?)</li>
</ol>

<p>Even if there's a way to do it directly in Premiere Elements, answers to #2 and #3 are likely to be helpful to people who use other editors.</p>

CC BY-SA 4.0
2018-05-16T22:15:50.193Z
I just wanted to ask the same! Important question.
Crouching Kitten
CC BY-SA 4.0
2019-03-17T11:25:33.957Z
Please share how did you eventually solve the problem? I'm considering the [tmix](https://ffmpeg.org/ffmpeg-filters.html#tmix) filter to evenly blend, say, 8 frames at 8x framerate. Then drop 7 out of 8 frames going to original framerate.
Serge
CC BY-SA 4.0
2019-03-29T17:48:21.920Z
@Serge , I did the blur entirely within Premiere. It was pretty tedious,  however. I split the frames into groups (for example, 0, 1, 2, 3, 4), and overlay them at alpha 20%, 25%, 33%, 50%, and 100%, respectively. With some mathematical reasoning, or with experimentation, you can find that to equally blend an *n* frame oversample, the top later should have alpha 1 ÷ *n*, the next 1 ÷ (*n* - 1), . . .,  and the bottom layer 100%.
Steve
CC BY-SA 4.0
2019-03-29T17:59:21.503Z
Although **tmix** may be a good general solution, I struggled with **ffmpeg** enough that I went ahead and did it entirely within Premiere. Maybe I should write up a full explanation of what I did, since this is now a "notable question", and a detailed explanation might be useful across all video editors if I explain it well. Doing it entirely within an editor may be preferable in some cases because it doesn't add a generation of codec artifacts and distortion to the video.
Steve
<ffmpeg><premiere-elements>
Can I add motion blur to make animation less jerky?
Steve
# Can I add motion blur to make animation less jerky?

(Asked by: username_0 on 2017-04-12)

I am doing an animation, and if I do things the easy way, fast moving objects end up jerking across the screen, rather than appearing to move smoothly – in other words, I have a temporal aliasing problem. One possible solution is to oversample the animation and blend the frames back together at the output frame rate.
To illustrate, at 24 frames per second:
frame
  0    **
  1        **
  2            **
  3                **
 ...                   **

Oversampled at double speed (though realistically I'd probably oversample quite a bit more than double):
frame
  0    **
 0.6     **
  1        **
 1.5         **
  2            **
 2.5             **
  3                **
 3.5                 **
 ...                   **

Blended back to 24 frames per second (all mixed with the background):
frame
  0    ****
  1        ****
  2            ****
  3                ****
 ...                   ****

The problem with oversampling is that if I just use Premiere Elements 14, if I take the oversampled clip and slow it back down to regular speed, it appears to just skip frames rather than blending them.
This seems like something that ffmpeg probably does, but I've barely started trying to understand it, and my reading of the documentation, tutorials, and the forum messages that have turned up with web searches hasn't been enough to figure out what switches would do the job.
So, questions:

Is there an option in Premiere Elements 14 to blend frames from an oversampled clip, rather than just skipping frames?
If ffmpeg is the smart way to do this, what kind of switches do I need to use to get the job done?
Is there some other reasonably easy-to-use software that could do the frame blending instead of skipping them? (And if so, how do I use that?)

Even if there's a way to do it directly in Premiere Elements, answers to #2 and #3 are likely to be helpful to people who use other editors.

**Tags:** ffmpeg, premiere-elements

> **Comments:**
> **username_1**: I just wanted to ask the same! Important question.  
> **username_2**: Please share how did you eventually solve the problem? I'm considering the [tmix](https://ffmpeg.org/ffmpeg-filters.html#tmix) filter to evenly blend, say, 8 frames at 8x framerate. Then drop 7 out of 8 frames going to original framerate.  
> **username_0**: @username_2 , I did the blur entirely within Premiere. It was pretty tedious,  however. I split the frames into groups (for example, 0, 1, 2, 3, 4), and overlay them at alpha 20%, 25%, 33%, 50%, and 100%, respectively. With some mathematical reasoning, or with experimentation, you can find that to equally blend an *n* frame oversample, the top later should have alpha 1 ÷ *n*, the next 1 ÷ (*n* - 1), . . .,  and the bottom layer 100%.  
> **username_0**: Although **tmix** may be a good general solution, I struggled with **ffmpeg** enough that I went ahead and did it entirely within Premiere. Maybe I should write up a full explanation of what I did, since this is now a "notable question", and a detailed explanation might be useful across all video editors if I explain it well. Doing it entirely within an editor may be preferable in some cases because it doesn't add a generation of codec artifacts and distortion to the video.  

---

## 2 answers

### Answer by username_2 on 2019-03-18. Score: 2

Newer ffmpeg since version 4.1 includes new tmix video filter that mixes N adjacent frames together using weights. 
Now it is possible to do exactly what you have suggested: take an animation rendered with a N times higher framerate, merge every N frames together and lower framerate N times down to normal one, dropping out extra frames.
Here's a script I created to test this flow:
#!/bin/bash

let WIDTH=640
let HEIGHT=480

let MID=$WIDTH/2

let BUFFER=16
let FRAMERATE=30

let XRATE=$BUFFER\*$FRAMERATE

let DURATION=8
let FPERIOD=$XRATE\*$DURATION


ffmpeg \
  -filter_complex \
  " \
    color=white:${WIDTH}x${HEIGHT}:d=$DURATION:r=$XRATE,format=rgb24[bg];  \
    color=black:8x${HEIGHT}:d=$DURATION:r=$XRATE,format=rgb24[bar];  \
    [bg][bar]overlay=x='$MID + $MID * sin(8 * PI * n / $FPERIOD)':y=0:format=yuv444,format=yuv420p[motion]; \
    [motion]tmix=frames=$BUFFER \
  " \
  -c:v libx264  \
  -r $FRAMERATE  \
  -an  \
  -hide_banner \
  -y  \
  output.mp4

It creates an 8-seconds long animation of a black bar running left-right in a sine speed motion. See it on YouTube.
Thanks username_3 for the tip on achieving smooth animation by forcing full chroma sampling.

> **Comments:**
> **username_0**: Excellent! I found a work-around within Premiere, but it was pretty tedious: split the frames into groups (for example, 0, 1, 2, 3, 4), and overlay them at alpha 20%, 25%, 33%, 50%, and 100%. Yours looks much better if I need to do this again. (And isn't there a badge for a good answer to an old question? )  

---

### Answer by username_3 on 2017-04-12. Score: 2

I can't test the ffmpeg method below now but it notionally does what you ask:
Let's say your source is 25 fps.
ffmpeg -i in.mp4 -vf minterpolate=50,tblend=all_mode=average,framestep=2 out.mp4

> **Comments:**
> **username_0**: I'm looking at the manual, and I can see what some of this means: -i for the input file name, -vf to define a filtergraph, and no prefix for the output file name. But I'm not clear which of `minterpolate`, `tblend`, `all_mode`, `average`, and `framestep` are keywords. None of them show up on https://ffmpeg.org/ffmpeg.html . I'll test and tinker, but I need to generate an oversample file for the testing first.  
> **username_3**: minterpolate, tblend and framestep are [filters](https://ffmpeg.org/ffmpeg-filters.html). The first does the oversampling. The 2nd, the blended frames, and 3rd reduces the stream back to 25 fps.  
> **username_0**: That's a big help. That list of filters is not linked in context on https://ffmpeg.org/ffmpeg.html – only in the "see also" section at the end, where I didn't know to look for it.  
> **username_0**: I tried a test case, and got the error message: "[Parsed_minterpolate_0 @ 0000000001fa9000] Failed to configure input pad on Parsed_minterpolate_0 Error opening filters!" (The long hex number changes each time I run it.) Web searches for "Failed to configure input pad" have been unhelpful so far.  
> **username_3**: Need to see full console output. The hex numbers is the address of the filter in memory. Ignore that. Add `-report` and run. Share the report.  
> **username_0**: The actual clip is 1800 frames at 50 frames per second, or 36 seconds. I want to downsample that 36-to-one, so that it's just 50 frames, one second. But I used the exact command line you gave (except adding `-report`), along with `minterpolate=25` and `100`. This is the log file for `minterpolate=50`: http://steve98052.powweb.com/debug/ffmpeg-20170415-121855.log  

---

