Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd March 2011, 22:04   #1  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
InterFrame 2.8.2 - Framedoubling/60FPS/HFR conversion script

Introduction:

InterFrame uses SVP plugins to create interpolated frames from real ones.
It has been compared with real 60FPS content with good results; it will never be as good as the real thing but it is very good and will continue to get better with your input

Step-by-step guide on how to use InterFrame for beginners

Download:


All dependencies are included in the download


Video samples:

Here is a before and after video comparison:
Original File
InterFrame (default settings with GPU=true)


Code samples:

Here is a sample of what the AviSynth script could look like.
It shows the recommended syntax and should be used with SET's AviSynth 2.6 MT build from here. It requires a build of AviSynth that can do multithreading.

Code:
Cores=4
SetMemoryMax(512)
SetMTMode(3, Cores)
LoadPlugin("svpflow1.dll")
LoadPlugin("svpflow2.dll")
Import("InterFrame2.avsi")
dss2("video.mkv", fps=23.976).ConvertToYV12()
SetMTMode(2)
InterFrame(Cores=Cores)

Description:

You've probably all seen the concept before in new TVs, sometimes called "Smooth Motion", "Higher Hz", "True Motion", "TruMotion", "HFR" or just the number of Hz (like 120Hz, 200Hz, 240Hz, etc.), well this is exactly the same but it works on any TV or computer monitor.
It inserts interpolated frames in between the real ones to make either 50FPS (for PAL sources) or 59.94FPS (for NTSC sources) output.
The best sources to use are 29.97FPS and 25FPS videos since they are neatly divisible to 59.94FPS and 50FPS respectively, but it works well with 23.976FPS too.


Documentation:

The help page is here. The documentation is also included in the download.
It contains a detailed breakdown of all options.


Disclaimer:

Some people are conceptually opposed to things like this for many reasons, including:
- It's not true to the director's vision for the video.
- Film should have lower framerates (even real 60FPS content looks too smooth and "cheap").
- The interpolated frames are "fake".

Hopefully people with those opinions can just choose to not use this plugin instead of starting arguments about it; that is your choice and this is ours.


Changelog: (full version)

21/05/2015 - 2.8.2:
  • Updated SVPflow to 1.1.15, which increased speed (thanks, SVP!)
02/05/2015 - 2.8.1:
  • Updated SVPflow to 1.1.14, which increased speed by up to 15% (thanks, SVP!)
10/03/2015 - 2.8.0.1:
  • Updated SVPflow to 1.1.13, which fixed the unused SVConvert function (thanks, SVP!)

Last edited by SubJunk; 21st May 2015 at 07:13. Reason: Updated to 2.8.2
SubJunk is offline   Reply With Quote
Old 23rd March 2011, 03:31   #2  |  Link
fairchild
Registered User
 
Join Date: Sep 2010
Posts: 321
Thanks for this. This can be used as well to do it in realtime as well so you don't have to re-encode the files? This is a script I found by another user from another forum. It doesn't work that smooth for me though, I get alot of frame drops. Probably my CPU is lacking and showing it's age.

Quote:
SetMTMode(1,16)
V = ffdshow_source()
SetMTMode(2)
G = V.RemoveGrain(mode=3)
H = G.MSuper(pel=2, hpad=8, vpad=8, rfilter=4)
S = V.MSuper(pel=2, hpad=8, vpad=8, rfilter=4)
A = H.MAnalyse(isb=true, blksize=16, plevel=0, search=3, searchparam=3, badrange=(-24), dct=10)
B = H.MAnalyse(isb=false, blksize=16, plevel=0, search=3, searchparam=3, badrange=(-24), dct=10)
C = S.MRecalculate(A, blksize=8, blksizev=8, search=3, searchparam=1)
D = S.MRecalculate(B, blksize=8, blksizev=8, search=3, searchparam=1)
E = S.MRecalculate(C, blksize=4, blksizev=4, search=3, searchparam=1)
F = S.MRecalculate(D, blksize=4, blksizev=4, search=3, searchparam=1)
V.MFlowFps(S, E, F, num=FramerateNumerator(V)*2, den=FramerateDenominator(V)*1, mask=2, ml=10000, blend=false)
GetMTMode(false) > 0 ? distributor() : last
Is this script using InterFrame at all or no?
__________________
MPC-HC/MPC-BE, Lav Filters, MadVR
CPU: AMD Ryzen 5 1600, Video: AMD Radeon RX Vega 56 -> TCL S405 55", Audio: Audio-Technica M50S
fairchild is offline   Reply With Quote
Old 23rd March 2011, 03:47   #3  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Yes, that is a script from Widezu and is quite similar to the Medium (default) preset of InterFrame.
You can use InterFrame for realtime processing, too, except then it would just be like:

Code:
SetMTMode(1,0)
ffdshow_source()
SetMTMode(2)
InterFrame(Preset="Fast")
GetMTMode(false) > 0 ? distributor() : last
Using that Fast preset of InterFrame should be enough to give you smooth playback in realtime, but it will be poor quality.
If you are interested, I can increase the quality of the "Fast" preset so it is still ok for realtime playback but looks better. Let me know

Last edited by SubJunk; 23rd March 2011 at 06:37. Reason: Added a bit more information
SubJunk is offline   Reply With Quote
Old 23rd March 2011, 07:36   #4  |  Link
fairchild
Registered User
 
Join Date: Sep 2010
Posts: 321
Quote:
Originally Posted by SubJunk View Post
Yes, that is a script from Widezu and is quite similar to the Medium (default) preset of InterFrame.
You can use InterFrame for realtime processing, too, except then it would just be like:

Code:
SetMTMode(1,0)
ffdshow_source()
SetMTMode(2)
InterFrame(Preset="Fast")
GetMTMode(false) > 0 ? distributor() : last
Using that Fast preset of InterFrame should be enough to give you smooth playback in realtime, but it will be poor quality.
If you are interested, I can increase the quality of the "Fast" preset so it is still ok for realtime playback but looks better. Let me know
Yes the difference from fast to medium is drastic indeed. Fast allows no dropped frames but during fast moving scenes it really breaks apart and quality goes downhill.

Thanks for providing the script, now I have two ways to play around with. I think it's probably just my cpu, maybe if I had an i7 or even a core2quad. Don't spend any time on my account though working on the script, I just wanted to try it and show it to friends so they can see the effect. (I don't plan to use it 24/7) Maybe if some other users on here plan to use it or you get requests then go for it. Thanks again.

BTW, what are the recommended settings for 3:2 Pulldown and Buffer back/ahead?
__________________
MPC-HC/MPC-BE, Lav Filters, MadVR
CPU: AMD Ryzen 5 1600, Video: AMD Radeon RX Vega 56 -> TCL S405 55", Audio: Audio-Technica M50S

Last edited by fairchild; 23rd March 2011 at 07:41.
fairchild is offline   Reply With Quote
Old 23rd March 2011, 16:27   #5  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
Looks good, except for the first two seconds (the guys jacket)!
__________________

Visit my IRC channel
Soulhunter is offline   Reply With Quote
Old 24th March 2011, 05:24   #6  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
I've just updated to 1.2, the changelog is:

- Renamed Fast preset to Ultra Fast
- Added Very Fast and Fast presets - these are so that users who are using it for realtime playback have more options to suit their computer speed
- 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


Quote:
Originally Posted by fairchild View Post
Don't spend any time on my account though working on the script, I just wanted to try it and show it to friends so they can see the effect. (I don't plan to use it 24/7) Maybe if some other users on here plan to use it or you get requests then go for it. Thanks again.
It's no problem, I want to make this script as useful as it can be
As the changelog above says, I have added some more presets ("Very Fast" and "Fast", while the old version of "Fast" is renamed to "Ultra Fast") that will hopefully let you achieve better quality with realtime playback.

Quote:
Originally Posted by fairchild View Post
BTW, what are the recommended settings for 3:2 Pulldown and Buffer back/ahead?
You can deal with pulldown the same way as usual, just do it before the InterFrame() line and not after

Quote:
Originally Posted by Soulhunter View Post
Looks good, except for the first two seconds (the guys jacket)!
Thanks
Yes, I purposely used a clip that isn't perfect since I didn't want people to expect it to be perfect.
I think that is a good representation of what it will usually look like. Sometimes it is worse and sometimes it is better.
SubJunk is offline   Reply With Quote
Old 24th March 2011, 06:02   #7  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
Thanks for the continued development of this script

BTW, I'm curious what movie is the sample from? It looks interesting...
aegisofrime is offline   Reply With Quote
Old 24th March 2011, 06:30   #8  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Thanks aegis, if there are any features you'd like to see feel free to suggest them

It's from a great film called Mr. Nobody. One of my faves
SubJunk is offline   Reply With Quote
Old 30th March 2011, 04:56   #9  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Version updated to 1.3, the changelog is:
- Added new Tuning value called Smooth, some people may prefer it to default so check out the sample
- Improved detection of scene-changes

I've updated the documentation with more details, too.

Lastly, the sample videos have been updated to reflect the new quality and tunings, check them out

Last edited by SubJunk; 30th March 2011 at 05:12.
SubJunk is offline   Reply With Quote
Old 30th March 2011, 07:24   #10  |  Link
Forfront
Registered User
 
Forfront's Avatar
 
Join Date: Jan 2011
Posts: 19
Hi' Sub,

Does the "VeryFast" preset not work for realtime? I tried it but avisynth asked what is "SuperDeGrained". Thanks

Edit: Never mind didn't space "Very Fast"

Last edited by Forfront; 30th March 2011 at 07:41.
Forfront is offline   Reply With Quote
Old 30th March 2011, 07:52   #11  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Hi Forfront
Glad you got it sorted. I will add descriptive warning messages in the next version to avoid that in the future
SubJunk is offline   Reply With Quote
Old 30th March 2011, 17:43   #12  |  Link
Forfront
Registered User
 
Forfront's Avatar
 
Join Date: Jan 2011
Posts: 19
Ok thanks, probably only happen to me though, typing fast can be +/- sometimes
Forfront is offline   Reply With Quote
Old 1st April 2011, 02:42   #13  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Well in case it happens to more people I have updated to the version to 1.3.1
The changes from 1.3 are:
- Added input validation for Tuning and Preset values with descriptive error messages

I also added a mini-changelog to the first post.
SubJunk is offline   Reply With Quote
Old 10th April 2011, 13:01   #14  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
InterFrame has been updated to 1.4.
This version introduces GPU-acceleration and quality improvements.
The video samples have also been updated
SubJunk is offline   Reply With Quote
Old 10th April 2011, 17:43   #15  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
SubJunk,
please do not forget GPL when distributute plugins
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 10th April 2011, 18:30   #16  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
Wow GPU acceleration! Certainly looks interesting. Great job with the plugin so far, I gave it a whirl just now and it definitely seems like it produces less nasty artifacts than MVTools 2 does. BTW, any chance of a 64-bit version?
aegisofrime is offline   Reply With Quote
Old 10th April 2011, 22:29   #17  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Quote:
Originally Posted by Fizick View Post
SubJunk,
please do not forget GPL when distributute plugins
Good point, sorry for forgetting about that. It is done now.
By the way, do you have any suggestions on how to squeeze more general quality from the script, regardless of how slow it gets?

Quote:
Originally Posted by aegisofrime View Post
Wow GPU acceleration! Certainly looks interesting. Great job with the plugin so far, I gave it a whirl just now and it definitely seems like it produces less nasty artifacts than MVTools 2 does. BTW, any chance of a 64-bit version?
Thanks a lot for the feedback
Yes it produces less artifacts because the new DLLs include a new type of masking, so there are actually 2 masks working now instead of 1. It has hardly any effect on performance, but a big effect on quality

I will check for you on the 64-bit versions, that would be cool I agree.
SubJunk is offline   Reply With Quote
Old 11th April 2011, 00:18   #18  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
One thing you're not doing is using MMask (in SAD mode) to determine areas with a probable poor motion match. In those areas flow will likely create a mess, so use a different interpolate instead. I have used a Gauss-blurred flow as the SAD gets a little high (the blur obscures the most obvious artefacts), and/or a simple frame average where the SAD is very high (which effectively removes the appearance of flow, but is better than the alternatives). QTGMC does a simple version of this with its shutter motion blur, but using a motion mask rather than SAD.

Last edited by -Vit-; 11th April 2011 at 00:21.
-Vit- is offline   Reply With Quote
Old 11th April 2011, 00:39   #19  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Hi -Vit-, thanks for the input! I love QTGMC, I use it all the time.
It does use MMask, it is included in the custom DLLs and is activated by the sadml parameter in the MSmoothFps function. It is similar to Yushko's script in that respect, if you're familiar with his YFRC function.
SubJunk is offline   Reply With Quote
Old 11th April 2011, 01:26   #20  |  Link
metanat
Registered User
 
Join Date: Mar 2011
Posts: 1
Awesome Script

I have watched around 15 movies that have used various versions of this script, including the latest version. The script has continually improved, to the point that now it is a must have for movie watching. After some initial adjusting to the different feel it gives the movie, you might find, as I have, that it makes a massive difference to the watching experience, creating a silky real-life smoothness that you just don't get without it. Watching regular framed movies now makes them feel jittery, and leaves me wishing they were converted with InterFrame.

Looking forward to more improvements SubJunk, keep up the awesome work!
metanat is offline   Reply With Quote
Reply

Tags
48fps, 60fps, framedoubling, interframe, smooth motion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.