InterFrame 1.12.3 (Updated 31 Dec 2011)
Introduction:
InterFrame is an AviSynth script.
Its main use is to give videos higher framerates like newer TVs do. Common names are framedoubling, smooth motion and 60FPS conversion.
Examples:
Here is a before and after video comparison:
Original File
InterFrame (default settings)
Description:
Dependencies are included in the download.
To use it in your script just call the function InterFrame(FlowPath="C:\Program Files\AviSynth 2.5\plugins\") (replacing the path with the path to the flow DLL files) and it will automatically choose a good framerate and preset for you.
There are more specifics like optional parameters and examples on this page, which is also included in the download.
There is also a complete guide on how to use it for those with no knowledge about any of this stuff here.
If you have any questions about it please check the guide first, there is a FAQ section and everything
Changelog:
31/12/2011 - 1.12.3:
- Updated libflowgpu to 1.2.6 from 1.2.5 which improves ATI GPU compatibility, thanks to SVP.
- Code reshuffle (no changes)
03/11/2011 - 1.12.2:
- Updated MVTools2 (SVP Build) to 2.5.11.8 from 2.5.11.7 which improves speed by 2-15%, thanks to SVP.
16/09/2011 - 1.12.1:
- Updated MVTools2 (SVP Build) to 2.5.11.7 from 2.5.11.6 which synchronises the build with the official 2.5.11.2 beta release.
- Updated libflowgpu to 1.2.5 from 1.2.0 which improves GPU compatibility, thanks to SVP.
12/09/2011 - 1.12:
- Improved some warping.
- Added new UltraSmooth tuning and changed the Smooth tuning. Smooth now has more error-correction than before, while UltraSmooth is roughly what Smooth was before.
05/07/2011 - 1.11:
- Increased quality of all presets. This change makes fast panning less smooth, but also decreases errors in general.
- Fixed bug with Placebo preset (thanks to Alek93j and Gavino).
18/06/2011 - 1.10:
- Increased quality of all presets. Thanks to DeathTheSheep for collaborating.
- Increased speed of "Ultra Fast" and "Super Fast" presets.
- "Animation" tuning is now much better and recommended for cartoon/anime inputs.
- What used to be the "Animation" tuning is now called "Weak".
23/05/2011 - 1.9:
- Added support for 2 more types of 3D inputs (Half-SBS and Half-Over-Under).
20/05/2011 - 1.8.1:
- Fixed stuttering motion particularly visible in cartoons.
04/05/2011 - 1.8:
- Improved support for 2 types of 3D content - SBS (Side-By-Side) and OU (Over-Under), AKA Top-to-Bottom. This new feature is controlled by the new parameter InputType.
30/04/2011 - 1.7.1:
- Increased the speed by roughly 40%, thanks to SVP
28/04/2011 - 1.7:
- Increased the quality of all presets
20/04/2011 - 1.6:
- Updated libflowgpu from 1.1 to 1.2 which improves the quality of GPU=true mode, thanks to SVP
- Added more presets ("Faster" and "Super Fast") based on some realtime user's suggestions, so now there is a smoother step between presets
13/04/2011 - 1.5.2:
- Set GPU=false by default instead of true, because of slight quality loss with GPU=true
13/04/2011 - 1.5.1:
- Fixed bug with GPU=false mode
11/04/2011 - 1.5:
- Improved the quality of the default, Fast and Placebo presets
- It now checks for the existence of the mandatory value for FlowPath and displays an alert if it isn't defined
- Added the GPU parameter (true for GPU-acceleration, false for CPU-only)
10/04/2011 - 1.4:
- Added custom mvtools2 and GPU-acceleration thanks to SVP
- Improved the quality of all presets
- Updated the sample videos in this post
01/04/2011 - 1.3.1:
- Added input validation for Tuning and Preset values with descriptive error messages
30/03/2011 - 1.3:
- Added new Tuning value called Smooth
- Improved detection of scene-changes
24/03/2011 - 1.2:
- Renamed Fast preset to Ultra Fast
- Added Very Fast and Fast presets
- Increased quality of Placebo and Medium presets
- Added Tuning variable
- Improved detection of scene-changes
- Added the file dependencies to the download since a couple of them were confusing some people
- Added links to the dependency websites in the help file
22/03/2011 - 1.1:
- Renamed Quality preset to Medium (default)
- Renamed Speed preset to Fast
- Increased quality of Medium (default) preset
- Added Placebo preset (little quality gain with big performance hit, not recommended)
- RemoveGrain is now required for Medium (default) preset
- EEDI2 is required for Placebo preset
21/03/2011 - 1.0.2:
- Increased speed of both presets
20/03/2011 - 1.0.1:
- Slightly faster
- Scene-changes no longer fade/blend
17/03/2011 - 1.0:
- Initial release

March 24th, 2011 - 03:19
How can i configure the script for “placebo” preset, and about EEDI2
March 24th, 2011 - 17:09
@Luiz: Hi
Thanks for posting the comment here.
In the 1.2 download I have added the dependencies, so all you need to do is download the new zip file and get EEDI2.dll from there and then include it in your script the same way as RemoveGrainSSE3.dll
Then to use the Placebo preset, or any other preset, you just use syntax like:
InterFrame(Preset=”Placebo”)
Hope that helps
April 4th, 2011 - 03:02
I’m not sure if I get the purpose of InterFrame correctly; are you using it standalone, or as an addition to PS3MS (seeing as you are a PS3MS coder). As this is an AviSynth script, is it possible (when using the AviSynth/MEncover transcoder in PS3MS) to configure PS3 Media Server to transcode into a higher framerate on the fly, or do you re-encode all your videos in advance?
What would the script for PS3MS look like?
Kind regards,
Torsten
April 4th, 2011 - 10:03
@Torsten: It’s separate from PS3MS. I encode videos in advance
PS3MS may support the feature at some stage, but not right now.
April 13th, 2011 - 10:43
@SubJunk
Is it possible to make a quick and dirty Version with Ps3MS. Only with a on/off switch. I ask because i want to know if i saw a difference on my 50″ TV(witch and without “tv optimations”. Yeah i saw a differenz @ my 24″ isp Monitor, but how is it with sound and @Stream?!?.
Yeah i ask you unhuman things, but hey you are a smart coder
.
Thanks…
and MEGA THANKS for PS3MS.
April 13th, 2011 - 17:17
@Master: It is on my to-do list
I don’t know when it will be done though
May 31st, 2011 - 14:22
Thanks for creating such great tool, I always dislike the 25/30fps of my 5D Mark II as the pan motion is not smooth, now there seems to be a good solution. While playing with interframe, I found a problem clip, don’t know if it was my setting problem:
http://www.accura.com.hk/Test-org.mkv
http://www.accura.com.hk/Test-interframe.mkv
While the org plays very smooth on my Panasonic PT-AE4000 frame insertion mode.
May 31st, 2011 - 15:36
@C.H.Ling: You’re welcome, I’m glad you are enjoying it
With regards to the clip, I assume you mean the glitch with the windows on the plane? To fix that, try using Tuning=”Animation”
May 31st, 2011 - 21:13
Yeah! “Animation” works much better, thanks! I had tried “Smooth” but it didn’t work. Require more caution to look at the result to decide if alternate setting needed for future conversions.
July 3rd, 2011 - 08:55
Guys-
Thanks for your work with PS3 Media Server and Interframe as well. I’m having an issue with Interframe and I’m hoping you can help. I was following along with your instructions to configure everything and got to the point where I was about to begin encoding my video. However, after loading the video file in MeGUI, I receive an error that says something about not having the “SetMTMode” set in line 2 of the script. Obviously, since I copied/pasted the script you provided, it’s there.
Here’s the script I’m trying to use:
Setmemorymax(1024)
SetMTMode(2,0)
PluginPath = “C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\”
LoadPlugin(PluginPath+”mvtools2.dll”)
LoadPlugin(PluginPath+”RemoveGrainSSE3.dll”)
Import(PluginPath+”InterFrame.avsi”)
LoadPlugin(“C:\Program Files (x86)\Haali\MatroskaSplitter\avss.dll”)
dss2(“I:\Videos\Paul (HD).mkv”, fps=23.976).AssumeFPS(24000,1001).ConvertToYV12()
#deinterlace
#crop
#denoise
#resize
InterFrame(FlowPath=PluginPath)
I tried to add the total number of processor threads (7) to the SetMTMode line – SetMTMode(2,7) as well as the GPU=true piece at the end – InterFrame(FlowPath=PluginPath, GPU=true) but they didn’t work due to same error. That’s when I decided to try the unchanged scripts you provided.
Any idea why I’m getting this error?
The only change I made to your instructions is that I downloaded the latest version of AVIsynth. Everything else was done as instructed.
Thanks in advance for the help. Keep up the great work!
~ Sko
July 3rd, 2011 - 19:24
@Sko: Hi
Your answer is in your question: You said “The only change I made to your instructions is that I downloaded the latest version of AVIsynth”, so please try it with the version that is included
(which is the latest, by the way)
July 4th, 2011 - 11:54
@SubJunk-
Thanks a bunch for your reply! I will try again – this time – using the version of AVIsynth you provided.
With that said, unless I’m missing something, the version of AVIsynth you’re providing is now an older release. The title of the file in your download package is “AviSynth_090927.exe” and is version 2.6.0.1.
There is now an updated version available through AVIsynth’s Sourceforge website titled “AviSynth_110525.exe” and is version 2.6.0.2. Therefore, the version in your download package is not the latest anymore.
The reason I used the more recent version is because I had downloaded/installed it literally just a couple days ago while trying to work with a few different versions of PS3 Media Server. I didn’t want to uninstall a newer version just to try your scripts.
On a side note, shouldn’t the scripts work regardless of the version being used? Your notes didn’t indicate anything about them not working with other versions. You just said the 2.6 release was more stable and offered faster multithreading than the previous 2.5 releases. My perception is that the scripts should still work with other releases.
Lastly, there’s a part missing from Step 9 of your walkthrough. After I load the video file (by clicking on the “…” button on the script creator screen), I’m presented with a pop-up window asking me to select one of 3 options/buttons – One Click Encoder, File Indexer or DirectShowSource.
This pop-up window is not mentioned in your tutorial so, by trial and error, I ended up selecting the “DirectShowSource” option as it was the only one that would allow the video screen to open (as stated in your tutorial).
Maybe I’m not selecting the right choice on this pop-up screen???
Thanks again for your assistance. Your efforts to help are very much appreciated!
I look forward to hearing from you again soon.
July 4th, 2011 - 13:14
@Sko: The “latest” version you refer to has no multithreading support, so this is the latest build for users who want that.
Without getting into too many details, the version included in this download was made by SET, who wrote his own multithreading patch for AviSynth that improves upon the official code. He has since gone inactive which is why it hasn’t been updated to the latest alpha release, but to my knowledge there was nothing great added in this year’s alpha.
You can see the list of most available builds at the AviSynth Wiki at http://avisynth.org/mediawiki/Main_Page where ST means single-threaded and MT means multi-threaded. The one included in this download is the bottom one, “v.2.6 MT”, with a slight modification to the version information by me because SET forgot to add it.
The scripts do work with most versions of AviSynth if you are willing to give up multithreading.
You’re right about Step 9, that step was added to MeGUI recently and I haven’t got around to updating the guide. Thanks for reminding me
September 12th, 2011 - 18:41
How can i use UltraSmooth tuning???
September 13th, 2011 - 11:19
@Luiz: Tuning=”UltraSmooth”
October 26th, 2011 - 06:36
Hello SubJunk!
At first a big thanks for developing this fine script! It works great! I have converted some of my own movies and it is nice to see them in 50/60FPS without so many artefacts
I would like to make real slow slowmotions too. Have you some tips for me what i can change to optimize it for slowmotions? Or have you planned to add an preset for this?
At the moment i use this in my own script, can´t find any better. And your script i don´t understand, its too complex for me at the moment
prefiltered = DeGrainMedian()
super = MSuper(hpad=16, vpad=16, levels=1)
superfilt = MSuper(prefiltered, hpad=16, vpad=16)
backward_vec = MAnalyse(superfilt, overlap=8, isb = true, search=3,searchparam=4,blksize=16,dct=5)
forward_vec = MAnalyse(superfilt, overlap=8, isb = false, search=3,searchparam=4,blksize=16,dct=5)
forward_re = MRecalculate(super, forward_vec, blksize=8, thSAD=100)
backward_re = MRecalculate(super, backward_vec, blksize=8, thSAD=100)
forward_re2 = MRecalculate(super, forward_re, blksize=4, thSAD=100)
backward_re2 = MRecalculate(super, backward_re, blksize=4, thSAD=100)
MFlowFps(super, backward_re2, forward_re2, num=SlowFPS,den=100, blend=false)
October 26th, 2011 - 12:16
@S3NS3: I think InterFrame will work well for slow motion if you just run:
InterFrame(params)
AssumeFPS(half framerate)
October 26th, 2011 - 23:13
Yes, i tried it this way but the results don´t look good as the short script above!
I have used the smooth preset, slowdown to 100FPS-200FPS, and the frames mostly blend instead of interpolate on my clips.
At the “normal use” to double the framerate your script really works great – and fast too
So i assumed that i should alter some internal parameter to optimize it more for slowmotion where i see much more interpolatet frames instead of real ones?
I will try it again with different presets!
Thanks for input!
November 15th, 2011 - 04:07
I converted a few videos and some of them of them suffer from bad analog to digital conversion (telecine warp) and some frames are doubled. Example: http://www.multiupload.com/92UOICTHMF
Normally it is not so noticeable but after conversion it looks really bad. Would you like to add to Interframe parameter and function to deal with such videos? Here is script to that which would be helpful: http://forum.doom9.org/archive/index.php/t-150460.html.
November 15th, 2011 - 11:12
@dzid: I have considered adding extra things like that to InterFrame but in the end I decided it’s best that people clean the videos before using InterFrame.
By the way, do you use InterFrame for the conversions on your high framerate blog?
November 15th, 2011 - 13:43
The reason I’ve asked about that particular function is that removing telecine warp is strictly related to frame interpolation. Integrating it with interframe won’t cause such many additional calculation as calculating it separately. Now I don’t have even idea how to do it so I stick with your concept.
Yes, I use InterFrame. Right now I am working on gui for Interframe/x264/mkvmerge to automate process of conversion. I am doing this for my friends now. I also would like idea of sharing converted movies to be legal..
November 15th, 2011 - 14:32
@dzid_: Cool blog, I might write a post about it
P.S. I recommend using WEB-DL releases instead of HDTV releases. The web ones are better quality and have no logos in the corner. For example, for Castle S04E08 there is Castle.S04E08.720p.WEB-DL.DD5.1.H.264-NFHD
November 18th, 2011 - 16:07
Of course, you can write about it.
After four nights I’ve made a very beta of InterFrameGUI. It has limited functionality now but it is already more automated than MeGUI. I need probably a few more nights to make it more usable. http://highframerate.wordpress.com/interframegui-download/
December 23rd, 2011 - 00:59
Hi SubJunk,
I really love your filter.
I want to use this filter in the post production workflow of footage from canon dslr.
Yesterday I posted this teaser that explains what we do.
http://vimeo.com/33987353
Now we use interframe to interpolate missing frames. like this:
=======================================
SetMemoryMax(1024)
A = FFVideoSource(“RAW.MOV”)
A = ConvertToRGB(A, matrix=”PC.601″, interlaced=false)
A = Converttoyv12(A) # convert to yv12 needed for Interframe
A = selecteven(A) # select even or odd frames and interpolate them
A = assumefps(A, 25) # Interframe doesn’t work with 12,5 fps
A = InterFrame(A, NewNum=50, NewDen=1, GPU=false, FlowPath=”C:\Program Files\AviSynth 2.5\plugins\”)
A = assumefps(A, 25)
A = trim(A, 1, 0)
A = ConvertToRGB(A)
A = ImageWriter(A, “frames\A%07d.jpg”, type = “jpg”)
B = FFVideoSource(“RAW.MOV”)
B = ConvertToRGB(B, matrix=”PC.601″, interlaced=false)
B = Converttoyv12(B) # convert to yv12 needed for Interframe
B = selectodd(B) # select even or odd frames and interpolate them
B = assumefps(B, 25) # Interframe doesn’t work with 12,5 fps
B = InterFrame(B, NewNum=50, NewDen=1, GPU=false, FlowPath=”C:\Program Files\AviSynth 2.5\plugins\”)
B = assumefps(B, 25)
B = ConvertToRGB(B)
B = ImageWriter(B, “frames\B%07d.jpg”, type = “jpg”)
return Interleave(A,B)
===============================================
So now interframe interpolates the missing frames from separate even and odd streams.
What would be great is that interframe would use the motionfactors from the opposite frame and tries to recreate that frame as good as possible. I think it could improve quality a lot! Especially on locating walking leg positions or stuff like that.
Please tell me your thoughts on this.
Bart van den Boogaard
Redkitemedia
December 23rd, 2011 - 11:19
@Bart, it looks great.
Your suggestion is good and it has been developed, along with other upcoming improvements. It is in the private beta stage right now and will be supported in InterFrame 2.0.
I guess it will be ready in a month – or two considering the busy time of year.
Feel free to link back to this blog anywhere you want, traffic is nice
December 24th, 2011 - 05:00
That is so great, thanks. Can you email me so we can discuss the possibilities?
Bart van den Boogaard
January 7th, 2012 - 06:30
wow thats great! any thoughts to make that private beta a little less private?
either way, thank you very much.
February 15th, 2012 - 01:48
Hello,
I tried Interframe and it is very interesting plugin for AviSynth. Especially I like stereoscopic options you added as well. However, do you have any guidelines what is the type of footage is useful for increasing framerate? My first test was on the following clip (inside zip file is original and increased fps footage):
http://wtrns.fr/kCQT20p51ExdrOw
However, the result is not as good as expected (when checked frame-by-frame). Namely, I would use Interframe for decreasing the speed of the footage. I suppose that moving violin bow is not the best case for Interframe, is it? Or maybe I made some wrong settings
(InterFrame(Preset=”Placebo”, NewNum=48000, NewDen=1001, FlowPath=”C:\Program Files (x86)\AviSynth 2.5\plugins\”)).
I tried it on one very slow pan as well and the result was much better.
February 15th, 2012 - 07:59
@Damir: Yes, panning performs much better than thin, moving things. A lot depends on contrast, like if the moving thing is similar to its background InterFrame will make more mistakes than if it is different to its background.
February 15th, 2012 - 21:40
Just one more question… Is it possible to make a version if Interframe which resuts in the same frame-rate, but which introduces the same time-shift regarding to the original footage? Namely, if we have 25FPS clip long 100 frames, I would like to get 25FPS clip also 100 frames long. However, each resulting frame should be e.g. 5ms “forward” than the corresponding frame in the original clip.
I suppose that this should not be very difficult, since Interframe should alreadyc do that by finding in-between frames at different positions if output frame rate is not exactly 2-times the input frame rate. However, such solution could be highly appreciated in stereoscopic community where one of the clips should be partially shifted in time in order to make synchronous 3D clips. Of course, in this case quality of transformation should be very high. Maybe there are already some avs scripts available??