View Full Version : InterFrame 2.8.2 - Framedoubling/60FPS/HFR conversion script


SubJunk
22nd March 2011, 22:04
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 (http://www.spirton.com/convert-videos-to-60fps/)

Download:
http://www.redskiesguild.com/urbanterror/uploads/urtplus-download.png (http://www.spirton.com/uploads/InterFrame/InterFrame-2.8.2.zip)

All dependencies are included in the download


Video samples:

Here is a before and after video comparison:
Original File (http://www.spirton.com/uploads/InterFrame/20130218-Sample-Original.mkv)
InterFrame (default settings with GPU=true) (http://www.spirton.com/uploads/InterFrame/20130218-Sample-InterFrame.mkv)


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 (http://forum.doom9.org/showthread.php?t=148782). It requires a build of AviSynth that can do multithreading.

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 (http://www.spirton.com/uploads/InterFrame/InterFrame2.html). 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 (http://www.spirton.com/interframe/#Changelog))

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

fairchild
23rd March 2011, 03:31
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.

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?

SubJunk
23rd March 2011, 03:47
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:

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 :)

fairchild
23rd March 2011, 07:36
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:

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?

Soulhunter
23rd March 2011, 16:27
Looks good, except for the first two seconds (the guys jacket)!

SubJunk
24th March 2011, 05:24
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


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.

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 :)

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.

aegisofrime
24th March 2011, 06:02
Thanks for the continued development of this script :)

BTW, I'm curious what movie is the sample from? It looks interesting...

SubJunk
24th March 2011, 06:30
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 (https://secure.wikimedia.org/wikipedia/en/wiki/Mr._Nobody_%28film%29). One of my faves :)

SubJunk
30th March 2011, 04:56
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 :)

Forfront
30th March 2011, 07:24
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":rolleyes:

SubJunk
30th March 2011, 07:52
Hi Forfront :)
Glad you got it sorted. I will add descriptive warning messages in the next version to avoid that in the future :)

Forfront
30th March 2011, 17:43
Ok thanks, probably only happen to me though, typing fast can be +/- sometimes :D

SubJunk
1st April 2011, 02:42
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
10th April 2011, 13:01
InterFrame has been updated to 1.4.
This version introduces GPU-acceleration and quality improvements.
The video samples have also been updated :)

Fizick
10th April 2011, 17:43
SubJunk,
please do not forget GPL when distributute plugins

aegisofrime
10th April 2011, 18:30
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:

SubJunk
10th April 2011, 22:29
SubJunk,
please do not forget GPL when distributute pluginsGood 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?

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: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.

-Vit-
11th April 2011, 00:18
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.

SubJunk
11th April 2011, 00:39
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.

metanat
11th April 2011, 01:26
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!

fairchild
11th April 2011, 04:17
Hey SubJunk, tried today to use the newer InterFrame to do some realtime frame doubling today using ffdshow, and it's spitting out an error at me. Not sure how to fix it. All I did was copy the plugins you added in the dependencies into my AviSynth/plugins directory. Using the following script:

SetMTmode(2,2)
ffdshow_source()
SetMTMode(2)
InterFrame(Preset="Fast")
GetMTMode(false) > 0 ? distributor() : last

Error given is:

MSmoothFPS: unable to load library given in svp_flow_lib (InterFrame.avsi, line 87)

Edit: I google'd the error and supposedly it has to do with the new GPU acceleration that you added. It means your card is not supported .
SVP GPU acceleration requires OpenCL 1.1

The thing is my card is an HD 5800 series card and does have OpenCL, not sure if it has 1.1 though. Using the 11.4 preview drivers also, maybe that has something to do with it.

SubJunk
11th April 2011, 04:19
Hi fairchild, sorry about that. I was made aware of the error earlier and I'm updating it to fix that now. Should be released within a few hours :)
It isn't a bug, but I forgot to add a check that FlowPath was specified, which it needs to be :)

-Vit-
11th April 2011, 04:50
I had a quick look at the SVP MVTools mod but didn't notice it used a SAD mask. Interesting. It's a shame that it only provides GPU acceleration for flow (MSmoothFps ). Would have thought that MAnalyse was the function to accelerate, but that would be much more difficult to do...

Didée
11th April 2011, 07:23
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.
How should that work for Flow Interpolation? Trying to do this manually at the script level, there is a problem...
A vector is a path from point A to point B. MMask shows the block metric at the end point of the vector. It would be needed to have the mask located at a point somewhere inbetween, at a fraction of the vector's length. This is not available. And manual compensation of the mask is not possible either, because the mask is located at the end point of the vector, and you can only compensate in the vector direction start->end.

SubJunk
11th April 2011, 07:57
InterFrame 1.5 is released!
The changes are:
- 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)

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!Wow, that's such an encouraging post. Thanks a lot and I'm glad you are enjoying it!

I had a quick look at the SVP MVTools mod but didn't notice it used a SAD mask. Interesting. It's a shame that it only provides GPU acceleration for flow (MSmoothFps ). Would have thought that MAnalyse was the function to accelerate, but that would be much more difficult to do...Yeah the sadml parameter is really useful, it fills a gap that was always there.
In InterFrame it's used lightly, because the blur effect looks strange when it's too strong (with each frame changing from sharp to blurry it's a weird strobing-blur effect).
It is an especially useful parameter for when the background is passing by quickly while something small is relatively unmoving on the screen. Without sadml the unmoving thing bounces around like crazy, but with even a light sadml like 150 it stabilises significantly.

How should that work for Flow Interpolation? Trying to do this manually at the script level, there is a problem...
A vector is a path from point A to point B. MMask shows the block metric at the end point of the vector. It would be needed to have the mask located at a point somewhere inbetween, at a fraction of the vector's length. This is not available. And manual compensation of the mask is not possible either, because the mask is located at the end point of the vector, and you can only compensate in the vector direction start->end.It's similar to the masking technique used in YFRC, but it is done at the plugin level, not the script level.
If you would like to see how it's done, you can download the sources here (http://www.svp-team.com/files/gpl/mvtools2-2.5.11-svp.zip) :)

The thing is my card is an HD 5800 series card and does have OpenCL, not sure if it has 1.1 though. Using the 11.4 preview drivers also, maybe that has something to do with it.I have added the new parameter "GPU" for you and other users with incompatible video cards.
So just use something like:
InterFrame(GPU=false, FlowPath="C:\Program Files (x86)\AviSynth 2.5\plugins\")
Please let me know if it works for you :)

fairchild
11th April 2011, 08:45
I have added the new parameter "GPU" for you and other users with incompatible video cards.
So just use something like:
InterFrame(GPU=false, FlowPath="C:\Program Files (x86)\AviSynth 2.5\plugins\")
Please let me know if it works for you :)

It's working well now, thanks for the speedy fix. :thanks:

Using the following script with 10,10 buffer and ignore pulldown:

SetMTmode(2,2)
ffdshow_source()
SetMTMode(2)
InterFrame(Preset="Fast", GPU=true, FlowPath="C:\Program Files (x86)\AviSynth 2.5\plugins\")
GetMTMode(false) > 0 ? distributor() : last

SubJunk
11th April 2011, 09:38
It's working well now, thanks for the speedy fix. :thanks:Great, glad it's working for you :)

ncatt
11th April 2011, 10:36
Hi SubJunk! Thanks for this great script! The gpu option is working very fast in my machine. With gpu=true the encode was nearly 40% faster. My gpu is a gtx580. :thanks:

Didée
11th April 2011, 10:42
It's similar to the masking technique used in YFRC, but it is done at the plugin level, not the script level.
If you would like to see how it's done, you can download the sources here

The point is not how things are done at the plugin level. My point is that at the script level it's hardly possible to make any meaningful use of MMask in combination with "Flow"-style filters.

If all accessibility would stop "at the plugin level", then things like e.g. Q/TGMC would not exist at all. :p

aegisofrime
11th April 2011, 10:51
Hi, just want to point out a slight error in the documentation:

FlowPath:

Sets the location of the libflow DLL files.
The full path of libflowgpu.dll and libflowgpu.dll, for example "C:\Program Files\AviSynth 2.5\plugins\".
Note: This is the only mandatory value; the script will not work without this.

default - Undefined (string)

One of those should be libflowsse.dll right? Pretty obvious, but in the interest of perfection just wanted to point it out :p

-Vit-
11th April 2011, 11:01
And manual compensation of the mask is not possible either, because the mask is located at the end point of the vector, and you can only compensate in the vector direction start->end.
We have forward and backward vectors...
Sure, not perfect (e.g. occlusion), but better than doing nothing in practice. YFRC's solution is not unreasonable: overlay the forward and reverse mask.

Didée
11th April 2011, 11:59
Sure, But those vectors are not correlated. Don't you see? Forward and backward vectors are computed completely independent from each other. And therefore it is absolutely possible that forward and backward vectors are finding different matches! (It's not only "possibly", it is even somewhat *likely*.)

See - you have to objects in two consecutive frames. Let's assume MVTools (should) try to match these two objects:

http://img703.imageshack.us/img703/7262/pic01j.png (http://img703.imageshack.us/i/pic01j.png/)

MAnalyse finds a match during backward search:

http://img585.imageshack.us/img585/8039/pic02.png (http://img585.imageshack.us/i/pic02.png/)

but a different match (or no match at all) during the forward search:

http://img545.imageshack.us/img545/2742/pic04.png (http://img545.imageshack.us/i/pic04.png/)

Take the backward search, and for simplicity lets talk about the block SAD:
The backward match causes a certain SAD:

http://img858.imageshack.us/img858/3299/pic03.png (http://img858.imageshack.us/i/pic03.png/)

Now, the task is to "Flow" the future object backwards by a fraction of the backward-vector's length:

http://img33.imageshack.us/img33/2659/pic05a.png (http://img33.imageshack.us/i/pic05a.png/)

Obviously, the mask you (would) get from MMask is not correlated with the Flow-compensation.

Now, the obvious idea is to compensate the mask. But this does not work.
Again: the forward vector is not correlated to the backward vector, and very well might have a completely different direction.

http://img69.imageshack.us/img69/6623/pic06.png (http://img69.imageshack.us/i/pic06.png/)


Problem? Ah! Problem!

One would need to be able to use a given vector in inverse direction. But there is no means to do that.


"Within" the plugin, it's a different story. There, it is sufficient to know -- while doing the flow-compensation -- that the currently-used vector has a certain metric "attached". This suffices to produce a result with an according weighting. That's okay.

But from the script level, it is not possible to align a fractionally flow-compensated object with the MMask that is created at the vector's end position.

SubJunk
11th April 2011, 12:37
Hi SubJunk! Thanks for this great script! The gpu option is working very fast in my machine. With gpu=true the encode was nearly 40% faster. My gpu is a gtx580. :thanks:That's a great result, thanks for the feedback! :)

The point is not how things are done at the plugin level. My point is that at the script level it's hardly possible to make any meaningful use of MMask in combination with "Flow"-style filters.That (and your next post) is all irrelevant to this script, however correct, though I do appreciate the effort you went to with the images ;) :D

Hi, just want to point out a slight error in the documentation:

FlowPath:

Sets the location of the libflow DLL files.
The full path of libflowgpu.dll and libflowgpu.dll, for example "C:\Program Files\AviSynth 2.5\plugins\".
Note: This is the only mandatory value; the script will not work without this.

default - Undefined (string)

One of those should be libflowsse.dll right? Pretty obvious, but in the interest of perfection just wanted to point it out :pYou're right, nice catch :) It's fixed in the online document and will be fixed in the next version download :D

-Vit-
11th April 2011, 19:49
Didée: I know. Regardless, problem areas are often found correctly. The "incorrect" case is not virulent. Fixing flow weirdness is valuable and "downgrading" an area mistakenly is relatively harmless in this use case. But I also enjoyed your pictures ;)

Subjunk: now you use SVP's GPU flow, how would you say your script compares with SVP?

Didée
11th April 2011, 20:24
Glad if I managed to entertain you with handdrawn art.:D - See, I had only a few minutes during lunchbreak.


-Vit-: That's almost as good as "there is no energy crisis. My current comes right out of the wall socket!"


Within the limits of what MVTools' filters are doing, the metric usage is sufficient.

But there are cases where the plugin is producing bad junk. (Funny deformations, or exzessive blending). MVTools can not produce anything senseful for certain areas.

Now, IF you had an idea how to produce some senseful interpolation nonetheless, then you cannot use it, because you can NOT locate the problem area from the script level.

Don't mistake that with the motion blurring you have in QTGMC. That one is not nearly as critical. You start with discrete target locations, and the area affected by motion blurring naturally will be located rather close to those discrete target areas. This is a luxury you don't have when doing a "free" interpolation. In particular when there is some "large" movement (would be a "long" vector) that MAnalyse completely misses, then you can do nothing. You just can't locate the affected areas.


Sorry if I disturbed the highly interesting discussion about wrapping MVTools documented examples in a function. Perhaps this isn't the place anymore to look for fresh ideas and ingeniosity.

Didée
11th April 2011, 20:41
More @topic, I tried to read a little source code, and got reminded why I don't like to read source code.

MSmoothFps.cpp: switch(algo)
{
case AlgoFast_1dir:
case AlgoFast_2dir:
case AlgoNoMask1:
case AlgoNoMask2:
case AlgoNoMask3:
case AlgoSimple:
case AlgoNormal:
case AlgoExtended: break;

default:
if(algo<90 || algo>100)
env->ThrowError("MSmoothFps: incorrect 'algo' value.");
}

InterFrame.avsi: MSmoothFps(Input, SuperRegular, backward, forward, finest=SuperRegular, num=NewNum, den=NewDen, algo=23, ml=0, sadml=150, sadgamma=2, block=false, blend=true)

Having cancelled the "true" programming back when original C just had started, am I interpreting this wrong?. The sourcecode seems to suggest that the script's default value is incorrect?

Gavino
11th April 2011, 21:17
The sourcecode seems to suggest that the script's default value is incorrect?
algo=23 corresponds to AlgoExtended, so is accepted by the first part of the switch statement.

libflow.h:
enum FlowLib_Algo
{
AlgoUnknown=0,

AlgoFast_1dir =1,//MFlow "1-dir"
AlgoFast_2dir =2,//MFlow "2-dir"

AlgoNoMask1 =11,//MBlockFps, mode=0
AlgoNoMask2 =12,//MBlockFps, mode=1
AlgoNoMask3 =13,//MBlockFps, mode=2

AlgoSimple =21, //like FlowInterSimple from MaskFun.cpp OR MBlockFps, mode=3
AlgoNormal =22, //FlowInter
AlgoExtended=23, //FlowInterExtra

AlgoMask =127,
AlgoProcessBlocks =128
};

SubJunk
11th April 2011, 22:20
now you use SVP's GPU flow, how would you say your script compares with SVP?Well SVP has many options and is great for realtime. I really recommend it for users who don't want to touch scripts, who would rather an easier experience.

It has always been my goal with InterFrame to find the highest quality settings without compromising for speed, and in my opinion InterFrame offers the best visual quality of any script or program I have seen, when using the default preset.
If I didn't believe that then I would either learn from the better script as I have done many times, or stop making this and just use the other script instead :)

What do you think about it? Any tips are always appreciated, especially from the great author of the incredible QTGMC :)

Sorry if I disturbed the highly interesting discussion about wrapping MVTools documented examples in a function. Perhaps this isn't the place anymore to look for fresh ideas and ingeniosity.You have brilliant knowledge and are one of the greatest contributors on this forum ever, now if only we could talk with you without being met with condescension the path to progress may be smoother and faster :)

-Vit-
12th April 2011, 01:26
I've looked over your script but not really experimented with it. One thing that immediately stands out is the EEDI2 custom pelclip. That's from the MVTools docs; doesn't that example assume interlaced source? Because it discards half the lines, interpolates them back, then resizes. You're assuming progressive source, yes? So wouldn't something like nnedi3_rpow2 be more appropriate? [without cshift, I believe].

SubJunk
12th April 2011, 01:45
I've looked over your script but not really experimented with it. One thing that immediately stands out is the EEDI2 custom pelclip. That's from the MVTools docs; doesn't that example assume interlaced source? Because it discards half the lines, interpolates them back, then resizes. You're assuming progressive source, yes? So wouldn't something like nnedi3_rpow2 be more appropriate? [without cshift, I believe].It does seem you're right logically but in testing I got a better result like this after comparing all the EEDI and NNEDI functions. I don't know why but it did seem consistent across multiple videos.
At any rate I am considering removing that option from the script because it is such a slight improvement for a huge performance hit. I don't think I would ever recommend it.

Didée
12th April 2011, 09:20
I have added the new parameter "GPU" ...
Please let me know if it works for you
With GPU=false it doesn not work correctly for me.

On Intel Pentium-D (WinXP): the output shows a 2x2 array of the input.

On Intel i7-860 (Win7): every few moments, there are green "flashes" all over the screen. (Didn't look close - could be the green builds a "cross" pattern, related to the grid of the 2x2 array.)

src = colorbars().converttoyv12().reduceby2().showframenumber()
dbl = src.interframe(GPU=false,FlowPath="C:\ [...] \InterFrame-1.5\Dependencies\")
stackhorizontal( interleave(src,src).subtitle("source").addborders(4,4,4,4),
\ dbl.subtitle("InterFrame(GPU=false)").addborders(4,4,4,4))
return(last)

http://img190.imageshack.us/img190/9342/interframegpufalse.jpg (http://img190.imageshack.us/i/interframegpufalse.jpg/)

Colorbars is just for demonstration. Running a native 1280x720 clip shows the same issue.

Gavino
12th April 2011, 09:23
One thing that immediately stands out is the EEDI2 custom pelclip. That's from the MVTools docs; doesn't that example assume interlaced source? Because it discards half the lines, interpolates them back, then resizes.
EEDI2 doesn't discard half the lines. It resizes an image by 2x in the vertical direction by copying the existing pixels and interpolating new ones in between them. So it works for progressive sources - the MVTools doc example is assuming progressive as it doesn't call SeparateFields before EEDI2.

SubJunk
12th April 2011, 09:48
With GPU=false it doesn not work correctly for me.

On Intel Pentium-D (WinXP): the output shows a 2x2 array of the input.

On Intel i7-860 (Win7): every few moments, there are green "flashes" all over the screen. (Didn't look close - could be the green builds a "cross" pattern, related to the grid of the 2x2 array.)

src = colorbars().converttoyv12().reduceby2().showframenumber()
dbl = src.interframe(GPU=false,FlowPath="C:\ [...] \InterFrame-1.5\Dependencies\")
stackhorizontal( interleave(src,src).subtitle("source").addborders(4,4,4,4),
\ dbl.subtitle("InterFrame(GPU=false)").addborders(4,4,4,4))
return(last)

http://img190.imageshack.us/img190/9342/interframegpufalse.jpg (http://img190.imageshack.us/i/interframegpufalse.jpg/)

Colorbars is just for demonstration. Running a native 1280x720 clip shows the same issue.Darn, that happens for me too.
It is related to that dll (libflowsse.dll) because it even happens with a simple script like this:

svp_flow_lib = "C:\path\libflowsse.dll"

Super = MSuper()
backward = MAnalyse(Super, isb=true)
forward = MAnalyse(Super, isb=false)

MSmoothFps(Super, backward, forward, num=48000, den=1001, algo=23)

I will contact the SVP guys, it is probable that it was an incorrect assumption of mine that libflowsse.dll would work the same as libflowgpu.dll.

-Vit-
12th April 2011, 09:56
EEDI2 doesn't discard half the lines. It resizes an image by 2x in the vertical direction by copying the existing pixels and interpolating new ones in between them. So it works for progressive sources - the MVTools doc example is assuming progressive as it doesn't call SeparateFields before EEDI2.
Ah yes, I forgot; the meaning of "field" is completely different between EEDI2 and [EEDI3/NNEDI2/NNEDI3]. (...)

Gavino
12th April 2011, 10:12
it is probable that it was an incorrect assumption of mine that libflowsse.dll would work the same as libflowgpu.dll.
Perhaps it would have been a good idea to test this before releasing it... ;)

SubJunk
12th April 2011, 11:59
Perhaps it would have been a good idea to test this before releasing it... ;)I had tested it, but not thoroughly enough. I had run a preview of the script and it was perfect, because the bug only affects 1 in every 2 frames (the preview happened to be on a good/original frame) ;)
I would usually test more thoroughly but I had several users without GPUs posting that it no longer worked so I wanted to release the fix ASAP for them :)

Ah yes, I forgot; the meaning of "field" is completely different between EEDI2 and [EEDI3/NNEDI2/NNEDI3]. (...)That's convenient! ;) I've also noticed that sometimes the documentation for those plugins just says "this has the same parameters as *function in other plugin*" so you have to open the other documentation :) It's a fun ride, but worth it

SubJunk
12th April 2011, 22:46
Version 1.5.1 is released with the GPU=false fix. Sorry to the people who encountered this bug.

SubJunk
13th April 2011, 06:25
Version 1.5.2 is released which is very minor, it just changes the default value of GPU from true to false because I discovered that the GPU mode reduces quality slightly.
It's a problem with SVP and the developers are aware of it so hopefully there is a fix coming soon :)

SubJunk
19th April 2011, 23:31
Version 1.6 is released which fixes the GPU mode bug and adds more presets for realtime users. Enjoy :)

jemm54
20th April 2011, 22:00
Hello, im having problems with this plugin, this is the error:

[Image]

im not sure what that means....

BTW, thanks for the plugin....

Edited: Make the picture smaller or upload it somewhere else and give a link. I've refused the pic.

SubJunk
20th April 2011, 22:34
Hi jemm :) You need a slash at the end of the FlowPath, so try:
InterFrame(FlowPath="C:\Archivos de programa\AviSynth 2.5\plugins\")

Gargalash
26th April 2011, 16:48
Hello Subjunk,
Thanks for this tool!

I have tried it and noticed something.

With default settings: --- EDIT: not default settings. I'm using preset "fast" and tuning="smooth" ---
- GPU= false, CPU usage is 48-50%, 42fps
- GPU= true, CPU usage is 46-48%, 46fps

The fps numbers are with vdub "video analysis pass" and my script has I have SetMTMode(2) before your filter.

If I don't use SetMTMode(2) I get about 13% CPU usage and 13fps for both true and false GPU. The AVI source I am using is on a SSD, I doubt it's creating the limitation.

Should this filter be using full cpu power? I have an i7 with multi-threading on.

Thanks for any input!

SubJunk
26th April 2011, 21:17
Hi Gargalash :)
Without SetMTMode the script will run in single-threaded mode, so 13% CPU probably just means it is using 100% of one CPU.
For the fastest results you should set the second number to 1.8x your thread count. So for example some quad-core CPUs have 4 cores but support 8 threads, so for that you would do 1.8*8 and round down to 14 so it would be:
SetMTMode(2,14)

Some people find they can just double the amount of threads and subtract one, but others find the 1.8x rule to provide better stability so I recommend that.

Hope that helps :)

PelPix
27th April 2011, 06:04
Hey SubJunk, I went back to InterFrame for motion blur because of the quality, but I'm having the problem I described earlier.
In the trails, the original frames are more visible than the interpolated frames. They have more weight in the accumulation/are held for longer/repeated more times. Is this intentional or a bug, and if it's intentional, is it for perceptual reasons?

SubJunk
27th April 2011, 06:10
Hi PelPix :) Can you post an example so I can see what you mean?

SubJunk
27th April 2011, 06:11
Removed double-post

PelPix
27th April 2011, 06:12
Yup! one second!
I apparently just lost that source video and can no longer duplicate the problem :(. I'll let you know the second it comes up!
In other news, InterFrame+an accumulative temporal filter (Like TemporalSoften) makes a mean synthetic motion blur:
http://i55.tinypic.com/1pcbop.png
Yet another use for this really amazing script.
(Sorry about the quality. I had to screencap it from a render snapshot because it was currently rendering)

SubJunk
27th April 2011, 06:36
It looks great, glad it's working for ya :)

Gargalash
27th April 2011, 18:08
Hi Gargalash :)
Without SetMTMode the script will run in single-threaded mode, so 13% CPU probably just means it is using 100% of one CPU.
For the fastest results you should set the second number to 1.8x your thread count. So for example some quad-core CPUs have 4 cores but support 8 threads, so for that you would do 1.8*8 and round down to 14 so it would be:
SetMTMode(2,14)

Some people find they can just double the amount of threads and subtract one, but others find the 1.8x rule to provide better stability so I recommend that.

Hope that helps :)

Hi, thanks for your answer. I manage to get cpu usage to 93% and run the filter at 53-54 fps.

SubJunk
27th April 2011, 21:32
Hi, thanks for your answer. I manage to get cpu usage to 93% and run the filter at 53-54 fps.Great, I'm glad it works for you :) Remember that the presets control the speed and quality so you can make that FPS higher or lower with them.
Tunings also affect it; the smooth tuning will make it run slower.

fairchild
28th April 2011, 01:07
Yet another use for this really amazing script.
(Sorry about the quality. I had to screencap it from a render snapshot because it was currently rendering)

Portal 2! I already beat it in single-player mode, pretty fun puzzler.

SubJunk
28th April 2011, 03:49
Version 1.7 is released which increases the quality of all presets. You can get it from the first post.

SubJunk
30th April 2011, 08:52
Version 1.7.1 is released which increases the speed by roughly 40%, thanks to the SVP team

aegisofrime
30th April 2011, 09:19
Thanks Subjunk! I tried Interframe for one whole DVD yesterday, which annoyingly was not interlaced, thus I couldn't use QTGMC to bob it. Interframe worked very well. I mean, quality and speed, what more could I ask for?

I'm sure the purist will say that framedoubling is flawed, but hey I want 59.94 fps and Interframe is great for that, so why not?

SubJunk
30th April 2011, 09:42
Thanks aegis, it's great to know you like it :)

horus14
30th April 2011, 22:22
i have this error u.u
http://i435.photobucket.com/albums/qq71/Kyrie-Senpai/errorinte.jpg

me script

import("C:\Documents and Settings\Administrador\Mis documentos\Encodeo\InterFrame.avsi")
DirectShowSource("G:\[Leopard-Raws] Fairy Tail - 73 RAW (TX 1280x720 x264 AAC).mp4",fps=23.976,audio=true,convertfps=true)

trim(937,3091)
InterFrame(NewNum=48000, NewDen=1001, FlowPath="C:\Documents and Settings\Administrador\Mis documentos\Encodeo\InterFrame.avsi")

Only have this problem with 1.7.1

SubJunk
30th April 2011, 22:25
i have this error u.u
http://i435.photobucket.com/albums/qq71/Kyrie-Senpai/errorinte.jpg

me script



Only have this problem with 1.7.1Hi horus14 :)
It's because your FlowPath should be the path, not including the filename. See the help page in the download, or online here (http://www.spirton.com/uploads/InterFrame/InterFrame.html) for details on each parameter :)

Mounir
1st May 2011, 19:56
Can someone upload a sample of a 60FPS video processed with interframe, I feel curious today...

Didée
1st May 2011, 22:25
One sample is linked in post#1.

InterFrame is there to be used. So, just use it.

oddball
3rd May 2011, 18:28
Watching the sample clip over and over the cigarette looks really bad. It has a judderyness I find really annoying to watch.

SubJunk
3rd May 2011, 21:52
It really shows how juddery regular videos are; it's not the script that makes it juddery, it's just that the rest of the frame is improved while the cigarette remains like the original video :)

However, you notice things like that much more when the interpolation is still a novelty; when you watch it all the time you get used to it :)

SubJunk
4th May 2011, 03:12
Version 1.8 is released which adds support for 3D content.

CruNcher
8th May 2011, 17:36
Its not only the cigarette but i have the feeling something is wrong with the background objects that passing by, might be just imagination though but i have the feeling watching the sample something is wrong.
Did someone compared this allready vs other FRCs like Yuvsoft, MSU or Cyberlinks Tzan (CUDA implementation) ?

Didée
8th May 2011, 17:52
Doing a non-integer framerate interpolation (like in 24->60) is always visually more problematic than doing an integer conversion (like in plain framerate doubling). When doubling, every second frame is original, and the potentially artificial/or/inconsistent interpolations show up only a short time. When you do 24->60, then you have one original frame, then come 4 (four!) interpolated frames, one original, 4 interpolations, etc. That's *much* more time for (potential) artifacts/inconsistencies to show up and be noticed.

CruNcher
8th May 2011, 18:04
Very well explained Didée thx if i understand it right this is once again combining needi + mvtools to achieve this :) so we have now FRC,Deinterlacing,Denoising,Deflicker,AddGrain,Degrain all based on mvtools as the motion estimation engine and needi playing a big part too that's great and for everyone we can partly utilize the GPU as well :). And by combining ffdshow with this we can even utilize it in Realtime frameworks and with DSP support (supplying the frames for decoding leaving more CPU for the PostPro) :)
The SVP guys actually seem to make the first steps into integrating this in a easy to use Realtime package absolutely great :)

Im really wondering how avisynth and it's framework by these days compares vs high class stuff like thefoundry or greenparrotpictures Research and YuvSoft also isvs like Cyberlink :)
Surely avisynth didn't reached 10 Bit yet but i wonder how the base algorithms compare and where it stands :)

Like there FRC http://www.greenparrotpictures.com/slomo.php
or http://www.greenparrotpictures.com/flicker.php

though also mostly impossible to compare i guess with those without having access to them :)


Of key importance is that we treat the problem at a pixel resolution, and we also pay attention to occlusion and uncovering of objects as they move through the scene.
Maybe that's also what i realize in that sample as it plays in the background

Here is the actual product where their stuff gets into action and what would be comparable to Interframe :) http://www.thefoundry.co.uk/products/kronos/

http://features.cgsociety.org/story_custom.php?story_id=5776 (the move from C++ to GPU)

here is a moving demo of the scene in the cgsociety article http://www.youtube.com/watch?v=hsFKiLxC4js

Especially the scene is interesting most of their Demo scenes they show Watter (chaotic motion) the canoe paddle shows though some heavy estimation problem, their solution though seems not to apply for interframe in the cigarette case or passing background http://www.youtube.com/watch?v=L0Dl8wyBolQ
Also it seems that their GPU version doesn't show this issue anymore and conquers it now in real time (looking @ the cgsociety demo of the same scene) without needing to apply any alpha matte anymore to fix this :)

Hey Hey Hey http://thefoundry.s3.amazonaws.com/downloads/FCNuke_Kronos_Media-v4.zip :) the assets of that tutorial :) the Watter scene :)

http://www.youtube.com/watch?v=tWWGqQImje4 <- Motionblur assets http://thefoundry.s3.amazonaws.com/downloads/FCFCP_Retiming_Media.zip <- seems damaged though :(

http://thefoundry.s3.amazonaws.com/downloads/FCNuke_MotionBlur_Media.zip <- Motionblur assets in .dpx

http://www.youtube.com/watch?v=YPLj5pQmbV8 <- Grain and Denoise assets http://thefoundry.s3.amazonaws.com/downloads/FCFCP_Grain_Media.zip

The Tutorial Videos are also available as higher quality Quicktime movs not perfect for comparing final results but better then with those youtube videos :) http://www.thefoundry.co.uk/articles/2010/05/05/108/furnacecore-for-nuke-denoise/ http://www.thefoundry.co.uk/articles/2010/05/05/109/furnacecore-for-nuke-kronos/
http://www.thefoundry.co.uk/articles/2010/05/05/116/furnacecore-for-nuke-steadiness/

Also even more assets to play with http://www.thefoundry.co.uk/products/furnacecore/training/ :)

The finalcut assets are either in mjpeg 4:2:2 or raw or rle

PS: Can somebody decipher what for a Xeon CPU they compare with http://media.cgnetworks.com/flash/foundry/hawaii.swf Intel Xeon ES5C4 or E55C4 hmm its like Google doesn't know it ?

SubJunk
8th May 2011, 23:35
Doing a non-integer framerate interpolation (like in 24->60) is always visually more problematic than doing an integer conversion (like in plain framerate doubling). When doubling, every second frame is original, and the potentially artificial/or/inconsistent interpolations show up only a short time. When you do 24->60, then you have one original frame, then come 4 (four!) interpolated frames, one original, 4 interpolations, etc. That's *much* more time for (potential) artifacts/inconsistencies to show up and be noticed.Yes, you're right, and that has always been mentioned in the Description section in the first post :)

Its not only the cigarette but i have the feeling something is wrong with the background objects that passing by, might be just imagination though but i have the feeling watching the sample something is wrong.It's probably a combination of errors and that you're not used to seeing such high framerates; people report the same "wrong" feeling when watching native 60FPS content, too.
There are definitely errors in the sample, and in fact that sample hasn't been updated in a while so I should remake it as there have been quality improvements since then. Of course it still won't be perfect :)

Did someone compared this allready vs other FRCs like Yuvsoft, MSU or Cyberlinks Tzan (CUDA implementation) ?I've compared it to all of the ones I've been able to try.

I emailed the YUVsoft and MSU guys but they said they don't have products for individual people, only for companies. I've also tried a few more products and found them to either be worse or had other problems (for example one of them only works with .avi files so I didn't bother trying it)

I'll read through your big post now and reply later. It's great to have all this feedback in the thread, maybe we can improve the script with all these eyes on it :D

SubJunk
9th May 2011, 01:01
Like there FRC http://www.greenparrotpictures.com/slomo.php
or http://www.greenparrotpictures.com/flicker.php

though also mostly impossible to compare i guess with those without having access to them :)You're right that it's hard to compare them because they will have had a larger clip to work with, but with that in mind I have made comparisons anyway :)

I should also note that InterFrame is not meant for slow motion and there is a change I would make in the code if it were meant for that. It may seem like framedoubling and slow motion are the same thing, and on paper they are, but our eyes see things differently depending on whether they are moving fast or slow so that is where the difference is.
For example slight blurring and ghosting can look good at fast speed while in slow motion it looks bad, so the technique is similar but not the same.

Samples:
GreenParrot (http://www.spirton.com/uploads/60FPS/test-20110509-1-GreenParrot.mkv) - InterFrame (http://www.spirton.com/uploads/60FPS/test-20110509-1-InterFrame.mkv).

P.S. I still have another reply to do, but I'm working so that's why I'm doing separate replies in my breaks :)

Edit: The Kronos trial installation doesn't work for me so I can't test it.

CruNcher
9th May 2011, 03:58
looks very good except that speed ramp or artifact @ 0:06 but taking into account you worked with the compressed youtube source it's identical in terms of motion feel, surely this way it can't be nicely compared in other parts like interpolation quality and speed :)

http://thefoundry.s3.amazonaws.com/products/kronos/ae/releases/5.0v1/Kronos_5.0v1_AE-win-x86-release-64.zip <- for everyone who wants to give it a compare shoot,dont forget it's an After Effects plugin http://www.thefoundry.co.uk/products/kronos/system-requirements/

PS: It looks like without the SVP team these speeds wouldn't have been possible @ all amazing work from Russia again a whole OpenCL implementation for the Optical Flow :)

SubJunk
9th May 2011, 08:40
It looks like without the SVP team these speeds wouldn't have been possible @ all amazing work from Russia again a whole OpenCL implementation for the Optical Flow :)Yes it's great, they are really moving things forward.
The upcoming version increases speed even more :)

madshi
13th May 2011, 09:13
Hey SubJunk,

what kind of motion estimation technique are you currently using? Have you thought about using Optical Flow + Warp, if you're not using that yet? Optical Flow algorithms seem to have improved quite nicely. They're still rather slow (at least the good ones), but I'd guess that they should allow you to improve quality quite a bit. Here are some links to open source Optical Flow algorithms:

http://people.csail.mit.edu/celiu/OpticalFlow/
http://www.onera.fr/dtim-en/gpu-for-image/folkigpu.php
http://sourceforge.net/projects/openvidia/files/CUDA%20Bayesian%20Optical%20Flow/
http://nghiaho.com/?page_id=189
http://plyer.fr/aurelien/?p=124
http://varflow.sourceforge.net/
http://perception.inrialpes.fr/~chari/myweb/Software/

Here's the "official" Optical Flow benchmark site. It seems that there are rather large differences between different Optical Flow algorithms:

http://vision.middlebury.edu/flow/eval/results/results-i1.php

Interesting approaches would also be to compare motion vectors between consecutive frames and only use those which are comparable. That should nicely sort out erratic motion vectors. Finally, how are you filling the occluded space? If you check motion vectors to the next "future" frame, too, you could eventually fill the occluded space from the future frame. That might help removing many artifacts.

Just shooting from my hip here, haven't really done any motion estimation programming myself yet. Just some brainstorming from what I've read...

-Vit-
13th May 2011, 13:42
What kind of motion estimation technique are you currently using?
This script uses MVTools (http://forum.doom9.org/showthread.php?t=84770), which is a library of motion analysis tools for Avisynth. It splits the image into a grid of blocks and attempts to track the motion of every block (as opposed to tracking specific features).

If you check motion vectors to the next "future" frame, too, you could eventually fill the occluded space from the future frame.
The flow interpolation functions in MVTools use both forward and backward vectors, and consider the occlusion masks (both ways) to determine how best to fill all areas of the interpolated frame.

Interesting approaches would also be to compare motion vectors between consecutive frames and only use those which are comparable.
I don't believe MVTools does this at any point, but it does seem a useful idea.

madshi
13th May 2011, 14:15
This script uses MVTools (http://forum.doom9.org/showthread.php?t=84770), which is a library of motion analysis tools for Avisynth. It splits the image into a grid of blocks and attempts to track the motion of every block (as opposed to tracking specific features).
Hmmmm... Isn't this kind of technique mostly aimed at encoding? I think the better optical flow algorithms work quite different in concept, looking for gradients instead of matching blocks, tracking motion per pixel instead of blocks etc...

The flow interpolation functions in MVTools use both forward and backward vectors, and consider the occlusion masks (both ways) to determine how best to fill all areas of the interpolated frame.
That is very good - better than I expected!

SubJunk
13th May 2011, 23:28
Hi madshi,
This script uses a modified MVTools2 for its motion estimation, so I suggest posting about these in the MVTools2 thread. Then Fizick (the developer) can give you his thoughts :)

Edit: Saw that Vit already posted, sorry for repeating information :)

zamadatix
15th May 2011, 23:26
InterFrame(Preset="Fast", FlowPath="C:\Program Files (x86)\MPCHC\AviSynth\plugins\")

Is giving me invalid arguements, why?

SubJunk
15th May 2011, 23:40
Hi zamadatix :)
What is the exact error you get?

zamadatix
16th May 2011, 02:19
It just says "Invalid arguments to function "InterFrame." in the video window when I drag a avs script with that line into mpchc.

ryrynz
16th May 2011, 03:20
Subjunk, do you know of any settings that could be used in to improve vertical panning in your script? I've tried the medium preset with film and animation tuning but both have caused tearing when I've played a vertical panning scene. I assume only the smooth setting seems to improve this but it's unusable in real time for the time being, any advice you could offer would be appreciated.

Anyway, thanks for your time creating this, I've tried quite a few MVtools scripts but was never satisfied with the results, this is working out quite well for my animated content and has become a part of my script.

SubJunk
16th May 2011, 04:23
It just says "Invalid arguments to function "InterFrame." in the video window when I drag a avs script with that line into mpchc.I just did that and it worked for me, so I don't know, maybe there is something else in the script that is causing it in some weird way.
P.S. That's awesome that MPC can do that, I never knew.

Subjunk, do you know of any settings that could be used in to improve vertical panning in your script? I've tried the medium preset with film and animation tuning but both have caused tearing when I've played a vertical panning scene. I assume only the smooth setting seems to improve this but it's unusable in real time for the time being, any advice you could offer would be appreciated. You can try editing line 119 of the file to change the value of sadml from 150 to 0. That will generally improve panning smoothness, but at the cost of overall frame-coherence. Or you could compromise and set the value to something higher like 300 or 500.

Anyway, thanks for your time creating this, I've tried quite a few MVtools scripts but was never satisfied with the results, this is working out quite well for my animated content and has become a part of my script.Thanks a lot, I'm glad you find it useful :)

sumawo13
16th May 2011, 23:18
I get these errors when using InterFrame 1.8.

http://i.imgur.com/WEUfM.png

This is the line I'm using for InterFrame.

interframe(flowpath="C:\Program Files (x86)\AviSynth 2.5\plugins\",preset="placebo",newnum=48000,newden=1001)

SubJunk
17th May 2011, 00:49
That can be a normal result depending on the source material. If the 2 frames on either side of that frame are very different, like in a high-action scene (which that looks like), those kind of frames are created.
You can try editing line 119 of InterFrame.avsi, changing algo=23 to algo=13 and sadml=150 to sadml=0. That will make individual details usually look better, but creates some edge artifacts. Let me know if that helps.

SubJunk
20th May 2011, 07:35
InterFrame 1.8.1 is released which fixes stuttering motion which was particularly visible in cartoons.

dansrfe
20th May 2011, 16:32
How CPU intensive is this script for realtime use? I have a C2D @ 2.66Ghz w/ 4GB RAM.

CruNcher
20th May 2011, 16:38
depends on the resolution heavily though it eats a lot of power when you do Full HD even SVPs original GPU supported (Realtime optimized) is a heavy thing for Full HD a 4 Core is advised even with GPU support (its only partial acceleration via OpenCL, but lowers the CPU load enough) :)
And then it depends on your Playback Chain (decoder,renderer ect)
see my results with SVPs original it's stunning (didn't tried it with interframe yet) and with the GPU i save a lot of Load that would slow it down heavily (VMR9 Renderless in this case though is to slow to cope). The SVP guys really thought about everything you even get statistics about it's Load Behavior :)
The absolute craziness it even has a side by side Realtime compare like you used to from Cyberlink,Corel,Arcsoft everything via avisynth ffdshow and they made the reload of a script a fully smooth experience (like it belongs to the player itself) you click onto their icon in the task tray select the option and it will change everything on the fly with only a small out time, just amazing work combining the best things into a very easy to use realtime experience :D

http://img715.imageshack.us/img715/3230/vmr9renderlessissue.png


Renderer wise when using SVP or Interframe realtime i would advise MadVR without doubt on any Windows OS when you have a capable GPU :)

Mr Alpha
20th May 2011, 19:04
Anybody know how to get multi-threading for this to work inside ffdshow for realtime playback? I can do SD content on one core, but fullHD just isn't working.

SubJunk
20th May 2011, 23:27
How CPU intensive is this script for realtime use? I have a C2D @ 2.66Ghz w/ 4GB RAM.It all depends on which Preset value you use. The Preset value controls the "quality vs CPU load", so just try to use the highest quality preset that gives you a constant framerate.
See the documentation for more details :)
Low presets of this script should work on even slow CPUs.

SVP etcThis is similar but different to SVP. These values are tweaked for better quality and smoother motion whereas SVP produces more ghosting by default. SVP can be tweaked to be similar to InterFrame in the options, but can't be the same (though maybe in a later version, I don't know)
You can also run InterFrame (or any AviSynth script) via SVP though which is convenient :)

Anybody know how to get multi-threading for this to work inside ffdshow for realtime playback? I can do SD content on one core, but fullHD just isn't working.Sorry, I'm not an expert on realtime since I convert. Hopefully someone else can help :)

fairchild
22nd May 2011, 21:54
Anybody know how to get multi-threading for this to work inside ffdshow for realtime playback? I can do SD content on one core, but fullHD just isn't working.

For me, I can't do real-time HD (720p and up). It turns into a slideshow and I verified it does use both of my cores so it is multi-threaded.

SD content works fine and looks fine and turns the frame rate to 59ish (converts 23.976, 25, and 30 fps content just fine to 59-60ish), but when I pop in a 720p or higher video it doesn't work. It appears to be my cpu which is stressed out to the max and can't do the real-time frame rate doubling at 720p and up.

SetMTmode(2,2)
ffdshow_source()
InterFrame(Preset="Fast", GPU=true, FlowPath="C:\Program Files (x86)\AviSynth 2.5\plugins\")
GetMTMode(false) > 0 ? distributor() : last

So the above works fine for SD, for real-time frame doubling to 59.94 fps.

Also this script works and is equivalent to the Faster preset in Interframe. This script also doesn't work right on my system in real-time with HD content, my CPU is not strong enough it seems.

svp_flow_lib="C:\Program Files (x86)\Avisynth 2.5\plugins\libflowgpu.dll"
svp_scheduler=true
SetMTMode(1,15)
V = ffdshow_source()
SetMTMode(2,15)
S = V.MSuper(pel=2, hpad=16, vpad=16, rfilter=4)
A = S.MAnalyse(isb=true, blksize=16, overlap=4, badSAD=2000, plevel=0, pelsearch=3, search=3, searchparam=3, badrange=(-24))
B = S.MAnalyse(isb=false, blksize=16, overlap=4, badSAD=2000, plevel=0, pelsearch=3, search=3, searchparam=3, badrange=(-24))
C = S.MRecalculate(A, blksize=8, overlap=2, search=3, searchparam=1)
D = S.MRecalculate(B, blksize=8, overlap=2, search=3, searchparam=1)
V.MSmoothFps(S, C, D, num=FramerateNumerator(V)*5, den=FramerateDenominator(V)*2, algo=23, sadgamma=2, sadml=0, ml=0, blend=true)
GetMTMode(false) > 0 ? distributor() : last

SubJunk
22nd May 2011, 21:57
fairchild, have you tried other presets? There are still 4 more presets that are faster than that one :)

fairchild
22nd May 2011, 22:15
fairchild, have you tried other presets? There are still 4 more presets that are faster than that one :)

I've tried the fastest preset "Ultra Fast" and it does work and doesn't drop as many frames, but there is a big quality drop that is most noticeable in fast action scenes and the audio goes way out of sync. With the Fast preset, my CPU is 100% stressed out and it begins to drop frames and looks like a slideshow since my system can't handle the decoding of the 720p video + real-time frame doubling. Perhaps if I had a faster CPU or a CPU with more cores (4+ cores) then it would possibly work.

But the scripts I posted should work well with multi-threaded stronger CPU's for real-time HD frame doubling. You possibly need to change the SetMTmode for cpu's with more threads/cores as using (2,2) is for a dual-core cpu.

So to sum up, for real-time SD, using the system in my sig the following code works for me with no frame drops or audio going out of sync. Only change I make is change the renderer to EVR-CP, because if I try using MadVR there will be frame drops randomly because MadVR uses more system resources.


SetMTmode(2,2)
ffdshow_source()
InterFrame(Preset="Medium", GPU=true, FlowPath="C:\Program Files (x86)\AviSynth 2.5\plugins\")
GetMTMode(false) > 0 ? distributor() : last

For HD I have a profile setup and just change the Preset=Ultra Fast

Didée
22nd May 2011, 22:34
I can't do real-time HD (720p and up).
[...]
I verified it does use both of my cores so it is multi-threaded.
For HD content, a dual-core very likely is too small.

To perform this kind of operation on HD content, a quad-core is strongly recommended. :)

Also, you definetly do NOT want to use FIFTEEN(!!) threads on a dualcore. More than 4 threads probably do more harm (overhead) than good.

SubJunk
23rd May 2011, 00:43
I've tried the fastest preset "Ultra Fast" and it does work and doesn't drop as many frames, but there is a big quality drop that is most noticeable in fast action scenes and the audio goes way out of sync. With the Fast preset, my CPU is 100% stressed out and it begins to drop frames and looks like a slideshow since my system can't handle the decoding of the 720p video + real-time frame doubling. Perhaps if I had a faster CPU or a CPU with more cores (4+ cores) then it would possibly work.

But the scripts I posted should work well with multi-threaded stronger CPU's for real-time HD frame doubling. You possibly need to change the SetMTmode for cpu's with more threads/cores as using (2,2) is for a dual-core cpu.

So to sum up, for real-time SD, using the system in my sig the following code works for me with no frame drops or audio going out of sync. Only change I make is change the renderer to EVR-CP, because if I try using MadVR there will be frame drops randomly because MadVR uses more system resources.


SetMTmode(2,2)
ffdshow_source()
InterFrame(Preset="Medium", GPU=true, FlowPath="C:\Program Files (x86)\AviSynth 2.5\plugins\")
GetMTMode(false) > 0 ? distributor() : last

For HD I have a profile setup and just change the Preset=Ultra FastDepending on your CPU it's possible you could run 4 threads max like Didee said, so I would recommend trying 3 (using the maximum amount of threads is a bad idea).
So try:


SetMTmode(2,3)
ffdshow_source()
InterFrame(Preset="Ultra Fast", GPU=true, FlowPath="C:\Program Files (x86)\AviSynth 2.5\plugins\")
GetMTMode(false) > 0 ? distributor() : last

If that still drops frames for you, there is an update coming soon that will increase the speed a lot at the same quality.

Edit: Also you could try removing the SetMTMode line because it's possible the script is choking other programs, so maybe running single-threaded will be more stable for a dual-core CPU. It's a longshot but worth trying.

SubJunk
23rd May 2011, 07:34
Version 1.9 is released, it adds support for 2 more types of 3D inputs (Half-SBS and Half-Over-Under).
Please see the documentation for details/descriptions.

Shah Jahan
27th May 2011, 04:13
I see that the code has Spline36Resize, if I change the code and make it Spline64Resize then will it work? Do you advise it? Is it a good/bad idea?

And this doesn't work for real-time viewing even on my Phenom II Quad Code overclocked to 3.6GHz. Only Super/Ultra Fast work albeit with not-so-good quality. Hoping for the promised faster-but-same-quality version to be released soon. Is it possible to add a GUI that gives several options to tweak like SVP Manager does? If you can pull that you'd immediately have a larger user-base.

SubJunk
27th May 2011, 05:00
Hi Shah, welcome to Doom9 :)

I see that the code has Spline36Resize, if I change the code and make it Spline64Resize then will it work? Do you advise it? Is it a good/bad idea?In normal 2D usage there is no resizing, that is just for 3D InputTypes.
Spline64 is for downsizing whereas 36 is more neutral, and the resizing in InterFrame 3D modes should be neutral. In reality it won't make much if any difference, but logically 36 is better suited than 64.

Shah Jahan
27th May 2011, 18:02
Hi Shah, welcome to Doom9 :)

In normal 2D usage there is no resizing, that is just for 3D InputTypes.
Spline64 is for downsizing whereas 36 is more neutral, and the resizing in InterFrame 3D modes should be neutral. In reality it won't make much if any difference, but logically 36 is better suited than 64.

Alright, thanks.

Now is there a way to tweak your presets like in SVP? SVP gives a lot (perhaps a bit too many?) options that you can change and we'd love to have the same with InterFrame.

BTW, how is your script different to SVP? Do you offer anything more which SVP doesn't?

Thanks.

SubJunk
28th May 2011, 04:37
The main difference is that, while InterFrame does support realtime playback, its main purpose is to allow users to encode and save their videos at higher framerates, while SVP is for realtime only.
This means that even users with slow computers can watch the highest quality interpolation instead of having to compromise on quality. It also means people can watch those highest-quality videos anywhere like on their TV via a media server.
InterFrame's default preset also offers higher quality than is possible with the SVP GUI - SVP can do it if you manually edit the avs file, but not via the GUI.

InterFrame also properly supports 4 types of stereoscopic 3D inputs whereas SVP doesn't AFAIK.

I would like to add that I love SVP. I'm not competing against it and I think we both have cool things to offer :)

P.S. I wrote a review of SVP here (http://www.spirton.com/svp-smoothvideo-project/) saying most of the same things.

Shah Jahan
28th May 2011, 05:37
Alright, thank for the reply.

SVP can do it if you manually edit the avs file, but not via the GUI.
Wait, what?! Why not from the GUI?

Also, with AVS, I have tweaked it to almost all settings to their highest levels and still have a smooth playback, but I guess Interframe is more intended towards encoding? Do you plan to have a real-time playback script, possibly with a GUI, if not then atleast an AVS script?

Re-encoding is too much a work, a hassle that most would prefer to skip, but if it can be done on-the-fly then it will garner more interest I guess. From a sheer marketing point of view, real-time has more market than re-encode. Just a suggestion, BTW I love what you do.

SubJunk
28th May 2011, 09:48
Wait, what?! Why not from the GUI?Because the settings are too CPU-intensive. You even said yourself that you can't use most InterFrame presets in realtime :) There is no speed difference between SVP and InterFrame on the same settings; the only reason this is slower on most presets is because the quality is higher.

Also, with AVS, I have tweaked it to almost all settings to their highest levels and still have a smooth playback, but I guess Interframe is more intended towards encoding? Do you plan to have a real-time playback script, possibly with a GUI, if not then atleast an AVS script?I'm not sure what you mean by "if not then at least an AVS script". InterFrame is an AviSynth script.

CruNcher
28th May 2011, 11:32
Alright, thank for the reply.


Wait, what?! Why not from the GUI?

Also, with AVS, I have tweaked it to almost all settings to their highest levels and still have a smooth playback, but I guess Interframe is more intended towards encoding? Do you plan to have a real-time playback script, possibly with a GUI, if not then atleast an AVS script?

Re-encoding is too much a work, a hassle that most would prefer to skip, but if it can be done on-the-fly then it will garner more interest I guess. From a sheer marketing point of view, real-time has more market than re-encode. Just a suggestion, BTW I love what you do.

Econonmy wise you have to take into account how balanced it is and how much you have to invest CPU cycle wise if you first tried out SVP & Interframe on 1080p content you will see what i mean ;) Realtime is possible but it will almost need all the resources available and for smooth playback a combination of CPU+GPU is needed which balance wise is crazy 2x power consumption for 1 task :). In this perspective investing it @ Transcoding time 1x can be more efficient depending on your scenario (clients shouldn't invest their resources ect). A complete Cuda/APP Implementation (even if it's less effective, lot of avg consumer won't detect problems in 1 frame randomly @ all) in those regards like i think Cyberlink (TrueTheater® Motion), Arcsoft (part of SimHD), Corel (Intervideo the first ones who implemented Philips Trimension algorithm for consumer Software use) and Mirilis (Motion²) have them can be far more efficient resource wise for Realtime Playback on the Desktop without a special Hardware solution (DSP). Though last tests i did with @ least Cyberlinks Tzan TrueTheater® Motion Cuda showed also extreme CPU usage but this can be also because i used only a Compute 1.1 and no Compute 1.2 card which should be more efficient in offloading the CPU (still obviously you have all the memory copy back and forth over the PCI-E going on and in such regards Sandy Bridge could become interesting as well as AMDs APU shorter cached transfer paths).

Shah Jahan
29th May 2011, 06:45
Will it be possible to add a buffer? Like when a video is played, or skipped forward it buffers for a [user selected time] before it starts to play? So that all the processing is done before hand and when the video starts to play it has a head-start so that it doesn't stutter? I don't know if having such a thing is possible? But I'll surely use it if it does! So is it possible? You can set the default value as 0 so that only those who intend to use it will manually set it on to a value they prefer.

Although the question remains, is it possible?

SubJunk
29th May 2011, 07:46
is it possible?You can set up ffdshow to buffer, but it's not possible to include it in an AviSynth script (nor should it be) :)

Shah Jahan
31st May 2011, 08:07
You can set up ffdshow to buffer, but it's not possible to include it in an AviSynth script (nor should it be) :)

So if I set ffdshow to buffer, then will I be able to use your script without lags? If yes, then how to enable it?

SubJunk
31st May 2011, 10:34
I'm not sure, maybe start a new thread for it or search old threads :)

Edit: I found this when I searched:

Now open up ffdshow and go to the avisynth tab, uncheck Add ffdshow video source and check buffer back/ahead. I have mine at 0/99 but the best value is probably 0/24.

magnetite
1st June 2011, 08:04
I tried doing the real-time thing just for fun. Didn't go so well. As was said earlier, you'll need major CPU/GPU power. I have a Sandy Bridge i7 2600K and a GTX 570, and I'd probably prefer to re-encode everything. Currently for SD material, I can use Interframe at around 145 FPS with the x264 Ultra Fast preset and MT mode 2. MT mode 1 will crash x264 for my DVDs. A 45 minute episode takes roughly 20 minutes to do, so I guess it's not too bad. Then again, I've got over 400 DVDs and around 45 Blu-rays. :eek:

Did it before, but didn't get the quality I wanted (not enough CRF). I think it was 16 before. This time I'm going for CRF 14. I guess for myself, I'd want to shoot for as close to the source as possible.

SubJunk
1st June 2011, 08:44
Yep I use 14 personally, and I know some release groups who have even gone to 11 before.
11 and 14 are different in screenshots but with a moving source I don't think anyone could tell the difference (queue videophiles telling me I must be blind ;))

magnetite
2nd June 2011, 06:48
Hey Subjunk. I'm just curious, but is MeGUI the only program that works with this? I keep getting this "Attempted to read or write protected memory. Memory is corrupt" or sometimes x264 will crash, even though I've got the MTMode set high enough.

I do also use Mediacoder, which allows for Avisynth scripts, so I'm wondering if you knew how to get Interframe working with that? I might have more luck.

SubJunk
2nd June 2011, 07:26
Hi magnetite :) It should work with any program that supports AviSynth.
I had that "protected memory" error some time in the past and I fixed it by installing a Microsoft Visual C++ Redistributable package. I think I only had the 2008 one and it needed the 2005 one or something, I installed a whole bunch of them and that fixed the bug.

I've attached a screenshot of the ones I have installed, so hopefully one of them will fix the bug for you :) If you need help finding download links let me know

magnetite
2nd June 2011, 08:08
Nevermind. I spoke too soon. I'll try the C++ thing.

I installed roughly 12 of those redistributables and I'm still getting the error. I don't think my actual RAM is corrupt, otherwise I would probably be getting lots of BSODs, but I'll run a RAM test just to be sure.

Edit: Something I didn't try before. I left out the line where it sets the maximum amount of memory in the script, and that seemed to get it going.

Shah Jahan
3rd June 2011, 15:06
I'm not sure, maybe start a new thread for it or search old threads :)

Edit: I found this when I searched:

Thanks, I tried different buffer settings but I think InterFrame is more inclined towards encoding and not a real-time thing.
Thanks for all the help though :thanks:

DeathTheSheep
6th June 2011, 02:25
Why is there a dependency on a cumbersome closed-source "plugin" that requires a password to install and fails to detect the presence of existing MT avisynth?

http://img684.imageshack.us/img684/5920/passwordl.png (http://imageshack.us/photo/my-images/684/passwordl.png/)

Can anyone just provide a zip of the "SVP" mvtools2 plugins? Last I checked MVTools2 was FOSS.

[edit]Ignore me. After downloading IF1.9 anyway, I saw the zip contained the dependencies already. My apologies! Perhaps you might consider advertising this fact on the download page itself -- "Dependencies (Included in zip!)"

SubJunk
6th June 2011, 02:56
Perhaps you might consider advertising this fact on the download page itself -- "Dependencies (Included in zip!)"Good idea, I will add that :)

DeathTheSheep
6th June 2011, 03:50
Excellent! Great work on the filter. I have one thing to point out: borders suffer from very strange artifacts -- perhaps if some border padding was used...or removed? I see you're using hpad/vpad. Is this even right with the flow functions? I don't see a reason to use this with a non-block search.

Here's a case-in-point with preset placebo. The first picture is default tuning; the second is with tune=smooth; the third is using a different, simple script without recalculation or anything (notably lacking vpad/hpad). Look at the borders on the far left/right:

Default tuning:
http://img101.imageshack.us/img101/9341/borders.jpg (http://imageshack.us/photo/my-images/101/borders.jpg/)

Tune=smooth:
http://img29.imageshack.us/img29/1827/borderstuningsmooth.jpg (http://imageshack.us/photo/my-images/29/borderstuningsmooth.jpg/)

Mine:
http://img135.imageshack.us/img135/1457/borderscorrectsimplemfl.jpg (http://imageshack.us/photo/my-images/135/borderscorrectsimplemfl.jpg/)

Another thing I realized after looking at these images is that the quality seems crispest in the last image in multiple places (note the woman's chin, the bricks under her lowered arm, the background near her outstretched hand, etc).

SubJunk
6th June 2011, 04:43
Yes there are sometimes those border problems with fast panning, they're caused by hpad and vpad, which are values that somewhat-ironically make the details near the edges more accurate ;)
The effect can be removed by setting hpad and vpad values to 0, with the tradeoff obviously being that the edges are less accurate.

I will make a post in the mvtools2 thread about it, maybe Fizick is unaware of that side-effect.

SubJunk
6th June 2011, 10:20
Another thing I realized after looking at these images is that the quality seems crispest in the last image in multiple places (note the woman's chin, the bricks under her lowered arm, the background near her outstretched hand, etc).Yeah, it does look better in that frame. What is the script you used?
It's possible that your script has benefits I can learn from, or that it got lucky with that particular scene, either way I'm interested to see the script so I can test for myself :)

Didée
6th June 2011, 10:45
It's a common misunderstanding that "more effort" in MVTools settings would necessarily increase the quality of flow interpolation. That's (partly) true for denoising, but not for flow-interpolation.

The motion search is about block matching. Block matching is not strictly related to motion. Any change related to vector coherence will "improve here, degrade there".

Said it a hundred times, here is the hundred-and-first: MVTools has no idea what "motion" actually is. It's only simple algorithms. No brain, no AI.

SubJunk
6th June 2011, 11:06
That's a very simplistic way of putting it. Compromise is rarely equal, so while changes may be compromises it's still possible to make improvements.
The mvtools2 scripts we use today are much better than the ones we used 3 years ago.

As for the point you keep raising about it having no brain or AI, I'm aware you have said it a hundred times but I've never seen it be in response to anything; I'm not aware of anyone claiming it did have those qualities.

DeathTheSheep
6th June 2011, 19:31
That's a very simplistic way of putting it. Compromise is rarely equal, so while changes may be compromises it's still possible to make improvements.
The mvtools2 scripts we use today are much better than the ones we used 3 years ago.

As for the point you keep raising about it having no brain or AI, I'm aware you have said it a hundred times but I've never seen it be in response to anything; I'm not aware of anyone claiming it did have those qualities.

By "effort" in this case, Didee is pointing out that you don't need high searchparam values and the like. It's true -- here's an example of a scene that would be expected OTOH to benefit greatly from a so-called "larger range motion search" but which actually isn't benefited by increasing the area scanned around a match:

High-speed case (defaults, pad=0):
http://img593.imageshack.us/img593/9938/fasthirange.jpg (http://imageshack.us/photo/my-images/593/fasthirange.jpg/)

High-speed case (tweaks=true, pad=0)
http://img7.imageshack.us/img7/8371/fastmyrange.jpg (http://imageshack.us/photo/my-images/7/fastmyrange.jpg/)

Medium-speed case (defaults, pad=0)
http://img810.imageshack.us/img810/7228/slowerhirange.jpg (http://imageshack.us/photo/my-images/810/slowerhirange.jpg/)

Medium-speed case (tweaks=true, pad=0)
http://img163.imageshack.us/img163/2003/slowermyrange.jpg (http://imageshack.us/photo/my-images/163/slowermyrange.jpg/)

Here you have version 2.0 with a few new treats. Output is identical to 1.9 by default, but contains the following new treats:
Tweaks (default false): Enables my tweaks. Should improve quality across the board, pretty much.
Pad (default 1): Scaling factor for padding. 0-0.5 is recommended to avoid the horrific edge artifacts.
Tuning = "Smoothfilm": A new setting for Tuning, it gently merges in some local motion enhancement. Significantly fewer artifacts than "Smooth".


#------------------------------------------------------------------------------#
# #
# InterFrame 2.0pre by SubJunk, DeathTheSheep #
# #
# A frame interpolation script that primarily uses MVTools2 for making #
# accurate estimations about the content of non-existent frames #
# Its main use is to give videos higher framerates like newer TVs do #
#------------------------------------------------------------------------------#


# For instructions and further information see the included InterFrame.html
# For news go to spirton.com


function InterFrame(clip Input, string "Preset", string "Tuning", int "NewNum", int "NewDen", string "FlowPath", bool "GPU", string "InputType", float "Pad", bool "Blend", bool "Tweaks") {
# Defaults
Preset = default(Preset , "Medium" )
NewNum = default(NewNum , 0 )
NewDen = default(NewDen , 0 )
Tuning = default(Tuning , "Film" )
FlowPath = default(FlowPath , "Undefined")
GPU = default(GPU , false )
InputType = default(InputType, "2D" )
Pad = default(Pad , 1 )
Blend = default(Blend , true )
Tweaks = default(Tweaks , false )

# Validate inputs
Assert(Preset == "Placebo" || Preset == "Medium" || Preset == "Fast" || Preset == "Faster" || Preset == "Very Fast" || Preset == "Super Fast" || Preset == "Ultra Fast", "'"+Preset+"' is not a valid preset. Please check the documentation for a list of the valid presets.")
Assert(Tuning == "Film" || Tuning == "Smooth" || Tuning == "Smoothfilm" || Tuning == "Animation", "'"+Tuning+"' is not a valid tuning. Please check the documentation for a list of the valid tunings.")
Assert(InputType == "2D" || InputType == "SBS" || InputType == "OU" || InputType == "HSBS" || InputType == "HOU", "'"+InputType+"' is not a valid InputType. Please check the documentation for a list of the valid InputTypes.")
Assert(FlowPath != "Undefined", "You must specify FlowPath. Please check the documentation for details.")

# Get either 1 or 2 clips depending on InputType
InputType == "SBS" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0 , 0, -Input.Width/2, 0), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(Input.Width/2, 0, 0 , 0), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackHorizontal(FirstEye, SecondEye)
""") : InputType == "OU" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0, 0 , 0, -Input.Height/2), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(0, Input.Height/2, 0, 0 ), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackVertical(FirstEye, SecondEye)
""") : InputType == "HSBS" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0 , 0, -Input.Width/2, 0).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(Input.Width/2, 0, 0 , 0).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackHorizontal(FirstEye.Spline36Resize(Input.Width/2, Input.Height), SecondEye.Spline36Resize(Input.Width/2, Input.Height))
""") : InputType == "HOU" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0, 0 , 0, -Input.Height/2).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(0, Input.Height/2, 0, 0 ).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackVertical(FirstEye.Spline36Resize(Input.Width, Input.Height/2), SecondEye.Spline36Resize(Input.Width, Input.Height/2))
""") : Eval("""
InterFrameProcess(Input, Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType, Pad=Pad, Blend=Blend, Tweaks=Tweaks)
""")
}

function InterFrameProcess(clip Input, string "Preset", string "Tuning", int "NewNum", int "NewDen", string "FlowPath", bool "GPU", string "InputType", float "Pad", bool "Blend", bool "Tweaks") {
#Assign defaults to Tweakable values
rfilter_val = 4
overlap_val = (Tuning == "Smoothfilm") ? 6 : 4
overlap_val2 = 2
sp_val = 4
sp_val2 = 3
sp_val3 = 1
badSAD_val = 2000
plevel_val = 0
dct_val = (Tuning == "Smoothfilm") ? 8: 5

#Apply Tweaks (if applicable) by changing some variables
Tweaks == true ? Eval("""
rfilter_val = 4
overlap_val = (Tuning == "Smoothfilm") ? 6 : 4
overlap_val2 = (Tuning == "Smoothfilm") ? 4 : 2
sp_val = 2
sp_val2 = 2
sp_val3 = 2
badSAD_val = 20000
plevel_val = 0
dct_val = (Tuning == "Smoothfilm") ? 8: 5
""") : Eval(""" """)


# Create processed clip for slower presets
Preset == "Placebo" || Preset == "Medium" || Preset == "Fast" || Preset == "Faster" ? Eval("""
ProcessedSource = Input.RemoveGrain(mode=17)
""") : Eval("""
# Don't want ProcessedSource
""")

# Set variables controlled by Tuning
BlockSize = (Tuning == "Film") ? 16 : \
(Tuning == "Animation" ) ? 32 : \
(Tuning == "Smooth" ) ? 8 : 16

# Create super clip/s
SuperRegular = MSuper(Input, hpad=Floor(Pad*BlockSize), vpad=Floor(Pad*BlockSize), rfilter=rfilter_val)

Preset == "Placebo" ? Eval("""
CustomPelClip = EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input), src_left=0.25)

Super = MSuper(ProcessedSource, hpad=Floor(Pad*BlockSize), vpad=Floor(Pad*BlockSize), rfilter=rfilter_val, pelclip=CustomPelClip)
""") : Preset == "Medium" ? Eval("""
Super = MSuper(ProcessedSource, hpad=Floor(Pad*BlockSize), vpad=Floor(Pad*BlockSize), rfilter=rfilter_val)
""") : Eval("""
Super = MSuper(Input, hpad=Floor(Pad*BlockSize), vpad=Floor(Pad*BlockSize), rfilter=rfilter_val)
""")

# Make interpolation vector clip
Preset == "Ultra Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=true , badSAD=badSAD_val, chroma=false)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=false, badSAD=badSAD_val, chroma=false)
""") : Preset == "Super Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=true , badSAD=badSAD_val, overlap=overlap_val)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=false, badSAD=badSAD_val, overlap=overlap_val)
""") : Preset == "Very Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=true , badSAD=badSAD_val, overlap=overlap_val)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=false, badSAD=badSAD_val, overlap=overlap_val)
backward = MRecalculate(Super, backward, blksize=8, searchparam=sp_val3, overlap=overlap_val2)
forward = MRecalculate(Super, forward, blksize=8, searchparam=sp_val3, overlap=overlap_val2)
""") : Preset == "Faster" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=true , badSAD=badSAD_val, overlap=overlap_val, search=3, pelsearch=3)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=false, badSAD=badSAD_val, overlap=overlap_val, search=3, pelsearch=3)
backward = MRecalculate(Super, backward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3)
forward = MRecalculate(Super, forward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3)
""") : Preset == "Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val, plevel=plevel_val, isb=true , badSAD=badSAD_val, overlap=overlap_val, search=3, pelsearch=3)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val, plevel=plevel_val, isb=false, badSAD=badSAD_val, overlap=overlap_val, search=3, pelsearch=3)
backward = MRecalculate(Super, backward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3)
forward = MRecalculate(Super, forward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3)
""") : Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val, plevel=plevel_val, isb=true , badSAD=badSAD_val, overlap=overlap_val, search=3, dct=dct_val, pelsearch=3)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val, plevel=plevel_val, isb=false, badSAD=badSAD_val, overlap=overlap_val, search=3, dct=dct_val, pelsearch=3)
backward = MRecalculate(Super, backward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3, dct=dct_val)
forward = MRecalculate(Super, forward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3, dct=dct_val)
""")

# Determine new framerate
NewNum != 0 ? Eval("""
# Use user values
""") : Input.Framerate == 25 ? Eval("""
NewNum = 50
NewDen = 1
""") : Input.Framerate == 30 ? Eval("""
NewNum = 60
NewDen = 1
""") : Eval("""
NewNum = 60000
NewDen = 1001
""")

# See whether to use GPU-acceleration or not
svp_flow_lib = GPU == true ? FlowPath+"libflowgpu.dll" : FlowPath+"libflowsse.dll"
Finest = GPU == true ? SuperRegular : MFinest(Input, SuperRegular)

# Put it together
MSmoothFps(Input, SuperRegular, backward, forward, finest=Finest, num=NewNum, den=NewDen, algo=23, ml=0, sadml=0, sadgamma=2, block=false, blend=Blend)
}

Try it before you buy it. So to speak.

Didée
6th June 2011, 21:17
IF (search==3) AND (processing_time == bearable) THEN { (searchparam == way_way_too_small) OR ((search=3)==nonsense) }

SubJunk
6th June 2011, 22:35
DeathTheSheep, I'll test your script soon but I wanted to reply about the padding before I forget.
The reason for the weird stuff on the borders of that video is just that the source is under-cropped; the right-most pixels are darker. Try cropping away those bad pixels and that error will go away. Thanks to Didee for pointing it out, I don't know why I didn't notice sooner.

DeathTheSheep
6th June 2011, 23:13
DeathTheSheep, I'll test your script soon but I wanted to reply about the padding before I forget.
The reason for the weird stuff on the borders of that video is just that the source is under-cropped; the right-most pixels are darker. Try cropping away those bad pixels and that error will go away. Thanks to Didee for pointing it out, I don't know why I didn't notice sooner.

Perhaps that is the case! Easier done than said anyhow, no? ;) :thanks:

For realtime playback, it would nevertheless be reasonable to decrease/eliminate the padding. After all, with every source there seems to be different cropping problems -- unless you use ffdshow with autocrop or the like, you're bound to run into problems sometime. Especially software like handbrake, megui, etc don't default to enabling crop correction. It's probably best to leave it up to the user's discretion. On this same vid, if I halve the crop value, the problem is largely diminished for casual viewing, so perhaps it's a good compromise in any case.

And at least now it's an option. So all's well that ends well, eh? ;)

SubJunk
6th June 2011, 23:45
I think I would rather leave the padding. To my knowledge, most people who use this script use it with scene releases, and the scene has strict rules about cropping :)

So your tweaks are basically to raise badSAD and lower searchparam, but I don't agree with either of those changes. I spent many hours testing badSAD values on different source videos and tabulated the results. Sometimes lower badSAD was worse, but more often it was better.

Searchparam is a hard thing because, as we all keep saying, it really depends on content. Sometimes 4 is best and sometimes 3 is best, and sometimes even 2, but again in testing I've found that 4 is better more often. Higher than 4 can cause warping, so 4 is the sweet-spot more often than not.
I have made the suggestion to Fizick to allow mvtools2 to dynamically change values like blksize and searchparam according to the amount of difference in the frame and he has said he will make that feature, but I don't know when.

The main consequence of using a lower searchparam is that mvtools2 will lose coherence on objects in motion, for example:
Mine (http://www.spirton.com/uploads/60FPS/test-20110607-1-SubJunk.png) - Yours (http://www.spirton.com/uploads/60FPS/test-20110607-1-DeathTheSheep.png)
Mine (http://www.spirton.com/uploads/60FPS/test-20110607-2-SubJunk.png) - Yours (http://www.spirton.com/uploads/60FPS/test-20110607-2-DeathTheSheep.png)
You see how in mine it recognises that the helicopter and the hand are supposed to be joined, but in yours it doesn't realise that because it doesn't have enough information to.

I really appreciate the effort and interest anyway, thanks a lot :)

DeathTheSheep
7th June 2011, 00:17
I think I would rather leave the padding. To my knowledge, most people who use this script use it with scene releases, and the scene has strict rules about cropping :)

So your tweaks are basically to raise badSAD and lower searchparam, but I don't agree with either of those changes. I spent many hours testing badSAD values on different source videos and tabulated the results. Sometimes lower badSAD was worse, but more often it was better.

Searchparam is a hard thing because, as we all keep saying, it really depends on content. Sometimes 4 is best and sometimes 3 is best, and sometimes even 2, but again in testing I've found that 4 is better more often. Higher than 4 can cause warping, so 4 is the sweet-spot more often than not.
I have made the suggestion to Fizick to allow mvtools2 to dynamically change values like blksize and searchparam according to the amount of difference in the frame and he has said he will make that feature, but I don't know when.

The main consequence of using a lower searchparam is that mvtools2 will lose coherence on objects in motion, for example:
Mine (http://www.spirton.com/uploads/60FPS/test-20110607-1-SubJunk.png) - Yours (http://www.spirton.com/uploads/60FPS/test-20110607-1-DeathTheSheep.png)
Mine (http://www.spirton.com/uploads/60FPS/test-20110607-2-SubJunk.png) - Yours (http://www.spirton.com/uploads/60FPS/test-20110607-2-DeathTheSheep.png)
You see how in mine it recognises that the helicopter and the hand are supposed to be joined, but in yours it doesn't realise that because it doesn't have enough information to.

I really appreciate the effort and interest anyway, thanks a lot :)

No problem. It was worth the [search] effort. ;) I guess my major point is, although the higher search ranges (more so than badSAD) can help -- their usefulness is source- and scene-dependent. The issue with that (and 'sweet spot' logic) is that when these larger ranges don't help, they produce even uglier artifacts than that unjoined/blurred plane/hand of yours -- they produce alarming warping (even in slower motion), long trailing artifacts, and/or strangely defined, inconsistent border ghosting. In casual viewing of frame-doubled content, that's a lot more off-putting than the objects that may not be "joined" -- because often (perhaps less often, as you say, but often nonetheless) they are less consistent than the lower search range. But when the big range fails (or jumps at a false bunch of candidates), the artifacts are often more distracting.

And this is why. Like Didee said, the algorithm is too simple, for as the range of potential "good candidate" vectors is increased beyond initial predictors, many more vectors (proportional to r^2!) that coincidentally happen to have a "good" SAD score stand a good chance of being picked, since there would be enough 'red herrings' in a given spatial area. Furthermore, the chance of a vector being designated good may be expected to decrease with increasing search radius -- and though there are safeguards and penalties in place, they are arbitrary thresholds. What's worse, consider this -- because the fields are cohesive (forced to conform to a blksize-dependent lambda), other vectors will be "brought down" by the coincidental presence of a few falsely decent random predictions in a certain far-off place, and as a result of the rest of the vectors trying to seek conformity, the entire field is contorted miserably.

A transformed search would actually generate decent info, since the list of "false positives" (a natural function of search radius) is drastically decreased. Instead of SAD-based ESA, to draw the analogy with x264 motion search modes, if a form of hadamard-transformed exhaustive search (TESA) were performed instead, it would automatically eliminate (or much reduce) the potential effects of these miserably failed searches over a larger distance -- and increase the accuracy of closer searches, too. Obviously, the issue is always what metric to optimize for, and how to more intelligently calculate 'cost' of any given search (Didee brings up "AI").

As it happens, the default search parameter, 2, is almost always 'safest', since it usually produces an acceptable result without a perfusion of ugly artifacts in failed cases.

In both of your two pictures, it appears to me that the artifacts are well within an 'acceptable' range when a scene with such motion is watched in real-time. The low-range search produces a result which is blurrier and not as consistent. But in my experience, it's when the walls start to morph, lines contort across large distances, large jagged ghosting patterns become apparent, etc (common failings of an erroneous large-radius search), that the rules governing the very frame cohesion the system is designed to protect (via lambda, lsad, etc) brings everything down spectacularly.

LoRd_MuldeR
7th June 2011, 00:31
It appears that it doesn't handle scene cuts very well:

Sequence 1:
http://img689.imageshack.us/img689/5756/interframe1.png
http://img560.imageshack.us/img560/5233/interframe2.png
http://img13.imageshack.us/img13/4876/interframe3.png

Sequence 2:
http://img219.imageshack.us/img219/1905/interframe4.png
http://img197.imageshack.us/img197/1729/interframe5.png
http://img809.imageshack.us/img809/8026/interframe6.png

SubJunk
7th June 2011, 00:42
No problem. It was worth the [search] effort. ;) I guess my major point is, although the higher search ranges (more so than badSAD) can help -- their usefulness is source- and scene-dependent. The issue with that (and 'sweet spot' logic) is that when these larger ranges don't help, they produce even uglier artifacts than that unjoined/blurred plane/hand of yours -- they produce alarming warping (even in slower motion), long trailing artifacts, and/or strangely defined, inconsistent border ghosting. In casual viewing of frame-doubled content, that's a lot more off-putting than the objects that may not be "joined" -- because often (perhaps less often, as you say, but often nonetheless) they are less consistent than the lower search range. But when the big range fails (or jumps at a false bunch of candidates), the artifacts are often more distracting.

And this is why. Like Didee said, the algorithm is too simple, for as the range of potential "good candidate" vectors is increased beyond initial predictors, many more vectors (proportional to r^2!) that coincidentally happen to have a "good" SAD score stand a good chance of being picked, since there would be enough 'red herrings' in a given spatial area. Furthermore, the chance of a vector being designated good may be expected to decrease with increasing search radius -- and though there are safeguards and penalties in place, they are arbitrary thresholds. What's worse, consider this -- because the fields are cohesive (forced to conform to a blksize-dependent lambda), other vectors will be "brought down" by the coincidental presence of a few falsely decent random predictions in a certain far-off place, and as a result of the rest of the vectors trying to seek conformity, the entire field is contorted miserably.

A transformed search would actually generate decent info, since the list of "false positives" (a natural function of search radius) is drastically decreased. Instead of SAD-based ESA, to draw the analogy with x264 motion search modes, if a form of hadamard-transformed exhaustive search (TESA) were performed instead, it would automatically eliminate (or much reduce) the potential effects of these miserably failed searches over a larger distance -- and increase the accuracy of closer searches, too. Obviously, the issue is always what metric to optimize for, and how to more intelligently calculate 'cost' of any given search (Didee brings up "AI").

As it happens, the default search parameter, 2, is almost always 'safest', since it usually produces an acceptable result without a perfusion of ugly artifacts in failed cases.

Honestly, in both of your two pictures, the artifacts are well within an acceptable range. It's when the walls start to morph, lines contort and drag large distances, large jagged ghosting patterns become apparent, etc (common failings of an erroneous large-radius search), the rules of the very frame cohesion the system is designed to protect (via lambda, lsad, etc) brings everything down spectacularly.We definitely all agree that the algorithm is too simple. It would be great if mvtools2 were better suited to this task, or if another plugin were instead, but we must work with what we have :)

It appears that it doesn't handle scene cuts very well:

Sequence 1:
http://img689.imageshack.us/img689/5756/interframe1.png
http://img560.imageshack.us/img560/5233/interframe2.png
http://img13.imageshack.us/img13/4876/interframe3.png

Sequence 2:
http://img219.imageshack.us/img219/1905/interframe4.png
http://img197.imageshack.us/img197/1729/interframe5.png
http://img809.imageshack.us/img809/8026/interframe6.pngYes, we've had a lot of discussions about scene cuts and in the end I decided to not handle them at all because mvtools2 isn't good at detecting them.
No matter which values the scene-cut variables (thSCD1 and thSCD2) are set to, they either detect fast-action sequences as scene-changes or fail to detect scene-changes.
So in the end I decided it is better to always have smooth motion instead of it getting choppy every time something moves quickly.

The final straw was in an episode of Criminal Minds during a scene of running through a corn field. Every single frame in that scene is detected as a scene-change even on modest detection settings :rolleyes:

Edit: It is of course possible to tweak the thSCD values per video for some videos to get accurate scene-changes, but this is a script that is meant to just run with little-to-no configuration.

DeathTheSheep
7th June 2011, 00:48
The final straw was in an episode of Criminal Minds during a scene of running through a corn field. Every single frame in that scene is detected as a scene-change even on modest detection settings :rolleyes:

Edit: It is of course possible to tweak the thSCD values per video for some videos to get accurate scene-changes, but this is a script that is meant to just run with little-to-no configuration.

Maybe OT, but which episode was this? :cool:

Weren't there some more accurate scenecut detection filters for Avisynth that can be incorporated instead (as dependencies or whatnot)?

SubJunk
7th June 2011, 02:15
Maybe OT, but which episode was this? :cool:I think S06E07 :)

Weren't there some more accurate scenecut detection filters for Avisynth that can be incorporated instead (as dependencies or whatnot)?I'm not aware of any but if anyone knows of one, it would be great to try

Edit: I saw SCSelect() mentioned as being better at detecting scene changes than mvtools2. I don't have the AviSynth scripting knowledge to pull off automatic integration if it's possible, but maybe someone else does?

DeathTheSheep
7th June 2011, 04:53
Okay. I increased 'object cohesion' a bit without introducing more artifacts. After comparing with some clips of searchparam 3, I found some interesting culprits. In a lot of cases where it produced the better picture, it wasn't due to an increased motion search at all -- but due to an increased number of good vectors per larger area. The bad effects were mostly caused by the opposite. Two additional simple parameters allowed me to replicate some level of this positive behavior without increasing searchparam -- and therefore drastically reducing the amount of artifacts. Give this puppy a shot with tweaks=true. (Ironically, I don't think it will be of much help on the particular extreme samples you brought up earlier...)


#------------------------------------------------------------------------------#
# #
# InterFrame 2.0pre2 by SubJunk, DeathTheSheep #
# #
# A frame interpolation script that primarily uses MVTools2 for making #
# accurate estimations about the content of non-existent frames #
# Its main use is to give videos higher framerates like newer TVs do #
#------------------------------------------------------------------------------#


# For instructions and further information see the included InterFrame.html
# For news go to spirton.com


function InterFrame(clip Input, string "Preset", string "Tuning", int "NewNum", int "NewDen", string "FlowPath", bool "GPU", string "InputType", float "Pad", bool "Blend", bool "Tweaks") {
# Defaults
Preset = default(Preset , "Medium" )
NewNum = default(NewNum , 0 )
NewDen = default(NewDen , 0 )
Tuning = default(Tuning , "Film" )
FlowPath = default(FlowPath , "Undefined")
GPU = default(GPU , false )
InputType = default(InputType, "2D" )
Pad = default(Pad , 1 )
Blend = default(Blend , true )
Tweaks = default(Tweaks , false )

# Validate inputs
Assert(Preset == "Placebo" || Preset == "Medium" || Preset == "Fast" || Preset == "Faster" || Preset == "Very Fast" || Preset == "Super Fast" || Preset == "Ultra Fast", "'"+Preset+"' is not a valid preset. Please check the documentation for a list of the valid presets.")
Assert(Tuning == "Film" || Tuning == "Smooth" || Tuning == "Smoothfilm" || Tuning == "Animation", "'"+Tuning+"' is not a valid tuning. Please check the documentation for a list of the valid tunings.")
Assert(InputType == "2D" || InputType == "SBS" || InputType == "OU" || InputType == "HSBS" || InputType == "HOU", "'"+InputType+"' is not a valid InputType. Please check the documentation for a list of the valid InputTypes.")
Assert(FlowPath != "Undefined", "You must specify FlowPath. Please check the documentation for details.")

# Get either 1 or 2 clips depending on InputType
InputType == "SBS" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0 , 0, -Input.Width/2, 0), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(Input.Width/2, 0, 0 , 0), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackHorizontal(FirstEye, SecondEye)
""") : InputType == "OU" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0, 0 , 0, -Input.Height/2), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(0, Input.Height/2, 0, 0 ), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackVertical(FirstEye, SecondEye)
""") : InputType == "HSBS" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0 , 0, -Input.Width/2, 0).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(Input.Width/2, 0, 0 , 0).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackHorizontal(FirstEye.Spline36Resize(Input.Width/2, Input.Height), SecondEye.Spline36Resize(Input.Width/2, Input.Height))
""") : InputType == "HOU" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0, 0 , 0, -Input.Height/2).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(0, Input.Height/2, 0, 0 ).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackVertical(FirstEye.Spline36Resize(Input.Width, Input.Height/2), SecondEye.Spline36Resize(Input.Width, Input.Height/2))
""") : Eval("""
InterFrameProcess(Input, Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType, Pad=Pad, Blend=Blend, Tweaks=Tweaks)
""")
}

function InterFrameProcess(clip Input, string "Preset", string "Tuning", int "NewNum", int "NewDen", string "FlowPath", bool "GPU", string "InputType", float "Pad", bool "Blend", bool "Tweaks") {
#Assign defaults to Tweakable values
rfilter_val = 4
overlap_val = (Tuning == "Smoothfilm") ? 6 : 4
overlap_val2 = 2
sp_val = 4
sp_val2 = 3
sp_val3 = 1
badSAD_val = 2000
plevel_val = 0
dct_val = (Tuning == "Smoothfilm") ? 8: 5
BlockSize = (Tuning == "Film") ? 16 : \
(Tuning == "Animation" ) ? 32 : \
(Tuning == "Smooth" ) ? 8 : 16
lambda_val = 1000 * BlockSize * Blocksize / 64
lsad_val = 1200

#Apply Tweaks (if applicable) by changing some variables
Tweaks == true ? Eval("""
rfilter_val = 4
overlap_val = (Tuning == "Smoothfilm") ? 6 : 4
overlap_val2 = (Tuning == "Smoothfilm") ? 4 : 2
sp_val = 2
sp_val2 = 2
sp_val3 = 2
badSAD_val = 20000
plevel_val = 0
dct_val = (Tuning == "Smoothfilm") ? 8: 5
lambda_val = 1000 * BlockSize * Blocksize / 128
lsad_val = 1600
""") : Eval(""" """)


# Create processed clip for slower presets
Preset == "Placebo" || Preset == "Medium" || Preset == "Fast" || Preset == "Faster" ? Eval("""
ProcessedSource = Input.RemoveGrain(mode=17)
""") : Eval("""
# Don't want ProcessedSource
""")

# Create super clip/s
SuperRegular = MSuper(Input, hpad=Floor(Pad*BlockSize), vpad=Floor(Pad*BlockSize), rfilter=rfilter_val)

Preset == "Placebo" ? Eval("""
CustomPelClip = EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input), src_left=0.25)

Super = MSuper(ProcessedSource, hpad=Floor(Pad*BlockSize), vpad=Floor(Pad*BlockSize), rfilter=rfilter_val, pelclip=CustomPelClip)
""") : Preset == "Medium" ? Eval("""
Super = MSuper(ProcessedSource, hpad=Floor(Pad*BlockSize), vpad=Floor(Pad*BlockSize), rfilter=rfilter_val)
""") : Eval("""
Super = MSuper(Input, hpad=Floor(Pad*BlockSize), vpad=Floor(Pad*BlockSize), rfilter=rfilter_val)
""")

# Make interpolation vector clip
Preset == "Ultra Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=true , badSAD=badSAD_val, chroma=false, lambda=lambda_val, lsad=lsad_val)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=false, badSAD=badSAD_val, chroma=false, lambda=lambda_val, lsad=lsad_val)
""") : Preset == "Super Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=true , badSAD=badSAD_val, overlap=overlap_val, lambda=lambda_val, lsad=lsad_val)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=false, badSAD=badSAD_val, overlap=overlap_val, lambda=lambda_val, lsad=lsad_val)
""") : Preset == "Very Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=true , badSAD=badSAD_val, overlap=overlap_val, lambda=lambda_val, lsad=lsad_val)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=false, badSAD=badSAD_val, overlap=overlap_val, lambda=lambda_val, lsad=lsad_val)
backward = MRecalculate(Super, backward, blksize=8, searchparam=sp_val3, overlap=overlap_val2)
forward = MRecalculate(Super, forward, blksize=8, searchparam=sp_val3, overlap=overlap_val2)
""") : Preset == "Faster" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=true , badSAD=badSAD_val, overlap=overlap_val, search=3, pelsearch=3, lambda=lambda_val, lsad=lsad_val)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val2, plevel=plevel_val, isb=false, badSAD=badSAD_val, overlap=overlap_val, search=3, pelsearch=3, lambda=lambda_val, lsad=lsad_val)
backward = MRecalculate(Super, backward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3)
forward = MRecalculate(Super, forward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3)
""") : Preset == "Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val, plevel=plevel_val, isb=true , badSAD=badSAD_val, overlap=overlap_val, search=3, pelsearch=3, lambda=lambda_val, lsad=lsad_val)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val, plevel=plevel_val, isb=false, badSAD=badSAD_val, overlap=overlap_val, search=3, pelsearch=3, lambda=lambda_val, lsad=lsad_val)
backward = MRecalculate(Super, backward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3)
forward = MRecalculate(Super, forward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3)
""") : Eval("""
backward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val, plevel=plevel_val, isb=true , badSAD=badSAD_val, overlap=overlap_val, search=3, dct=dct_val, pelsearch=3, lambda=lambda_val, lsad=lsad_val)
forward = MAnalyse(Super, blksize=BlockSize, searchparam=sp_val, plevel=plevel_val, isb=false, badSAD=badSAD_val, overlap=overlap_val, search=3, dct=dct_val, pelsearch=3, lambda=lambda_val, lsad=lsad_val)
backward = MRecalculate(Super, backward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3, dct=dct_val)
forward = MRecalculate(Super, forward, blksize=8, searchparam=sp_val3, overlap=overlap_val2, search=3, dct=dct_val)
""")

# Determine new framerate
NewNum != 0 ? Eval("""
# Use user values
""") : Input.Framerate == 25 ? Eval("""
NewNum = 50
NewDen = 1
""") : Input.Framerate == 30 ? Eval("""
NewNum = 60
NewDen = 1
""") : Eval("""
NewNum = 60000
NewDen = 1001
""")

# See whether to use GPU-acceleration or not
svp_flow_lib = GPU == true ? FlowPath+"libflowgpu.dll" : FlowPath+"libflowsse.dll"
Finest = GPU == true ? SuperRegular : MFinest(Input, SuperRegular)

# Put it together
MSmoothFps(Input, SuperRegular, backward, forward, finest=Finest, num=NewNum, den=NewDen, algo=23, ml=0, sadml=0, sadgamma=2, block=false, blend=Blend)
}

SubJunk
7th June 2011, 05:06
OK, I'll have a look soon :)
P.S. The next version will either be 1.9.1 or 1.10, not 2.0 :)

magnetite
7th June 2011, 05:24
I know you guys were talking about using your CPU and GPU combined to do real time transcoding. However, is it possible for Interframe to use both your CPU and GPU at the same time for re-encoding? I know you have to choose between the two, but if you've got a system with the latest hardware, it would be kind of cool to see if that would work or not. It would increase the speed of the script if both were used.

SubJunk
7th June 2011, 05:36
I know you guys were talking about using your CPU and GPU combined to do real time transcoding. However, is it possible for Interframe to use both your CPU and GPU at the same time for re-encoding? I know you have to choose between the two, but if you've got a system with the latest hardware, it would be kind of cool to see if that would work or not. It would increase the speed of the script if both were used.Sure, it has been possible for months by using the GPU parameter, like:
InterFrame(GPU=true, FlowPath="C:\Program Files\AviSynth 2.5\plugins\")
:)

magnetite
7th June 2011, 18:46
Oh okay, I was a bit confused earlier about that. I thought GPU=true used the GPU only, and the CPU would be idle, but I guess not.

SubJunk
7th June 2011, 22:16
Oh okay, I was a bit confused earlier about that. I thought GPU=true used the GPU only, and the CPU would be idle, but I guess not.I'll clarify that in the documentation now :)

magnetite
8th June 2011, 21:39
That's a big improvement. I was getting roughly 160 FPS before, and I just tested a video, and now I'm getting 200 FPS.

SubJunk
8th June 2011, 22:03
Great! :)

DeathTheSheep
9th June 2011, 20:20
How does "SmoothFPS" work? It's a bit different than FlowFPS for a few reasons (GPU acceleration support, better frame blending when good matches aren't found, faster, etc). I see there are parameters I've never seen before in an mvtools2 function. What do they control? For instance, there's a parameter that I believe deals with the algorithm used to interpret and create the new frame -- but which "algo" does what? I can't seem to find any other info on this function.

SubJunk
9th June 2011, 23:13
algo=1, block=false = MFlow
algo=11, block=true = MBlockFps(mode=0)
algo=12, block=true = MBlockFps(mode=1)
algo=13, block=true = MBlockFps(mode=2)
algo=21, block=false = MFlowFps(mask=0)
algo=22, block=false = MFlowFps(mask=1)
algo=23, block=false = MFlowFps(mask=2)

That's a rough estimation, but there are some differences, especially with algo=13 which is quite different to anything in the official mvtools2 release.

P.S. I'm still testing the script you gave and I might use some of it, but I'm being very careful and testing a lot of different videos.

dfan
16th June 2011, 23:40
For I avoid that artifacts, I configure in MAnalyse: delta=0 (for back) and delta=-2 (for forw). But using MAnalyse's delta, the script loses estimation power :\

SubJunk
18th June 2011, 12:20
InterFrame 1.10 is released. See the first post for details and enjoy :)

Edit: I also updated the sample videos

edison
19th June 2011, 17:45
http://www.mediafire.com/file/33w33iqfjlgxa5l/svp_artifacts_supression_high_vs_interframe_720p.mkv

The artifacts supression settings of SVP is very useful in some case although somtimes will cause blending look, how can I enabled similar thing with InterFrame ?

CruNcher
19th June 2011, 20:50
http://www.mediafire.com/file/33w33iqfjlgxa5l/svp_artifacts_supression_high_vs_interframe_720p.mkv

The artifacts supression settings of SVP is very useful in some case although somtimes will cause blending look, how can I enabled similar thing with InterFrame ?

the first look says interframe smokes svp smoothness wise in this case very impressive :) hehe btw that compare remembers me of this split compare though for superresolution with the avatar source ftp://ftp.cs.huji.ac.il/users/raananf/demo.mpg

Only near Realtime CPU, GPU, FPS, Memory utilization (CPU&GPU) and Frame Number visualization is missing in your compare for both then it would be perfect, and yeah in very very very high motion sequences you see the prediction issues but in lower motion they not visible and the smoothness wins overall ;)

SubJunk
19th June 2011, 22:58
The artifacts supression settings of SVP is very useful in some case although somtimes will cause blending look, how can I enabled similar thing with InterFrame ?I don't offer the SVP-like settings because I don't think it looks good, but if you want it you can manually change line 132 from algo=23 to algo=13.

the first look says interframe smokes svp smoothness wise in this case very impressive :)Thanks a lot :)

PALpilot
21st June 2011, 18:39
WOW thanks a lot! Add another Assumefps(25) and you have an awesome slowmotion script. It does so much better than the one on the mvtools2 page.
:thanks:

SubJunk
21st June 2011, 23:50
http://www.mediafire.com/file/33w33iqfjlgxa5l/svp_artifacts_supression_high_vs_interframe_720p.mkv

The artifacts supression settings of SVP is very useful in some case although somtimes will cause blending look, how can I enabled similar thing with InterFrame ?I finally got around to watching the video, great job on it. It's a great comparison.

WOW thanks a lot! Add another Assumefps(25) and you have an awesome slowmotion script. It does so much better than the one on the mvtools2 page.
:thanks:Awesome, thanks a lot for the feedback :)

Dogway
23rd June 2011, 02:30
SubJunk: Just wanted to know if there is something to take care in mvtools for using GPU other than defining svp_flow_lib. Im using it just for mdegrain tasks, but I get artifacts in the few first frames of my encoded intermediary either using gpu or sse.

SubJunk
23rd June 2011, 03:11
SubJunk: Just wanted to know if there is something to take care in mvtools for using GPU other than defining svp_flow_lib.No, there is no other way sorry.

Dogway
23rd June 2011, 22:52
oops, I missed this post (http://forum.doom9.org/showthread.php?p=1491506#post1491506), looks like it only works for msmoothfps... thanks for the feedback

CruNcher
24th June 2011, 03:05
Most of the Hard work is still done on the CPU it wont be usefull for the hard core motion search part :)

edison
28th June 2011, 08:22
algo 13 vs algo 23 is almost same here:
http://www1.mediafire.com/imgbnc.php/3dfeef40760b0dd00ce1f73b4c0fa23d84a771c0c36d381638ceaec29fd945fa6g.jpg (http://www.mediafire.com/imageview.php?quickkey=t0fm0h5b5vfjh5j&thumb=4)

http://www.mediafire.com/file/guwggij7m89mhwz/multi_svp_nh_vs_origin.mkv

http://www.mediafire.com/file/w3ggw7dggd71l2t/multi_svp_nh_vs_interframe.mkv

http://www.mediafire.com/file/cvdupddtkkuu6gf/multi_interframe_algo_13_vs_default.mkv

origin 23.976p:
http://www.mediafire.com/file/z1zzg8qsnqen993/origin_23.976.mkv

Didée
28th June 2011, 08:48
algo 13 vs algo 23 is almost same here:
<pic>
"algo" changes the calculation of the interpolation.

The shown artifact is not a problem of interpolation ... the problem is the motion search has gathered bad motion vectors. Try tweaking MAnalyse settings. Lowering pzero, slightly raising pnew, maybe dct=5, search on a slightly blurred clip, .....

Remember, MVTools does not search "motion". It only searches for small squares that look similar to each other. ;)

SubJunk
28th June 2011, 09:04
Those errors can be avoided by using searchparam=1, but of course that has its own problems too

Didée
28th June 2011, 09:45
The search defaults are quite skewed, anyway. So yes, lets skew them even more. :D

edison
28th June 2011, 09:54
searchparam=1 works :)

http://www4.mediafire.com/imgbnc.php/ea54f29a7bac20b0fb4881060008e4b16f8c5b1cd98e5946d43d03d8eacf3d726g.jpg (http://www.mediafire.com/imageview.php?quickkey=wk2rjdduuynydd6&thumb=4)

Didée
28th June 2011, 09:57
But now it will miss much more motion that's different from global motion. :)

edison
28th June 2011, 11:31
maybe, but searchparam = 1 is better than searchparam = 2 in this case. I hope there is a better algorithm can handle this case .

aegisofrime
1st July 2011, 09:07
Subjunk, your modified MVTools is based on an older version, 2.5.11.1, correct? If so, would it be possible for you to release that under a different name? Soon QTGMC will require the latest MVTools, and thus using your MVTools effectively precludes me from using QTGMC, and vice versa.

SubJunk
1st July 2011, 12:18
Subjunk, your modified MVTools is based on an older version, 2.5.11.1, correct? If so, would it be possible for you to release that under a different name? Soon QTGMC will require the latest MVTools, and thus using your MVTools effectively precludes me from using QTGMC, and vice versa.Hi :) You can just rename the file

Alek93j
2nd July 2011, 12:53
Hi SubJunk :) I read this in mvtools doc:
(Recent note: it is true for luma, but is not exactly corresponded to chroma pixels positions of internal MVTools interpolation. Nevertheless vectors and motion compensation are quite similar for usual clips, same chroma would be with src_left=0.5 for YUY2 and additionally src_top=0.5 for YV12).
I saw that you wrote this in the script
CustomPelClip = EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input), src_left=0.25)
I only partially understand your method; I tried doing it like this, shouldn't it be better?
FUNCTION pelclipfix(Clip input)
{
luma=EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input))
chroma=EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input),src_top=0.5,src_left=0.5)
MergeChroma (luma,chroma,1)
}

here the results:
your:
http://img225.imageshack.us/img225/8640/orig.png
my:
http://img839.imageshack.us/img839/9436/fix.png

does this make sense?

Gavino
2nd July 2011, 14:37
luma=EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input))
Your change is correct for more accurate chroma, but you still need the src_left=0.25 for luma.

Alek93j
2nd July 2011, 22:10
Is this related to avisynth's resize bug or is it an issue internal to mvtools?
Anyway:
FUNCTION pelclipfix(Clip input)
{
luma=EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input),src_left=0.25)
chroma=EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input),src_top=0.5,src_left=0.5)
MergeChroma (luma,chroma,1)
}

Gavino
2nd July 2011, 22:39
Is this related to avisynth's resize bug or is it an issue internal to mvtools?
MVTools (see doc) requires the pelclip to have original pixels at (0,0) and at row and column positions with multiples of pel. EEDI2(field=1) does this when it doubles the height. However, the Avisynth resizers (by design, it's not a bug) preserve the image centre postion rather than the corner position, so to get the original pixels from the width doubling you need to specify src_left=0.25.

Alek93j
3rd July 2011, 00:40
thank you for the answers

SubJunk
3rd July 2011, 02:14
Cool :) I will have that fixed in the next version

SubJunk
4th July 2011, 23:00
1.11 is released, enjoy :)

Alek93j
5th July 2011, 00:59
I need to make a custom function with mvtools2 for slow motion needs in my editing works, but I noticed that your msmoothfps often works much better than I could manage, so I'd like to know what the finest, sadm, and sadgamma options in msmoothfps exactly do.

SubJunk
5th July 2011, 01:12
I need to make a custom function with mvtools2 for slow motion needs in my editing works, but I noticed that your msmoothfps often works much better than I could manage, so I'd like to know what the finest, sadm, and sadgamma options in msmoothfps exactly do.Mfinest creates a better pelclip than default and is only used in CPU mode.
Sadml is completely new to the custom mvtools and based on the ml from MMask, it defines a threshold at which vectors are marked as erroneous and then blurs/ghosts over the erroneous area using a different mask to ml. The lower the value, the more vectors are marked as erroneous. I recommend values between 150-250.
Sadgamma is the same as gamma in MMask.

Ikaro
5th July 2011, 22:59
Hello everyone, I use interframe from one month and I find it a great script to create interpolated frames in videos.
Thanks a lot for your work SubJunk!!!!!
But I need your help to solve this problem:

http://img231.imageshack.us/img231/6503/provasearchparam4.jpg

http://img808.imageshack.us/img808/2281/provasearchparam1.jpg

It's the same with ALGO 13.
This artifact is the biggest and most visible in the video, can you help me with the parameters??
TIA!!!

P.S. sorry for my bad, googled, english :-(

Max

SubJunk
5th July 2011, 23:10
Hi Ikaro. Sometimes that will just happen. mvtools gets confused because the sections of net are almost identical to eachother.
You can fix it by using blksize=32, but that will affect the overall smoothness.

Rumbah
7th July 2011, 16:44
Hi, I have a question about the modded mvtools.
I'd like to use Interframe with Dither. That uses a modded mvtools version itself. Is it possible to get both plugins working together or do I have to use an intermediate lossless video?

SubJunk
8th July 2011, 00:16
Sure, you can just rename the files however you want and include them when you want them. For example "mvtools-dither.dll" and "mvtools-interframe.dll".
Note that to do that they need to be in a directory other than the default one, because the default will autoload them.

Rumbah
10th July 2011, 12:59
Ok, thanks, I'm doing it in two steps now as loading both dlls at the same time does not seem to work for me, e.g.

dither()
Interframe()

In addition to that I notice that some settings are used here that are not mentioned in the documentation, like searchparam, algo and blocksize. Is there a document where I can read about them?

SubJunk
10th July 2011, 13:20
Yeah, using both at the same time wouldn't work. I thought you meant you wanted to use them separately.
Searchparam and blksize are the same as they are in the official mvtools documentation, and algo is basically an easy way of referencing mflow, mflowfps and mblockfps within the same function instead of separate ones.

Rumbah
10th July 2011, 16:10
Ok, thanks, then I've done it the right way.

Btw thanks for this script, I'm impressed with the result. When watching it frame by frame you'll notice errors but in motion it's great for the "normal" watcher.

DeathTheSheep
10th July 2011, 21:38
searchparam=1 works :)

http://www4.mediafire.com/imgbnc.php/ea54f29a7bac20b0fb4881060008e4b16f8c5b1cd98e5946d43d03d8eacf3d726g.jpg (http://www.mediafire.com/imageview.php?quickkey=wk2rjdduuynydd6&thumb=4)

Searchparam=2 is the best of all worlds. I just tried my script (see previous post) with your source with perfect results.

I will repeat this ad nauseam: for searchparam, anything higher than 2 is placebo, folly, or destructive, not helpful. I've shown many examples and others have, too. Make sure to change all references to "searchparam" to 2 in your script if they are higher.

SubJunk
11th July 2011, 00:20
Ok, thanks, then I've done it the right way.

Btw thanks for this script, I'm impressed with the result. When watching it frame by frame you'll notice errors but in motion it's great for the "normal" watcher.You're very welcome, thanks for the support :)

Searchparam=2 is the best of all worlds. I just tried my script (see previous post) with your source with perfect results.

I will repeat this ad nauseam: for searchparam, anything higher than 2 is placebo, folly, or destructive, not helpful. I've shown many examples and others have, too. Make sure to change all references to "searchparam" to 2 in your script if they are higher.For the record I still disagree ;)

PALpilot
12th July 2011, 11:03
Hi,

Again, superb tool. But I have another great use for it. I make HDR timelapse shots of landscapes from a tripod. I use my Canon 550D and the Magic Lantern application. I use an interval of 3-4 seconds and I use InterFrame to interpolate the in between frames so I get a movie.
So 1 HDR picture, 6-10 frames interpolated, next HDR picture. This results in a more alive landscape with small movements in trees. And InterFrame does a superb job interpolation cloudmovements so you can get a timelapse movie out of like 6 pictures.

I might stick with 1.10 sometimes because of the super smooth pans.

Note it doesn't work for some situations like running water of course.

edison
12th July 2011, 19:49
Searchparam=2 is the best of all worlds. I just tried my script (see previous post) with your source with perfect results.

I will repeat this ad nauseam: for searchparam, anything higher than 2 is placebo, folly, or destructive, not helpful. I've shown many examples and others have, too. Make sure to change all references to "searchparam" to 2 in your script if they are higher.

script of #136 not works.

http://www.gokuai.com/w/3nz240TD8CVl4i4X/deaththesheep_script_136.jpg

SubJunk
12th July 2011, 22:00
Hi,

Again, superb tool. But I have another great use for it. I make HDR timelapse shots of landscapes from a tripod. I use my Canon 550D and the Magic Lantern application. I use an interval of 3-4 seconds and I use InterFrame to interpolate the in between frames so I get a movie.
So 1 HDR picture, 6-10 frames interpolated, next HDR picture. This results in a more alive landscape with small movements in trees. And InterFrame does a superb job interpolation cloudmovements so you can get a timelapse movie out of like 6 pictures.

I might stick with 1.10 sometimes because of the super smooth pans.

Note it doesn't work for some situations like running water of course.I've seen that effect before, too, in this video (http://www.watchthinkchat.com/) for one. It looks great :)
Yeah it was a hard decision to trade smoothness for accuracy, really hard. I still question the decision sometimes, but oh well. Maybe I will change the smooth tuning to be like the regular one was in 1.10 so that users like you can continue to update.

script of #136 not works.Yes, for those types of errors usually changing searchparam to 2 will do nothing, only changing it to 1 will often fix it and even then sometimes not. The only sure fix is to use blksize 32 :) (like I said before)

Didée
13th July 2011, 00:06
Let's drop some hints.

In regard to those false-motion "jalousie window" artifacts shown on the last pages ...

Anyone ever spent a thought why this nasty artifact often occurs in areas of big local contrast (plus repetitive patterns, to make it worse).


A block with small local contrast typically has smaller SADs to blocks similar to it.

A block with big spatial contrast typically has bigger SADs to blocks similar to it.

Isn't it obvious that

"SAD_related_threshold = ONE_FIXED_VALUE_FOR_ALL_BLOCKS_NO_MATTER_THEIR_CHARACTERISTICS"

is going to give problems? The job is to identify motion. It doesn't matter if a moving block contains only weak detail, or very strong detail - here, "motion" is just a vector, and the vector by itself is not related to the block's content.

Still, the search engine will come to different decisions for either block type, because of the fixed thresholds. What is considered "good" for a soft block might be considered "bad" for a hard block. Or vice versa.

(The bell has been ringing for years now .... Basically I'm praying this since back in MVTools1 days)


Oh, one more hint:
# Create clip for motion search.
# Trick: weight-in a gaussian blur, to reduce # (Needed to later make MVDegrain work as expected ...the "SAD concept" doesn't fit
# local contrast of the searchclip. # to the realities -- so, let's tailor the realities to fit the darn concept ...)
This is not merely funny. It's one major key (out of two) why the whole shebang actually works .... :rolleyes:



Of course, you can continue to work around the problem by shrinking, shrinking, shrinking the actual motion search, like repeatedly suggested on the recent pages. Once you fully inhibit MVTools' motion search, you can be sure that it doesnt find "false motion" anymore. :p

SubJunk
13th July 2011, 00:46
I have never recommended shrinking motion search, it has only been a quick suggestion for specific videos. Actually, the only change I have made in the code has been to increase the default searchparam from 3 to 4 ;)
As always, if you have an improvement to the script I'm happy to try it.

Emulgator
20th July 2011, 08:17
Avisynth open failure:
Script error: there is no function named "MFinest"
(InterFrame.avsi, line 132)
(InterFrame.avsi, line 50)

Ah. mvtools 2.5.11.6 is needed. My fault. I was on 2.5.11.2 16bit.

SubJunk
20th July 2011, 11:29
Glad you figured it :)

Emulgator
21st July 2011, 09:34
many thanks, SubJunk ! Interframe works quite good to get some framerepeat-flagged AVCHDLite 1280x720x25p to more fluid 1280x720x50p.

A smallish suggestion: Working in varying OSes it may become tedious to hand edit any plugin paths when swapping machines.

A global variable helps here:

#To automate varying plugin call paths a script named AviSynthPluginsDir.avsi has to reside in AviSynths plugins directory.
#It uses the call GetWorkingDir() which requires GetSystemEnv.dll by stickboy to be in AviSynths plugins folder.
#AviSynthPluginsDir.avsi contains only one line: global AviSynthPluginsDir = GetWorkingDir()


Now any script may call its respective plugins, even in separate folders.

Version for the "single big bag of plugins":

InterFrame(FlowPath=AviSynthPluginsDir)

Version for separated plugin folders where a folder named "InterFramePlugins" shall contain the plugins to be loaded exclusively for InterFrame:

InterFrame(FlowPath=AviSynthPluginsDir + "InterFramePlugins/")

Unfortunately I don't seem to get a 64-bit GetSystemEnv.dll. Did anybody find or build one ?

SubJunk
22nd July 2011, 00:21
Hi Emulgator, I'm glad you like it, thanks for the feedback :)
With regards to the suggestion, it seems like that is something that would be better left to the user, rather than me including it. Some people like to have their plugins in different directories from eachother that are nowhere near the default one so I think the current system is more flexible for everyone :)

SubJunk
11th September 2011, 22:34
1.12 is released, enjoy :)

I should also note that I was experiencing stability problems with SET's recent AviSynth 2.6 update (2011.07.19) with most scripts, so if you use his builds and have been getting crashes I recommend going back to his 2009.09.19 build

Yellow_
12th September 2011, 10:07
I'm enjoying using your Interframe script, but wonder if there is any way to minimise the warping effect around movement, same problem with Twixtor I believe, any sort of masking that can be done?

SubJunk
12th September 2011, 13:59
There are developments happening with the SVP developers right now that improve that by making the forward and backward vector information synchronised instead of separate.
It isn't released publicly yet, though. When it is I will update InterFrame for it :)

SubJunk
16th September 2011, 02:41
1.12.1 is released :)

Shah Jahan
9th October 2011, 10:31
I'm using your Guide to framedoubling/60FPS conversion and at moving objects it creates a hazy vapor like thing at moving objects and I'm not sure if I'm using the Placebo preset. How to select the preset for encoding? I know how to for real time, but the guide for encoding doesn't mention on how to do it for encoding? I'd want to use the Placebo preset, if it's not already. Is there any way to make it work with MediaCoder?

And when you update your realtime versions, then do you also update the encoding versions or do we have to do it manually? If yes, then how?

Thank you.

SubJunk
9th October 2011, 21:16
The guide download and the InterFrame download are updated at the same time.
The placebo tuning won't offer big improvements, it is only slightly better.
The hazy vapor will still be there on placebo tuning. There are quality improvements coming soon.

Shah Jahan
11th October 2011, 14:36
The guide download and the InterFrame download are updated at the same time.
The placebo tuning won't offer big improvements, it is only slightly better.
The hazy vapor will still be there on placebo tuning. There are quality improvements coming soon.
Thanks for the reply.
So what are the current settings used in encoding? (Placebo, medium...?)
Can you please make different encoding settings (like it is for realtime encoding) and post it on your website OR kindly give me the placebo settings for encoding?
Can you please give any tentative date about the next version which has some quality improvements? Or atleast allude if it's within days/weeks/months?

Thank you.

SubJunk
11th October 2011, 22:59
Thanks for the reply.
So what are the current settings used in encoding? (Placebo, medium...?)By default it's Medium and you can change it to whatever you like by specifying "Preset"

Can you please make different encoding settings (like it is for realtime encoding) and post it on your website OR kindly give me the placebo settings for encoding?I'm not sure what you mean. The script is always the same whether realtime or not. Please see the documentation, it is linked to from the first post and is in the download.

Can you please give any tentative date about the next version which has some quality improvements? Or atleast allude if it's within days/weeks/months?I guess weeks.

Shah Jahan
12th October 2011, 09:04
By default it's Medium and you can change it to whatever you like by specifying "Preset"
Will this work?

Setmemorymax(4096)
SetMTMode(2,7)
PluginPath = "C:\Program Files (x86)\AviSynth 2.5\plugins\"
LoadPlugin(PluginPath+"mvtools2.dll")
LoadPlugin(PluginPath+"RemoveGrainSSE3.dll")
Import(PluginPath+"InterFrame.avsi")
<input>.ConvertToYV12()
<deinterlace>
<crop>
<denoise>
<resize>
InterFrame(FlowPath=PluginPath, GPU=true, Preset="Placebo")


Or do I have to change something, or remove the inverted commas?


I'm not sure what you mean. The script is always the same whether realtime or not. Please see the documentation, it is linked to from the first post and is in the download.
OK, I got it now. Mea Culpa!


I guess weeks.
Damn! Can't wait that long. Will start encoding.

SubJunk
12th October 2011, 22:44
Will this work?

Setmemorymax(4096)
SetMTMode(2,7)
PluginPath = "C:\Program Files (x86)\AviSynth 2.5\plugins\"
LoadPlugin(PluginPath+"mvtools2.dll")
LoadPlugin(PluginPath+"RemoveGrainSSE3.dll")
Import(PluginPath+"InterFrame.avsi")
<input>.ConvertToYV12()
<deinterlace>
<crop>
<denoise>
<resize>
InterFrame(FlowPath=PluginPath, GPU=true, Preset="Placebo")


Or do I have to change something, or remove the inverted commas?SetMemoryMax should usually be at about 800 or 600 for maximum stability, the rest looks ok. Remember though that Placebo makes it much slower for not much quality gain, you were warned :)

Shah Jahan
15th October 2011, 07:53
SetMemoryMax should usually be at about 800 or 600 for maximum stability, the rest looks ok. Remember though that Placebo makes it much slower for not much quality gain, you were warned :)
For some reason if I use any value below 4096 then it crashes after encoding for a few minutes. I kept the Task Manager opened and saw that the RAM usage kept on increasing and at around 2048 it crashed (2048 was my previous limit) and hence I thought about increasing it to 4096 and never had a crash after that.

And yes, it really is very VERY slow on placebo but I'm alright with it. I just wish I had Intel i7 2600K

Gser
15th October 2011, 14:03
Is there a reason why this script uses eedi2 instead of eedi3 or nnedi3?

magnetite
15th October 2011, 15:21
Hey SubJunk,

I know this script supports GPU acceleration, but would that also mean it supports SLI? That would give a nice speed boost.

Bloax
15th October 2011, 18:23
Talking about speed, setting "pel" to 1 in the MSuper call gives a hefty speed boost.
It's fine by me to keep it on 2 for the Medium/Placebo, but for Fast and below, it could be considered. (I can't see the difference anyway.)

SubJunk
16th October 2011, 00:03
For some reason if I use any value below 4096 then it crashes after encoding for a few minutes.Ah that's interesting, I have the opposite; it crashes if I set it higher than 800. It's funny how different this program is for different hardware :)

Is there a reason why this script uses eedi2 instead of eedi3 or nnedi3?I did comparisons of all of them and found eedi2 was better more of the time than the others :)

I know this script supports GPU acceleration, but would that also mean it supports SLI? That would give a nice speed boost.I haven't tried it but I think it would use both GPUs if they were in SLI configuration :)

Talking about speed, setting "pel" to 1 in the MSuper call gives a hefty speed boost.
It's fine by me to keep it on 2 for the Medium/Placebo, but for Fast and below, it could be considered. (I can't see the difference anyway.)Yeah, it does increase speed but quality suffers :)

THX-UltraII
31st October 2011, 16:12
I m new to InterFrame 1.12.1. I have some question about it:

Is it a real-time script that can be used while watching a movie?
How do I know if my projector (JVC RS25) supports 60FPS?

Gser
31st October 2011, 20:13
How do I know if my projector (JVC RS25) supports 60FPS?
I don't think there is a projector in the world that doesn't support it.

SubJunk
31st October 2011, 20:45
I m new to InterFrame 1.12.1. I have some question about it:Welcome :)
Is it a real-time script that can be used while watching a movie?It can be, yes. You just have to select a preset that works with your CPU.
How do I know if my projector (JVC RS25) supports 60FPS?Like Gser said, if it doesn't support it that would be weird.

THX-UltraII
31st October 2011, 21:36
thxz for the quick reply guys. I just checked and my RS25 projector supports 60fps.

I don t know how to begin with this :stupid:
Do I have to download and install something?

My setup:
hardware:
Core2Quad Q6600@3,2Ghz
4gb DDR3 1333
MSI GTX460 Cyclone 1gb ddr5 OC overclocked @880mhz
1000watt power supply
JVC RS25 Dila projector 1920x1080@60Hz max.

software:
NVIDIA 285.62
MPC-HC 1.5.3.3757
madVR v0.77 as video renderer
LAV Filters 0.37 with CUVID (hardware decoding) enabled

SubJunk
2nd November 2011, 06:13
For a user who doesn't know how to begin, I recommend using SVP (http://www.svp-team.com/wiki/Main_Page).

THX-UltraII
2nd November 2011, 08:53
Thanks for your reply. I ve done a lot of reading last night about SVP and I have some last questions before I m going to experiment with it because of madVR I m using:

Do I just need to choose the NVIDIA profile 1080p60 and will it work ok with madVR than?

I ask this because madVR needs to get a PRECISE feed of the correct refresh rate. With this I mean:
With my current setup (posted later in this reply) I feed madVR with a custom made res/refresh rate made in the NVIDIA control panel of 23,976Hz. I do this because the standard 23Hz profile of the NVIDIA control panel is actually 23,971 so you get so called dropped frames in MPC-HC/madVR because the deviation between 23,971 and the actual 23,976 it needs to be.

What my question really is if I will get problems with dropped frames with SVP and running MPC-HC/madVR?

My setup:
Hardware:
Intel Core2Quad Q9450
4 GB DDR3 running @1333Mhz
MSI Cyclone 460GTX 1gb ddr5 oc edition overclocked running@880Mhz
1000Watt Power Supply

Software:
W7 X64 (disabled all services running in background that I don t need)
no Anti-Virus, Spyware and Firewall running in the background
MSI afterburner and Eventghost always running in background which takes some CPU but really not much
NVIDIA 285.58 WHQL driver
MPC-HC 1.5.3.3757 X86
madVR v0.77 as video output renderer
LAV video decoder 0.37

SubJunk
2nd November 2011, 09:19
Try it and find out :)

Sp00kyFox
2nd November 2011, 15:01
hmm. I don't get it. I was interested in the whole concept of framerate doubling so I found this script.
But no matter what I do I always get the msmoothfps-error:

MsmoothFps: unable to load library given in svp_flow_lib

My avisynth script in ffdshow so far:

interframe(gpu=false, flowpath="C:\path\Dependencies")

I don't get it. The error seems to be related with unsupported gpus and the "libflowgpu.dll". But my gpu is unsupported anyway (ati hd radeon 4870) so it should use the "libflowsse.dll".
Maybe my cpu is outdated? (amd athlon 64 x2 4400+).
I also tried to specifically link the dll with:

svp_flow_lib = "C:\path\Dependencies\libflowsse.dll"
interframe(gpu=false, flowpath="C:\path\Dependencies")

Didn't help either. Any suggestions how to solve the problem?

naoan
2nd November 2011, 16:50
try :

interframe(gpu=false, flowpath="C:\path\Dependencies\")

also have you put fft3w on system32 (or syswow64 if you have 64 bit windows) ?

Sp00kyFox
2nd November 2011, 16:56
try :
interframe(gpu=false, flowpath="C:\path\Dependencies\")
that's exactly what I did. See my last post.


also have you put fft3w on system32 (or syswow64 if you have 64 bit windows) ?
yip already done (wxp-se3 32bit)

edit:
oh you mean with an additional backslash, well let's try

edit2:
seems to work now, well kinda. it completely freezes on the first displayed frame even with the ultra fast preset.
cpu is working on 100%. well my system is maybe too old for realtime fps doubling, but thx anyway.

SubJunk
2nd November 2011, 22:33
InterFrame 1.12.2 is released which increases speed by up to 15%

Portioli
3rd November 2011, 15:11
for phenom ii x4 955 what is the best setting in SetMTMode(x,x) ?

and one more question, how i can set it for 50fps for PAL?

and one more question, "Prefer DSS2 over DirectShowSource" is always grey and i cannot check this box

SubJunk
4th November 2011, 00:51
for phenom ii x4 955 what is the best setting in SetMTMode(x,x) ?For a CPU that has 4 threads, the best is (2,3).

and one more question, how i can set it for 50fps for PAL?This is explained in the documentation (http://www.spirton.com/uploads/InterFrame/InterFrame.html).

and one more question, "Prefer DSS2 over DirectShowSource" is always grey and i cannot check this boxThis is explained in the FAQ section of the guide (http://www.spirton.com/convert-videos-to-60fps/#FAQ).

THX-UltraII
4th November 2011, 14:07
Hi SubJunk,

As you might have read in my postings I m pretty new with PC frame interpolation and unfortunately I m a little noobish too as it comes to PC. Well, I ll try to explain you what I want and maybe you can tell me if it s possible:

After doing a lot of reading and questions on the SVP forum I finally tried (the lastest) version of SVP last night. I choose the Core2Quad profile because I have a Core2Quad :) and changed one of the settings in SVP from 'x2' to display refresh rate (which I put on 60Hz in my case because that s the max of my digital projector). I got a CPU load of 70%. I played a movie and it runned 'fine'. With this I mean that I only had problems with frame drops reported by madVR (but that s for later; first things first). I did however noticed artifacts which bothered me a lot (especially around the contours of people who move). So I switched to 'expert' view in the SVP manager which gave me a lot of options to fine tune. Changing one of the options (don t remember what option it was) from 'normal' to 'complex' helped some but also raised my CPU a bit. After this I tried to change more of the settings in the expert view to a higher quality setting but soon the max of my CPU was reached. I now know for sure that my CPU is just not capable of handling ALL the highest settings in SVP. I m not going to invest in a new systeem (i7 970) only for SVP so what I want to try is CONVERT my movies with the help of you guide. But I already have some questions about it before I start trying this:

1.
Is your guide compatible with full Blu-Ray rips in BDMV folder structure, .m2ts Blu-Ray remuxes, .mkv 1080p content (BR rips that are decoded to save space) and .mov HD trailers?

2.
Is it possible with you guide to convert a movie with the highest possible settings that are in theory possible with SVP in real-time?
(btw. cannot imagine there s a PC out there that can handle ALL the highest settings in SVP in real-time for 1080p content)

my hardware:
Core2Quad Q9450
4gb DDR3 1333
MSI GTX460 Cyclone 1gb ddr5 OC overclocked @880mhz
1000watt power supply
JVC RS25 Dila projector 1920x1080@60Hz max.

my software:
NVIDIA 285.62
MPC-HC 1.5.3.3757
madVR v0.77 as video renderer
LAV Filters 0.38 with CUVID (hardware decoding) enabled

SubJunk
4th November 2011, 23:00
Is your guide compatible with full Blu-Ray rips in BDMV folder structure, .m2ts Blu-Ray remuxes, .mkv 1080p content (BR rips that are decoded to save space) and .mov HD trailers?The guide is compatible with any video that plays on your computer. As long as your computer knows how to decode it (meaning you have the codecs installed and set up properly) then the method used in my guide can use them.

Is it possible with you guide to convert a movie with the highest possible settings that are in theory possible with SVP in real-time?The default settings in InterFrame are the best quality I know of. SVP does not offer any more or less quality than InterFrame, we share knowledge and files so we improve eachother's products.

(btw. cannot imagine there s a PC out there that can handle ALL the highest settings in SVP in real-time for 1080p content)Well the "highest" settings in SVP will often make the quality worse, because SVP does not sort its settings in order of worst to best, they are just options to choose. But yes, many PCs are capable of running the highest quality settings (the default tuning in InterFrame) on 1080p in realtime.

THX-UltraII
5th November 2011, 12:30
Ok, thanks SubJunk.

So I started last night with your guide but I immediately have some questions already @step 1 :o

- with the updates process of MeGUI I get a notification that 'neroaacence' is outdated and that I have to dl this from the site from Nero and unpack it to the correct path.
Is this step need for the coversion I m going to do?

- I don t know what to do exactly with the step 'Close MeGUI and extract the tools folder over the top of your MeGUI tools folder, which for most people will be C:\Program Files\MeGUI\tools\.'

EDIT:
I think I found what the pupose it of the tools folder. I just copied and pasted the 'tools' folder that was located in the folder 'Files-20111103' I just downloaded and pasted this into my folder 'C:\Program Files (x86)\MeGUI\tools' (I did overwrite the previous 'avisynth_plugin' folder).

After this I went on with your guide in the hope I don t need the nero thing to download.

Ok, everything went well untill step 7 where I have some question about:

- I own a Q9450 with 4 threads so I filled in 2,7 at SetMTMode correct?

- I own a fairly good video card, the MSI GTX460 GDDR5 oc edition overclocked@900Mhz. I read that I can increase the speed of the conversion by adding a line to the script. But I see that it will take slight picture quality so when I want the highest possible quality I just don t fill in this line even though a have a good video card correct? (never thought that a videocard could help with a conversion process btw)

step 8:
the checkbox 'prefer DSS2 over DirectShowSource' is greyed out and not selectable.


And if I already own LAV filters and all my video content runs good with this atm, can I skip the codec package download?


Enough questions for now I think :D. I ll wait for further instructions before I move on now.

SubJunk
5th November 2011, 21:11
Hi THX-UltraII, I don't think this is the right place to discuss this so please ask further questions about the guide by commenting on the guide. I'll answer this lot of questions here for convenience, though :)

I own a Q9450 with 4 threads so I filled in 2,7 at SetMTMode correct?Yes

when I want the highest possible quality I just don t fill in this line even though a have a good video card correct?The quality loss is almost unnoticeable, in fact I don't think anyone could see it in moving video, only by studying screenshots. So up to you.

the checkbox 'prefer DSS2 over DirectShowSource' is greyed out and not selectable.That's answered in the FAQ section of the guide.

And if I already own LAV filters and all my video content runs good with this atm, can I skip the codec package download?Sure, you can always install codecs at a later stage if you run into problems too :)

magnetite
6th November 2011, 08:02
Hey SubJunk, I asked about GPU encoding before, however, I have some new questions. Now my GPU vs CPU seems to be 180 FPS vs 210 FPS or so. My GTX 570 has 480 CUDA cores, each running at 1.4 GHz. I'm not good at math, but I've also heard that CUDA is much faster than regular CPU encoding because you've got 480 slower cores versus 8 high speed CPU cores. Not sure if your script uses just the graphics card, or whether it actually uses the CUDA cores.

Here's a video to show you what I'm talking about (http://www.youtube.com/watch?v=DnIvodB2RzU&feature=player_embedded#!)

Okay this guy isn't doing video encoding, but he basically bought a bunch of GPUs and is crunching some serious numbers with it. Same could be applied here, although I've never tested it out before.

Long story short, would it be better to upgrade one of my old computers with another i7 2600K? Or do what this guy is doing. Wouldn't need to upgrade the whole computer, just the CPU, motherboard, and RAM.

Another thing I wanted to add was when the GPU=true, my GTX 570's load is only around 10%. Is there a way to utilize the whole card?

widezu69
6th November 2011, 21:12
@magnetite Hey, I'm new here but I've been working on this with Sub for years before he moved here. GPU=true does not completely turn everything to the GPU. It just spreads the work across. Your CPU will still be pegged full. You cannot compare this to CUDA computing. I use InterFrame with realtime playback. Cuda and GPU computing is way faster than CPU but only when the app is properly written to address everything the GPU has to offer. I don't under stand why your GPU rendering speed is slower though :confused: try and get that sorted. Are you using SetMTMode?

Personally I'd love to see a completely separate GPU, CPU utilisation. Eg the CPU does the interpolation and the GPU does the rendering or vice versa. Don't see it happening soon though :(

magnetite
6th November 2011, 23:00
I don't under stand why your GPU rendering speed is slower though :confused: try and get that sorted. Are you using SetMTMode?


Actually to clarify, I'm getting 180 FPS with the CPU alone (4C/8T i7 2600K @ 4.5 GHz), then when I add "GPU=true" it jumps up to 210-220 FPS or so. MTMode is set to (2, 14), since SubJunk said you should put your threads * 1.8.

I know it only takes about 20 minutes to do an episode, but I'm actually doing my whole library like this so I'll take all the speed boosts I can get.

SubJunk
7th November 2011, 00:25
Welcome to the thread, widezu :D

magnetite, like widezu said, the GPU is only partly used right now so 10% usage is normal. It would take significant code changes to utilise the GPU more. Maybe one day, but not soon.

widezu69
7th November 2011, 01:06
Actually, try (2,15) I find that slightly better. Ok so your GPU mode has increased speed. There was some confusion there :) good to see that you have a nice machine and are using it well.

@Sub, how much difference to the quality does dct add? I'm realtiming your second highest settings and was wondering how much of a noticeable difference it actually adds. BTW I'm playing everything @120fps -> 24x5 :D

SubJunk
7th November 2011, 02:16
dct=5 seems to make big improvements with sudden luma changes like flashing lights, it's better at keeping objects still if they're meant to be still instead of moving them because of luma changes.

magnetite
7th November 2011, 04:21
Welcome to the thread, widezu :D

magnetite, like widezu said, the GPU is only partly used right now so 10% usage is normal. It would take significant code changes to utilise the GPU more. Maybe one day, but not soon.

That's cool. Parallel processing is still sort of new. I mean a lot of programs still use two cores. Not too many make use of four or more, with the exception of video encoding and such.

I guess I was just throwing it out as an idea of what could be accomplished with this someday.

cattolicboy
16th November 2011, 02:18
Hi SubJunk, first of all I want to make the compliments for the script, I'm using it very often and I hope there will be more improvements regarding moving scenes.
I just need some advice about the encoding process: usually I use 2pass at 3000kbps for 720p source at 24fps so how much you suggest to set the bitrate for the same "interframed" source?
Someone says that would be enough a 20% more of the usual bitrate (in this case 3500/4000kbps) or do you think that will be neccessary to doubling the bitrate too?

SubJunk
16th November 2011, 03:27
Hi SubJunk, first of all I want to make the compliments for the script, I'm using it very often and I hope there will be more improvements regarding moving scenes.
I just need some advice about the encoding process: usually I use 2pass at 3000kbps for 720p source at 24fps so how much you suggest to set the bitrate for the same "interframed" source?
Someone says that would be enough a 20% more of the usual bitrate (in this case 3500/4000kbps) or do you think that will be neccessary to doubling the bitrate too?Hi cattolicboy, thanks for the feedback :)
If you use x264 I recommend using CRF instead of setting a bitrate. It will adjust the bitrate for you based on the CRF value and it takes into account framerate in recent x264 versions. Personally I use CRF 14 for near-lossless quality, but release groups are using values around 20.

cattolicboy
16th November 2011, 03:38
Thanks for the quick reply.
Most of the times I use crf, but for some projects where I want to have total control of the final size I need 2pass encoding.
That's why I asked that. Any idea?

SubJunk
16th November 2011, 04:23
I'm not sure, but you can do an easy test to find out yourself:
1) Encode a video using CRF at its original framerate
2) Encode the same video using the same CRF value but using InterFrame
3) Calculate the difference between the two filesizes

travolter
17th November 2011, 10:25
Actually to clarify, I'm getting 180 FPS with the CPU alone (4C/8T i7 2600K @ 4.5 GHz), then when I add "GPU=true" it jumps up to 210-220 FPS


How do you measure this? Programs?

When I do framedoubling realtime I can only measure that video skips frames at 60fps or not (reading output framerate of my videoplayer).. but I wonder if I have more headroom to increase script settings

SubJunk
17th November 2011, 11:24
MeGUI displays the FPS while it is converting

Bloax
17th November 2011, 12:21
You can also measure script speed by using "Run video analysis pass" in VirtualDub.

widezu69
24th November 2011, 23:01
Hey Sub, any progress with synchronised unpaired simpler vectors? You can reach me over PM if it isn't ready yet.

SubJunk
24th November 2011, 23:22
Hey mate, it looked promising at first but then I noticed it was making as many scenes worse as it was making better

BilboFett
30th December 2011, 09:23
I've followed your great guide from http://www.spirton.com/convert-videos-to-60fps/

MeGUI seems to work great through all steps, even if I modify the AVS script for interframe to change the tuning to "smooth" or "Ultrasmooth". But if I add the line "preset=Placebo", it fails.

Here is my script:

SetMTMode(2,7)
PluginPath = "C:\Program Files (x86)\megui\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"mvtools2.dll")
LoadPlugin(PluginPath+"RemoveGrainSSE3.dll")
Import(PluginPath+"InterFrame.avsi")
<input>.ConvertToYV12()
InterFrame(Preset="Placebo", FlowPath=PluginPath, Tuning="UltraSmooth")

Here's the failure line from when I press "save" at step 10:

http://imgur.com/b2qnG.jpg

SubJunk
30th December 2011, 09:58
Hi BilboFett, great to hear it's mostly working well for you!
Your error can be fixed by loading the EEDI2 plugin, which is included in the InterFrame download (not the guide download)

BilboFett
30th December 2011, 10:07
Hi BilboFett, great to hear it's mostly working well for you!
Your error can be fixed by loading the EEDI2 plugin, which is included in the InterFrame download (not the guide download)

Wow fast response!

Can you show me where on my computer to place the EEDI2 plugin, and where to invoke the command in my line? Or even better, show me my new script w/ the EEDI2 plugin added?

Thanks so much for such an awesome tool! I've been searching for months for something like this!! KUDOS!

SubJunk
30th December 2011, 11:04
Can you show me where on my computer to place the EEDI2 plugin, and where to invoke the command in my line? Or even better, show me my new script w/ the EEDI2 plugin added?It should be put in the same folder as RemoveGrainSSE3.dll
Here's your script with the line added:

SetMTMode(2,7)
PluginPath = "C:\Program Files (x86)\megui\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"mvtools2.dll")
LoadPlugin(PluginPath+"RemoveGrainSSE3.dll")
LoadPlugin(PluginPath+"EEDI2.dll")
Import(PluginPath+"InterFrame.avsi")
<input>.ConvertToYV12()
InterFrame(Preset="Placebo", FlowPath=PluginPath, Tuning="UltraSmooth")

Thanks so much for such an awesome tool! I've been searching for months for something like this!! KUDOS!Awesome :)

SubJunk
31st December 2011, 02:55
InterFrame 1.12.3 is released, enjoy :)

BilboFett
2nd January 2012, 22:05
Open-question to everyone on this forum: what to do w/ the audio? When I've tried the frame doubling to 59.94 from 29.97, at least in small 2-3 minute items like movie trailers, the audio stays in sync.

But when I apply it to longer things that are 10-15 mins, it gets out of sync every time. Doesn't seem to matter what codec I use for the audio or how I mux it back in w/ the video.

Any suggestions? Any configuration I can do?

I'm having trouble wrapping my brain around the math of what *SHOULD* change about the audio, to have it match the video.

Subjunk, thanks so much for making this for us. A high quality product!

SubJunk
3rd January 2012, 00:04
If the audio goes out of sync it's likely that the source has a variable framerate. What you said (muxing the original audio with the converted video) should work perfectly if the framerate is constant.

BilboFett
3rd January 2012, 00:11
If the audio goes out of sync it's likely that the source has a variable framerate. What you said (muxing the original audio with the converted video) should work perfectly if the framerate is constant.

The source for the audio is a wav file, w/ no variable frame rate. I'll try just muxing the wav file in. But when I've converted it to an mp3 or an ac3, I always choose CBR, not VBR... ?

SubJunk
3rd January 2012, 00:32
The framerate for the video :)

BilboFett
3rd January 2012, 00:47
The framerate for the video :)

the frame-rate for the video was 29.97fps locked, and became 59.94fps locked via your step by step process...

I had total control over every step.

Tuning was "smooth". Everything else default.

SubJunk
3rd January 2012, 01:09
The only other thing I can think of would be dropped frames, are your scripts using DirectShowSource or DSS2?

BilboFett
3rd January 2012, 01:20
The only other thing I can think of would be dropped frames, are your scripts using DirectShowSource or DSS2?

In step 8 of your guide, you said: "Click the Extra Setup tab and make sure "Prefer DSS2 over DirectShowSource" is checked" and then in step 9 you said "A window will pop up to give you 3 buttons, click "DirectShowSource".
So, I followed those steps. Should I be doing something different? Also... if its doing the MeGUI writing-to-disk encoding, obviously not in full-time, why would it be dropping any frames whatsoever? When you encode "off-line" like that, shouldn't it go for each and every single frame, period, and not drop any?
UPDATE: I just got properties for my encoded video from Adobe Premiere... it lists zero dropped frames.

SubJunk
3rd January 2012, 02:21
DirectShowSource drops frames but DSS2 doesn't, so yes you should be safe.
I'm not sure why your audio drifts out of sync with your video, it shouldn't happen and has never happened for me unless I was accidentally using DirectShowSource or a VFR video.
Hopefully someone else can help you.

Shah Jahan
4th January 2012, 09:46
I use InterFrame in realtime and with Medium settings the CPU load stays at ~60% whereas with placebo it shoots to 100% and starts to lag. So I guess there is room for improvement with the presets.

Can you please make a few more presets for it? Something like Good, better, best or along the lines? This way I can use the presets and the CPU load more effectively.

Thank you very much.

Bloax
4th January 2012, 10:46
I think the biggest speed drain in "Placebo" is EEDI2.
On this little clip I have here (800x600) - EEDI2 alone gets 10 FPS.

I know it's PLACEBO and all, but NNEDI3 (like this) is slightly less smoothish, but six times faster.
NNEDI3(1,true,nsize=0,nns=0)

Shah Jahan
4th January 2012, 12:22
I think the biggest speed drain in "Placebo" is EEDI2.
On this little clip I have here (800x600) - EEDI2 alone gets 10 FPS.

I know it's PLACEBO and all, but NNEDI3 (like this) is slightly less smoothish, but six times faster.
NNEDI3(1,true,nsize=0,nns=0)
But I don't use EEDI2 or NNEDI3

I use the following script:

SetMTmode(2,7)
ffdshow_source()
SetMTMode(2)
InterFrame(Preset="Placebo", GPU=true, FlowPath="C:\Program Files (x86)\AviSynth 2.5\plugins\")
GetMTMode(false) > 0 ? distributor() : last

Perhaps, the preset it uses calls for EEDI2? If yes, then perhaps SubJunk might consider using NNEDI3 if it is 6x faster for a slight drop in quality?

Maybe use it in the presets between Medium and Placebo, if you don't want to remove it entirely?

Bloax
4th January 2012, 14:19
Yeah, I'm referring to the script itself.
Preset == "Placebo" ? Eval("""
CustomLuma = EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input), src_left=0.25 )
CustomChroma = EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input), src_left=0.5 , src_top=0.5)

Shah Jahan
4th January 2012, 21:46
Massive improvements in speeds using NNEDI3, but there is still some lag due to high-CPU usage.

SubJunk
8th January 2012, 02:15
The placebo setting will always be very slow, that is why it's called placebo :) It is the same in x264. But yes I could look at adding some more presets in the next version.

choas ct4
9th January 2012, 18:46
Hi everyone, congratulations for the forum and this topic, I would like to ask if you can make good use (and how?) InterFrame in real time during playback of videos using this configuration: mpc-hc + ffdshow + avisynth.
thanks

pbristow
9th January 2012, 20:35
OK, just a casual question here... why is the "placebo" preset called "placebo"?

The word placebo implies "It doesn't really do anything, but you'll *think* it helps!"
But looking at the code, it seems to me the placebo preset does actually do something! 8-)

[IS CONFUSED]

SubJunk
9th January 2012, 21:31
It's just a naming convention I adopted from x264 :) The placebo preset offers very slight quality advantages (almost none) but is much much slower.

Bernardd
28th January 2012, 20:13
Hello,
Thanks for InterFrame
I wanted to use InterFrame to change Super 8 movies' FPS from 16.667 to 25.
In some part of clip, with MFlowFPS, i get mad pictures like in this clip. http://www.youtube.com/watch?v=geO_I0sHv0E

With InterFrame, with Algo=13 and SadML=50, i can get this clip. http://www.youtube.com/watch?v=MnLFVnPBAeY

It is not perfect, but the look is better in the first part. But in the middle, Algo and SadML' tuning must be changed.

So i have written this mod of InterFrame script in the joint zip file. The changes are :

Add new "Preset", "Add masque", to proceed motion analyse on one mask made by MaskTools v2 cf. http://manao4.free.fr/mt_masktools.html (It is a try)

Add new item "Mode" to indicate if necessary the MaskTools mode.

Add new item "Tuning_Manuel" with default "False" to keep the original InterFrame process and if shift to "True", it enable the two new functions "Algo_manuel" and "SadML_manuel".

Add "blend" shift from "True" to "False", in accordance with old movies restoring scripts.

Do you agree this mod ?

Do you know other MSmoothFps' tunings can be used for Super 8 or 8 mm movies ?

Thanks
Bernard

SubJunk
28th January 2012, 23:16
Hi Bernardd,
Maybe you could upload it to another website so we don't have to wait for the attachment to be approved :)

Bernardd
28th January 2012, 23:26
Hi SubJunk

The script is not to big, so i copy it below.

Quote

#------------------------------------------------------------------------------#
# #
# InterFrame 1.12.3 by SubJunk #
# #
# A frame interpolation script that primarily uses MVTools2 for making #
# accurate estimations about the content of non-existent frames #
# Its main use is to give videos higher framerates like newer TVs do #
#------------------------------------------------------------------------------#


# For instructions and further information see the included InterFrame.html
# For news go to spirton.com


function InterFrame(clip Input, string "Preset", string "Tuning",int "NewNum", int "NewDen", \
string "FlowPath", bool "GPU", string "InputType", string "Mode", bool "Tuning_manuel", string "Algo_manuel", int "SadML_manuel",\
bool "blend") {
# Defaults
Preset = default(Preset , "Medium" )
NewNum = default(NewNum , 0 )
NewDen = default(NewDen , 0 )
Tuning = default(Tuning , "Film" )
FlowPath = default(FlowPath , "Undefined")
GPU = default(GPU , false )
InputType = default(InputType, "2D" )
Mode = default(Mode, "sobel")
Tuning_manuel = default(Tuning_manuel, true)
Algo_manuel = default(Algo_manuel , "23" )
SadML_manuel = default(SadML_manuel , 150 )
blend = default(blend , true)



# Validate inputs
Assert(Preset == "Placebo" || Preset == "Medium" || Preset == "Fast" || Preset == "Faster" || Preset == "Very Fast" || Preset == "Super Fast" || Preset == "Ultra Fast" || Preset == "Add Masque", "'"+Preset+"' is not a valid preset. Please check the documentation for a list of the valid presets.")
Assert(Tuning == "Film" || Tuning == "Smooth" || Tuning == "UltraSmooth" || Tuning == "Animation" || Tuning == "Weak" || Tuning == "Manuel","'"+Tuning+"' is not a valid tuning. Please check the documentation for a list of the valid tunings.")
Assert(InputType == "2D" || InputType == "SBS" || InputType == "OU" || InputType == "HSBS" || InputType == "HOU", "'"+InputType+"' is not a valid InputType. Please check the documentation for a list of the valid InputTypes.")
Assert(FlowPath != "Undefined", "You must specify FlowPath. Please check the documentation for details.")

Assert(Mode == "sobel" || Mode == "roberts" || Mode == "laplace" || Mode == "hprewitt" || Mode == "prewitt" || Mode == "cartoon" || Mode == "min/max", "'"+Mode+"' is not a valid preset. Please check the documentation for a list of the valid modes.")
Assert(Algo_manuel == "23" || Algo_manuel == "22" || Algo_manuel == "21" || Algo_manuel == "13" || Algo_manuel == "12" || Algo_manuel == "11"\
|| Algo_manuel == "1" || Algo_manuel == "2","'"+Algo_manuel+"' is not a valid tuning. Please check the documentation for a list of the valid Algo_manuels.")

# Get either 1 or 2 clips depending on InputType
InputType == "SBS" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0 , 0, -Input.Width/2, 0), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(Input.Width/2, 0, 0 , 0), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackHorizontal(FirstEye, SecondEye)
""") : InputType == "OU" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0, 0 , 0, -Input.Height/2), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(0, Input.Height/2, 0, 0 ), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackVertical(FirstEye, SecondEye)
""") : InputType == "HSBS" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0 , 0, -Input.Width/2, 0).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(Input.Width/2, 0, 0 , 0).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackHorizontal(FirstEye.Spline36Resize(Input.Width/2, Input.Height), SecondEye.Spline36Resize(Input.Width/2, Input.Height))
""") : InputType == "HOU" ? Eval("""
FirstEye = InterFrameProcess(Input.crop(0, 0 , 0, -Input.Height/2).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
SecondEye = InterFrameProcess(Input.crop(0, Input.Height/2, 0, 0 ).Spline36Resize(Input.Width, Input.Height), Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType)
StackVertical(FirstEye.Spline36Resize(Input.Width, Input.Height/2), SecondEye.Spline36Resize(Input.Width, Input.Height/2))
""") : Eval("""
InterFrameProcess(Input, Preset=Preset, Tuning=Tuning, NewNum=NewNum, NewDen=NewDen, FlowPath=FlowPath, GPU=GPU, InputType=InputType,\
Mode=Mode, Tuning_manuel=Tuning_manuel, Algo_manuel=Algo_manuel, SadML_manuel=SadML_manuel,\
blend=blend)
""")
}

function InterFrameProcess(clip Input, string "Preset", string "Tuning", int "NewNum", int "NewDen", \
string "FlowPath", bool "GPU", string "InputType", string "Mode", bool "Tuning_manuel", string "Algo_manuel", int "SadML_manuel",\
bool "blend") {

# Create processed clip for slower presets
Preset == "Placebo" || Preset == "Medium" || Preset == "Fast" || Preset == "Faster" ? Eval("""
ProcessedSource = Input.RemoveGrain(mode=17)
""") : Preset == "Add_Masque" ? Eval("""
ProcessedSource=Input.RemoveGrain(mode=17).MT_Edge(mode=Mode)
""") : Eval("""
# Don't want ProcessedSource
""")

# Set variables controlled by Tuning

BlockSize = (Tuning == "Film" || Tuning == "Animation") ? 16 : \
(Tuning == "Weak") ? 32 : 16
Overlap1 = (Tuning == "Animation") ? 0 : 4
Overlap2 = (Tuning == "Animation") ? 0 : 2
Tuning_manuel == false ? Eval("""
Algo = (Tuning == "Smooth" || Tuning == "Animation") ? 23 : 13
SadML = (Tuning == "Smooth" || Tuning == "Animation") ? 150 : 0
""") : Eval("""


Algo = (Algo_manuel == "23") ? 23 : \
(Algo_manuel == "22") ? 22 : \
(Algo_manuel == "21") ? 21 : \
(Algo_manuel == "13") ? 13 : \
(Algo_manuel == "12") ? 12 : \
(Algo_manuel == "11") ? 11 : \
(Algo_manuel == "128") ? 128 : \
(Algo_manuel == "1") ? 1 : \
(Algo_manuel == "2") ? 2 : 13

SadML = SadML_manuel
""")



# Create super clip/s
SuperRegular = MSuper(Input, hpad=BlockSize, vpad=BlockSize, rfilter=4)

Preset == "Placebo" ? Eval("""
CustomLuma = EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input), src_left=0.25 )
CustomChroma = EEDI2(Input, field=1).Spline36Resize(2*width(Input), 2*height(Input), src_left=0.5 , src_top=0.5)

CustomPelClip = MergeChroma(CustomLuma, CustomChroma, 1)

Super = MSuper(ProcessedSource, hpad=BlockSize, vpad=BlockSize, rfilter=4, pelclip=CustomPelClip)
""") : Preset == "Medium" || Preset == "8_mm" ? Eval("""
Super = MSuper(ProcessedSource, hpad=BlockSize, vpad=BlockSize, rfilter=4)
""") : Eval("""
Super = MSuper(Input, hpad=BlockSize, vpad=BlockSize, rfilter=4)
""")

# Make interpolation vector clip
Preset == "Ultra Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, chroma=false)
forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, chroma=false)
""") : Preset == "Super Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1)
forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1)
""") : Preset == "Very Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1)
forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1)
backward = MRecalculate(Super, backward, blksize=8, overlap=Overlap2)
forward = MRecalculate(Super, forward, blksize=8, overlap=Overlap2)
""") : Preset == "Faster" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3)
forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3)
backward = MRecalculate(Super, backward, blksize=8, overlap=Overlap2, search=3)
forward = MRecalculate(Super, forward, blksize=8, overlap=Overlap2, search=3)
""") : Preset == "Fast" ? Eval("""
backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3)
forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3)
backward = MRecalculate(Super, backward, blksize=8, overlap=Overlap2, search=3)
forward = MRecalculate(Super, forward, blksize=8, overlap=Overlap2, search=3)
""") : Eval("""
backward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=true , lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3, dct=5)
forward = MAnalyse(Super, blksize=BlockSize, plevel=0, isb=false, lambda=1000 * BlockSize * Blocksize / 128, lsad=1600, overlap=Overlap1, search=3, pelsearch=3, dct=5)
backward = MRecalculate(Super, backward, blksize=8, overlap=Overlap2, search=3, dct=5)
forward = MRecalculate(Super, forward, blksize=8, overlap=Overlap2, search=3, dct=5)
backward = MRecalculate(Super, backward, blksize=4, overlap=Overlap2, search=3, dct=5)
forward = MRecalculate(Super, forward, blksize=4, overlap=Overlap2, search=3, dct=5)
""")

# Determine new framerate
NewNum != 0 ? Eval("""
# Use user values
""") : Input.Framerate == 25 ? Eval("""
NewNum = 50
NewDen = 1
""") : Input.Framerate == 30 ? Eval("""
NewNum = 60
NewDen = 1
""") : Eval("""
NewNum = 60000
NewDen = 1001
""")

# See whether to use GPU-acceleration or not
svp_flow_lib = GPU == true ? FlowPath+"libflowgpu.dll" : FlowPath+"libflowsse.dll"
Finest = GPU == true ? SuperRegular : MFinest(Input, SuperRegular)

# Put it together
MSmoothFps(Input, SuperRegular, backward, forward, finest=Finest, num=NewNum, den=NewDen, algo=Algo, ml=0, sadml=SadML, sadgamma=2, block=false, blend=blend)
}

Unquote

Bernardd
28th January 2012, 23:28
blank

Bernardd
28th January 2012, 23:30
blank

Bernardd
28th January 2012, 23:37
Hi SubJunk

This is link to mod script file. http://www.sendspace.com/file/9xgq4k


Thanks
Bernard

SubJunk
30th January 2012, 12:04
I'll check it out when I get a chance :)

SubJunk
1st February 2012, 12:09
I just finished looking over and testing your mod.
I don't know if MT_Edge offers any quality benefits, it seems almost identical with or without it.
The other changes are just adding more options so that users can tweak things manually, which I have no problem with. I will include more customisation in the next version, thanks.

Bernardd
2nd February 2012, 11:25
Hi SubJunk,

I agree with you MT_Edge is not yet necessary. I have try it, before i read your post http://www.svp-team.com/forum/viewtopic.php?id=73 and i see the magic work of YFRC-06dd-01mm-2011yyyy.avsi by RunForLife(Oleg Yushko).

Since 28 of january, i have try to adust too Blocksize.

With BlockSize = 32, Algo = 2 and SadML = 0, so i get frame without blend, but small morphing.
There is a link to one 25 frames HUFFYUV video file, which compare on left InterFrame (blocksize 32, Algo 2, SadML 0) with on right the ouput of MFlow FPS and InterFrame (default) (same ouput for this two process on my video clip). http://www.sendspace.com/file/t0bk0h
When you play this clip frame by frame, you can see the process difference.

I am happy, you will include more customisation in the next version. I think that will be useful for some chirurgical frame process.

Thank you

FDisk80
3rd February 2012, 21:02
So I tried running InterFrame 1.12.3 with this scipt:

SetMTmode(2,7)
ffdshow_source()
SetMTMode(2)
InterFrame(Preset="Very Fast", Tuning="Film", NewNum=48000, NewDen=1001, GPU=true, FlowPath="C:\Program Files (x86)\AviSynth 2.5\plugins\")
GetMTMode(false) > 0 ? distributor() : last


http://i.imgur.com/12xaY.jpg

After some time the player crashes with this error:
http://i.imgur.com/vCpvq.jpg

Tried MPC-HC and Pot Player. Same thing happens with both.

Some hardware info:
Intel i5 750 Quad Core @3663Mhz
4GB 1600Mhz RAM
HD5770 1GB 1000/1387Mhz
Windows 7 x64

Any ideas what is wrong here? :scared:

SubJunk
3rd February 2012, 21:14
A couple of ideas:
Add SetMemoryMax() to the top of your script, try something like SetMemoryMax(600)
If that doesn't work, try using SetMTmode(2,3)

FDisk80
3rd February 2012, 21:32
A couple of ideas:
Add SetMemoryMax() to the top of your script, try something like SetMemoryMax(600)
If that doesn't work, try using SetMTmode(2,3)

Still crashed with "SetMemoryMax(600)"
Trying "SetMTmode(2,3)"

Look like this happens when the CPU reaches close to 100% in some heavy scenes.

Edit: With "SetMTmode(2,3)" the frame rate drops below 35fps. Not all CPU threads are fully used I'm guessing.
Also testing SVP and even with i7 preset it runs 1080p at 60fps no problem.


Edit2: ok, so it's doesn't crash with "SetMTmode(2,3)"
But even with "Super Fast" preset the frame rate drops below 35fps in some scenes. And the CPU cores are only about 30~70% loaded.

Didée
3rd February 2012, 22:22
Disclaimer: I've zero experience with InterFrame or SVP.

Regarding Avisynth and MT, your script should start with setmtmode(5,x), like

SetMemorMax(666)
SetMTmode(5,6)
ffdshow_source()
SetMTMode(2)
InterFrame(.....
Because source filters usually don't like MTmode 2. Now ffdshow_source() might be a special case, but surely it doesn't need any threading.


Then, I'm not sure if MT can be successful when you set GPU=true. My experience with other GPU-filters is that they cannot run multithreaded. You can MT CPU filters, but not GPU filters. Is InterFrame/SVP any different in this respect?
In any case, try with GPU=false, too.

FDisk80
3rd February 2012, 22:58
Disclaimer: I've zero experience with InterFrame or SVP.

Regarding Avisynth and MT, your script should start with setmtmode(5,x), like

SetMemorMax(666)
SetMTmode(5,6)
ffdshow_source()
SetMTMode(2)
InterFrame(.....
Because source filters usually don't like MTmode 2. Now ffdshow_source() might be a special case, but surely it doesn't need any threading.


Then, I'm not sure if MT can be successful when you set GPU=true. My experience with other GPU-filters is that they cannot run multithreaded. You can MT CPU filters, but not GPU filters. Is InterFrame/SVP any different in this respect?
In any case, try with GPU=false, too.

With GPU=false the frame rate drops below 20 in some scenes and it will still crash when the load on the CPU is high.
And isn't "setmtmode(5,x)" will make things even slower?

Mode 1 is the fastest but only works with a few filters.
Mode 2 should work with most filters but uses more memory.
Mode 3 should work with some of the filters that don't work with mode 2 but it is slower.
Mode 4 is a combination of mode 2 and 3 and should work with even more filters but is both slower and uses more memory.
Mode 5 is the slowest (slower than not using SetMTMode) but should work with all filters that don't require linear frameserving (that is the frames come in order: frame 0,1,2,...,last).
Mode 6 is a modified mode 5 that might be slightly faster.

SubJunk
3rd February 2012, 23:01
@Didée: GPU=true works with MT

@FDisk80: You can try using SetMTMode(2,6)

FDisk80
3rd February 2012, 23:16
@Didée: GPU=true works with MT

@FDisk80: You can try using SetMTMode(2,6)

I did, still crashes.
Also tried:
SetMemoryMax(600)
SetMTmode(5,6)

Now mvtools2.dll crashed.
http://i.imgur.com/dlL3A.jpg

Even with SetMTMode(2,5) it crashed after some time.
And with SetMTMode(2,5) the frame rates are very low.

Didée
3rd February 2012, 23:33
@Didée: GPU=true works with MT
"works" is good. But "works correctly" is so much better. Did you verify if the results still are correct? Checking "if it doesn't crash" isn't sufficient. Back when I played with FFT3dGPU, I first thought all is okay (it didn't crash and looked okay). Only after closer checking it became clear that the results of FFT3dGPU were all-funky-wrong when the script was multithreaded. ;)

Gavino
3rd February 2012, 23:54
And isn't "setmtmode(5,x)" will make things even slower?
To continue Didée's theme: "slow" is bad. But "crashing" is even worse.

Most source filters don't work multithreaded, so you have to run them in mode 5, before switching to mode 2 for the rest of the script.

FDisk80
4th February 2012, 00:05
To continue Didée's theme: "slow" is bad. But "crashing" is even worse.

Most source filters don't work multithreaded, so you have to run them in mode 5, before switching to mode 2 for the rest of the script.

Well, it still crashes in mode 5.
The script is just to heavy for realtime 1080p even for a quad core CPU at 3.6Ghz and GPU acceleration + DXVA enabled.
Even at "Very Fast" and "Super Fast" presets.

BTW,
SVP sets "SetMemoryMax(1024)" and "SetMTMode(3,7)" by default, did not see it crash once. CPU load is much much lower and GPU load is the same, about 40%
Some settings are just overkill in InterFrame for realtime.


svp_scheduler=true
SetMemoryMax(1024)
svp_cache_reduce=true
svp_flow_lib="C:\Program Files (x86)\SVP\Plugins\MVTools2\libflowgpu.dll"
multinum=5
multiden=2
algo=13
block=false
ml=0
search=5
sadml=100
sadgamma=1
blend=true
dist=2
pel=2
sharp=0
Recalc=0
blkh=32
blkv=32
overlap=8
overlapv=8
wid_den=1
hei_den=1


LoadPlugin ("C:\Program Files (x86)\SVP\Plugins\MVTools2\mvtools2.dll")
SetMTMode(3,7)
ffdShow_source()
Assert(width==1920 && height==816,"Frame size "+string(width)+"x"+string(height)+" instead of 1920x816")
delim=":"
WriteFileStart("C:\Users\FDisk\AppData\Roaming\SVP\Logs\avsFPS.txt", "FramerateNumerator()", "delim", "FramerateDenominator()")
SetMTMode(2)
src=last
wid_den==1 ? last : \
hei_den==1 ? LanczosResize(int(width/wid_den/2)*2,height) : LanczosResize(int(width/wid_den/2)*2,int(height/hei_den/2)*2)
super=MSuper(pel=pel, hpad=blkh, vpad=blkv, sharp=sharp)
finest=pel==1 ? super : MFinest(super)
backward_vec=MAnalyse(super, isb=true, blksize=blkh, blksizev=blkv, overlap=overlap, overlapv=overlapv, search=search, searchparam=dist, pelsearch=dist, plevel=0)
forward_vec=MAnalyse(super, isb=false, blksize=blkh, blksizev=blkv, overlap=overlap, overlapv=overlapv, search=search, searchparam=dist, pelsearch=dist, plevel=0)
backward_vec = Recalc==0 ? backward_vec : MRecalculate(super, backward_vec, blksize=blkh2, blksizev=blkv2, overlap=int(overlap/4)*2, overlapv=int(overlapv/4)*2, search=search, searchparam=dist)
forward_vec = Recalc==0 ? forward_vec : MRecalculate(super, forward_vec, blksize=blkh2, blksizev=blkv2, overlap=int(overlap/4)*2, overlapv=int(overlapv/4)*2, search=search, searchparam=dist)
smooth_video=MSmoothFps(super, backward_vec, forward_vec, finest=finest, num=FramerateNumerator(last)*multinum,den=FramerateDenominator(last)*multiden, algo=algo, ml=ml, sadml=sadml, sadgamma=sadgamma, block=block, blend=blend)
smooth_video


distributor()

SubJunk
4th February 2012, 00:28
"works" is good. But "works correctly" is so much better.It works correctly.

The script is just to heavy for realtime 1080p even for a quad core CPU at 3.6Ghz and GPU acceleration + DXVA enabled.It works fine for me and my CPU is slower than yours.
It's not the settings that are the problem, since like you said SVP runs fine for you with the i7 settings which are a lot more intensive than InterFrame's fast presets :)

It's possible that DXVA is the problem, I've had trouble with that being very slow on my computer despite a fast GPU. You could try disabling that.

FDisk80
4th February 2012, 00:47
It works fine for me and my CPU is slower than yours.
It's not the settings that are the problem, since like you said SVP runs fine for you with the i7 settings which are a lot more intensive than InterFrame's fast presets :)

It's possible that DXVA is the problem, I've had trouble with that being very slow on my computer despite a fast GPU. You could try disabling that.

Tried it without DXVA, CPU load is still high and player crashes.
I don't understand how is your slower CPU can run this without crashes or low frame rates in realtime with 1080p.

SubJunk
4th February 2012, 00:55
I don't understand how is your slower CPU can run this without crashes or low frame rates in realtime with 1080p.InterFrame and SVP use the same files and same AviSynth code, so of course InterFrame can run videos that SVP can.
Just because something happens for you doesn't mean it happens for all people :)

Since SVP is working for you you can modify it to either use InterFrame or to use the same settings as InterFrame.

FDisk80
4th February 2012, 01:10
InterFrame and SVP use the same files and same AviSynth code, so of course InterFrame can run videos that SVP can.
Just because something happens for you doesn't mean it happens for all people :)

Since SVP is working for you you can modify it to either use InterFrame or to use the same settings as InterFrame.

Yes, this was my next step, to play with both scripts and see what is going on there. :cool:

BTW, is interpolation like this possible to be made as a filter or even a shader?

Maccara
4th February 2012, 03:46
"works" is good. But "works correctly" is so much better. Did you verify if the results still are correct? Checking "if it doesn't crash" isn't sufficient. Back when I played with FFT3dGPU, I first thought all is okay (it didn't crash and looked okay). Only after closer checking it became clear that the results of FFT3dGPU were all-funky-wrong when the script was multithreaded. ;)

IMO, every GPU filter should assert if someone tries to run them with MT. :p

It is completely contradictory to do that, since GPU filters are (or should be, otherwise there's no point) inherently multithreaded on the GPU already.

Best case: MT with GPU filter works but is completely pointless.

SubJunk
29th February 2012, 00:38
InterFrame 1.13 is released. Please see the first post for the changelog. Enjoy :)

Bernardd
29th February 2012, 16:47
Hi SubJunk

Thank you very much

What do you think about Algo 2 ? I find interest for it, because in problematic rush, it produce morph pictures without blend.

Bernard

SubJunk
29th February 2012, 22:40
Hi Bernardd, I will try it :)

FDisk80
29th February 2012, 23:18
InterFrame 1.13 is released. Please see the first post for the changelog. Enjoy :)

720P is all smooth and nice, looks good, no crashes
1080P the picture is blinking with green frames and then player freezes and crashes :(

MPC-HC + LAV (DXVA) + Interframe (Very Fast setting), (GPU accelerated)

SubJunk
1st March 2012, 02:57
Hi FDisk80, thanks for reporting this bug!
It's almost certainly a .dll problem so could you please try replacing the dependencies one by one with the previous version to see which is causing the problem? The previous version is here (http://www.spirton.com/uploads/InterFrame/InterFrame-1.12.3.zip)

FDisk80
1st March 2012, 12:13
Hi FDisk80, thanks for reporting this bug!
It's almost certainly a .dll problem so could you please try replacing the dependencies one by one with the previous version to see which is causing the problem? The previous version is here (http://www.spirton.com/uploads/InterFrame/InterFrame-1.12.3.zip)

Will try when I get home.

SubJunk
1st March 2012, 22:22
Thanks!

CruNcher
1st March 2012, 22:49
Hi FDisk80, thanks for reporting this bug!
It's almost certainly a .dll problem so could you please try replacing the dependencies one by one with the previous version to see which is causing the problem? The previous version is here (http://www.spirton.com/uploads/InterFrame/InterFrame-1.12.3.zip)

Especially if he uses a Script that uses external functions that have not been tested with SVPs modification i had a lot of crashes also depending on the Avisynth version and way of loading in the past and had to manually adapt stuff very often or update/downgrade.

mark0077
5th March 2012, 21:03
SubJunk, where did you get the new libflowgpu dll? Is it a yet unreleased dll from svp?

SubJunk
5th March 2012, 22:04
They released it publicly on their website but not in a SVP version

kolak
9th March 2012, 01:06
Is there a way to use YUY2 color space in interframe?
Is RemoveGrain only one filter which does not like YUY2 color space?
Tried to use Interleaved2Planar() and opposite, but had no luck.
Need help :(

SubJunk
11th March 2012, 01:13
Yeah I don't think it's possible, I have never tried though. I think MVTools2 doesn't allow it?

geminigod
11th March 2012, 04:57
Subjunk, you mentioned previously that if the goal were slow motion vs. smooth motion, you would not use this setup. I was hoping you might expand on the particulars of why and what you would use instead. It seems like this could work well for both, and I am struggling to comprehend the practical difference.

For example, what you recommendation as best course of action for this hypothetical scenario? Goal: create smooth slow motion with 50% reduction in speed from a source video of 1080p @ 23.976fps with medium-fast motion in scene?

SubJunk
11th March 2012, 08:22
Subjunk, you mentioned previously that if the goal were slow motion vs. smooth motion, you would not use this setup. I was hoping you might expand on the particulars of why and what you would use instead. It seems like this could work well for both, and I am struggling to comprehend the practical difference.

For example, what you recommendation as best course of action for this hypothetical scenario? Goal: create smooth slow motion with 50% reduction in speed from a source video of 1080p @ 23.976fps with medium-fast motion in scene?Thanks for the good question :) The practical difference is that at different speeds, different artifacts are more noticeable than others. It would be a good idea for InterFrame to have a slow motion preset or something but since I don't use it for that I don't think it will be added. However I know a lot of people do use it for slow motion and I've had good feedback about it, so while it could be further optimised for it, it should still be good :)

RemoveGrain and MVTools2 do support YUY2 actually. For RemoveGrain, you have to convert the clip into planar YUY2 by applying Interleaved2Planar() first, then feed the converted clip to RemoveGrain() with "planar=true" set. For MVTools2, both interleaved and planar YUY2 are supported, but it's recommended to feed planar YUY2 to MVTools2 for the sake of faster processing. Like RemoveGrain, MVTools2 also has a "planar" parameter. The problem is InterFrame doesn't use MFlowFps but MSmoothFps(SVP Build), which doesn't have a "planar" parameter. I don't know whether MSmoothFps even support interleaved YUY2 or not. You may try it. If MSmoothFps supports interleaved YUY2, remember to apply Planar2Interleaved() to the converted clip before feeding to MSuper and MSmoothFps.Thanks for the info :)

kolak
11th March 2012, 22:19
RemoveGrain and MVTools2 do support YUY2 actually. For RemoveGrain, you have to convert the clip into planar YUY2 by applying Interleaved2Planar() first, then feed the converted clip to RemoveGrain() with "planar=true" set. For MVTools2, both interleaved and planar YUY2 are supported, but it's recommended to feed planar YUY2 to MVTools2 for the sake of faster processing. Like RemoveGrain, MVTools2 also has a "planar" parameter. The problem is InterFrame doesn't use MFlowFps but MSmoothFps(SVP Build), which doesn't have a "planar" parameter. I don't know whether MSmoothFps even support interleaved YUY2 or not. You may try it. If MSmoothFps supports interleaved YUY2, remember to apply Planar2Interleaved() to the converted clip before feeding to MSuper and MSmoothFps.

Thanks- I already removed RemoveGrain and it does the trick- YUY2 seams to work fine even with SVP MVtools2. There is some speed penalty.
I tried convert to planar, but can't make it working- always have error about not supported color space in RemoveGrain. I don't think I know avisynth grammar well enough- it seams to be ingnored :)

Atak_Snajpera
20th March 2012, 15:44
Does anybody know how to increase motion search range or precision in order to eliminate "double leg effect"?
http://i.imgur.com/l22j7.png

BTW. Source is 1080@25fps. I'm trying to achieve nice looking slow motion effect.

kolak
20th March 2012, 18:24
Won't be easy as your source is only 25p.

Didée
20th March 2012, 18:49
A nice example for a case where motionsearch failure is almost guaranteed (even though it looks so easy to our eyes). The bright area of concrete between the legs does exist only in one frame, but is virtually non-present in the other. The angle of the moving leg's borders is different. The concrete below the shoe (moving leg) is noticeably darker in the one frame compared to the other.

A hard time for a tool bearing the "motion search" title, when in fact it only searches for X*X blocks that are most similar to each other.

kolak
20th March 2012, 20:02
btw... svp released their new dll - speed is very good, but I can't get as good results as with old mvtools :(

SubJunk
20th March 2012, 22:30
@Atak_Snajpera: I'm working on InterFrame 2.0 which will most likely fix that. It no longer uses MVTools2 and is much more advanced than the current 1.x versions.

@kolak: 25p is still easier to interpolate than most video which is at 23.976 :) By default InterFrame just doubles it to 50p.

kolak
20th March 2012, 23:29
Yes- 23.976p is the worse, but 25p not much easier :)
Once you have 50i/60i and can deinterlace to 50/60p than conversion is much easier and works much better.

Is new version based on new svp flow dll?
Can't wait to try it :)

SubJunk
20th March 2012, 23:34
Yeah it is :) I would have released it now, but the SVP DLLs don't work with AviSynth 2.6 yet so I'm waiting to see if we can fix that

kolak
20th March 2012, 23:36
Yeah it is :) I would have released it now, but the SVP DLLs don't work with AviSynth 2.6 yet so I'm waiting to see if we can fix that

I'm happy with 2.5 :)
Also found new dll way faster (maybe due to wrong settings) than old one? Is it true? I could not get good quality thought :(

Atak_Snajpera
20th March 2012, 23:52
kolak don't forget that 2.6 mt is less buggy than 2.5.8 mt version.

SubJunk
21st March 2012, 00:01
Also found new dll way faster (maybe due to wrong settings) than old one? Is it true?Yeah it is faster :)

kolak
21st March 2012, 01:01
kolak don't forget that 2.6 mt is less buggy than 2.5.8 mt version.

I had no major issues with interframe- even when using 6 cores.
QTGMC is a different story.

update- sorry- I think I'm using 2.6MT now- don't remember :)

aegisofrime
21st March 2012, 12:27
@Atak_Snajpera: I'm working on InterFrame 2.0 which will most likely fix that. It no longer uses MVTools2 and is much more advanced than the current 1.x versions.

@kolak: 25p is still easier to interpolate than most video which is at 23.976 :) By default InterFrame just doubles it to 50p.

Ooooo I can't wait! Been using Interframe since you first released it and still using it now. :thanks:

pbristow
21st March 2012, 12:44
Didee summed up my thoughts (and spotted an issue I hadn't!). It's an excellent test case, though!


@Atak_Snajpera: I'm working on InterFrame 2.0 which will most likely fix that. It no longer uses MVTools2 and is much more advanced than the current 1.x versions.


Ooh, this sounds exciting! Can you give us an idea what the new method is based on? Is it still block-matching based, but with added rotation/sheering/size-change/lighting-change detection? Or does it leap a few rungs further up the ladder of sophistication, with actual feature tracking (i.e. recognising the entire trouser leg as one "object", the shoe as another, and so on)...? :)

LexSfX
21st March 2012, 19:21
I made a little AVISynth script to use InterFrame 1.x easily with most videos. Here it is: https://github.com/AlexFolland/interframe-avisynth-script. I made it for personal use and am sharing it in case anyone else finds it useful. Any feedback of any kind is appreciated.

SubJunk
22nd March 2012, 23:28
InterFrame 1.14 is released. It is (hopefully) the final 1.x release.

I will release the first 2.0 beta soon, I'm still testing it.

Ooh, this sounds exciting! Can you give us an idea what the new method is based on? Is it still block-matching based, but with added rotation/sheering/size-change/lighting-change detection? Or does it leap a few rungs further up the ladder of sophistication, with actual feature tracking (i.e. recognising the entire trouser leg as one "object", the shoe as another, and so on)...? :)One of the cool new things is that backwards and forwards vectors influence eachother instead of being blind to eachother, which results in much more accuracy. Masking is also improved a lot as is scene-change detection.

kolak
23rd March 2012, 01:41
Lest wait and see. I still have motion problems when watched on TV. There are moments when there is jerkiness for few frames.

LexSfX
23rd March 2012, 04:16
I haven't read much about 2.0. Will it support multiple threads, or will it still be limited to a single thread like 1.x is? "usegpu" helps performance a little bit, but I'd like to be able to get the full power of my CPU.

aegisofrime
23rd March 2012, 05:31
InterFrame 1.14 is released. It is (hopefully) the final 1.x release.

I will release the first 2.0 beta soon, I'm still testing it.

One of the cool new things is that backwards and forwards vectors influence eachother instead of being blind to eachother, which results in much more accuracy. Masking is also improved a lot as is scene-change detection.

Thank you for your continued hard work. I shall put my interpolation projects on hold until the release of 2.0 beta. Won't want to waste those CPU cycles :p

SubJunk
23rd March 2012, 05:34
I haven't read much about 2.0. Will it support multiple threads, or will it still be limited to a single thread like 1.x is? "usegpu" helps performance a little bit, but I'd like to be able to get the full power of my CPU.InterFrame has always supported multi-threading, as do most AviSynth plugins.

You just use a multithreaded version of AviSynth then make the script like:

SetMemoryMax(512)
SetMTMode(3)
DSS2('file')
SetMTMode(2)
InterFrame()

Thank you for your continued hard work. I shall put my interpolation projects on hold until the release of 2.0 beta. Won't want to waste those CPU cycles :pCool, I'll try not to keep you waiting too long ;)

aegisofrime
23rd March 2012, 05:56
Cool, I'll try not to keep you waiting too long ;)

Lol I wasn't trying to put pressure on you, if that's how it came across. :( I will just work on my interlaced/Needs-To-Be-QTGMC'ed stuff first. :devil:

LexSfX
23rd March 2012, 07:26
InterFrame has always supported multi-threading, as do most AviSynth plugins.

You just use a multithreaded version of AviSynth then make the script like:

SetMemoryMax(512)
SetMTMode(3)
DSS2('file')
SetMTMode(2)
InterFrame()This is interesting, and I got the latest multi-threaded build from SEt ( http://www.mediafire.com/file/3gd3851mb9o9wq7/avisynth.7z ). Before installing it, setmtmode() returned an error saying setmtmode() didn't exist, and after installing it, it ran with setmtmode(), so I know I installed it properly. However, even after doing that, the script only used 1 thread with the interframe() call, but all 4 threads without it. I'm using ffmpegsource, if that makes a difference. It runs at full speed without the interframe() call, but interframe() seems to throttle its CPU usage to 1 of my 4 cores somehow, even though I am using setmtmode(2) before the interframe call. Do you have any ideas about why this is happening?

I'm using "avs2pipemod -benchmark interframe.avs" for testing.

My script is here: https://raw.github.com/AlexFolland/interframe-avisynth-script/master/interframe.avs

By the way, before you say it's because there's no setmtmode(3) before the source function calls, I tried that. It didn't change anything. Also, ffmpegsource seems to be multi-threaded anyway, even without that.

I would be very happy if I could use interframe at full speed! :)

SubJunk
23rd March 2012, 07:33
No idea why it's doing that, sorry. I've never used it with ffmpegsource

Bernardd
23rd March 2012, 22:43
Hi SubJunk,
Thank you for this new release.
Bernard

SubJunk
23rd March 2012, 23:22
InterFrame 2.0b1 is released :)

Bloax
24th March 2012, 10:41
"Film" tuning for 2.0b1 seems broken.

Even though the source I'm testing it on is pretty tough, it still uses pure frame blending on the easy parts.
"Smooth" Works just fine though. [/feedback]

SubJunk
24th March 2012, 12:42
Yeah I think the scene-change detection is too strong, that could be what's happening there. I'll look at making it weaker. Thanks for the feedback!

Bloax
24th March 2012, 12:49
Yeah, I'd believe that's the issue. Since in my brief testing of the new plugins, pumping the SCD way too high up resulted in the same effect.

Edit: Though it seems strange that I can't seem to find neither "Scene: x" nor "Blocks: y" definitions.

Reel.Deel
24th March 2012, 12:52
Hello SubJunk,

Thanks for your hard work.

In one your ealier post you said that the SVP DLLs did not work on AVIsynth 2.6. Is this still a work in progress?
I get an error for both svpflow_cpu.dll and svpflow_gpu.dll. Plugin "__" is not an AVIsynth 2.5 plugin. I'm using 2.6 MT on 32bit XP.

noee
24th March 2012, 13:15
Hello SubJunk,

Thanks for your hard work.

In one your ealier post you said that the SVP DLLs did not work on AVIsynth 2.6. Is this still a work in progress?
I get an error for both svpflow_cpu.dll and svpflow_gpu.dll. Plugin "__" is not an AVIsynth 2.5 plugin. I'm using 2.6 MT on 32bit XP.

Don't load *cpu or *gpu. Only load the plugins SVP1 and SVP2...

Reel.Deel
24th March 2012, 13:31
Thanks Noee.

I had tried that but didn't realize that it only works when GPU=True.

When GPU=False I get an error.

SVSmoothFps: overlap must be even with CPU frame composition.

(__\Interframe2.avsi, line 98)

(__\Interframe2.avsi, line 51)

kolak
24th March 2012, 13:48
Have same error.
Also NewNum adn NewDen are String, but in help/examples they are written eg. as 48000 instead of "48000"

aegisofrime
24th March 2012, 16:40
Subjunk, I remember in pre 2.0 versions of InterFrame your documentation states that usage of the GPU results in softer output. Your documentation for 2.0 does not state this. Does it mean that GPU and non-GPU output are of the same quality, more or less? :thanks:

SubJunk
25th March 2012, 00:22
In one your ealier post you said that the SVP DLLs did not work on AVIsynth 2.6. Is this still a work in progress?It works with 2.6 now :)

When GPU=False I get an error.

SVSmoothFps: overlap must be even with CPU frame composition.

(__\Interframe2.avsi, line 98)

(__\Interframe2.avsi, line 51)You're right. I will fix it. For now using Preset="Fast" should fix it.

Also NewNum adn NewDen are String, but in help/examples they are written eg. as 48000 instead of "48000"All strings (like Tuning and Preset) in the documentation are written without quotation marks, since they have "(String)" next to them. It has always been like that in 1.x too.

Subjunk, I remember in pre 2.0 versions of InterFrame your documentation states that usage of the GPU results in softer output. Your documentation for 2.0 does not state this. Does it mean that GPU and non-GPU output are of the same quality, more or less? :thanks:Yes :)

kolak
25th March 2012, 00:47
Does it use fallback method?

SubJunk
25th March 2012, 00:59
I'm not sure what you're asking

kolak
25th March 2012, 01:17
Some solutions use fallback method- so when motion adapative engine produces to many artefacts it switches to simple frame blending conversion.

SubJunk
25th March 2012, 01:21
There are fallbacks but in those cases we use masking on the problematic areas instead of giving up on the whole frame.

kolak
25th March 2012, 01:42
Does this not break frame cohesiveness?

I have some smoothness issues when watching footage on TV.
It's mainly on horizontal movements, eg when someone walks across.
Another question- it also looks like there is not enough motion blur, so footage look very sharp, but not smooth. I tried different setting for sadgamma, but still can't get enough blurring. It's ok for PC monitor, but once watched on TV than motion is not that smooth.

Didée
25th March 2012, 01:52
What motion blur? That's not the scope of this tool. If in frame one the ball is left, and in frame two the ball is right, it will calculate a new frame with the ball in the middle.

Creating motion blur is a quite different kettle of fish.

SubJunk
25th March 2012, 02:19
Does this not break frame cohesiveness?No, it just blurs the parts that are less likely to be accurately predicted. It was like that in 1.x too.

it also looks like there is not enough motion blurLike Didée said, there is no motion blur with InterFrame and never has been.

Reel.Deel
25th March 2012, 02:34
It works with 2.6 now :)

You're right. I will fix it. For now using Preset="Fast" should fix it.



Thanks SubJunk.

Are there any future plans to implement any other colorspace besides YV12 in Interframe 2.x?

I know Interframe 1.x was limited to YV12 due to some of the required plugins.

SubJunk
25th March 2012, 04:01
InterFrame 2.x only uses SVP plugins now, no other ones, so it may already work

kolak
25th March 2012, 12:19
What motion blur? That's not the scope of this tool. If in frame one the ball is left, and in frame two the ball is right, it will calculate a new frame with the ball in the middle.

Creating motion blur is a quite different kettle of fish.

Hmmm- you need it, because when you convert eg. 60i to 24p you end up with something strange- 24p which is so sharp, that it's unreal.
I assume, the way to solve, is to do it during deinterlacing with QTGMC.
I know it was designed to double fps, but does not have to be limited just to do this :)

What does sadgamma do?- this seams to help when set to <1.

kolak
25th March 2012, 12:22
InterFrame 2.x only uses SVP plugins now, no other ones, so it may already work

Looks like SVP plugins are resticted to yv12 for now.

pbristow
25th March 2012, 14:29
Regarding motion blur:

Hmmm- you need it, because when you convert eg. 60i to 24p you end up with something strange- 24p which is so sharp, that it's unreal.
I assume, the way to solve, is to do it during deinterlacing with QTGMC.
I know it was designed to double fps, but does not have to be limited just to do this :)


I can see both sides of this...

On the one hand, calculating and applying motion blur is probably best done as a separate step from motion interpolation, *if* the user requires it (I certainly *don't* want it done by default!). MVTools2 has a function to create motion blur by overlaying multiple closely-interpolated copies, for example. Very slow, not always accurate, but sometimes useful. A much quicker technique, I would think, would be to apply a localised one-dimensional spatial blur (possibly gaussian, or raised cosine), running parallel to the local motion vector(s), and in proportion to their length. That's something I wish I had the time and the coding chops to create. :\

On the other hand, where motion blurring (or indeed motion *de*-blurring!) is needed, it would be very useful to exploit the motion vectors already found by Interframe rather than starting again from scratch, since obtaining the vectors is the slowest part of the process.

Reel.Deel
25th March 2012, 14:48
InterFrame 2.x only uses SVP plugins now, no other ones, so it may already work

I did some playing around.

For YUY2, RGB24, and RGB32 I get an error:

SVSuper: Clip must be YV12
(__\Interframe2.avsi, line94)
(__\Interframe2.avsi, line 51)

For YV16 and YV24 there is no error but produces some odd artifacts.

For YV16 it seems that only the bottom half of the frames are affected. http://www.mediafire.com/?8esnfr7kshec64x

For YV24 3/4 of every frame has artifacts. http://www.mediafire.com/?1dq88w51znyd1c0

Maybe this will work with GPU=False, Preset=Medium. :)

The 1080p 30FPS test clip came from my Canon 7D. ConvertToXXX was used for color conversion.

kolak
25th March 2012, 15:17
On the other hand, where motion blurring (or indeed motion *de*-blurring!) is needed, it would be very useful to exploit the motion vectors already found by Interframe rather than starting again from scratch, since obtaining the vectors is the slowest part of the process.


I do it during deinterlacing with QTGMC. If you increase fps than it's not that important or needed, but when you going down (specially a lot) than you have to apply motion blur, otherwise you end up with something unreal. 24p can't "store" motion from eg. 60i source.

kolak
26th March 2012, 14:58
How can I reduce mask/blur effect- bit to much form my taste- creates visible smearing. I tried changing cover and mask, but don't see any effect.

mark0077
26th March 2012, 18:54
SubJunk, any idea how to read settings from the hidden settings file into your scripts.

I need to use this setting from the hidden settings file, to make SVP take what frame rate I give it as golden, otherwise it assumes I'm using reclock to change frame rate after SVP (which I'm not), so instead of getting 50.000fps output from SVP, it outputs 48fps

UseReClockToFixFPS=0

I have tried putting it in the script, but I assume its the SVP Manager that must read it in rather than through the script :(

chainik_svp
27th March 2012, 15:34
Looks like SubJunk is responsible for all SVP here. That's not right ;)

Just finished more complete description (http://www.svp-team.com/wiki/Plugins:_SVPflow) for libs.
Yeah I know my English is awful but I do the best I can :devil:

May be it'll better to start a separate thread for svp libs?

to make SVP take what frame rate I give it as golden
SubJunk uses a "special build" with additional option for defining absolute target frame rate ;)

kolak
27th March 2012, 17:44
Looks like SubJunk is responsible for all SVP here. That's not right ;)

Just finished more complete description (http://www.svp-team.com/wiki/Plugins:_SVPflow) for libs.
Yeah I know my English is awful but I do the best I can :devil:

May be it'll better to start a separate thread for svp libs?


SubJunk uses a "special build" with additional option for defining absolute target frame rate ;)

Very useful!

:thanks:

mark0077
27th March 2012, 18:38
Thanks Chainik, got it working with those special dlls :)

Bernardd
27th March 2012, 20:35
Thanks Chainik and SubJunk for the special svpflow2.dll. In restoring old 8mm or Super 8, we need to be able to fix the frame rate.
SVSmoothFPS is more smart and flexible than MFlowFPS.
Thank you.
Bernard

kolak
27th March 2012, 20:53
Can I repeate question now:

How can I reduce mask/blur effect- bit to much form my taste- creates visible smearing. I tried changing cover and mask, but don't see any effect.
Algo=13 produces best results for me, but still has this halo effect- bit to much blurring around edges.

SubJunk
27th March 2012, 21:22
Yeah I know my English is awful but I do the best I can :devil:Your English is great!

May be it'll better to start a separate thread for svp libs?That could be less confusing

How can I reduce mask/blur effect- bit to much form my taste- creates visible smearing. I tried changing cover and mask, but don't see any effect.If you use Tuning="Smooth", OverrideArea="0" it should be disabled. Algo=13 itself causes a lot of blurring/doubling so for a more crisp image algo=23 is needed (which is what smooth tuning uses)

kolak
27th March 2012, 21:30
If you use Tuning="Smooth", OverrideArea="0" it should be disabled. Algo=13 itself causes a lot of blurring/doubling so for a more crisp image algo=23 is needed (which is what smooth tuning uses)

I'm not after that sharp image- just don't want that much blurriness around ages. It's mainly on the fast motion, where any moving abject has this blurred mask around it- in some cases it's does not look good. I would rather prefer to have "broken" image than blurred one, because in motion this is less visible. I will try your suggestion- thanks. It's also related to block size- in some cases increasing block size helps, but than other parts are not as good as with smaller blocks :) Maybe it needs some sort of adaptive block size :)
Overall all this is great script and results are very good and I hope will be even better, as this is still work in progress :)

SubJunk
30th March 2012, 05:43
InterFrame 2.0b2 is released :)

kolak
30th March 2012, 10:50
Thanks- looks like it's faster :)

Ulf
3rd April 2012, 08:37
Anyone else having a problem with piping a script with GPU=true to an encoder?

In essence, a script using InterFrame2 with GPU=true works fine with:
x264.exe script.avs --output out.264

but throws an error (x264 [error]: could not open input file `-') with:
avs2pipe.exe video script.avs | x264.exe --demuxer y4m - --output out.264

With GPU=false, all works as expected. The problem is not related to x264. I get the same error piping a script to other encoders.

P.S. I am using single threaded Avisynth.

kolak
4th April 2012, 17:59
Interframe 2, with GPU=true and algo=21 I have artefacts on the left and right edge of the footage. It looks like some grey mask.
This is just on some scenes, others are fine.

aegisofrime
4th April 2012, 18:00
For some reason, even with the latest version, GPU=false doesn't work very well. My frame counter just stops moving, indicating that processing has stopped.

Also, I just upgraded from a GTX 460 to a Radeon 7850 and it seems slower now. Now SVP perform better on nvidia hardware? Thanks.

chainik_svp
4th April 2012, 21:13
I just upgraded from a GTX 460 to a Radeon 7850 and it seems slower now.
What's the absolute FPS value? To see some difference between 450 and 460 it should be far more than 120 fps, and 7850 is definitely faster. Please post your results with 7850 to SVPmark database, it'll be interesting. It can be anything, for example 69xx cards just hung the whole system with OpenCL+D3D until 11.6 or 11.7 (?) drivers.
But it's obviously an offtopic in Interframe thread :)

with GPU=true and algo=21 I have artefacts on the left and right edge of the footage. It looks like some grey mask.
What if crop the source by several pixels on all sides? But anyway it's some kind of a bug, I think I know what're you talking about.

kolak
4th April 2012, 21:32
Can try cropping (it's 1920x1080 source with clean/normal edges)- it only happens with GPU=true. CPU mode does not have such a problem. I can try other algos, but I think it's only problem with algo=21 (it's definitely not happening with algo=13).
For my source (very fast motion) algo=21 with lambda=20 and plevel=1 produces well balanced output- clean edges with not much halos.

plevel<1 seams to affect motion a lot- not smooth output.

SubJunk
4th April 2012, 21:49
Interframe 2, with GPU=true and algo=21 I have artefacts on the left and right edge of the footage. It looks like some grey mask.
This is just on some scenes, others are fine.I think I noticed the same thing on one video last night too

chainik_svp
4th April 2012, 21:50
Please post a screenshot with these arts. But two adjacent source frames will be much helpful ;)

kolak
4th April 2012, 22:12
Simulated look:

http://i40.tinypic.com/2814kqr.jpg

I don't have this source on my laptop, but it looks like this.
Both sides will have this sort of grey mask- it will change size, shape a bit over many frames, but always look like this example. It will be few pixels deep and bit more grey than the one on the picture. I can post exact frame tomorrow.

SubJunk
4th April 2012, 22:46
Ah yeah that's different from what I meant. It looks like your source might have a light left border. Will wait to see it

kolak
4th April 2012, 23:00
I will post tomorrow grabs from this problematic source.

aegisofrime
5th April 2012, 05:57
What's the absolute FPS value? To see some difference between 450 and 460 it should be far more than 120 fps, and 7850 is definitely faster. Please post your results with 7850 to SVPmark database, it'll be interesting. It can be anything, for example 69xx cards just hung the whole system with OpenCL+D3D until 11.6 or 11.7 (?) drivers.
But it's obviously an offtopic in Interframe thread :)


Apologies, I actually meant to say Interframe but I wrote SVP since I figured that it is what is responsible for making use of the GPU in Interframe.

On my GTX 460, I used to be able to process 2 720p videos concurrently at around 12fps each. On my current Radeon 7850, I get around 6.8fps. Imagine my disappointment since I bought this Radeon 7850 partly because I thought it will enable Interframe to run faster, and cut down on my electricity costs at the same time.

However I know from my experience with Bitcoin mining that OpenCL code can perform differently on different GPUs, even if one GPU is faster than the other on paper.

Anyway, here's the scores from SVPMark:

Test summary
-----------------------
Date: 2012-04-05T12:54:31
CPU: Intel Core i7-2600K @3392 MHz [8 threads]
GPU: AMD/ATI Radeon HD 7800 [ver.1.4.1703]
Mode: FHD + GPU [17 threads]
Comment: 3.6

Overall scores
-----------------------
Synthetic CPU: MC2030
Synthetic GPU: MG3530
Real-life: FG2743

Details: synthetic
-----------------------
CPU: compose (single-threaded): 553
CPU: compose (multi-threaded): 2391
CPU: search (single-threaded): 415
CPU: search (multi-threaded): 1765
GPU: system -> GPU transfer: 555
GPU: GPU -> system transfer: 1310
GPU: calculations: 1636
GPU: total score: 4772

Details: real-life /FHD
-----------------------
decode video: 16.14x (387.4 fps)
48 fps - vectors search: 1.31x (62.7 fps)
60 fps - frame composition: 3.54x (212.2 fps)
48 fps - [SVP] fastest: 6.30x (302.5 fps)
48 fps - [SVP] simple 1: 4.53x (217.3 fps)
60 fps - [SVP] good: 2.34x (140.2 fps)
60 fps - [SVP] high: 1.83x (109.9 fps)
60 fps - [SVP] highest: 0.83x (50.0 fps)
72 fps - [SVP] simple 2: 4.20x (302.1 fps)


Edit: I took a look at your SVPMark database and you guys don't have any Radeon 7800 series cards in there. Guess I'm the first one :D

chainik_svp
5th April 2012, 09:51
here's the scores from SVPMark
GPU scores are too low, at least "system -> GPU transfer" value, may be it's a drivers bug.
Guess I'm the first one
I can't add your results to DB by hands ;)

kolak
5th April 2012, 09:58
Ah yeah that's different from what I meant. It looks like your source might have a light left border. Will wait to see it

Here it's:

http://i39.tinypic.com/15hilq9.jpg

Source has some thin grayish border (and I said it has clean edges-ups), so I assume this causes the problem.

aegisofrime
5th April 2012, 10:39
GPU scores are too low, at least "system -> GPU transfer" value, may be it's a drivers bug.

I can't add your results to DB by hands ;)

Indeed I noticed that too.

I registered an account with SVP just now but SVPMark returned authentication wrong. It returns correct now, and I will upload scores once my current encoding job is finished. :D

chainik_svp
5th April 2012, 10:47
Source has some thin grayish border (and I said it has clean edges-ups), so I assume this causes the problem.
Yep ;) Avatar remux also have 2px black borders for some reason :confused:
And I don't know what I could do with it if I've got real motion vector points outside the frame.

kolak
5th April 2012, 11:08
Why is it fine with algo=13 (and in CPU only mode)?

chainik_svp
5th April 2012, 11:27
In CPU mode vectors're brutally clipped at the blocks level.

I think algo=11 should give the same artifact, algo=13 could "mask" it with median function (but I need to check).

kolak
5th April 2012, 11:41
Yep, algo=11 same problem.
It's actually also on algo=13, but way less visible. I'm was so focus on the main frame that never noticed borders- hehe :)

CruNcher
5th April 2012, 13:34
GPU scores are too low, at least "system -> GPU transfer" value, may be it's a drivers bug.

I can't add your results to DB by hands ;)

I hope it's not the standard low copy back performance that goes on in the next generation as well though @ the time i read AMDs dev forums there where some special parts their about improving memory copy performance PCIE-E transfer speed code wise with their SDK especialy in the Compute section you find people their naging about the copy performance ;).

Huit
6th April 2012, 19:09
When I try to convert 1920x1080, 23.976fps footage I get an error from MS Visual C++ runtime Library:
Runtime Error!
Program C:\Program Files (x86)\MeGUI\tools\x264\avs4x264mod.exe

1280x720, 30fps works just fine.

Any ideas?

chainik_svp
6th April 2012, 22:05
Huit
1. Patch .exe with that tool (http://www.ntcore.com/4gb_patch.php), AND/OR
2.1. Lower value in SetMemoryMax() call, OR
2.2. Use modified Avisynth 2.5.8 build from SVP

I hope it's not the standard low copy back performance
It doesn't matter cause I'm not writing GPU benchmark ;)

On my GTX 460, I used to be able to process 2 720p videos concurrently at around 12fps each. On my current Radeon 7850, I get around 6.8fps.
I'm sure the problem is in something else. Two 720p is like one 1080p and even with the highest possible rendering settings any video card >=5770 can render >100 FHD frames per second.

Huit
6th April 2012, 23:11
Huit
1. Patch .exe with that tool (http://www.ntcore.com/4gb_patch.php), AND/OR


That did the trick.
Thank you very much! :) :) :)

aegisofrime
7th April 2012, 03:14
Huit
I'm sure the problem is in something else. Two 720p is like one 1080p and even with the highest possible rendering settings any video card >=5770 can render >100 FHD frames per second.

I have to apologize for being unclear again. :scared: What I described was Interframe in combination with QTGMC(Preset="slow",InputType=1) and encoding with x264 preset slower. So it's pretty heavy stuff there. It's not just Interframe or SVP by itself.

That said, do you think the low system to GPU transfers could be fixed on your end, like what Cruncher said? Or do I have to wait for AMD to release new drivers?

Thanks for your work as always!

mark0077
7th April 2012, 17:42
Hi all, what number of Cores are you setting Interframe to use?

I'm able to use max settings in Interframe 2.0 b2 (Medium profile) even with 1080p content, except I need to make one change. I need to reduce overlap from 2 to 0 to make 1080p not drop any frames. That seems to have a huge impact on performance for me.

I'm using Cores=15 on my Core i7 920 using gpu=true (GTX 295)

I notice however cpu usage is still only around 40% and many of the "cores/threads" don't seem to be getting used at all according to Windows Task Manager. Thats using overlap=2. With overlap=0 I get about 26% usage. I don't know if this 40% usage yet many frame drops when using overlap=2, is an indication that I could possible get a little more out of my machine or not in terms of settings, thats why I ask what settings you guys are using?

chainik_svp
7th April 2012, 21:50
aegisofrime
I can explain ;)

Let's say you've got 10 fps at output with 1080p (or 2x720p) source which means each output frame is processed in about 100 ms. I know from your SVPmark results that your system / video card can render >=212 frame per second. OK, 200, and each frame is rendered in 1000/200 = 5 ms. So, all your outer scripts make their work in 100-5=95 ms, and GPU renders a frame in 5 ms.
What if you change your new 7850 to something 5 (five) times slower? Rendering time will be 5*5=25 ms, total processing time = 95+25 = 120 ms, in other words - 8.3 fps.

Conclusion: using 5 times slower video card you'll get just 20% overall performance drop.
Of cause I assume that SVP libs are the only components in processing chain that uses GPU in any way.

mark0077
In SVP we're using 1.9*<num_of_HW_threads> in GPU mode and 1+<num_of_HW_threads> in CPU mode for maximum CPU usage. But:
- 23th shader seems to require more threads and
- it may not be enough with default Avisynth threads scheduler.

But if you're talking about real time playback it's a different story. Frame drops usually caused by splitter / decoder / renderer combination and not by CPU load.

mark0077
8th April 2012, 20:38
Hi chainik. What do you recommend I use for threads with shader 23 on core i7 920 + gpu

With overlap=0 I get 0 frame drops and with overlap=2 I get lots of drops although CPU and gpu usage is quite low. I'm not sure what's limiting the performance. Perhaps as you say it's 15 threads not being enough to get the most out of my setup?

chainik_svp
8th April 2012, 21:34
mark0077
That (http://www.svp-team.com/forum/profile.php?id=1337) is you, right? So why asking here where any "frame drops" is off-topic cause Interframe is an encoding script?

mark0077
9th April 2012, 00:13
Because choosing settings that makes the most of ones machines resources is one of the most important topics of this thread ;)

SubJunk
11th April 2012, 00:52
2.0b3 is released :)

Bernardd
11th April 2012, 13:39
Hi SubJunk,
Thank you for this new release with return some strings to int values. But i have one problem, OverrideArea changes are skipped.
Bernard

SubJunk
11th April 2012, 22:06
Hi Bernardd, you're right, thanks for reporting it. It will be fixed in the next release :)

SubJunk
12th April 2012, 07:16
2.0b4 is released :)

aegisofrime
15th April 2012, 07:32
Subjunk, have you encountered any problems with the speed of processing dropping to zero after the first few frames with GPU=false?

SubJunk
15th April 2012, 09:10
Not recently, but a few months ago I had that problem when using intensive scripts (like QTGMC) and I just had to adjust the SetMemoryMax and SetMTMode values to fix the stability.

aegisofrime
15th April 2012, 09:47
Version 2.0 was frustrating stability wise, but then I found out that removing SoraThread helps. 30% of my current processing job done so far, hopefully it will finish without a hitch.

SubJunk
17th April 2012, 05:27
Version 2.0 RC1 is released, which improves stability

aegisofrime
17th April 2012, 05:59
Thanks for 2.0RC1 SubJunk. It does seem more stable! Pity that I'm better off using my CPU rather than my GPU; It's actually slower than the CPU! I feel like I have gone backwards "upgrading" from a GTX 460 to a Radeon 7850. Never touching AMD again.

SubJunk
17th April 2012, 10:24
Bad luck on the GPU! I wonder if chainik_svp can shed some light on why that would be the case?

chainik_svp
17th April 2012, 11:01
I've already said (http://forum.doom9.org/showthread.php?p=1568951#post1568951) that I doubt about this's a 7850 issue.
Anyway don't be so upset, some said that GTX 680 isn't working at all with current drivers :D

aegisofrime
18th April 2012, 07:04
I've already said (http://forum.doom9.org/showthread.php?p=1568951#post1568951) that I doubt about this's a 7850 issue.
Anyway don't be so upset, some said that GTX 680 isn't working at all with current drivers :D

I understand your point. Is it possible that the slow GPU->System transfer speed is the main culprit? The GPU may be able to process the frames fast, but information is going back to the CPU too slowly. Ultimately, my processing chain is encoded by x264. Perhaps x264 is wasting time waiting for these frames from the GPU?

chainik_svp
18th April 2012, 09:51
The GPU may be able to process the frames fast, but information is going back to the CPU too slowly.
It's "slow" for 300 FHD frames per second but not for 10.

aegisofrime
18th April 2012, 11:46
It's "slow" for 300 FHD frames per second but not for 10.

I see. Good point. Time to shoot a few angry emails at AMD. :devil:

chainik_svp
22nd April 2012, 21:55
aegisofrime

May be you're not alone (http://www.svp-team.com/forum/viewtopic.php?pid=21198#p21198). Could you look at video memory consumption while encoding?

chainik_svp
27th April 2012, 17:47
aegisofrime

12.4 really improves OpenCL performance on 5xxx and 6xxx series. What about you? :)

aegisofrime
28th April 2012, 04:00
aegisofrime

12.4 really improves OpenCL performance on 5xxx and 6xxx series. What about you? :)

Heya thanks for the heads up. Unfortunately, I haven't noticed significantly increase speeds between Catalyst 12.3 and 12.4. Still slower than my old GTX 460 :/

I think I will be looking for a trade when the GTX 660 comes out. :/

Edit: One more thing that has been bugging me.

Why do I get "nvcuvid.dll" and "nvcuda.dll" errors even when I'm running ATI? Clicking ok on the error gets rid of it fine, and my encoding starts without a hitch, but I'm wondering if not having those files on my system could cause issues with my encoding.

SubJunk
2nd May 2012, 23:40
InterFrame 2.0 is released. This marks the end of support for version 1. Enjoy :)

kolak
3rd May 2012, 00:35
:thanks:

What are the improvements?

SubJunk
3rd May 2012, 00:42
There are no improvements over 2.0 RC1, I just updated the libraries and renamed the files :)

SubJunk
4th May 2012, 21:02
2.0.1 is released :)

mark0077
8th May 2012, 18:36
SubJunk, do you know of a way to avoid the flickering effect seen when seeking, when using these frame doubling avisynth scripts.

I see some posts on avsforum here seem to point to it being related to the avisynth dll being used. http://www.avsforum.com/avs-vb/showthread.php?p=20171150#post20171150

Is this flickering, something you think about when selecting an avisynth dll to use in your interframe packs? I'd love to get rid of it to avoid the family going blind when I seek :D

chainik_svp
8th May 2012, 21:24
mark0077
I know :D The only ultimate solution is to reload script after seek - uncheck "avisynth" checkbox and check it again after 1 second.

kolak
1st June 2012, 22:49
Having issues with the smoothness :(
50p to 59.94p conversion on some live shot footage produces jerky scenes. Most of the scenes are absolutely fine, but some (and actually rather slow motion ones) look jerky (specially when watched on TV)- it almost looks like interframe uses original frames instead of interpolated ones. I'm with original mode=0 setting. Some of the problems were related to my adjustment to make scene changes more sensitive- going back to the default settings fixed some scenes, but there are still some bad ones left. Does it mean that interframe thinks that there are scene changes in this pieces of the footage? Should I reduce sensitivity for scene changes? It also looks like problems appears on rather darker scenes (but not very dark). It will go bad after some scene change and than get back to "normal" after another. Most interesting is that these scenes look for me as easy ones. I'm after smooth, interpolated footage, even in price of bit artefacts. Using algo=13, but algo=21 did not really help neither. I have no idea what is causing it :(

SubJunk
1st June 2012, 23:00
Hi kolak, please upload a sample so I can test

chainik_svp
1st June 2012, 23:03
@kolak
may be you could cut off a short sample of a "bad" sequence?
---
@SubJunk ;)

kolak
1st June 2012, 23:10
I will, but on Wednesday once I'm back to work :)
It looks strange, maybe some bug, as these scenes do look easy in terms of motion estimation. Done some stress test with very fast footage and there was no problems at all!
I'm bit confused :)

SubJunk
4th June 2012, 13:36
InterFrame 2.0.2 is released :)
By the way, InterFrame is included in Universal Media Server (http://www.universalmediaserver.com/), allowing you to transcode videos from your computer to your renderer (PS3, XBOX, TV, iPad, anything) using InterFrame in realtime. Pretty cool :)

Reel.Deel
4th June 2012, 13:45
Thanks Subjunk! :)

Just wondering, are you ever going to implement a "placebo" preset like V.1 of Interframe?

SubJunk
4th June 2012, 13:57
Hi Reel.Deel :)
I decided the old placebo preset wasn't worth it; it was only better quality by a tiiiiiny bit and was many times slower.
Anyway I don't think that method would still work with the SVP DLLs I'm using in version 2 :)

Reel.Deel
4th June 2012, 14:09
Thanks for the fast responce. :) I'm very happy with the quality of "medium", I was just wondering... I have a sample I'll try to upload later today or tomorrow, Is a 1080p test clip shot with a DSLR at 29.97 with a high shutter speed, the interpolated frames look bad. Maybe I can get some advice on how to tune Interframe. Anyways Thanks for all! :)

chainik_svp
4th June 2012, 19:04
By the way, InterFrame is included in Universal Media Server (http://www.universalmediaserver.com/)

Can't find any word about SVP there :(

SubJunk
4th June 2012, 23:16
Thanks for the fast responce. :) I'm very happy with the quality of "medium", I was just wondering... I have a sample I'll try to upload later today or tomorrow, Is a 1080p test clip shot with a DSLR at 29.97 with a high shutter speed, the interpolated frames look bad. Maybe I can get some advice on how to tune Interframe. Anyways Thanks for all! :)I'll be happy to have a look :)

Can't find any word about SVP there :(I can find somewhere to add credit for SVP if you want :)

Reel.Deel
5th June 2012, 15:14
I'll be happy to have a look :)

Thanks subJunk! Very kind of you. :)

So I tried just about every single setting there is in the InterFrame script and I could not get results that I was satified with. I even tried disabling MTmode, changing source filters since I use DGIndexNV with also uses GPU but that did not help.

This is the original (http://www.mediafire.com/?oax5x3fwxlv7c7p) clip. Shot with a Canon DSLR at a high shutter speed.

Using Interframe I get weird artifacts most noticeably around frames 65-75. See Interframe video with artifacts. (http://www.mediafire.com/?s9u7cj09010r1ya)

SetMemoryMax(1024)

#Load Plugins

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\InterFrame\svpflow1.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\InterFrame\svpflow2.dll")

#Load Script

Import("C:\Program Files\AviSynth 2.5\plugins\InterFrame\InterFrame2.avsi")

#Source

DGSource("MVI_0695.dgi")

#Multi Thread

#SetMTMode(2,4)

#FrameRate Correction

AssumeFPS(29.97)

#Frame Interpolation

InterFrame(GPU=true, Preset="medium", Tuning="film", OverrideAlgo=13, Cores=4)

I saw this thread (http://forum.doom9.org/showthread.php?p=1577135#post1577135) and decided to try it out with the test clip, and it produce much better results (http://www.mediafire.com/?l91fg2g5fdzxkb3).

#Load Plugins

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\InterFrame\svpflow1.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\InterFrame\svpflow2.dll")

DGSource("MVI_0695.dgi")

Threads=4

SetMTMode(3,threads)

AssumeFPS(29.97)

SetMTMode(2)

super_params="{pel:2,gpu:1}"

analyse_params="""{block:{w:32,h:32,Overlap:2},
main:{search:{coarse:{distance:-10}}},
refine:[{thsad:200}]}"""

smoothfps_params="{num:2,den:1,algo:13,cubic:1}"

super = SVSuper(super_params)
vectors = SVAnalyse(super, analyse_params)
smooth_video = SVSmoothFps(super, vectors, smoothfps_params, url="www.svp-team.com", mt=threads)

return smooth_video

I tried looking at the Interframe script to compare, but for me there's too much going in your script to completely follow :o. However, I did notice changing the block size to 8 or 16 produces similar results to Interframe.

I'm going to read the SVP manual more thoroughly and use a couple of the suggestions here (http://forum.doom9.org/showthread.php?p=1568084#post1568084). Hopefully I'll learn a thing or two :).

Any suggestions will be greatly appreciated. Maybe it's not such a bad idea to add a couple more override parameters to let the user create his own "placebo" :).

Thanks in advance!

Gavino
5th June 2012, 16:54
...
DGSource("MVI_0695.dgi")

Threads=4

SetMTMode(3,threads)
...
The first call to SetMTMode() in a script must come before all filters (including source filters), otherwise multithreading will be disabled. So you need to move it before the call to DGSource().

Reel.Deel
5th June 2012, 17:21
I always put setmtmode before source filters but I thought it was different for DGSourceNV since it's GPU based. Well I learned something new. Thanks Gavino!

kolak
5th June 2012, 23:33
From other post:


there is no motion between frames 1 & 2

That's incorrecty detected scene change.

motion between 2&3 is small, followed by a big jump between 3&4

I see now, it's an "adaptive" interpolation, set scene.mode=0 to get rid of this.
I agree that may be it's a bug to use "adaptive" for 2:1 interpolation, thanks.


It's probably the same problem as on my sample, even if I use mode=0. I will post sample tomorrow anyway.

kolak
6th June 2012, 13:48
Can confirm that problems are due to false detection of scene changes.
Tweaked scene change detection sensitivity (scene:5000, blocks:25) and problems are gone.
Maybe some scene changes are not detected (blended frames appear), but at the end I prefer this than bad motion.

kolak
6th June 2012, 20:21
Are these parameters: scene, blocks are only way to tweak scene change detection?

chainik_svp
6th June 2012, 20:43
Are these parameters: scene, blocks are only way to tweak scene change detection?

scene.limit.scene, scene.limit.blocks, scene.limit.zero, scene.luma

Default values may incorrectly detect scene change BUT it will never(*) be missed, even in a night scene

----
(*) almost never :D

kolak
6th June 2012, 22:07
Well- it did miss quite a lot on one of my sources and that's why I made it more sensitive, but this made my conversion rather bad than good :P
Now I prefer lower it to have smooth motion, even for a cost of few blended frames :)

Scenes, which were wrongly detected were for example when someone was walking across frame and than stopped (or slowed down a lot). This was detected as scene change.

What does luma do?

kolak
8th June 2012, 12:50
chainik_svp- can you include/merge Mug Funky script

http://forum.doom9.org/showthread.php?p=1577458#post1577458

for motion blur/angle simulation into interframe? It needs to be adjusted, but as far as I understand it it' just only 2 lines which needs to be added to interfame+tiny modification.

chainik_svp
8th June 2012, 21:19
@ kolak
SubJunk is the author of InterFrame script, I'm just watching :D

What does luma do?
value_for_scene_change_detection = block_SAD_value / (average_block_luma ^ scene.luma)

kolak
9th June 2012, 00:41
Ups- sorry :)

SubJunk
9th June 2012, 02:15
I'll try it :)

janderclander14
23rd June 2012, 00:15
@Subjunk, I've using Interframe with default settings for movie watching for a while and I must say results are very satisfying. It provides almost perfect smoothness with a reasonable amount of artifacts.

I would like to ask you if you know which parameters could be changed to reduce two kind of artifacts that are the most noticeable:
- The first one is some kind of black surfaces (like smooth squares) that appear briefly during scenes with high motion. It seems that not enough motion information is available to perform the estimation and the lacking surfaces are filled with back colour. This artifact does not appears so usually with SVP default settings.
- The other one is the warping around the edges of moving objects with high contrasted backgrounds.

Thanks!

kolak
23rd June 2012, 12:27
I'll try it :)

Mug Funky script works quite well but makes blended scene changes, as it has no scene change detection. Is there a way to avoid it?

SubJunk
24th June 2012, 22:38
@Subjunk, I've using Interframe with default settings for movie watching for a while and I must say results are very satisfying. It provides almost perfect smoothness with a reasonable amount of artifacts.

I would like to ask you if you know which parameters could be changed to reduce two kind of artifacts that are the most noticeable:
- The first one is some kind of black surfaces (like smooth squares) that appear briefly during scenes with high motion. It seems that not enough motion information is available to perform the estimation and the lacking surfaces are filled with back colour. This artifact does not appears so usually with SVP default settings.
- The other one is the warping around the edges of moving objects with high contrasted backgrounds.

Thanks!Those are definitely two of the main issues remaining, if I knew the answer to them I would put it in InterFrame hehe. Let me know if you find anything :)

kolak
24th June 2012, 22:54
InterFrame is as good if not better than pro solutions, so any further improvements are going to be big thing.
I would like to see reduced masking artefacts (in mode 21 and 23)- it's better to have some breaking image than blurred mask- it's less visible in motion.
Another thing is build in deinterlacing (something on the level of yadifmod+NNEID2), so interframe could be a stand alone solution for all input sources.

SubJunk
27th June 2012, 02:25
Version 2.1.0 is released, thanks to widezu for collaborating on this :)

Another thing is build in deinterlacing (something on the level of yadifmod+NNEID2), so interframe could be a stand alone solution for all input sources.I think QTGMC is the best thing for deinterlacing, so I guess I could either put a note on the first page about that or talk to Vit about including it with the InterFrame package

kolak
27th June 2012, 12:25
Well- QTGMC is slow and unstable on many cores PCs, so if you combine it with interframe than you will be waiting years for your conversions to finish :)
yadifmode+NNEDI3 is not as good in terms of quality, but represents good balance between speed/quality. Stability is also very good.
I was thinking about something new, which would use already calculated motion vectors etc.

kolak
27th June 2012, 12:27
Version 2.1.0 is released, thanks to widezu for collaborating on this :)


I had no issues with high motion scenes, but I'm using limits=4700, so maybe this helps or maybe my footage is not fast enough:)

SubJunk
27th June 2012, 12:35
Well- QTGMC is slow and unstable on many cores PCs, so if you combine it with interframe than you will be waiting years for your conversions to finish :)
yadifmode+NNEDI3 is not as good in terms of quality, but represents good balance between speed/quality. Stability is also very good.
I was thinking about something new, which would use already calculated motion vectors etc.Have you tried the fastest presets on QTGMC? The fastest one is pretty basic. If you have an idea for a faster one maybe Vit would be interested to hear it and put it in as a new mega-fast preset :)
I just don't want to duplicate the functionality of an actively-developed script. If I could make a better one then maybe, or if QTGMC was dead maybe, but at the moment I don't see any way I could contribute to make it better without putting in a lot more time than I'm willing to put in :)

I had no issues with high motion scenes, but I'm using limits=4700, so maybe this helps or maybe my footage is not fast enough:)It can be a bit hard to see because InterFrame uses frame-blending for scene-changes anyway, so sometimes action scenes have a bunch of blended frames but it's so fast anyway that it looks like it's interpolated. Using 2.1.0 though most users should notice an overall "smoother" feel to videos even if they didn't notice the blending before :)

kolak
27th June 2012, 13:53
It can be a bit hard to see because InterFrame uses frame-blending for scene-changes anyway, so sometimes action scenes have a bunch of blended frames but it's so fast anyway that it looks like it's interpolated. Using 2.1.0 though most users should notice an overall "smoother" feel to videos even if they didn't notice the blending before :)

Yes- I spent loads of time with QTGMC trying different settings etc and for HD source it's still problematic for me. Now I use yadifmode+NNEID3, which seams to be good enough for my needs.

Well- you can change scene change detection to be ON and this is what I use and have no blended frames. You just have to be careful with Limits/blocks setting, because to strong causes false scene change detection and breaks smoothness. Interframe by default has blend=true, so it needs to be changed to avoid blending.

SubJunk
27th June 2012, 21:50
As long as scene-detection isn't reliable, which it isn't at the moment, I'll keep blend=true to stop the framerate jumping around. All it takes is one false-positive to make the video look like it skipped a frame, and there are many false-positives in high-action scenes and scenes with lighting changes. There always have been with the old MVTools2 method and with this one too.
Didee suggested changing the blend value a while ago and I did it without thinking, which lead to a bunch of complaints from users that suddenly it was much less smooth so I quickly changed it back.
Feel free to share the settings for limits/blocks that you think work and I'll test them out :)

kolak
27th June 2012, 23:49
For my 50i/60i HD live recordings sources (so quite high fps) default setting caused false detections, so now I use limits:4700 and blocks: (20-25) (some scene changes- maybe 5% are missed, but did not have false detections). Funny enough for me these were not fast action scenes, but rather some specific ones- eg person walking and than stopping quickly and than walking again. This would cause false detection. My files are watched on big TV where any motion break is very obvious (not a PC monitor).
Regarding scene change detection- pro solutions seams to work fine, so it means it can be improved. Most encoders seams to also have good scene change detection, so I hope it will be improved :)

alexx7777
10th July 2012, 09:06
Tell me please, you can use interframe for interlaced video, if so, when it is better to use in conjunction with Deshaker (before or after)?

TheSkiller
10th July 2012, 11:25
InterFrame and (I think) also Deshaker cannot be used with interlaced video without bob-deinterlacing it first.
Bob-deinterlacing does not really destroy anything, it is merely a temporal stage needed for InterFrame to work with. After that, the video can be re-interlaced without noticable losses if needed.

Something like this:

AssumeTFF #or AssumeBFF, specify field order of the source
Bob()
InterFrame(...)
AssumeTFF() #or AssumeBFF, use the same as above
SeparateFields().SelectEvery(4,0,3).Weave()

alexx7777
10th July 2012, 12:16
Thank you for your reply Theskiller, but I want to leave interlaced video. I do not need deinterlacing. Desire - to increase the number of frames / (25> 50) and apply Deshaker (a neyastnost - it is better to apply before or after)

Didée
10th July 2012, 12:28
You must bob-deinterlace beforehand. The critical word is "must". Period.
As TheSkiller said, bob-deinterlacing is a "temporary" operation (at least in this context here), you can undo it afterwards.

However, you say you want to do 25-->50 frames. But if you have 25i video, then it already contains 50 motionstates per second. No need for framerate interpolation at all. You just bob-deinterlace, then use deshaker, then re-weave.

kolak
10th July 2012, 13:24
What is the most optimal bobber for 50i <-> 60i conversion? Simple bob is good but introduces problems on static areas/text (flickering).
Any fast solution to keep eg original fields intact+not introduce flickering, so interframe has full frame for its interpolation, but after this we take only "original" fields back.
I use yadifmod+NNEDI3 now.

Didée
10th July 2012, 13:53
In last consequence, that problem is yet unsolved.

For a relatively quick solution, YadifMod+NNEDI3 is pretty fine. But it will snap only onto almost perfectly static areas, and will still show shimmering if things move slowly.

TGMC mostly avoids shimmering on slow motion, but the price is that it isn't lossless.

You can get TGMC mostly lossless by using the "sourcematch" feature, at the expense of slightly more shimmer again, while still not being perfectly lossless. (But noticeably slower...)

If you have proposals for squaring the circle, speak loud. So far, all approaches ended with "you have to trade this for that".

Another point to consider - when doing framerate conversions anyway, then how important "lossless" really is? Pretty much of the result is pure interpolation anyway, so the imperative of "keep those original fields!" seems expendable.

kolak
10th July 2012, 19:36
Well it's not really about fields being original, but rather to be "good", so when watched on TV there is no shimmer/flickering etc problems introduced compared to the source. With "bad" deinterlacing you end up with many more problems than just conversion artefacts, so in my case it makes difference. Lets say this way- source and converted file should look the same except fps being different :)

From my experience yadif+NNEDI3 is "the best" solution for 50i<->60i conversion- no problems on static text and just small shimmering, which is not very visible on TVs (even big ones).
When your target is progressive than QTGMC with very fast preset is probably better, but it introduces more problems on static areas. QTGMC produces very progressive look and in some cases it's big +.

Biggest + for yadif+NEEDI3 is stability on many cores machines- I have rock stable conversions and all done in one script. With QTGMC I have to go through 2 steps, which is not the end of the world, but even so I have stability issues all the time.

Didée
10th July 2012, 20:43
Well, sure. Things strongly depend on the source characteristics. I've seen plenty sources where the difference between Q/TGMC and YadifMod+NNEDI, (or even plain bob(), sometimes), is so minimal that using Q/TGMC would be almost silly.

But then, there are sources where air is getting thin. Consider THIS (http://www.mediafire.com/?a447853jzrq2j6h). (MediaFire, 47MB)
(VQEG "MobCal" test sequence, bobbed with YadfMod(NNEDI3) and TGMC_beta3, both MFlowFPS'ed from 50 to 60fps, result slowed down to half speed)

Bottomline: it depends. ;)

kolak
10th July 2012, 21:18
Yes- I've seen something similar, but in real source (like some live performance) these sort of scenes represent 5% of the whole source.
When I see these sort of problems I fight with QTGMC to have it done without to many crashes :)

Bottomline: it depends :)

alexx7777
10th July 2012, 22:48
I can not understand it correctly, but I leave nuzho interlaced video. Razesnite please apply what Bob ()
This script is suitable -
DirectShowSource("D:VIDEO.avi", fps=25, convertfps=true)
AssumeBff()
converttoyuy2(interlaced=true)
Autolevels()
ConverttoYV12(interlaced=true)
setmtmode(3)
interFrame (GPU=true, Preset="Medium", Tuning ="Film", InputType="2D", Cores=4)
setmtmode(2)
super = MSuper(pel=2, sharp=2, chroma=false)

b_vec1 = MAnalyse(super, isb = true, delta = 1, chroma=false, blksize=8, overlap=4,truemotion=true)
f_vec1 = MAnalyse(super, isb = false, delta = 1, chroma=false, blksize=8, overlap=4,truemotion=true)

MDegrain1(super,b_vec1,f_vec1,plane=0,thsad=400)

kibu
22nd August 2012, 05:03
So, I have been a fan of this script for a year now. I have used the 1.14 for realtime as AVS in FFDShow for a long time. Unfortunately I never could get my CPU usage to get >30%, with a 1280p file resizing to 1024 and then use "Super Fast" preset.

So, I always thought I could get more performance out of my processor(s) and I'm now trying an .avs file and playing that with MPC-HC. It works better! CPU usage is 70-80% and I can use the Fast preset as long as I resize to 1024. This is the script I'm using: (feel free to make suggestions)
SetMTMode(1,0)
DirectshowSource("cd.mkv")
ConvertToYV12()
SetMTMode(2,3)
Spline64Resize(1024,576)
Setmemorymax(512)
InterFrame(Cores=4, Preset="Fast", GPU=False)

My Macbook Pro 2012 doesn't support GPU for some reason so I have to use CPU.

I am having 1 problem though: when I seek in the video, MPC-HC freezes. Anyone know how to fix that?

SubJunk
22nd August 2012, 05:22
So, I have been a fan of this script for a year now. I have used the 1.14 for realtime as AVS in FFDShow for a long time. Unfortunately I never could get my CPU usage to get >30%, with a 1280p file resizing to 1024 and then use "Super Fast" preset.

So, I always thought I could get more performance out of my processor(s) and I'm now trying an .avs file and playing that with MPC-HC. It works better! CPU usage is 70-80% and I can use the Fast preset as long as I resize to 1024. This is the script I'm using: (feel free to make suggestions)
SetMTMode(1,0)
DirectshowSource("cd.mkv")
ConvertToYV12()
SetMTMode(2,3)
Spline64Resize(1024,576)
Setmemorymax(512)
InterFrame(Cores=4, Preset="Fast", GPU=False)

My Macbook Pro 2012 doesn't support GPU for some reason so I have to use CPU.

I am having 1 problem though: when I seek in the video, MPC-HC freezes. Anyone know how to fix that?Hi Kibu, I have a couple of notes about your script. First, with SetMTMode, the second parameter can only be set once and it defaults to 0. Also GPU=false is default. So here is a more concise version of the script:

SetMTMode(1)
SetMemoryMax(512)
DirectshowSource("cd.mkv").ConvertToYV12()
SetMTMode(2)
Spline64Resize(1024,576)
InterFrame(Cores=4, Preset="Fast")

As for the freezing, I don't know. If it becomes a problem you can't solve you can use SVP, I think they use a buffer to fix that bug (not sure but worth trying) :)

kibu
22nd August 2012, 14:54
Thanks for your tips SubJunk!

I could start using SVP, but I feel that the script like this, even on "Super Fast", is giving me way more quality and less artifacts than SVP gives me. Does that make any sense?

(I think SVP doesn't make MPC crash because on seeking they stop interframing)

kibu
22nd August 2012, 16:29
Ok, a small update. It seems that MPC doesn't crash, but FFDshow does. MPC keeps to be responsive when I try to seek, but the video screen is just black and when I try to close MPC, FFDShow stays in the notification bar and I have to force quit the MPC process from the Task Manager.

It also doesn't have anything to do with Interframe, cause when I remove the Interframe line from the script, it still won't seek. It seems to be a problem with MPC handling avs files OR Haali Media Splitter not being able to seek through the MKV? Is there any other player who handles avs?

SubJunk
23rd August 2012, 21:56
I don't know of another player but I'm sure some will work

pbristow
23rd August 2012, 23:02
Is there any other player who handles avs?

I use KMPlayer, and I'm very happy with it. Powerful, good performance, handles a huge range of file types, gives a really useful technical report if you ask for "Media Info" on the file you're playing... and has lots of extra tweaking options for experts. :)

The only bad thing is that it's ad-funded, and the latest versions have turned a bit naggy about updating... Presumably so that you get to see the latest adds on the default screen. (You only see the adds if you open the app with no input file, by the way, so don't worry about them being intrusive). I don't mind clicking "remind me next week" once a week, though, if gets me such an excellent and avisynth-enabled player.

SubJunk
13th November 2012, 06:51
Version 2.2.0 is released, enjoy :)
This one is based on months of testing with many sources and aims to reduce artifacts by blending frames that are too dissimilar to interpolate, instead of trying to interpolate them and making ugly warps/tears.

kolak
24th December 2012, 00:12
Is new version with 1.06 libraries coming?
Any changes to the conversion quality/speed or just support for more GPU etc?

SubJunk
24th December 2012, 01:36
Yep, 2.3.0 is released, enjoy :)

mark0077
30th December 2012, 17:40
Cheers for the new version. Might need updating again with newer dlls releaed today :)

I see the main change is the addition of pel=1. Doesn't this negatively impact on quality over default / pel=2?

It has a huge impact on performance anyways (in a good way of course), I can now set overlap to 2, where I had to always change it to 0 in previous scripts by hand, to run in quality mode as it made quality mode sooo slow for me in realtime playback.

One other question, in your zip containing the avisynth exe installer, do you recommend installing that and then using the latest dll from sets page here. http://forum.doom9.org/showthread.php?t=148782 . This is what I always do but don't see it mentioned in your guide. I'm not sure if thats recommended or not.

chainik_svp
31st December 2012, 00:25
Might need updating again with newer dlls releaed today.

Libs are the same.

I've some updates but the difference is only in integration with MVTools functions so it's not interesting neither for SVP nor for Interframe.

SubJunk
1st January 2013, 04:04
I see the main change is the addition of pel=1. Doesn't this negatively impact on quality over default / pel=2?In my tests I found that pel=1 wasn't worse quality than pel=2, and in some cases it removed artifacts that were there with pel=2.

One other question, in your zip containing the avisynth exe installer, do you recommend installing that and then using the latest dll from sets page here. http://forum.doom9.org/showthread.php?t=148782 . This is what I always do but don't see it mentioned in your guide. I'm not sure if thats recommended or not.I recommend using the version from my latest zip, since SEt's more recent DLLs have been causing problems with some plugins.

kolak
2nd January 2013, 12:01
It's source dependant- in some case pel=2 is better in others pel=1. In my tests pel=2 was still bit better on average, but pel=1 much faster.

SubJunk
2nd January 2013, 21:17
Maybe I will add the option to be able to use it

fluor
4th January 2013, 19:45
I encoded one movie file (30 fps) at two versions, one with original framerate and one at 60 (interframe).Why do the 60fps version end up smaller than the 30fps?

I have to use FlipVertical() or else the dss2 reads the movie file upside down

####60fps.avs####

Input = "F:\My movies\2012\P1050484.MOV"

PluginPath = "c:\util\avisynth_plugins\"
Setmemorymax(900)
SetMTMode(3,8)
LoadPlugin(PluginPath+"avss.dll")
LoadPlugin(PluginPath+"interframeDependencies\svpflow1.dll")
LoadPlugin(PluginPath+"interframeDependencies\svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
dss2(Input).ConvertToYV12()
SetMTMode(2)
InterFrame(Cores=8)

#antishake --- depan/motion stabilization. needs cropping
loadplugin(PluginPath+"DePan.dll")
loadplugin(PluginPath+"DePanEstimate.dll")
i = ConvertToYV12()
mdata = DePanEstimate(i)
DePanStabilize(i, data=mdata,method=0,dxmax=20,dymax=20,rotmax=0)
crop(30,30,-30,-30)

FlipVertical()

- - - -
####30fps.avs####

Input = "F:\My movies\2012\P1050484.MOV"

PluginPath = "c:\util\avisynth_plugins\"
Setmemorymax(900)
SetMTMode(3,8)
LoadPlugin(PluginPath+"avss.dll")
dss2(Input).ConvertToYV12()
SetMTMode(2)

#antishake --- depan/motion stabilization. needs cropping
loadplugin(PluginPath+"DePan.dll")
loadplugin(PluginPath+"DePanEstimate.dll")
i = ConvertToYV12()
mdata = DePanEstimate(i)
DePanStabilize(i, data=mdata,method=0,dxmax=20,dymax=20,rotmax=0)
crop(30,30,-30,-30)

FlipVertical()


Encoded using x264.exe --crf 15 --tune film --preset veryslow

Original mov-file (MJPEG) 30fps, 810MB
30fps: 260MB
60fps: 244,9MB

SubJunk
4th January 2013, 22:19
x264 introduced optimisations for higher framerates about a year ago. Without going into details, your results are normal.

heizenberg
5th January 2013, 10:14
hello,

For Using Megui for 60fps convertion, i have a little problem with the tutorial from Spirton web site

My gpu is used to 2 or 3 % ( 670 GTX ) , im realy GPU assist ?

my 3570k is on 100% but the GTX is 2% or 3%

here is my script ( from spirton )

Setmemorymax(512)
SetMTMode(3,4)
PluginPath = "C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
<input>.ConvertToYV12()
SetMTMode(2)
<deinterlace>
<crop>
<denoise>
<Resize>
InterFrame(Cores=4, GPU=true)

Sparktank
5th January 2013, 12:05
Great work!
Just saw the Hobbit over the holidays and became instantly fascinated with the HFR fields.
I'll be looking forward to playing around with making some pseudo-HFR video for fun.
Thank you :)

bcn_246
6th January 2013, 01:51
hello,

For Using Megui for 60fps convertion, i have a little problem with the tutorial from Spirton web site

My gpu is used to 2 or 3 % ( 670 GTX ) , im realy GPU assist ?

my 3570k is on 100% but the GTX is 2% or 3%

here is my script ( from spirton )

Setmemorymax(512)
SetMTMode(3,4)
PluginPath = "C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
<input>.ConvertToYV12()
SetMTMode(2)
<deinterlace>
<crop>
<denoise>
<Resize>
InterFrame(Cores=4, GPU=true)

Have you updated to the latest version of SVPflow (v1.0.6)? Proper support for Keplar GPUs is one of the things that is being worked on at the moment...

SubJunk
6th January 2013, 04:03
My gpu is used to 2 or 3 % ( 670 GTX ) , im realy GPU assist ?That's normal :)

Great work!
Just saw the Hobbit over the holidays and became instantly fascinated with the HFR fields.
I'll be looking forward to playing around with making some pseudo-HFR video for fun.
Thank you :)Welcome :)

heizenberg
7th January 2013, 09:29
ok thank you


just another question,

is it possible to convert into 30fps ( in place of 60 )

if it yes , what do I need to change in my script ?

Thank you !

SubJunk
7th January 2013, 10:22
Sure, just use NewNum and NewDen. Like:

InterFrame(Cores=4, NewNum=30000, NewDen=1001)

heizenberg
7th January 2013, 12:17
Thank you SubJunk ;)

SubJunk
11th January 2013, 00:01
2.4.0 Beta 1 is released.
This has quite a few code changes and some of it is untested so please report bugs.

chainik_svp
11th January 2013, 17:50
I am curious what does rc:false do in SVSuper

it turns on interprocess communication between library instance and SVP Manager so every processing option can be changed on the fly

SubJunk
12th January 2013, 14:00
VectorsString = VectorsString + "distance:-6,satd:false,distance:0,"

distance is specified twice. I think distance:0 should be put inside search:{}Thanks, it will be fixed in the next version :)

mark0077
12th January 2013, 17:50
Thanks for the new version SubJunk. Have you ever considered taking the overlap values into consideration for faster / fast presets.

Overlap being set to 2 has one of the biggest impacts on my machine, core i7 920 3.6ghz, gtx 295. Setting it to 0 or 1 seems fine, setting it to 2 means I get lots of frame drops even with the fastest presets.

I can use Medium preset and overlap 1 or 0 without any issues and it looks great. Seems to be one of the big performance hitters for me anyways.

SubJunk
13th January 2013, 02:16
I can make the Faster preset use overlap:1 in the next version?

mark0077
13th January 2013, 04:37
I will leave that upto your judgement. Not sure how much impact it has on your machine or others. On mine it has a huge impact on performance. Not sure what you think of it in terms of quality?

kolak
13th January 2013, 13:06
Not much difference, but overall there is some- in some case can be actually better than overlap=2. Performance boost is much bigger than relative quality loss.

Motenai Yoda
13th January 2013, 20:34
there is a parameter to avoid blending on scenechanges?
like blend=false in mflowfps

SubJunk
13th January 2013, 22:19
there is a parameter to avoid blending on scenechanges?
like blend=false in mflowfpsYes, there is a parameter for that, but it is not recommended because it will make high-action scenes juddery

SubJunk
15th January 2013, 23:34
2.4.0 RC1 is released :)

heizenberg
16th January 2013, 10:26
Hello Subjunk

i have updated to your 2.4.0,

I have a little more gpu usage ( now is +- 8 % on 670 GTX , before +- 3 % )



just a little question,

how to choice your new preset with the script for megui for encoding ? ( fast, smooth... )

and its possible to skip the input convertion task ? or its not CPU / GPU change if skip this task ?


Setmemorymax(512)
SetMTMode(3,4)
PluginPath = "C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
<input>.ConvertToYV12()
SetMTMode(2)
<deinterlace>
<crop>
<denoise>
<Resize>
InterFrame(Cores=4, GPU=true)

thank you !

YGPMOLE
17th January 2013, 04:25
Sorry for asking here, but I have the same issue using Interframe or Framedoubling scripts with AviSynth, and I don't know how to resolve...

I'm using MPC-HC with LAV Splitter (video and audio decoder), FFDShow, ReClock and madVR on a Windows 7 64 bit O.S and Intel I7 860 CPU.: Avisynth is used for frame doubling and (added two day ago) Finesharp scripts.

Not problems at all when the DVDs menus have some moving backgrounds (i.e. films scene), but when they just have a static image (and this often happens with the older DVDs), I'm not able to highlight the various entries and when click on one of them the backgroud image remains the same even if I entered in the new menu (so I'm not able to go back to the previous menu or to know what selection I'm going to do in the actual one).

Trying to explain better...

Suppose to be in the main menu of a TV series DVD with 4 episodes. If I wanted to choose one of them, the highlighting doesn't follow the cursor, so I can't make my choice using the remote: I have to use the mouse and follow the cursor, clicking when it changes from the "little arrow" to the "little hand".

If I do that to change the menu (i.e. to go in the audio language and subtitles menu, or in the extras menu), the background image remains the one of the main menu, so from this moment I'm even not able to know where the menu entries are, and how to go back.
I discover that leaving just the Finesharp script everything works perfectly, so the problem is on the frame doubler or Interframe script.

I figure out that when there is a static menu on the screen, as if the buffer isn't able to drainy and it shows the last image in it's memory, so when I try to highlight a selection the image remains the same.
Changing the values of back/ahead buffer changes the background "frozen" image just of a single frame when I try to highlight a selection, which means that when I move the cursor (or I use the remote) it's like I "forward one step" in a slow motion (I hope I have explained it in an understandable way...) but this happens just once.

Any ideas and/or suggestions?

SubJunk
18th January 2013, 02:37
Hello Subjunk

i have updated to your 2.4.0,

I have a little more gpu usage ( now is +- 8 % on 670 GTX , before +- 3 % )



just a little question,

how to choice your new preset with the script for megui for encoding ? ( fast, smooth... )

and its possible to skip the input convertion task ? or its not CPU / GPU change if skip this task ?


Setmemorymax(512)
SetMTMode(3,4)
PluginPath = "C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
<input>.ConvertToYV12()
SetMTMode(2)
<deinterlace>
<crop>
<denoise>
<Resize>
InterFrame(Cores=4, GPU=true)

thank you !Like this: InterFrame(Cores=4, GPU=true, Tuning="Smooth") :)

SubJunk
24th January 2013, 03:51
Version 2.4.0 is released :)

SubJunk
18th February 2013, 05:07
Version 2.5.0 is released, and I updated the video samples in the first post

heizenberg
18th February 2013, 17:33
thank you SubJunk !

johnmeyer
18th February 2013, 18:13
Many thanks, SubJunk. I just used it to convert a 1964 Kinescope from 24p to 60i and it worked quite well. It sure is fast!

mark0077
18th February 2013, 19:56
Cheers SubJunk. This one is definitely much harder on my system, the price to pay for more smoothness :)

I was again trying some tweaks to your script for my own system. I'm working off Preset Medium with Smooth Tuning. I have to use overlap:0 as it doubles cpu usage on my core i7 leaving almost all presets unusable. I also use algo 13 as algo 23 seems to push my cpu too much with the new block size 8. Looks pretty good.

I notice one error when trying out the Weak Tuning option with Medium Preset. Not sure if you can also see this error on your side with Weak / Medium. Thought I should mention it.

"Overlap size must be >=1 after recalculation"

SubJunk
18th February 2013, 20:57
Hi mark0077, yeah it is definitely slower than before :) But I like the result much more.
I think the error you see is because of your edits to the overlap values, you'll have to adjust some other values to fit (probably remove the refine step, which can also be done by using Preset="Faster"
Hope that helps

thank you SubJunk !Thanks for using it :)

Many thanks, SubJunk. I just used it to convert a 1964 Kinescope from 24p to 60i and it worked quite well. It sure is fast!Glad to hear it! :D

mark0077
18th February 2013, 21:06
Thanks SubJunk, looks like I'll need alot of tweaking to get this to play 1080 with 0 drops :) Any recommendations as to what might have a big reduction in cpu usage / gpu usage, but relatively minimal drop in quality for Film / Smooth + Medium preset. Overlap 0 was my first change, but its just not enough :) Still getting a drop every few seconds. Not sure whats the next best tweak without having to go full blown "Fast" or "Faster"

SubJunk
18th February 2013, 21:30
You could just change blocksize back to 16 and that will bring the speed back to what it was in 2.4.0, and you will still get the benefit of less artifacts

mark0077
18th February 2013, 21:33
Sounds like a good compromize. Thank you.

Sparktank
19th February 2013, 00:11
I just converted a trailer for Fast and the Fursious 6 overnight using 2.5.0 and it was superb!
I can see a much improved visual presentation with the updates compared to recent updates.

Definitely pleased with all the fine tunings going around.
I found on a different forum where someone has DCP trailers to convert to logo-free 1080p with much better encodings than QuickTime will ever offer.
I found that with 2.4.0, there were heavy artifacts if I converted to 720p. I had to convert to a much smaller resolution to get less artifacts so I opted for 480p all the time.

kolak
19th February 2013, 19:25
SubJunk:

Latest dlls compared to ones from version 2.01 give worse quality (with the same script, non-GPU mode).
New ones seams to make object edges more rough with more artefacts (like a not smooth pixels). Edges are also not as well defined and more "doubled".
On a plus side looks like areas around frame edges are better converted.
Any idea?

SubJunk
19th February 2013, 20:50
Do you mean if you use the DLLs from 2.0.1 with the InterFrame 2.5.0 script?

kolak
19th February 2013, 20:53
Can be old or new script- dlls are changing.

SubJunk
19th February 2013, 20:55
I'll test it

kolak
19th February 2013, 21:13
There is one big improvement- handling edges of the frame- way better than in old version!

kolak
19th February 2013, 21:21
I'll test it

It's almost like I need pel=4 (with pel=2 for old dlls) to get same results.

sofakng
8th March 2013, 15:00
I've installed AviSynth 2.5.8 because apparantly SVP (SmoothVideo Project) doesn't work well with 2.6, but I'd like to use AviSynth 2.6 MT when encoding with InterFrame + MeGUI.

Is this possible?

sofakng
8th March 2013, 17:58
OK - It looks like I figured it out.

I have AviSynth 2.5.8 installed normally (through the installer).

I downloaded the AviSynth 2.6 MT (latest) avisynth.dll and had to copy it to the following folders:

\MeGUI
\MeGUI\tools\avs
\MeGUI\tools\x264

I really needed it in all three places (I tried every combination) and now it seems to work fine.

sofakng
9th March 2013, 15:55
Sorry, but one more post.

Last night I ran several tests and using the "GPU=true" flag actually slowed down the encoding by a tiny bit. I ran several consecutive tests (each encode took about three hours), and here was the latest test:

CPU: 14.05 FPS
GPU: 13.37 FPS

Is this normal?

My GPU is a GTX 690 and I'm running Windows 7 x64...

chainik_svp
9th March 2013, 22:00
using the "GPU=true" flag actually slowed down the encoding by a tiny bit

Is this normal?

My GPU is a GTX 690

May be it's not the only GPU you have?
HD4000/2500 is also a "GPU", you know...

SubJunk
10th March 2013, 22:36
That's normal because InterFrame uses higher quality settings while in GPU mode

kolak
10th March 2013, 22:48
What exactly is better?
How much is it better?

SubJunk
10th March 2013, 22:58
GPU mode uses 8x8 blocksize, CPU mode uses 16x16

XinZu
13th March 2013, 00:55
hello, i'm new at tweaking video settings and i just followed a tutorial at a site...interframe works well with sd content but cant get it to work properly with 720&1080 video becomes choppy, slow & out of sync with audio...m using alienware m17x-r4 i7 quad processors, 8gb ram, gforce 660m gtx 2gb...is it the settings or is this hardware insufficient to use interframe on hd video?

Motenai Yoda
18th March 2013, 20:14
16/01/2013 - 2.4.0 RC1:
[list] Fixed the presets Weak and Faster when not using GPU (thanks, Motenai Yoda!)

thanks but why? :confused:

LilScrappy
28th March 2013, 16:50
I have question please for help, when try to use Preset="Placebo" have this error, any chance to fix?
And Placebo have big different between Medium, or it a good options to use ?
http://i.imgur.com/ZOPNSWB.jpg

aegisofrime
28th March 2013, 18:47
I have question please for help, when try to use Preset="Placebo" have this error, any chance to fix?
And Placebo have big different between Medium, or it a good options to use ?
http://i.imgur.com/ZOPNSWB.jpg

Placebo was removed. Can't remember which revision, but the "highest" preset is now Medium.

LilScrappy
28th March 2013, 19:08
ок
when i encoding full movie with 60fps in 48% i think looks megui stoped encoding, and in log info i see have some error but i forgot to save, something like this time frame error 12567, i encoding now again and save error if have again!
my script is
FFVideoSource("J:\video.mkv", fpsnum=24000, fpsden=1001)
Spline36Resize(1920,800,0,140,-0,-140) # Spline36 (Neutral)
Setmemorymax(1024)
SetMTMode(5,6)
SetMTMode(2)
InterFrame(Cores=6, Preset="Medium", Tuning="Film", OverrideAlgo=23, NewNum=60060, NewDen=1001)

i don't have Video Card, please tell me where maybe is problem, to stoped encoding when is 48%
maybe SetMode dont know, i use Intel i5 3550

LilScrappy
29th March 2013, 18:40
Please for help i have again error in 48% i think:
http://i.imgur.com/ZSZOPMR.jpg
what mean want to disable 64 bit mode in megui setting or, and why?
please helping me to fix this problem!

edit:
i start again encoding 60fps this time with x264 32bit, but please tell me below 60fps, i mean 30fps, 50fps no problem to use x264 64bit mode or ?

edit2:
i use now 32bit 10bit-depth and have this error:
http://i.imgur.com/9tRc0Ta.jpg

SubJunk
29th March 2013, 22:56
The best option is to use x264 32-bit at 8-bit-depth. 64-bit is less stable and 10-bit-depth is unsupported by most hardware

kolak
3rd April 2013, 20:33
Have a problem with my new laptop with GPU mode- keeps crashing.
I have HD4000 and GF 640M LE, so would like to use it. Tried different settings for gpuid and nothing works- if works a bit than always uses HD4000.
How can I check what GPU is my cards have?

StainlessS
3rd April 2013, 20:49
Suggest, Right click "My Computer,Properties,Hardware,Device Manager,Display Adapters".

If "My Computer" not on Desktop, then same on "My Computer" in Windows Explorer (WINDOWS E key).
Then perhaps google the card with "GPU".

Could perhaps identify card by clicking on it in device manager (as above) and selecting Details tab, and google search on one of the
ID's there, will look something like "PCI\VEN_8086&DEV_29A2&SUBSYS_513D8086&RE_02"

http://www.geforce.co.uk/hardware/desktop-gpus/geforce-gt-640m-le/specifications (see note at top of page)

kolak
3rd April 2013, 22:06
I see both cards fine- this is not the problem, just don't know how to use them in interframe.
How can I know what gpuid should I specify to use GF card?

kolak
4th April 2013, 20:46
Sorted- had some OpenCL drivers installed, which was causing crashes.

Sparktank
27th April 2013, 11:23
Looking at the SVP wiki, is this the chart I use to help determine if my Intel is GPU worthy?
http://www.svp-team.com/wiki/GPU_Compatibility

Intel 2nd gen. Core "Sandy Bridge" CPU IGP
Intel HD Graphics 3000

So that would be a no for GPU=true on my laptop?
I tried and it doesn't work. But I mean, there won't be any support for Intel HD Graphics 3000 in the future?

I usee DirectShowSource or DSS2 in the mean time, which works well.

kolak
27th April 2013, 13:07
It's probably not fast enough, the same as 2500.

SVP:

(*) Note: HD2500 is still too slow for any real job. Don't try to use it, we warned you!

x265
27th April 2013, 15:50
Does frame interpolation using Interframe require very high bitrates to look good?

kolak
27th April 2013, 16:41
If you have source with macroblocking this may affect motion compensation algorithm, but it works quite well on many source types- the cleaner the source, the better.

x265
27th April 2013, 16:57
I tried encoding a small part of a BD, sometimes during motion the space around people looks distorted. Why does this happen?

kolak
27th April 2013, 17:07
BDs are mainly 24p and this means "not much motion+motion blur", which causes artefacts in motion estimation algorithm. This is normal and at the moment not much can be done- motion adaptive fps conversion is very difficult. We have to wait for some miracle from SVP :)
In the meantime 50/60i source (deinterlaced to 50/60p) convert between each other at very good quality.

Sparktank
28th April 2013, 00:50
It's probably not fast enough, the same as 2500.

SVP:

(*) Note: HD2500 is still too slow for any real job. Don't try to use it, we warned you!

Interesting. I'll stick with DSS/DSS2. It does a well enough job as it is.

I tried encoding a small part of a BD, sometimes during motion the space around people looks distorted. Why does this happen?

This makes me think.
I've been downsizing to cropped 720p and then applying InterFrame and it turns out fine.

But I recently tried InterFrame first in the script then downsized it to cropped 720p.
Crop()
InterFrame()
SplineResize()

The results were uncanny. Especially for things where text fades in and out (like in teasers/trailers).

ratulupadhyay
6th May 2013, 03:39
Hey subjunk, thanks a ton for all your hard work, and I made this account just to say thank you. :)

While I'm at it I thought I could ask about what should I use. Currently I'm using this script to upscale and apply interframe. Couldn't get it all the way up to 1080p, my native resolution, as my CPU usage shoots up to 100% and then the player crashes. Most of my videos are in 720p, so is there anything I should change or add to make the quality better?

SetMemoryMax(512)
SetMTMode(3,16)
ffdshow_source()
LoadPlugin("C:\\Program Files (x86)\\Avisynth 2.5\\plugins\\svpflow1.dll")
LoadPlugin("C:\\Program Files (x86)\\Avisynth 2.5\\plugins\\svpflow2.dll")
Import("C:\\Program Files (x86)\\Avisynth 2.5\\plugins\\InterFrame2.avsi")
SetMTMode(2)
lanczos4resize(1366,768)
InterFrame(Cores=16, GPU=true, Tuning="Smooth", Preset="Medium")
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last

With this script my CPU usage is around 40-70%

CPU - Phenom X6 1090T
GPU - GTX 660

SubJunk
6th May 2013, 22:26
Hi ratulupadhyay, thanks for the kind words!

The script looks good, I would try removing the tuning and presets since I recently made the default preset smoother than it used to be, you can always change it back if you still prefer smooth.
The only real thing to change is the resizer, you should get slightly better quality by using Spline36Resize(1366,768) or if you want the very best you can use ResampleHQ (http://forum.doom9.org/showthread.php?t=160038) which is nice especially for downscaling.

ratulupadhyay
8th May 2013, 02:39
Spline36resize did make a difference, resampleHQ looked good but it blew up my CPU usage! Running interframe with default settings lowered my CPU usage by 10% and looked quite a lot better, lot less artifacts. Thanks a lot. :)

SubJunk
9th May 2013, 02:30
Great, glad it helped :)

aegisofrime
9th June 2013, 05:48
Hi Subjunk!

I use InterFrame on a regular basis, and am generally pleased with the visual quality. It's the speed that concerns me. I'm currently using a Radeon 7850, and I wonder if I will get better speeds if I change to a GTX 660?

SubJunk
9th June 2013, 07:46
Probably not, since it only uses the GPU for a few things. It's still mostly CPU-based. Overclocking the CPU is probably the easiest way to get better speeds, or of course using a lower quality preset

ceth
12th June 2013, 12:52
Hi SubJunk,

I'm looking for a way to achieve "controlled interpolation". What I mean by "controlled" is the script would only interpolate pre-determined frames from an inputed list.

For exemple:

original has frames 1-2-3-4-5-6-7-8-9-10

inputed list:
4
8
9

output: 1-2-3-4-i1-5-6-7-8-i2-9-i3-10 where i1, i2, i3 are frames interpolated from original frames 4&5, 8&9 and 9&10 respectively, and the other frames are the original frames that remain untouched.

Is it possible ?

SubJunk
14th June 2013, 08:00
Yeah I think there is a way using AviSynth but I don't know how off the top of my head. You could start a thread about it.

robpdotcom
14th June 2013, 14:18
Can I get some tips on using Interframe while re-encoding?

Since I'm re-encoding, I don't need real-time performance, and I want maximum quality.

Thanks

SubJunk
14th June 2013, 21:06
Maximum quality is somewhat subjective but my recommendation is to leave it all at defaults but use GPU=true

pbristow
15th June 2013, 19:52
Hi SubJunk,

I'm looking for a way to achieve "controlled interpolation". What I mean by "controlled" is the script would only interpolate pre-determined frames from an inputed list.

For exemple:

original has frames 1-2-3-4-5-6-7-8-9-10

inputed list:
4
8
9

output: 1-2-3-4-i1-5-6-7-8-i2-9-i3-10 where i1, i2, i3 are frames interpolated from original frames 4&5, 8&9 and 9&10 respectively, and the other frames are the original frames that remain untouched.

Is it possible ?

First, a good way to avoid confusion is to number your frames 0, not from 1, as that's what avisynth assumes. For simplicity's sake, I'm going to assume/pretend that in your example there's a frame at the beginning of the input called frame 0, but which you don't want to include in the output.

The way to approach the task is to just generate extra in-between frames with InterFrame as usual, and then select the frames you want from that. Don't worry about time/CPU being wasted producing frames you don't want: Avisynth is cleverly designed to only generate frames that are actually required for the eventual output. So for example, if I say:


Interframe()
SelectEvery(999, 2, 4, 6, 8, 9, 10, 12, 14, 16, 17, 18, 19, 20)


Then avisynth looks at the SelectEvery function first, requests the frames it needs Interframe, and interframe either passes through an original frame or generates a new one as required. It never generates a frame you haven't asked for.

The result will be your "1-2-3-4-i1-5-6-7-8-i2-9-i3-10" sequence. All you need to do is double the frame numbers you want to keep from the original, and insert odd numbers in between for the ones you want interpolated by InterFrame.

SelectEvery() is a quick-n-dirty way of selecting a fixed sequence of frames if your source clip is short enough (up to a thousand frames, say): You just use a number bigger than the input clip length as the first argument, so that it doesn't start looping. There are lots of other ways to select frames, depending what you need: SelectRangeEvery (new in version 2.5); Decimate; and various things recently created by StainlessS.

ceth
16th June 2013, 16:52
Thanks for your answer pbristow :)
I have quoted it and answered in the thread I opened here (http://forum.doom9.org/showpost.php?p=1633126&postcount=11) so I don't pollute Subjunk's thread with things that are not only related to interpolation.

robpdotcom
16th June 2013, 20:02
Maximum quality is somewhat subjective but my recommendation is to leave it all at defaults but use GPU=true

Thanks for the tip. BTW: Why was the "placebo" preset dropped? Would that have given better results?

StainlessS
16th June 2013, 20:14
Placebo, "An innocuous or inert medication; given as a pacifier or to the control group in experiments on the efficacy of a drug".

In context, takes a LOT longer to make negligible difference, for those that have time to waste with little or no benefit.

SubJunk
17th June 2013, 01:48
Thanks for the tip. BTW: Why was the "placebo" preset dropped? Would that have given better results?As the quality of other presets was improved, thanks to SVP, the placebo preset didn't offer better quality anymore

SubJunk
1st July 2013, 00:32
Hi jq963152, can you describe a part of the video that does that?
InterFrame isn't meant to be a competitor against SVP because it's mostly for a different purpose; SVP is for realtime watching on the computer, while InterFrame is for encoding for later, or watching on your TV.

otherman
1st July 2013, 07:53
It's possibile to use interframe to analyze a lowres 24fps video to get 24fps into a highres 8fps video? (The videos are the same, recorded in the same time from the same camera)

SubJunk
5th July 2013, 03:33
I'm not sure what you're asking, otherman. If you want to make a 24fps video into 8fps then you don't need InterFrame. AviSynth can do it with functions like AssumeFPS() or ConvertFPS()

sigma2x
5th July 2013, 08:10
I think what otherman is asking is, can you take a high resolution 8fps clip and turn it into 24fps using a low res 24fps clip to guide the motion.

otherman
5th July 2013, 09:55
I think what otherman is asking is, can you take a high resolution 8fps clip and turn it into 24fps using a low res 24fps clip to guide the motion.

Exactly :)

SubJunk
5th July 2013, 11:11
Ah I see, thanks for clarifying :)
I'm not sure if it can be done now that we use SVP, but in version one of InterFrame I used MVTools2 and it was possible with that. I recommend reading the documentation for MVTools2 to see what you need, and you can use InterFrame 1.14 as a guide.
I experimented with doing a similar thing for a while where I got the motion from a 720p clip and used it on a 1080p clip so I know it works.

bxyhxyh
21st July 2013, 06:34
Can i use it without avisynth MT?

SubJunk
24th July 2013, 07:55
I think that will work

Sparktank
24th July 2013, 09:39
InterFrame without MT is possible, but must use non-MT versions of AviSynth.
Use Groucho2004's Latest CVS avisynth.dll built with ICL 10 (http://forum.doom9.org/showthread.php?p=1618864#post1618864) so no crash errors happen.

If you use SEt's MT DLL, you'll get errors if you try to run without setting MT.
If you use SEt's MT version, Avisynth 2.6 MT 2013.03.09 (http://forum.doom9.org/showthread.php?p=1312666#post1312666), must specify MT, otherwise it will crash.
SetMTMode(3,1) or (3,0) if you only have single core with no HyperThreading or anything (1 logical core).

cafevincent
7th August 2013, 15:03
I'm using megui to encode. I'm trying to encode 23,976fps material but it gives me 59,94fps as a result. Is there any way to limit the frames to double, hopefully via megui?

raffriff42
7th August 2013, 19:56
@cafevincent, Yes indeed (http://www.spirton.com/uploads/InterFrame/InterFrame2.html)
Interframe(NewNum=48000, NewDen=1001)

cafevincent
10th August 2013, 16:02
@cafevincent, Yes indeed (http://www.spirton.com/uploads/InterFrame/InterFrame2.html)
Interframe(NewNum=48000, NewDen=1001)

Thanks! Wow this script is amazing! Is there other "effects" I could apply like this? I'm thinking Grindhouse style film noise?

SubJunk
17th August 2013, 23:44
I'm sure you can apply other effects, I don't know how but AviSynth is capable of amazing things :)

XinZu
31st August 2013, 11:30
hi guys just need some help...this is the script i use

SetMemoryMax(512)
SetMTMode(3,14)
PluginPath="C:\Program Files (x86)\AviSynth 2.5\plugins\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
ffdshow_source()
SetMTMode(2)
LimitedSharpenFaster(ss_x=2.0,ss_y=2.0,strength=45)
InterFrame(Preset="Medium", Cores=14, GPU=true)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last

while it works wonders on sd vids, it lags on 1080 vids
im using alienware m17x-r4
i7-3610qm cpu
8gb ram
660m gtx card with 2gb or 4gb (not sure)

i'm not too knowledgable on this topic so any input is appreciated...

mark0077
31st August 2013, 13:04
I have found the two settings in interframe that have a huge impact on my 1080p playback are these two. I leave settings on medium but tweak these two settings.

Instead of

VectorsString = "{block:{w:8,"

I use

VectorsString = "{block:{w:16,"

Also instead of

VectorsString = VectorsString + "overlap:2"

I use

VectorsString = VectorsString + "overlap:1"

I use those and get 0 frame drops with my i7 920 on all content, looks very good also. You might try only changing one of those perhaps with your higher spec machine than mine. I also use 15 threads. Also instead of interpolating to 60000/1001, I try to use non absolute, just incase I have any frame rates that arn't exactly divisble by that, like 24.00, ie instead of

SmoothString = "{rate:{num:60000,den:1001,abs:true},"

I use

SmoothString = "{rate:{num:5,den:2,abs:false},"

XinZu
31st August 2013, 15:18
thank you for that...but i spent more than an hour reading faqs and guides and i still don't fully understand how to incorporate those commands...those are supposed to be tweaked in "InterFrame2.avsi", right? am i supposed to create a setting for medium preset with these modifications? help please...

mark0077
31st August 2013, 17:53
Hi XinZu, yes your exactly right. Thats what I do, I make a backup of the InterFrame2.avsi file and edit the original with notepad or wordpad. If you want you could try replacing the original lines I mentioned, with the changed line (you could use notepad find and replace to replace one line at a time.?)

Then just save the avsi file and start up a 1080p video to check the smoothness. Changing one alone might be enough for you but on my machine changing those 2/3 settings made a huge performance different with not a huge quality difference.

XinZu
31st August 2013, 19:12
that's what i did...but videos still lags so i thought i wasn't doin it right...

mark0077
31st August 2013, 19:38
thats a pity, I guess all I can suggest is make sure your using the likes of madVR and LAV Filters as a good setup. Other than that maybe try other values like overlap of 0 instead of 1 (might help), or lower quality presets ..

chainik_svp
31st August 2013, 23:37
XinZu

may be you need to start with SVP rather than with these hardcore script things? ;)

XinZu
1st September 2013, 00:33
yeah...gave up and installed svp...1080 looks great at doubled framerate...no lags or out of sync with audio...seems my laptop can do it, just something wrong with the script...anyway, thnx guys for the help...really appreciate it...

SubJunk
1st September 2013, 06:13
Glad you got SVP working :) In case you ever try InterFrame again, try changing the Preset. So instead of Preset="Medium" there is Preset="Fast" and Preset="Faster"

XinZu
4th September 2013, 09:17
just wondrin, i didnt tweak with svp so everything is default from installation...i watched world war z and when the movie goes fast paced like in chases, you can see lotsa artifacts around the characters...is it also like that with interframe? i know its expected but i'm just wondrin if interframe handles that aspect better...

SubJunk
4th September 2013, 11:37
In my tests it does. Also you can always tweak your SVP settings to match InterFrame's quality if you prefer to continue to use SVP.
There's also a GUI for InterFrame called InterFrameGUI if you want to automate its use even more. So you have many options! :)

Music Fan
11th September 2013, 10:16
@cafevincent, Yes indeed (http://www.spirton.com/uploads/InterFrame/InterFrame2.html)
Interframe(NewNum=48000, NewDen=1001)
48000/1001 = 47,9520479520479520...

Shouldn't we use 47952/1000 (which equals exactly 47.952) instead of 48000/1001 (and 23976/1000 instead of 24000/1001 for 23.976) ?

Gavino
11th September 2013, 11:09
Shouldn't we use 47952/1000 (which equals exactly 47.952) instead of 48000/1001 (and 23976/1000 instead of 24000/1001 for 23.976) ?
No. It is 23.976 that is the approximation (to 3 decimal places).
The exact rate is 24/1.001 or 24000/1001.

Music Fan
11th September 2013, 13:10
Does it mean that 59,94 fps is also an approximation and is actually 59,94005994... ?
Because I believe 23.976 fps is linked to 59,94 fps because of the 3:2 pulldown.

Gavino
11th September 2013, 16:36
Does it mean that 59,94 fps is also an approximation and is actually 59,94005994... ?
Yes. For example, see http://en.wikipedia.org/wiki/Ntsc#Color_encoding:
"... designers adjusted the original 60 Hz field rate down by a factor of 1.001 (0.1%), to approximately 59.94 fields per second."

Music Fan
12th September 2013, 10:14
Thanks, I learnt something ;)
For 50p, can we specify 50/1 ? And also 25/1, 30/1, 60/1 ... for 25p, 30p, 60p ... ?

Gavino
12th September 2013, 13:59
For 50p, can we specify 50/1 ? And also 25/1, 30/1, 60/1 ... for 25p, 30p, 60p ... ?
Yes, that's right.
For an integral ('whole number') rate, you can use a denominator of 1.

SubJunk
12th September 2013, 22:01
Gavino is right, and to add to that answer, 50p is automatically chosen if the input is 25p

Music Fan
13th September 2013, 10:06
Thanks. Actually I asked that also for the assumefps function. I used to specify 23.976 or 29.97 instead of fractions, I won't do this again.
But for integral rates like 25p, I guess assumefps doesn't need fraction and that we can put simply assumefps(25) instead of assumefps(25/1).
I noticed with AVSMeter that scripts were a little bit faster with assumefps than without, that's strange. Is it because in this case Avisynth doesn't have to search the framerate ?
Thus now I specify framerate in each script, even if I don't have to change framerate.

creaothceann
14th September 2013, 07:58
You can just use

AssumeFPS(24000, 1001)

which might be even more accurate than a fraction (float values have limited accuracy defined by their number of bits).

Music Fan
14th September 2013, 10:08
Do you mean there is also a difference between (24000, 1001) and (24000/1001) ?

Groucho2004
14th September 2013, 10:26
Do you mean there is also a difference between (24000, 1001) and (24000/1001) ?
RTFM!!

AssumeFPS(24000/1001) will give you 23.000 FPS (division of int values).
AssumeFPS(24000, 1001) is the correct form and will result in 23.976.... FPS.

Music Fan
14th September 2013, 10:42
Thanks.
I didn't know there was a difference because I often saw scripts on this forum using 24000/1001 while I guess the guys who did it didn't want to get 23 fps but 23.976.
And I don't really understand why and how 24000/1001 give 23.000 FPS. As a fraction, that does not look very logical :confused:

TheSkiller
14th September 2013, 12:15
And I don't really understand why and how 24000/1001 give 23.000 FPS. As a fraction, that does not look very logical :confused:
It's because both are integers (whole numbers, no point-something allowed), hence you get an integer (23) as well if you divide two integers.

Gavino
14th September 2013, 12:30
24000/1001 (integer division) gives 23
24000.0/1001 (float division, note decimal point!) gives 23.976 (approx).
AssumeFPS(24000, 1001) - two parameter form, setting numerator and denominator separately, is the most exact.
You can also use AssumeFPS("ntsc_film").

Music Fan
14th September 2013, 12:36
Thanks !
24000.0/1001 (float division, note decimal point!) gives 23.976 (approx)
I had read the assumefps help but I hadn't understand this point ;)

willsonsin
21st September 2013, 04:04
Why my converted 60FPS video has lower bitrate than the original 24FPS video?
Is this normal?

Music Fan
21st September 2013, 06:43
You have to choose the bitrate in your encoder (which is not supposed to know the original bitrate of your video when opened with Avisynth which send a decompressed video to the encoder).

willsonsin
21st September 2013, 14:45
Do you mean by changing the CRF?
My CRF was set to 16 and encoding mode was set to Target Quality.
But converted 60FPS video still getting lower bitrate than original video.
I compared the sample videos provided by the author...but they having same bitrate...

pbristow
21st September 2013, 15:16
willsonsin:

It sounds like you're using the x264 codec to encode your output, yes? In CRF mode, x264 will allocate as many bits as are necessary to achieve the quality you've asked for. It won't add extra bits if they aren't necessary to achieve that. It's different from constant bitrate mode, where the codec just keeps applying more bits wherever they are most likely to be useful, until either the maximum bitrate has been reached, or the encoded image is identical to the source.

You've told us nothing about the nature of the source. Is it also encoded in x264/h264, or something else (such as DivX, or Xvid, or WMF, or... etc.)? If it was x264, what settings were used to encode it? Was it also done in CRF mode, or constant bitrate mode, or some other mode? What parameters were set? Unless *all* those factors were the same as you're using for your encoding (or at least reasonably similar), there's no way to estimate what proportion of the original file's bitrate your new files should have.

Now, if you're *sure* that both your encoding and the original encoding are being done the same way, then I would expect the bit rates of the two files to be roughly similar, but with the second one *probably* being a bit larger... but certainly not twice as big. How much larger depends on how much motion is taking place in the video. If there are large chunks of certain scenes that don't move at all from one frame to the next, then they don't need any more bits to encode them at double frame rate then they do at single rate.

And finally, the file could even end up smaller if, as part of your Avisynth processing, you've lost a little bit of fine detail somewhere - most likely just random noise. Some of the InterFrame presets may involve a bit of denoising to reduce the overall processing workload, I don't know without looking into it.

Any clearer? :)

raffriff42
21st September 2013, 15:38
It's weird but often converting frame rate - up or down - will not affect overall file size when compressed with x264. This is because the higher the frame rate, the less *difference* exists between frames (and vice versa - lower frame rates have higher interframe differences), and this is what is encoded (to oversimplify).

willsonsin
21st September 2013, 15:45
pbristow:

Thank you very much~ You let me understood how does video encode works. =) I really appreciate your patient explanation and help~ =) From your explanation, I think I already understand how it works now. =)
Thank you very much~ =)

LilScrappy
25th November 2013, 10:44
Some progress with ghosting movement (how to fix), because they are not nice !

SubJunk
15th December 2013, 23:11
InterFrame 2.5.1 is released, enjoy! :)

vampiredom
17th December 2013, 22:57
InterFrame 2.5.1 is released, enjoy! :)

Thanks!

nautilus7
20th December 2013, 00:58
Thanks for the update. What is the currently suggested way to use InteFrame in avs sripts for realtime playback with mpc and ffdshow?

SubJunk
23rd December 2013, 05:53
I'm not an expert on realtime use so it would be better if someone else gave advice on that. I've always used it for encoding, and via Universal Media Server (http://www.universalmediaserver.com/) in realtime

mark0077
23rd December 2013, 19:16
nautilus7, what I personally do is take the latest interframe, make 1 or 2 small tweaks to Overlap and BlockSize params so that I can run it in Medium Mode at 1080p realtime without framedrops in difficult scenes. I then strip out the function calls from interframe and place a little bit of code above and below to get things working via one script.

I source in that file alone in ffdshow avisynth, ie a 1 line avisynth call. I have ffdshow "Add ffdshow video source" disabled and buffers set to 0/15.

Let me know if you'd like me to send what I use.

nautilus7
26th December 2013, 14:35
Yes, of course. It would be great. Thanks.

sofakng
9th January 2014, 18:34
Is there a way to batch-convert files using Interframe?

I'm using FFMPEG (with AviSynth) and am able to control everything from the command-line and it's working great, but I want to make sure I'm not really losing any quality.

For example, if my input file is 720p, H.264, 5 Mbps, I want to maintain as much quality as possible but only apply frame interpolation.

Basically I just want a simple method of:

convert.exe -I input.mkv -O output.mkv

...and have it automatically choose the best settings and maintain the closest quality to the original input file.

GMJCZP
25th January 2014, 00:15
I used Interframes() to transform a video of 14.8 fps and other of 10 fps to 23.976 and it is miraculous. Thanks for this tool!

TOM_SK
14th February 2014, 09:26
Is there a 'noob' guide to use InteFrame with MPC-HC?

daglax
20th March 2014, 23:26
Did you guys ever test, which preset produces the fewest artifacts?

I did a lot of testing the last days and i come to the conclusion, that "Smooth" produces fewer artifacts than the default preset "Film" in almost any cases (except for Sports or fast moving individual things).

I also come to the conclusion, that "Medium" is not always the best option, especially not for live conversion. I have one of the best Desktop-CPU's out there (4770k) and still can't run the medium preset at 1080p-movies. I'm not even able to run "Fast" @1080p. And there are still framedrops, if i install a pretty good GPU (760 GTX).

For live conversion, it is necessary to go back to "Faster", or you will get FPS-drops sooner or later (without modding the script itself).
But i don't think that's a real problem, because in most cases, you can't tell a difference between "Faster" and "Medium". There's the same amount of artifacts.

To minimize artifacts on live conversion, you can do the following:

InterFrame(GPU=true, Preset="Faster", Tuning="Smooth", NewNum=48000, NewDen=1001, Cores=4)

With this script you'll get ~ 48 fps from a ~ 24 fps movie. The lower the output-fps the less artifacts you'll get.


Did you guys have other tricks to minimize artifacts?

daglax
22nd March 2014, 04:01
Hey it's me again.
I did some further testing and i stumbled upon a strange behavior.
If I set the framerate to 30 fps, the whole video laggs like crazy (live conversion). Much more than with the normal 24 fps.
Why is this happening?

I used
InterFrame(GPU=true, Preset="Faster", NewNum=30000, NewDen=1001, Cores=8)
for testing

EDIT: Nevermind. I resolved the issue by putting Avisynths buffer back/ahead to around 12. For some reason 30 fps need more buffered pictures than 48 fps (everything below 10 is too low!).

pirum
2nd April 2014, 20:22
I'm about to convert some blurays to 1280x720x50p, as that is within bluray specs. (I intend to play them on my bluray-player).

Any idea what would be a good way to do it?

I was thinking of doubling the frames, and then speed up the video (and sound) from 48fps to 50fps, similar to the way PAL DVDs are produced, a 4% increase of speed is rarely noticeable IMHO and I reckon this will produce the best result.

Or am I better off just going straight from 24fps to 50fps or 60fps?

SubJunk
2nd April 2014, 23:10
1280x720x60p is also within blu-ray specs, which is a fairly nice conversion from 24p

aegisofrime
7th April 2014, 06:26
Hi Subjunk :)

Will there be an update to take advantage of the recent improvements in svp, or will replacing the dlls do the job? :o

SubJunk
7th April 2014, 22:39
Replacing the DLLs should do it :) I'll release an update with updated DLLs too when I have time to test the improvements

SubJunk
8th April 2014, 01:41
The updated DLLs are causing crashes for me so I don't recommend updating them for use with InterFrame

aegisofrime
8th April 2014, 05:58
The updated DLLs are causing crashes for me so I don't recommend updating them for use with InterFrame

Alright I will wait for you to release an update to InterFrame then. :)

daglax
13th April 2014, 15:07
Does it affect smoothness or quality, if Interframe interpolates the video to a non-integer instead of an integer?
For example: Is 24 x2 = 48 fps better than 24 x2.08 = 50 fps?

And if I want to interpolate a video to 40 fps to be rendered on a 120 hz projector (60fps produces more artifacts), should i use "NewNum=40" or "NewNum=40000, NewDen=1001"? Couldn't see much of a difference.

Music Fan
13th April 2014, 15:29
Does it affect smoothness or quality, if Interframe interpolates the video to a non-integer instead of an integer?
For example: Is 24 x2 = 48 fps better than 24 x2.08 = 50 fps?
I guess interpolate to an integer is easier to calculate and should produce smoother result.
But you can try both with a short extract to see differences.

Sparktank
14th April 2014, 02:32
You'll get better quality the closer you get to the original source FPS. So going double the FPS (24*2=48) will have less artifacts than going 24->50/60(59.94).
Also if you have a decent, compatible graphics card (CUDA recommended), you'll get better results with the GPU-Acceleration.

How smooth it is depends on the settings.

40fps to 120Hz projector, as in convert to 40fps to 120fps?
40fps source and "NewNum=40000, NewDen=1001" will give you same as the source.
NewNum/NewDen is what you set for the target.
NewNum=120000, NewDen=1001 (or NewDen=1000 for even 120?).

daglax
14th April 2014, 13:51
I know. the less interpolated frames, the less artifacts you'll get.
that's the reason i want to got to 40fps videos instead of 60 fps. So the source is a 23.976 movie that i want to interpolate to 40 fps. The reason why i want to do this is, because a 40 fps video on a 120 hz screen doesn't have the motion judder that an 48fps video will have.

I tried both options: "NewNum=40" and "NewNum=40000, NewDen=1001" and both convert a 23.976 fps movie to a 40 fps video. I didn't notice any difference in playback so far. So what should i choose?

Music Fan
15th April 2014, 07:38
And what if you let the video in 24hz ? 120/24 = 5, an integer, which means no judder. You can make a simple assumefps(24) in real time to get exactly 24 hz instead of 23.976.
Does your screen support 100 hz ? If yes, you can convert 24hz into 48 (or 47.952) and make assumefps(50).

daglax
15th April 2014, 17:33
Yep. If i play back a normal 24p movie on a 120hz screnn, there is no 24p-judder at all, but the lack of frames per second is still very much noticeable. For normal movies, i don't activate frame interpolation, because i'm used to this crucial framerate givben from the film industry, but in 3D 24 fps is way too low to enjoy a movie (at least in my opinion). It just doesn't look natural and fluid.

So interpolate all 3D movies to at least 40 fps.

pirum
15th April 2014, 21:09
1280x720x60p is also within blu-ray specs, which is a fairly nice conversion from 24p

Thanks, I tried to convert the same film to 60p, and 50p (going first to 48p and then speeding up to 50p), and the 60p looked noticeably smoother (not surprising considering 20% more fps) but also had more artifacts/ripples/whatever in some scenes.

So for now I'll go for 50fps for my TV, if video should be played on my computer screen 60fps is better.

Maybe next I'll, just for fun, try 1920x1080 interlaced (to keep it playable in my Bluray player).

BTW, one reason I'm doing this is because I'm a bit annoyed, to say the least, that the Hobbit-films aren't released in HFR. I'd say that on my 32" TV the 50fps versions I created using Bluray as source is quite good. Very big thanks to InterFrame.

druneau
3rd May 2014, 20:52
I know. the less interpolated frames, the less artifacts you'll get.
that's the reason i want to got to 40fps videos instead of 60 fps. So the source is a 23.976 movie that i want to interpolate to 40 fps. The reason why i want to do this is, because a 40 fps video on a 120 hz screen doesn't have the motion judder that an 48fps video will have.

I tried both options: "NewNum=40" and "NewNum=40000, NewDen=1001" and both convert a 23.976 fps movie to a 40 fps video. I didn't notice any difference in playback so far. So what should i choose?

Have you tried sticking to multiples of the source frame rate? To me this results in cleaner image look since you keep source frames intact.

As for the refresh rate, you can create custom ones easily then use your player's ability to switch refresh rates when needed. (I've been using ToastyX's Custom Resolution Utility (http://www.monitortests.com/forum/Thread-Custom-Resolution-Utility-CRU) for a while.)

SubJunk
5th May 2014, 01:34
BTW, one reason I'm doing this is because I'm a bit annoyed, to say the least, that the Hobbit-films aren't released in HFRI'm also annoyed at that!

chainik_svp
5th May 2014, 22:55
The updated DLLs are causing crashes for me so I don't recommend updating them for use with InterFrame

I've no idea why the "sertified beta tester" of SVP project can't report such information to us :confused:

CPU mode with blend=true and pel>=2 - are you talking about this crash? Fixed in SVPflow libs 1.0.11.

SubJunk
5th May 2014, 23:25
I've had lots of stuff going on in my life including my computer being broken for weeks. Thanks for the fix.

aegisofrime
6th May 2014, 12:43
Can I assume that with 1.0.11, I can simply update the dlls and they will work in Interframe?:cool:

Reel.Deel
6th May 2014, 15:48
Can I assume that with 1.0.11, I can simply update the dlls and they will work in Interframe?:cool:

It should work without a problem.

daglax
10th May 2014, 21:48
Is there any need to update the dlls or say is there any noticeable improvement with the new ones?

Sparktank
10th May 2014, 23:18
Is there any need to update the dlls or say is there any noticeable improvement with the new ones?

You don't need to, but it you could benefit from the updates, especially where an issue has just been addressed that chainik_svp mentioned a few posts back.

Check out the SVPflow thread for updates to the libraries.
http://forum.doom9.org/showthread.php?t=164554

Plus with SubJunk having computer problems lately, it'd be helpful if you did update them and report any issues so the teams can work on it (and be aware of any issues).

daglax
11th May 2014, 03:46
ok. I updated the dlls and watched a movie since then. Didn't play around in the settings. I didn't notice any difference in playback whatsoever.
As far as i can say, there even isn't any difference in cpu load. So no performance gain/drop for me.
I'll keep you guys updated, if i stumble upon any issues.

SubJunk
11th May 2014, 12:15
I just tested the new libraries and can confirm the crash has been fixed for me.
I can also confirm what daglax said about performance, I found very similar performance between the old and new DLLs.
Also the quality difference is slight but it's there. I noticed it when comparing single frames. I did a comparison of Game of Thrones footage and it was sometimes better and sometimes worse than before, but it was better more often.
InterFrame 2.5.2 is released

wdwms
14th May 2014, 03:05
Greetings! I'm using Interframe for the first time. I'm feeding it 18fps Super8 film as an input and using interframe to output 29.97fps. The results are incredible!

However I have one problem.. After I create the 30fps file, I want to use another script to append some video to the beginning and end. All videos that I'm appending are also 29.97. I use the following code to create the 30fps file, I load this into Virtualdubmod and save the output as an AVI. This avi plays super smooth and looks great.

AVISource("V:\18fps.avi").assumefps(18).ConvertToYV12()
InterFrame(NewNum=30000,NewDen=1001,Cores=8,GPU=false)

Then in my new script, if just put these two lines, and NOTHING else:

movie=Directshowsource("V:\30fpsfile.avi").converttoYV12().SSRC(AudRate).assumefps(29.97)
movie


The above returns a video that plays too fast, 9:24 cut down to 5:38. Changing assumefps to 18, returns the video in its proper length but it is choppy and back to 18fps. I'm using the latest version of InterFrame.

What am I doing wrong? does interframe create a "fake" 29.97 file? that is its 18fps but with other information thrown in?

Thanks!

SubJunk
14th May 2014, 04:16
Hi wdwms, glad you like InterFrame and thanks for using it :)
InterFrame really does output the framerate specified, so the video from the first script should really be 29.97FPS. You can check that with MediaInfo.
Have you tried removing SSRC() to see if it still gives 18FPS? I haven't used that function before but it might be scaling the video length with the sample rate or something

wdwms
14th May 2014, 04:35
InterFrame really does output the framerate specified, so the video from the first script should really be 29.97FPS. You can check that with MediaInfo.
Have you tried removing SSRC() to see if it still gives 18FPS? I haven't used that function before but it might be scaling the video length with the sample rate or something

Yes I checked the file with mediainfo, and with MPC. Everything shows 29.97.. However, no matter what program I bring it into to encode it (avisynth, tried TMPGenc as well) - when it is saved back out the Interframes are completely lost. I removed SSRC, that had no effect.

I got the time to render correctly by using this as input:

movie=Directshowsource("V:\30fpsfile.avi", fps=29.97,convertfps=true).converttoYV12()
movie


But the resulting AVI file shows 29.97fps, but its choppy and has lost the work that interframe has done. Its got to be something with the encoding of the file, as all programs are having trouble with it.

Can you test out a short clip to see if you are getting the same? Just use interframe on a short 10 second clip, save it out to an avi with virtualdubmod, then try to bring it back into vdub with my line above and save it out again as avi. The result will be a new file that says it is 29.97fps, but it will play as if you never applied interframe to it.

SubJunk
14th May 2014, 04:44
Yup I can test it just send me a link :)

wdwms
14th May 2014, 11:43
Yup I can test it just send me a link

Will put together a file w/the scripts shortly... thanks.


Try using AVISource instead of DirectShowSource in your second script and see if the result differs?

Did that too, no difference... frames are still lost

wdwms
14th May 2014, 12:53
Ok I think i found the problem.. I may have been pulling the unconverted file into my script.. wow it was late last night.. rendering now, so i'll know later today if to worked

Thanks!

wdwms
14th May 2014, 18:34
Ok I've got it all worked out.. Sorry for the false alarm.. had some other settings incorrect.

Here is the final results: https://vimeo.com/95237467
This is a 18fps HD 1920x1080 transfer of Super8 film, InterFrame converted it to 30fps! Amazing!

StainlessS
14th May 2014, 19:38
Hi there SubJunk, thanks for Interframe, first time I've used it and very impressive too.

However, I often deligate one of several older single core machines to render in MeGUI, I'm getting
this error message from a Pentium 4 (Prescott) 3Ghz single core with Hyperthreading.

Evaluate: System exception - Illegal instruction
(Interframe2.avsi, line 153)
(Interframe2.avsi, line 57)

Same error message from another Pentium 4, 2.88Ghz without Hyperthreading.

The question is, is multicore supposed to be mandatory, I've seen no mention in opening post ?
EDIT: What are the requirements, Instruction set etc (SSE2/3)?

(I dont use MT version Avisynth, just standard [or ICL] v2.6Alpha5.)

EDIT: This line:

SVSmoothFps(Input, Super, Vectors, SmoothString, url="www.svp-team.com", mt=Cores)


With Cores=1, GPU=false.

SubJunk
14th May 2014, 23:58
Ok I've got it all worked out.. Sorry for the false alarm.. had some other settings incorrect.

Here is the final results: https://vimeo.com/95237467
This is a 18fps HD 1920x1080 transfer of Super8 film, InterFrame converted it to 30fps! Amazing!No problem, it turned out great :)

The question is, is multicore supposed to be mandatory, I've seen no mention in opening post?Since version 2 of InterFrame it has used the SVP libraries and I think they require multithreading, since SVP bundles AviSynth MT. You should be able to use InterFrame 1 without multithreading, although you'll take a quality and speed hit going back to that version

StainlessS
15th May 2014, 01:24
Thank you for your answer knd sir.
I shall try t locate v1.0, and decide wehther to only render on multi-core, or otherwise,
can I suggest that you mention on 1st post that there is a requirement, (or refer to older posts if not met).
Sleep well my friend, and again, thank you.

SubJunk
15th May 2014, 06:01
Good idea, I've clarified that on the first page now.
You can get InterFrame 1.14 (the last release of version 1) from here: http://www.spirton.com/uploads/InterFrame/InterFrame-1.14.zip
The documentation is: http://www.spirton.com/uploads/InterFrame/InterFrame.html

Aznboy1993
18th May 2014, 03:37
Hello SubJunk. I would first like to thank you for you for making InterFrame and the possibilities that it entails! Now, if you don't mind me asking you a few questions?

I am a novice when it comes to AVS scripts, but I have a pretty good knowledge of video processing and DSP in general. Recently, I have used your guide to convert lower frame movies to HFR using InterFrame (Spirton website). I am converting a 23.976 movie to 60 fps (it's a direct Blu-ray rip of Disney's Frozen, if that matters). However, I have found some artifacts and such during high motion scenes. Now, I do know that this is a consequence of motion interpolation and that for the most part nothing can be done about it. However, using SVP (SmoothVideo Project) and "live streaming" the video to 60 fps I get less (sometimes considerably less) frame artifacting. I have found specific examples in the same file (one using InterFrame to upconvert to 60 fps and other using SVP to live upconvert to 60 fps) where using SVP there is much less artifacting when compared to the the file processed through InterFrame.

I am just wondering why this is the case since to my knowledge InterFrame is based directly off of SVP and uses its dynamic link libraries. Also, is there a way to make it so that I get this "antialiasing" (so to speak) and make the converted videos like SVP with less artifacting? I am not bashing your product in anyway, I am just curious as to why this is occurring.

Please correct me if I am grossly misinformed in any of this matter. Your help is much appreciated :)

SubJunk
20th May 2014, 04:21
Hi Aznboy1993, thanks for the post. The reason that there can be different results - sometimes better and sometimes worse - than SVP is because we use different options than the SVP program does.
SVP supports outputting its .avs file so you can see what options it's using. If you post the .avs file from SVP then we can compare its settings and see which one/s are different

lpcstr
20th May 2014, 04:22
I for the life of me can't get this to work.

I started by following the instructions here: http://www.spirton.com/convert-videos-to-60fps/

Installed the version of Avisynth provided, installed the K-lite Mega pack, installed MeGUI and ran the updates, etc.

First problem was that "Prefer DSS2 over DirectShowSource" was disabled, and contrary to the information in the "FAQ", reinstalling K-lite and rebooting didn't do anything. Reading in the comments someone suggested the solution was to install "Haali", which I assumed meant the Matroska splitter. Installing that allowed me to enable the option. But then when I get to step 9 and I select the file for video input MeGUI gives me an error:


MeGUI encountered a fator error and may not be able to proceed.
Reason: Could not load file or assembly 'MediaInfoWrapper, Version=0.7.61.0, Culture=neutral, PublicKeyToken=null' or one of it's dependencies. The system cannot find the file specified.


So I said to heck with MeGUI, I will simply write a avs script and see if I can play it back in MPC-HC. So I do like so:


Setmemorymax(512)
SetMTMode(3,4)
PluginPath = "C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
dss2("C:\file.mkv", fps=23.976).ConvertToYV12()
SetMTMode(2)
InterFrame(Cores=4)


And it tells me that dss2 isn't a function. So I do a bit more looking around and somebody says to copy avss.dll from Haali into the AviSynth plugin directory. Now MPC-HC simply displays the error "Can't open C:\file.mkv: 80004005".

This is ridiculously frustrating. I wish there was simply a ffmpeg filter or something for this so I could skip all this AviSynth and DirectShow codec and registry nonsense.

SubJunk
20th May 2014, 04:36
It looks like you're using an old version of MeGUI, please make sure it updates. It will probably fix that error you described - they updated MediaInfo to 0.7.64 in July last year so I'm not sure why it would have 0.7.61.
I'm updating the guide now with the Haali thing. K-Lite used to install it by default but stopped doing it recently.

lpcstr
20th May 2014, 04:48
It looks like you're using an old version of MeGUI, please make sure it updates. It will probably fix that error you described - they updated MediaInfo to 0.7.64 in July last year so I'm not sure why it would have 0.7.61.
I'm updating the guide now with the Haali thing. K-Lite used to install it by default but stopped doing it recently.

I ran update again on MeGUI (was once not enough? :confused:) and now when I select a file it asks me for my preferred way of opening and when I select DirectShowFilter, it gives me an error:


AviSynth Script error:
DirectDhowSource: RenderFile, the filter graph manager won't talk to me


EDIT: Ok, I selected a different video file (the first was encoded with H.265) and it seems it may be working now.

SubJunk
20th May 2014, 05:06
I ran update again on MeGUI (was once not enough? :confused:) and now when I select a file it asks me for my preferred way of opening and when I select DirectShowFilter, it gives me an errorSeems like a codec issue. When installing K-Lite make sure to select "Profile 9: Lots of Stuff" during installation and that could fix it.
Anyway none of this involves InterFrame (these errors are all about opening and reading the file, regardless of InterFrame) so this probably isn't the best place to discuss it, if you'd like more help we can switch to the comments section of the "Convert videos to 60fps" article :)

Edit:
Ok, I selected a different video file (the first was encoded with H.265) and it seems it may be working now.Cool :)

Aznboy1993
21st May 2014, 01:28
Hi Aznboy1993, thanks for the post. The reason that there can be different results - sometimes better and sometimes worse - than SVP is because we use different options than the SVP program does.
SVP supports outputting its .avs file so you can see what options it's using. If you post the .avs file from SVP then we can compare its settings and see which one/s are different
Thanks for your response! Yes, I figured that was the and I was going to go ahead and see if I could change the parameters, but upon looking at the AVS script for InterFrame, I have no idea :stupid:

Here is the AVS script generated from SVP:
# This script was generated by SmoothVideo Project (SVP) Manager.
# Check http://www.svp-team.com for more details.

SetMemoryMax(1024)

global svp_scheduler=true
global threads=15
global svp_cache_fwd=threads+2

LoadPlugin("C:\Program Files (x86)\SVP\plugins\svpflow1.dll")
LoadPlugin("C:\Program Files (x86)\SVP\plugins\svpflow2.dll")

SetMTMode(3,threads)
DirectShowSource("D:\Frozen\Frozen Videos\CRF\Frozen (1080p HD).mkv", fps=23.976, convertfps=true).ConvertToYV12()
SetMTMode(2)

global crop_params=""
global resize_string=""
global super_params="{scale:{up:0},gpu:1,rc:false}"
global analyse_params="{main:{search:{coarse:{distance:-10,bad:{sad:2000}}}},refine:[{thsad:65000}]}"
global smoothfps_params="{rate:{num:5,den:2},algo:13,scene:{limits:{m1:0,m2:0}}}"

global demo_mode=0
stereo_type=0
stereo_left_selection=""
stereo_right_selection=""

########## BEGIN OF MSMoothFps.avs ##########
# This file is a part of SmoothVideo Project (SVP) 3.1.4
# This is NOT the full AVS script, all used variables are defined via
# JavaScript code that generates the full script text.

function interpolate(clip src)
{
input = crop_params=="" ? src : eval("src.crop("+crop_params+")")
input = resize_string=="" ? input : eval("input."+resize_string)

super=SVSuper(input, super_params)
vectors=SVAnalyse(super, analyse_params, src=input)
smooth=SVSmoothFps(input, super, vectors, smoothfps_params, mt=threads, url="www.svp-team.com")

return demo_mode==0 ? smooth : demo(input,smooth)
}

input=last

stereo_type==0 ? eval(""" interpolate(input)
""") : stereo_type==1 || stereo_type==3 ? eval("""
lf = interpolate(input.crop(0,0,input.width/2,0))"""+stereo_left_selection+"""
rf = interpolate(input.crop(input.width/2,0,0,0))"""+stereo_right_selection+"""
StackHorizontal(lf, rf)
""") : stereo_type==2 || stereo_type==4 ? Eval("""
lf = interpolate(input.crop(0,0,0,input.height/2))"""+stereo_left_selection+"""
rf = interpolate(input.crop(0,input.height/2,0,0))"""+stereo_right_selection+"""
StackVertical(lf, rf)""") : input

########### END OF MSMoothFps.avs ###########



Much help would be appreciated :)

SubJunk
21st May 2014, 04:15
Thanks for your response! Yes, I figured that was the and I was going to go ahead and see if I could change the parameters, but upon looking at the AVS script for InterFrame, I have no idea :stupid:

Here is the AVS script generated from SVP:
# This script was generated by SmoothVideo Project (SVP) Manager.
# Check http://www.svp-team.com for more details.

SetMemoryMax(1024)

global svp_scheduler=true
global threads=15
global svp_cache_fwd=threads+2

LoadPlugin("C:\Program Files (x86)\SVP\plugins\svpflow1.dll")
LoadPlugin("C:\Program Files (x86)\SVP\plugins\svpflow2.dll")

SetMTMode(3,threads)
DirectShowSource("D:\Frozen\Frozen Videos\CRF\Frozen (1080p HD).mkv", fps=23.976, convertfps=true).ConvertToYV12()
SetMTMode(2)

global crop_params=""
global resize_string=""
global super_params="{scale:{up:0},gpu:1,rc:false}"
global analyse_params="{main:{search:{coarse:{distance:-10,bad:{sad:2000}}}},refine:[{thsad:65000}]}"
global smoothfps_params="{rate:{num:5,den:2},algo:13,scene:{limits:{m1:0,m2:0}}}"

global demo_mode=0
stereo_type=0
stereo_left_selection=""
stereo_right_selection=""

########## BEGIN OF MSMoothFps.avs ##########
# This file is a part of SmoothVideo Project (SVP) 3.1.4
# This is NOT the full AVS script, all used variables are defined via
# JavaScript code that generates the full script text.

function interpolate(clip src)
{
input = crop_params=="" ? src : eval("src.crop("+crop_params+")")
input = resize_string=="" ? input : eval("input."+resize_string)

super=SVSuper(input, super_params)
vectors=SVAnalyse(super, analyse_params, src=input)
smooth=SVSmoothFps(input, super, vectors, smoothfps_params, mt=threads, url="www.svp-team.com")

return demo_mode==0 ? smooth : demo(input,smooth)
}

input=last

stereo_type==0 ? eval(""" interpolate(input)
""") : stereo_type==1 || stereo_type==3 ? eval("""
lf = interpolate(input.crop(0,0,input.width/2,0))"""+stereo_left_selection+"""
rf = interpolate(input.crop(input.width/2,0,0,0))"""+stereo_right_selection+"""
StackHorizontal(lf, rf)
""") : stereo_type==2 || stereo_type==4 ? Eval("""
lf = interpolate(input.crop(0,0,0,input.height/2))"""+stereo_left_selection+"""
rf = interpolate(input.crop(0,input.height/2,0,0))"""+stereo_right_selection+"""
StackVertical(lf, rf)""") : input

########### END OF MSMoothFps.avs ###########



Much help would be appreciated :)Cool. Firstly I will assume you're using gpu=true with InterFrame - that will give a quality boost if you weren't already using it.
If the default values of InterFrame with GPU=true were written into the SVP script you provided, it would be as follows:

global super_params="scale:{up:0,down:4},gpu:1,rc:false}"
global analyse_params="{block:{w:8,overlap:2},main:{search:{distance:0,coarse:{distance:-10,bad:{sad:2000}}}},refine:[{thsad:250}]}"
global smoothfps_params="{rate:{num:60000,den:1001,abs:true},algo:13,mask:{cover:80,area:0,area_sharp:1.2},scene:{blend:true, mode:0}}"

So from there you can compare them

Aznboy1993
21st May 2014, 16:19
Cool. Firstly I will assume you're using gpu=true with InterFrame - that will give a quality boost if you weren't already using it.
If the default values of InterFrame with GPU=true were written into the SVP script you provided, it would be as follows:

global super_params="scale:{up:0,down:4},gpu:1,rc:false}"
global analyse_params="{block:{w:8,overlap:2},main:{search:{distance:0,coarse:{distance:-10,bad:{sad:2000}}}},refine:[{thsad:250}]}"
global smoothfps_params="{rate:{num:60000,den:1001,abs:true},algo:13,mask:{cover:80,area:0,area_sharp:1.2},scene:{blend:true, mode:0}}"

So from there you can compare them

Thank you very much for the information, SubJunk. Yes, I do use GPU=true. I have compared the values and I have a few questions:

- Why does SVP use "less information" when compared to "InterFrame" (at least for those global variables)?
- Is it possible to mimic the settings I have in SVP to InterFrame (namely the interpolation method used in SVP - "1.5m")?

Your help is very much appreciated! :thanks:

SubJunk
22nd May 2014, 06:28
SVP relies on the default values a lot more than us so that's why InterFrame looks more complex. You could mimic the settings by editing InterFrame2.avsi. Hope that helps :)

Aznboy1993
23rd May 2014, 04:28
SVP relies on the default values a lot more than us so that's why InterFrame looks more complex. You could mimic the settings by editing InterFrame2.avsi. Hope that helps :)
Ahh, I see. Thanks for that. Do you know how I should go about editing the avsi to mimic the "1.5m" interpolation method of SVP?

otherman
28th May 2014, 14:35
And this is my strange case: I've a 24fps source with full temporal resolution in green channel, but half temporal resolution for Red and Blue channel (even frames have red and green channels, odd frames have green and blue channel. I would like use green channel full temporal resolution to rebuild missing Red and Blue, becouse working directly on only 12fps red/blue channel take terrible output. Any idea how to achieve that?

Bloax
28th May 2014, 17:53
Sounds a bit like a job for MFlow (since you can do the motion analysis on the Green channel.), but I'm not sure.

Guest
28th May 2014, 17:58
@otherman

Please don't duplicate your other thread issue here. Cross-posting is not allowed. Thank you.

rowas
5th June 2014, 21:58
I know for a fact that Interframe is usable with any program that can handle AviSynth scripts. Up until now, I've been using the method described in the step-by-step guide with MeGUI.

However, I need to use MediaCoder and I've been attempting to follow along with the MeGUI guide to get videos to convert correctly on the other program. I'm not sure what I'm doing wrong... is there anyone here who can post a step-by-step guide for using Interframe with MediaCoder?

Music Fan
5th June 2014, 22:21
You just have to load your avs script in MediaCoder, as with all encoders, assuming MediaCoder accept avs scripts. Otherwise you can load your script in Virtual Dub, encode in lossless (Lagarith is good for this), then load your Lagarith video (in avi container) in MediaCoder.
The quality will be exactly the same and the whole process won't need much more time than loading directly the script in MediaCoder.
If you do this, don't forget to configure correctly Lagarith (untick RGB and choose YV12 if your video is in YV12, which is the case of most videos).

Bloax
6th June 2014, 00:43
Don't forget to set [Video > Color Depth > Output format to compressor/display -> 4:2:0 planar YCbCr (YV12)] in VirtualDub if you're going to encode it to YV12 in Lagarith. (And if your avisynth input is YV12, you may also want to set "Decompression format" to the same thing.)

foxyshadis
7th June 2014, 02:27
Unless you're doing multiple encodes, avsproxy is usually much faster than a lossless step. The disk writing & reading kills speed, and lagarith is pretty slow too.

Mediacoder might not work because it includes version 2.6 alpha 2 of avisynth, which doesn't really work with anything. Replace it (in the "codecs" folder) with your own avisynth.dll from the windows folder.

Music Fan
7th June 2014, 11:48
The disk writing & reading kills speed, and lagarith is pretty slow too.
The encoding time difference between avsproxy and lagarith is probably very thin, especially when encoding in x264 (which needs much more time than reading the source file).
I didn't know avsproxy but there were other tricks to render avs script as "virtual" avi for non avs compatible applications (AVS2AVI, MakeAVIS, VFAPI with readAVS.dll ...), but I don't know what is better.
Are you sure avsproxy can work with anything else than Avidemux ?
http://www.avidemux.org/admWiki/doku.php?id=using:avsproxy
AvsProxy, as the name says, is a proxy between Avisynth and Avidemux.

rowas
8th June 2014, 00:15
I'm gonna come out of the digital closet here and say that there are ulterior motives for getting a motion interpolation script working with MediaCoder.

I have OSX installed on my system and I was frustrated having to switch to Windows to run the conversion. Currently, there are no viable methods to run motion interpolation on videos on OSX except with professional video editing software. I've looked, but didn't find any native OSX software that can use Avisynth. Maybe someone can point me to something if it exists?

Just out of curiosity, I checked to see if MeGUI can run under Wine (with Crossover). It doesn't.
However, I discovered that MediaCoder (despite being nagware), lists good compatibility with OSX and Linux when running under Wine.
So far, the program has given me no problems other than confusing me when getting Avisynth to work.

I'm quite sure that Avisynth can work in this environment and the fault is likely entirely my own for being quite ignorant in this area (pretty n00b actually). But bear with me. Once I have this figured out, I'm sure this will help others in the future who want to experience videos differently.
Once done, I'll be posting a video tutorial along with a guide similar to Subjunk's guide on Spirton (http://www.spirton.com/convert-videos-to-60fps/) for users who are using OSX or Linux who are using Wine. Perhaps, he may want to post my guide there as well, who knows. I just want my 60fps videos.

Here are the steps I am taking. Please examine them and let me know what I'm doing wrong. I'm following along with Subjunk's guide here, looking for the equivalent procedures on MediaCoder as MeGUI.

1.) Install the Avisynth program as provided on Spirton. v2.6 alpha
2.) Install MediaCoder v0.8.30.5622 (32-bit) Full edition - non portable
3.) Extract "tools" to program files > MediaCoder > tools
4.) Create the script. I edited the script from the guide
Setmemorymax(2048)
SetMTMode(3,4)
PluginPath = "C:\Program Files\MediaCoder\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
<input>.ConvertToYV12()
SetMTMode(2)
<deinterlace>
<crop>
<denoise>
<resize>
InterFrame(Cores=8)
5.) I didn't see a built- in script wizard like MeGUI does, so I used a normal text editor. The example script does not include the video input so I added
DirectShowSource("c:\Program Files\Working\In\Sample.mp4")
to point to the video at the first line.
6.) I now believe the script to be finished, so I save the .avs file in \Working\Scripts
7.) That done, I drag the script into the queue in MediaCoder. MediaCoder is set to its defaults currently and nothing has been changed. I try encoding the video. It doesn't work and I get an error message stating that "An Invalid Combination of Settings is Made."

7.) I also tried a different method where I used the "AviSynth" tab and specified my script as the script template (without the first line), dragging "Sample.mp4" to the list and trying to encode it that way. The process works, but the resulting video is the same as the input video as if the script was bypassed entirely.

SubJunk
8th September 2014, 23:22
Hi rowas, it might be that some of the lines in that script are MeGUI-specific; <input> is a placeholder that shows MeGUI where to put the input file, <deinterlace> shows it where to put deinterlacing stuff, etc. so we can remove those bits of code and replace <input> with your input.
So for a non-MeGUI script you can try:

Setmemorymax(512)
SetMTMode(3,4)
PluginPath = "C:\Program Files\MediaCoder\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
DirectShowSource("C:\Program Files\Working\In\Sample.mp4").ConvertToYV12()
SetMTMode(2)
InterFrame(Cores=4)

Other things I changed were memory from 2048 to 512, because AviSynth is bad at dealing with memory so this has to be low for stability, regardless of how much RAM you have on the computer.
Also the second number in "SetMTMode" should be the same as "Cores".

If you end up publishing a guide for OS X I'll be happy to link to it from my guide

SubJunk
9th September 2014, 01:53
InterFrame 2.6.0 is released, with the addition of a new boolean "FrameDouble" to always double the framerate. Enjoy!

Sparktank
9th September 2014, 12:20
new boolean "FrameDouble"

Nice one, thanks. :)

StainlessS
9th September 2014, 12:23
+1 to that.:thanks:

Bloax
9th September 2014, 16:58
Hell yeah, no more checking the actual video framerate and manually setting the damn settings.
Thanks!

sofakng
3rd October 2014, 02:19
Is there a difference in 60 FPS and 120 FPS?

My monitor is 120 Hz and SVP always converts to 120 FPS. However, SVP doesn't always achieve 120 FPS so I'm looking to do offline conversion so it plays smoother.

Is there a difference in 60 vs 120 FPS?

Also, how would I tell InterFrame to convert to 60 and 120?

SubJunk
3rd October 2014, 02:58
Sure, 120 FPS will be even smoother than 60 FPS, but will take almost twice as long to convert so you should compare the conversion speeds between the two framerates and decide if it's worth it :)

InterFrame(Cores=x, NewNum=120000, NewDen=1001)

sofakng
3rd October 2014, 03:03
Thanks, that's what I thought.

Encoding is very, very slow with 1080p... (h264 encoding doesn't take too long but SVP absolutely kills my i5-2500k CPU).

SubJunk
3rd October 2014, 03:48
You can try different speed presets in both InterFrame and x264 to make it pretty fast

johnmeyer
3rd October 2014, 05:10
Does converting to 120 fps actually make the video look better?? I would think that any minor improvement in smoothness would be more than offset with the inevitable artifacts that motion estimation introduces. I have only seen the results of my TV's internal software ("Auto Motion Pro") which does a similar thing, and I have to say that the result is most definitely not addictive. However, perhaps I have not tried using it on the right video sources, and therefore it might look good with some program material.

Chacun à son goût, I guess.

creaothceann
3rd October 2014, 09:02
However, perhaps I have not tried using it on the right video sources, and therefore it might look good with some program material.

http://www.youtube.com/watch?v=lXX7dRULFaE
http://amvnews.ru/index.php?go=Files&file=down&id=4941

johnmeyer
3rd October 2014, 15:55
I only watched the YouTube video. The video quality was absolutely awful to begin with, and the morphing artifacts between the anime slow/variable framerate was terribly distracting.

I restore old films and video for a living, and I am probably more sensitive than most people to artifacts that result from technology designed to improve video. I know what it is like to apply a noise filter, for instance, and initially marvel at the reduction in noise, only to later realize what a mess I've created. From those experiences, I've learned to live by this old quote: Less is more. (Mies van der Rohe, from Robert Browning).

However, if you like it, that is all that matters. Pay no attention to me ...

SubJunk
4th October 2014, 04:23
The quality of interpolation will be the same whether 60FPS or 600FPS, because motion vectors are used to create the intermediate frames - adding more frames doesn't change the motion vectors, and every time you double the frames it means each frame is being displayed for half the time as before, so the quality always looks the same regardless.

TL;DR If you don't like it at 60FPS then 120FPS won't change it negatively or positively

daglax
4th October 2014, 17:50
Is it possible to use this script with avisynth x64? It would be really nice to use more than 2 Gigs of RAM when applying different filters.

PS: I found a movie interpolated to 40 fps to have a lot less artifacts than a movie interpolated to 60 fps. So i don't think that's completly true.

Music Fan
4th October 2014, 19:20
Are you sure avisynth x86 is limited to 2 GB when installed on Windows 64 bit ?

daglax
4th October 2014, 19:38
Yes. A 32 bit application only uses 2 Gigs of RAM regardless of 32bit or 64bit windows operation system.

I did run into some errors during realtime encoding due to this limited amount of RAM available.

SubJunk
5th October 2014, 05:14
Yeah the RAM thing is true, I haven't tried AviSynth x64 so I'm not sure if this script works with it.
I haven't had any issues with this script running out of memory when I use SetMemoryMax(512), but it has at higher values than that. But I haven't done much 4k interpolation, only 1080p.

Asmodian
5th October 2014, 07:18
You can get Avisynth x86 to use 4 Gigs of RAM on a 64 bit OS if your application is Large Address Aware. You can patch an application to be large address aware too, lots of tools available if you google.

Music Fan
5th October 2014, 13:05
Interesting, could you explain how to do this for avisynth ?
The 1st result found with google ;
http://www.techpowerup.com/forums/threads/large-address-aware.112556/
It seems to work with all 32 bit programs but I'm not sure.

videoh
5th October 2014, 13:31
Interesting, could you explain how to do this for avisynth ? You can't do it to a DLL, because large address awareness is a process attribute, i.e., it applies to EXEs. You need to apply it to the EXE that invokes Avisynth.

Music Fan
5th October 2014, 13:45
Ok, do you mean the program in which the script is opened, for example Virtual Dub ?

videoh
5th October 2014, 14:53
Yes, that is correct.

StainlessS
5th October 2014, 15:05
It is my understanding that you can enable Large Address Aware for program invoking Avisynth for both 32/64 bit systems.
Under 32 bit OS, enables 3GB user space, Under 64 bit OS, enables 4GB user space.

Question:
Is there any difference to the invoking LAA executable, ie do you have to have one for 32 bit OS @3GB and another for 64bit OS @ 4GB ?
(or is it just setting a flag that is interpreted differently depending upon system).
EDIT: What if any difference if executable is 32bit / 64bit ?


Thank you in advance.

daglax
5th October 2014, 17:27
To answer the question, i asked:

No, it's not possible to use Interframe with Avisynth x64. Large Address Aware seems like a good alternative, unfortunately this program doesn't really work with avisynth. mpc-hc still crashes at around 2GB RAM usage with heavy post processing scripts enabled.

i guess the only thing we can do is to wait for an 64bit working svpflow.dll from the SVP developers, which they declined a while ago in their forums.

Groucho2004
5th October 2014, 17:50
unfortunately this program doesn't really work with avisynthWhich program?

Groucho2004
5th October 2014, 17:56
Under 32 bit OS, enables 3GB user space
Only under specific conditions, see link below.

Question:
Is there any difference to the invoking LAA executable, ie do you have to have one for 32 bit OS @3GB and another for 64bit OS @ 4GB ?
(or is it just setting a flag that is interpreted differently depending upon system).
EDIT: What if any difference if executable is 32bit / 64bit ?


Thank you in advance.
Have a look here. (http://blogs.technet.com/b/askperf/archive/2007/03/23/memory-management-demystifying-3gb.aspx)

daglax
5th October 2014, 19:15
Which program?
Large Address Aware

Keiyakusha
5th October 2014, 19:20
mpc-hc still crashes at around 2GB RAM usage with heavy post processing scripts enabled.

what about virtualdub? maybe that's mpc-hc being buggy. Also have you patched mpc-hc with largeadressaware? Because host app should be patched, not the avisynth itself.

Groucho2004
5th October 2014, 20:38
Large Address Aware
:confused::confused:
"LARGE_ADDRESS_AWARE" is a linker flag. For an already built binary it can be applied by patch. Try Keiyakusha's suggestions.

Edit:
I see now that somebody made a "program" called Large Address Aware. Funny, it requires .NET Framework 3.5 although a patch utility like this could be written in 5 minutes with a few lines of C code. Talk about hyper-bloat.

Music Fan
5th October 2014, 20:45
:confused::confused:
"LARGE_ADDRESS_AWARE" is a linker flag.
That's also the name of a tool which allows to patch programs, I gave the link page 34.

daglax
6th October 2014, 20:15
if anything in the combination mpc-hc - ffdshow - avisynth is laggy, it sure is avisynth. The plugins and dlls aren't supposed to run in x64 or with a large adress aware flag.
Unfortunately Interframe stays 32bit with max 2 Gigs of RAM

Groucho2004
7th October 2014, 10:23
if anything in the combination mpc-hc - ffdshow - avisynth is laggy, it sure is avisynth.
It's not Avisynth that's slow, it's the filters and how you use them. Your statement borders on trolling since you provide no data whatsoever to back it up.

The plugins and dlls aren't supposed to run in x64 or with a large adress aware flag.
Another ridiculous statement.

Unfortunately Interframe stays 32bit with max 2 Gigs of RAM
More proof that you have not understood anything what other users here tried to tell you. It's not the plugins that have to be "large address aware", it's the application that interfaces with Avisynth.

By the way, mpc-hc uses more than 2GB happily in my quick test:

Script:
SetMemoryMax(4000)
SetMTMode(3)
LWLibavVideoSource("test.264", threads = 1)

SetMTMode(2)
SlowMotion(multi = 5)

function SlowMotion (clip video, int "multi")
{
last = video
org_num = FramerateNumerator(last)
org_den = FramerateDenominator(last)
multi = default(multi, 2)
InterFrame(NewNum = FramerateNumerator(last) * multi, NewDen = FramerateDenominator(last), Cores = 4, Tuning = "Smooth", GPU = true)
AssumeFPS(org_num, org_den)
return last
}


Task Manager:
http://s29.postimg.org/k3h5jaeon/mpchc.png

chainik_svp
7th October 2014, 21:46
mpc-hc.exe is already "patched" since ages ;)
common apps that need to be patched are x264.exe and potplayermini.exe

and again and again - if you really lack memory with some AVS script try SVP's avisynth.dll at the first place
it was specifically optimized to save memory in MT mode to not break 3GB level
look at SVP generated scripts for sample code

Groucho2004
7th October 2014, 22:27
mpc-hc.exe is already "patched" since ages ;)
Indeed.

common apps that need to be patched are x264.exe and potplayermini.exe
32 Bit x264 has the large address aware linker flag set by default. Why would it need to be patched?
On a 64 Bit system one would use the 64 Bit x264 anyway, receiving frames through stdout from Avisynth.

chainik_svp
8th October 2014, 09:24
32 Bit x264 has the large address aware linker flag set by default. Why would it need to be patched.

some people complained about the one included with MeGUI for example

Groucho2004
8th October 2014, 10:17
some people complained about the one included with MeGUI for example
Odd. One would have to deliberately remove that linker switch when compiling x264 or "un-patch" the binary. Both of which seem rather unlikely.

mixmasterarne
24th December 2014, 15:31
Hello Doom9 Board.

i am a big fan of frame interpolation and using this tool a lot to increase the overall picture quality. I do not use the realtime solution with Potplayer or MPC. I am using a interframe gui tool, that is based on the avisynth encoder and megui. It can be found here:

https://highframerate.wordpress.com/int … -download/

I tested this on several movies and it worked out quite good, smooth motions and fine image quality. However, there are still artifacts when it comes to motions that are not straight like people running on a police chase.

I was searching for a method or special settings on the template, that will lower the amount of artifacts. So far i did not find them, if anyone hase some settings please let me know.

The next thing i was testing was that i took the new X265 encoder and replaced it in the folder of the X264 exe. There are x265 builds deployed every day on this page:

http://builds.x265.eu/

So i took the latest x32 build with 8bit and renamed it to x264.exe and put into the folder of the interframe gui program.

The result was good and i noticed that the amount of artifact was slightly reduced. Has anyone some experience with X265 and frame interpolation?

Are there possibilites to run the frame interpolation also with 4K content?

Music Fan
24th December 2014, 15:49
Your link is incomplete, I guess it's this one ;
https://highframerate.wordpress.com/interframegui-download/

Sparktank
25th December 2014, 00:05
I was searching for a method or special settings on the template, that will lower the amount of artifacts. So far i did not find them, if anyone hase some settings please let me know.

You could lower the new fps to 48 instead of 60.
That would lower artefacts.

You could also use SVP which allows much more customization and save as an AVS script and run that through an encoder.

Also it helps a lot to have a capable graphics card so you can set GPU=true.

IMO, double the frame rate looks better than 2.5x the frame rate.

My monitor is also capable of doing 60/70/75 Hz, so I customized it to do 71.928 Hz instead.
So 47.952fps (double of NTSC_FILM@23.976) looks superb.

wonkey_monkey
25th December 2014, 01:19
IMO, double the frame rate looks better than 2.5x the frame rate.

Doubling means you have just one interpolated frame between every input frame, and all of the input frames make it into the output. If you use a non-integer multiplier, on the other hand, not all of the input frames will even make it into the output unaltered - so with 2.5x, you end up one unaltered input frame followed by four interpolated frames, which skip over the next input frame (if that makes sense)

See how frame 1 (and all other odd frames, if you continue the list) doesn't appear in the list under 2.5x:


Output frame number 2x 2.5x
0 0 0
1 0.5 0.4
2 1 0.8
3 1.5 1.2
4 2 1.6
5 2.5 2
6 3 2.4
7 3.5 2.8

Sparktank
25th December 2014, 01:28
Output frame number 2x 2.5x
0 0 0
1 0.5 0.4
2 1 0.8
3 1.5 1.2
4 2 1.6
5 2.5 2
6 3 2.4
7 3.5 2.8


I actually never looked at it that way.
I've been using double so I can keep it at 1080p for remuxes (to avoid frame drops in MadVR).
I used to do 60fps (2.5 for me in NTSC) but had to resize to 1280width or even 800width in SVP.

I should start playing with everything again.
1280width wouldn't be so bad. I don't exactly have HD monitors.

Since I'm going to resize, I wonder how different resize filters affect interpolation quality.
I did notice that in SVP, it would always use Lanczos to downsize, until I modified scripts to use Spline in all circumstances.

After the holidays, I'll give a few different resizers a go.
I did notice a difference between Lanczos and Spline when interpolating (especially when using Pulfrich 3D glasses).
(and create a new thread to discuss more on resizing+interpolating)

Music Fan
25th December 2014, 10:43
Doubling means you have just one interpolated frame between every input frame, and all of the input frames make it into the output. If you use a non-integer multiplier, on the other hand, not all of the input frames will even make it into the output unaltered - so with 2.5x, you end up one unaltered input frame followed by four interpolated frames, which skip over the next input frame (if that makes sense)
I'm not sure to understand the sense of your message because your reasoning seems to confirm that Sparktank made the good choice.
Doubling the framerate should be better, there is only one new frame between two original frames unaltered and there are probably less artifacts.
With 2,5 multiplication, you can't keep all original frames, otherwise the process would add judder (36 new frames can't be spread evenly between the 24 original frames).

I don't know how Interframe works, but the best solution to get 60 frames from 24 may be to convert 24 fps into 120 fps (24 x 5), then keep 1 frame on 2.

mixmasterarne
25th December 2014, 21:25
Hello,

i know that there are some special settings from svp for example anime movies to prevent artifacts.

Can someone show me how to import these settings to the avisynth script?

wonkey_monkey
25th December 2014, 22:58
I don't know how Interframe works, but the best solution to get 60 frames from 24 may be to convert 24 fps into 120 fps (24 x 5), then keep 1 frame on 2.

That wouldn't be any different to going direct from 24 to 60 - half of the unaltered input frames would still get dropped at the "keep 1 frame in 2" stage.

Music Fan
25th December 2014, 23:43
Yes I know (I wrote With 2,5 multiplication, you can't keep all original frames), that was another reflexion about quality (fluidity and artifacts), admitting multiply by 5 then divide by 2 is easier than x 2,5, but Interframe maybe does it internally when making x 2,5.

SubJunk
3rd January 2015, 08:01
InterFrame 2.7.0 is released! This releases adds a "Fastest" preset, for faster processing but lower quality.

mixmasterarne
13th January 2015, 23:11
Are there plans to add support for 4K content?

SubJunk
15th January 2015, 00:13
Are there plans to add support for 4K content?4k should work already, if AviSynth can handle it without running out of memory

aegisofrime
25th January 2015, 03:13
Hi SubJunk!

I routinely use QTGMC followed by InterFrame. I was wondering, is it possible to use the motion vectors generated by QTGMC for InterFrame to speed up performance?

Thanks!

SubJunk
25th January 2015, 03:40
That would be really cool! I don't think so though, since InterFrame no longer uses MVTools2 like QTGMC does

TCmullet
18th February 2015, 07:30
Wow, I can't believe I survived reading/skimming this whole thread! I think I see "the light" better. The forum at SVP is not the place to discuss InterFrame; this thread is, even though it's merely a thread. I kinda thought there would be a whole forum section on it. And I now perceive that you, Subjunk are the author and not to be confused with Mag79 and the others at the SVP-Team, though you are on good terms and work "together".

So may I raise a question that's not been addressed? I was under the impression that I could do all my Avisynth processing in one script. But if I include "loop" commands to chop out footage before doing InterFrame, Virtualdub hangs. Then I observe that I have not seen anyone here using Interframe along with other actions such as "loop". Is it true that I must separate all other actions of certain types and keep the call to InterFrame all by itself? (Including with it ONLY things directly related to it, like SetMT stuff.) This makes for 2 processing runs, when I would have preferred one. Also, I observe that for many things, I must switch back to AS 2.5.8, then switch forward to 2.6 for InterFrame.

StainlessS
19th February 2015, 00:29
Can you check, should you be using Trim() rather than Loop(). [Loop repeats a section a number of times, default being 'almost endlessly'].

EDIT: Posting a small script exhibiting the problem is always a good idea (leaving out all unnecessary stuff which does not contribute to the problem).

SubJunk
19th February 2015, 01:33
Wow, I can't believe I survived reading/skimming this whole thread! I think I see "the light" better. The forum at SVP is not the place to discuss InterFrame; this thread is, even though it's merely a thread. I kinda thought there would be a whole forum section on it. And I now perceive that you, Subjunk are the author and not to be confused with Mag79 and the others at the SVP-Team, though you are on good terms and work "together".
I guess that can be a bit confusing since it has been a collaborative effort. I don't think any of us are really the sole author of anything since we have all iterated the work of others. I should probably add a polished version of something like the following to the first post:

This script started as some text being thrown around another forum by lots of people, and eventually I, along with some others like Widezu69, started doing extensive tests on the script trying to squeeze out all the quality we could. At the time, it used the AviSynth plugin called MVTools2 which has had various authors and contributors like Manao, Fizick, Tsp, TSchniede and SEt. We kept having lots of requests by people to tweak the script for their processor and so we established some good ways to reduce or increase CPU load without killing quality too much, and to make it easier I wrote a guide (in my signature) and developed InterFrame so people could modify those things themselves in a more readable way. Then SVP got released based on MVTools2 and it was faster than MVTools2, so I rewrote InterFrame to use SVP instead, and again collaborated with Widezu69 and some others along the way, and I'm on the SVP beta testing team so I get to communicate with Chainik and Mag79 about it there too.

So may I raise a question that's not been addressed? I was under the impression that I could do all my Avisynth processing in one script. But if I include "loop" commands to chop out footage before doing InterFrame, Virtualdub hangs. Then I observe that I have not seen anyone here using Interframe along with other actions such as "loop". Is it true that I must separate all other actions of certain types and keep the call to InterFrame all by itself? (Including with it ONLY things directly related to it, like SetMT stuff.) This makes for 2 processing runs, when I would have preferred one. Also, I observe that for many things, I must switch back to AS 2.5.8, then switch forward to 2.6 for InterFrame.StainlessS' response goes for me too :)

foxyshadis
19th February 2015, 02:00
Also, I observe that for many things, I must switch back to AS 2.5.8, then switch forward to 2.6 for InterFrame.

Unless you're using Deen or Dust, I can't imagine why you'd still need Avisynth 2.5.8. All of the plugins I use are compatible with 2.6.

Reel.Deel
19th February 2015, 02:08
Unless you're using Deen or Dust, I can't imagine why you'd still need Avisynth 2.5.8. All of the plugins I use are compatible with 2.6.

Deen works with 2.6. Dust is a 2.0 plugin (IIRC) and does not work with either 2.5.8 or 2.6. But yeah, there's not many good reasons to use Avisynth 2.5.8.

StainlessS
19th February 2015, 11:14
Dust is a 2.0 plugin (IIRC) and does not work with either 2.5.8 or 2.6.

RD, So far as I'm aware, DustV5 should load with Kevin Atkinson
v2 C plugs loader (but it dont), are you aware of a reason for this ?
EDIT: Above is nonsense, is v2.0 CPP dll.

Is there any source (you seem to know where everything is :) )

TCmullet
20th February 2015, 02:35
Thanks for all said. Turns out there were missing pieces of the puzzle and I have it working now. Let me answer each item relevant, after I post my script, which DOES work. (Actually, this is another video, but just like the prior one.)
# Uses AS 2.6.0.5
SetMemoryMax(512)
SetMTMode(3,4)
main=AviSource("D:/Video-Work/myVideoFile.504p.lag.pcm.avi")
main
DelayAudio(0.140)
#
# delete comm brks
loop(0,0,5)
loop(0,3972,5847)
loop(0,29260,32108)
loop(0,35660,37575)
loop(0,50447,53256)
loop(0,74336,77161)
loop(0,77352,79283)
loop(0,93587,97319)
loop(0,97604,101393)
loop(0,114267,116187)
loop(0,119848,121710)
loop(0,144678,144727)
ConvertToYV12()
SetMTMode(2)
InterFrame(Cores=2,Tuning="Film")
#InterFrame(Cores=2,Tuning="Film",FrameDouble=true)

Re: Using loop vs trim: I like the loop option that has 0 as the first of three operands. See my 2nd instance:

loop(0,3972,5847)

This deletes frames 3972 thru 5847, exactly what I want. Trim didn't seem to be as easy to code. (However, the AviSynth docs are often obtuse, at least to me.)

As far as VD hanging or crashing (yes, there were quasi-random crashes), that is solved via 2 changes:

1. I posted the crash dump at Virtualdub forum:
http://forums.virtualdub.org/index.php?act=ST&f=15&t=23198&
Learned I was still using a buggy version of FFInputDriver.vdplugin. Upon installing the current version, all problems go away, except one.

2. The one problem was that at same time I was experimenting with various InterFrame options. Bad idea to hastily change multiple items in a new dev environment. In the script above, the last line is a comment. If you swap-comment those last two lines such that you DO execute the one with FrameDouble, the script fails in one of two ways. If you have no file open in VD, it weirdly opens with no frames but VD says you have "Frame 18446744073709551276 (0:00:4294967291.4294" (This is in the window at the bottom). The other way was with the script the other way, the script open, and I try to F2 with the FrameDouble line activated. VD gave a hairy message about frame numbers being wrong, but I have not been able to recreate the condition, in order to report the text that VD gave.

So, adding the FrameDouble option, at least in this circumstance causes failure of the script to open properly. I guess this is a bug report for you, Subjunk.

TCmullet
21st February 2015, 16:05
Maybe I wrote too big a post. Subjunk, near the end, I reported to you a bug with FrameDouble.

StainlessS
21st February 2015, 17:15
@TCMullet,
If you have a lot of ranges to trim out (especially if list is auto generated), then you might like to try a script provided in FrameSel plug, also has a
1 millisecond fade (default) between splices to avoid 'cracks' in audio (where trim occurs during loud-ish noise).

Script from FrameSel() : http://forum.doom9.org/showthread.php?t=167971&highlight=framesel

Function RejectRanges(clip c,String "SCmd",String "Cmd",Bool "TrimAudio",Float "FadeMS") {
# RejectRanges() by StainlessS. Required:- FrameSel, Prune, RT_Stats
# Wrapper to delete frames/ranges along with audio, can supply frames/ranges in SCmd string And/Or Cmd file.
# The wrapper makes for easier usage of Prune() which supports up to 256 input clips, but requires a clip index,
# eg '3, 100,200' would specify clip 3, range 100 to 200. The wrapper does away with the necessity for the clip index as we
# are only using a single clip here. Prune also does not have a 'reject' arg to delete specified frames rather than select them,
# this wrapper also converts a list of frames to delete into a list of frames to select so that we can use Prune and its audio
# capability.
#
# SCmd: Frames/Ranges specified in String (Frames/Ranges either Chr(10) or ';' separated, infix ',' specifies range, eg 'start,end').
# Cmd: Frames/Ranges specified in file (one frame/range per line, comments also allowed, see FrameSel for Further info).
# TrimAudio:
# True(default), deletes audio belonging to deleted frames
# False, returns original audio, probably out of sync.
# FadeMS: (default 1.0 millisec). Linear Audio Fade duration at splices when TrimAudio==true, 0 = dont fade (might result in audio 'clicks/cracks').
c
TrimAudio=Default(TrimAudio,True) # default true trims audio, false returns original audio (audiodubbed, as Framesel returns no audio)
FadeMS=Float(Default(FadeMS,1.0)) # 1 millisecond linear fadeout/fadein at splices
PruneCmd = (TrimAudio) ? "~Prune_"+RT_LocalTimeString+".txt" : ""
(!TrimAudio)
\ ? FrameSel(scmd=SCmd,cmd=Cmd,reject=true)
\ : FrameSel_CmdReWrite(PruneCmd,scmd=SCmd,cmd=Cmd,reject=true,Prune=True,range=true)
(TrimAudio) ? Prune(Cmd=PruneCmd,FadeIn=True,FadeSplice=True,FadeOut=True,Fade=FadeMS) : NOP
# If TrimAudio==true then delete Prune temp file, Else restore original Audio to the now audio-less clip
(TrimAudio)
\ ? RT_FileDelete(PruneCmd)
\ : (c.HasAudio) ? AudioDub(c) : NOP
Return Last
}

Function SelectRanges(clip c,String "SCmd",String "Cmd",Bool "TrimAudio",Float "FadeMS",Bool "Ordered") {
# SelectRanges() by StainlessS. Required:- FrameSel, Prune, RT_Stats
# Wrapper to Select frames/ranges along with audio, can supply frames/ranges in SCmd string And/Or Cmd file.
# The wrapper makes for easier usage of Prune() which supports up to 256 input clips, but requires a clip index,
# eg '3, 100,200' would specify clip 3, range 100 to 200. The wrapper does away with the necessity for the clip index as we
# are only using a single clip here.
#
# SCmd: Frames/Ranges specified in String (Frames/Ranges either Chr(10) or ';' separated, infix ',' specifies range, eg 'start,end').
# Cmd: Frames/Ranges specified in file (one frame/range per line, comments allowed, see FrameSel for Further info).
# *** NOTE ***, If both Cmd and SCmd supplied AND Ordered == False, then will process Cmd file and then SCmd string afterwards, ie
# Will select ranges in Cmd file and in order specified (rather than auto ordering ranges) and then append ranges specified in
# SCmd string (and in order specified).
# TrimAudio:
# True(default), selects audio belonging to selected frames/ranges
# False, returns original audio, probably out of sync (maybe totally out of whack if Ordered == false and selected ranges out of order).
# FadeMS: (default 1.0 millisec). Linear Audio Fade duration at splices when TrimAudio==true, 0 = dont fade (might result in audio 'clicks/cracks').
# Ordered:
# True(default), all frames/ranges are returned in sequencial order. Any frame specified more than once will return only 1 instance.
# False, All frames/Ranges are returned in specified order, Cmd processed first and then SCmd. Frames/ranges specified more than once
# will return multiple instances. Allows out-of-order trimming of clip, eg re-sequencing of scenes in movie.
#
# Does not make much sense to select individual frames with audio, best used with ranges.
# Will coalesce individually selected adjacent frames/ranges before any Fade, ie only audio fade where sensible to do so.
# TrimAudio==false with non Ordered selection will result in completely out of sync audio.
c
TrimAudio=Default(TrimAudio,True) # default true trims audio, false returns original audio (audiodubbed, as Framesel returns no audio)
FadeMS=Float(Default(FadeMS,1.0)) # 1 millisecond linear fadeout/fadein at splices
Ordered=Default(Ordered,True) # True (default) frames/ranges will be Ordered and selected only once even if specified more than once.
# False, frames/ranges returned in specified order, Cmd processed 1st and then SCmd.
PruneCmd = (TrimAudio) ? "~Prune_"+RT_LocalTimeString+".txt" : ""
(!TrimAudio)
\ ? FrameSel(scmd=SCmd,cmd=Cmd,Ordered=Ordered)
\ : FrameSel_CmdReWrite(PruneCmd,scmd=SCmd,cmd=Cmd,Ordered=Ordered,Prune=True,range=true)
(TrimAudio) ? Prune(Cmd=PruneCmd,FadeIn=True,FadeSplice=True,FadeOut=True,Fade=FadeMS) : NOP
# If TrimAudio==true then delete Prune temp file, Else restore original Audio to the now audio-less clip
(TrimAudio)
\ ? RT_FileDelete(PruneCmd)
\ : (c.HasAudio) ? AudioDub(c) : NOP
Return Last
}


The post limit is 16KB in user forum and 20KB in developer.

TCmullet
21st February 2015, 18:07
Thanks, Stainless. Will keep this on file for possible future use. But for now the loop0 method of chopping out things is working perfectly. I generate it by hand, with a bit of copy/paste help in conjunction with Vdub's ctrl-g feature. So while I didn't type any numbers, I picked the start and end chop points manually in Vdub. It's working perfectly, and audio is fine.

The only thing that remained outstanding for me in this thread (at least right now) was to get into SubJunk's hands the bug report about FrameDouble's presence causing the script to bomb.

SubJunk
21st February 2015, 21:21
@TCMullet thanks for the bug report, but I don't think it's a bug in InterFrame. It may be a bug in Vdub.
FrameDouble only does one simple thing and that is toggle the framedoubling functionality in SVP, which InterFrame already uses by default for some content like PAL.

Do you get the error if you use a 25FPS input clip and don't use FrameDouble?

TCmullet
21st February 2015, 21:29
The post limit is 16KB in user forum and 20KB in developer.
Thanks for the numbers. But I only meant "too long" in the sense of having it full of stuff so that the small item at the end of it about FrameDouble might not have been noticed.

TCmullet
21st February 2015, 21:36
@TCMullet thanks for the bug report, but I don't think it's a bug in InterFrame. It may be a bug in Vdub.
FrameDouble only does one simple thing and that is toggle the framedoubling functionality in SVP, which InterFrame already uses by default for some content like PAL.

Do you get the error if you use a 25FPS input clip and don't use FrameDouble?

I don't have any 25fps clips. But if you meant 'what happens if you don't use FrameDouble', I thought i answered that by saying that if you swap the '#' between these two lines, to choose which one will execute, the one without FrameDouble works and the one WITH it does not.

InterFrame(Cores=2,Tuning="Film")
#InterFrame(Cores=2,Tuning="Film",FrameDouble=true)

That is, I'm showing you both versions of the code. (I often keep code fragments around in comments.) The fact that taking FrameDouble out made it work, tells me that it's presence is a bug. I don't see how VDub could have any bearing. Oh, if it's not obvious, I DO realize it's usage was superflous as the default under the circumstances would be to convert from 29.97 to 59.94 anyway. I merely had preferred to include "FrameDouble=true" in the code so it would be more self-documenting.

SubJunk
21st February 2015, 23:15
I don't have any 25fps clips. But if you meant 'what happens if you don't use FrameDouble', I thought i answered that by saying that if you swap the '#' between these two lines, to choose which one will execute, the one without FrameDouble works and the one WITH it does not.

InterFrame(Cores=2,Tuning="Film")
#InterFrame(Cores=2,Tuning="Film",FrameDouble=true)

That is, I'm showing you both versions of the code. (I often keep code fragments around in comments.) The fact that taking FrameDouble out made it work, tells me that it's presence is a bug. I don't see how VDub could have any bearing. Oh, if it's not obvious, I DO realize it's usage was superflous as the default under the circumstances would be to convert from 29.97 to 59.94 anyway. I merely had preferred to include "FrameDouble=true" in the code so it would be more self-documenting.I understand you were showing both versions of the code. Using FrameDouble triggers a different part of the InterFrame code than not using it, if your input file is 29.97FPS, but it will use the same part of the code if your input file is 25FPS. So while you're right that your use of FrameDouble was superfluous, since it should result in the same FPS in the output, it does not use the same part of InterFrame and therefore does not pass the SVP DLLs the same instructions.

I can make a 25FPS test clip so we can narrow down the issue some more if you want.

Stormborec
21st February 2015, 23:26
Can it work for single core too?

SubJunk
21st February 2015, 23:35
@Stormborec I think it can work for single core, just use Cores=1.

@TCMullet that reminds me, I think your script should use the same amount of cores for SVP and SetMTMode. It's probably not related to this issue but might make things more stable.

TCmullet
22nd February 2015, 03:46
@TCMullet that reminds me, I think your script should use the same amount of cores for SVP and SetMTMode. It's probably not related to this issue but might make things more stable.
I'm very green at SetMTmode, and am using only because I was told to. Here's that tail code, plus I have another question somewhat related.

ConvertToYV12()
SetMTMode(2)
InterFrame(Cores=2,Tuning="Film")
SR(1280,720,2)

As you can see, I had already set cores equal as you suggested (after the fact). What I'm asking about now relates to SR in addition.

I had set InterFrame cores to 1 and SR to 2, think that SR (SuperRes 2.0, which you're probably familiar with) needs more (a lot more) cpu than InterFrame. But if I set both to 2 and I only have a 4-core system (and no hyperthreads), would I then be choking out the OS (Windows 7)?? Seems to me that Windows would be choked off and the whole system would bogg down, knowing that the OS DOES need cpu cycles.

I'd like your thoughts. In the meantime, I did some tests, and I surprisingly (but maybe not to you) found that 2 and 2 ran a okay and maybe even a little better than 1 and 2. A possible explanation might be that (if true) all application tasks have lower priority than any OS task, and therefore the OS never gets short-changed.

So what is the general formula for when you have 2 multi-threading apps running on a 4-core system? (Do I need to give a core to the system?)

SubJunk
22nd February 2015, 04:37
In general I'd say to let every program/app/script use max cores. As long as everything is normal and healthy on the computer (like it's not being overclocked too much) it should be fine. Like you said, process priorities make a difference.

I hadn't heard of SuperRes but I'll give it a go now, I have an upscaling toolchain I regularly use so I might be able to add it to that. Actually I got the Blu-ray for a movie the other day and compared it to a DVD upscale I did of the same movie, and my upscale was better quality, which is a real shame.

TCmullet
22nd February 2015, 04:42
In general I'd say to let every program/app/script use max cores.
Please explain what you mean by "max cores", using my example of a 4-core system (no hyperthreads).

How many threads should be allocated to InterFrame and how many to SuperRes, given that they are both in the same script? If you answer that, I'll know which way to interpret your comment.

SubJunk
22nd February 2015, 06:44
AviSynth isn't great at multithreading so it's impossible to tell what will work best here, but I would try 4 for everything at first and see how it goes. A lot of times multithreading in AviSynth is a process of trial and error and gives different, unpredictable results for different computers, along with SetMemoryMax.

TCmullet
22nd February 2015, 23:07
AviSynth isn't great at multithreading so it's impossible to tell what will work best here, but I would try 4 for everything at first and see how it goes. A lot of times multithreading in AviSynth is a process of trial and error and gives different, unpredictable results for different computers, along with SetMemoryMax.
Oh so 2+2 is not valid logic. Okay. At present, I'm 16 hrs into a 21 hr run, then another VDub job kicks in for probably 17 hrs more. Then I can try 4+4 for the next task. However, I have a Cpu usage icon that continually shows bar graph for all 4 cores. All 4 are floating near the top, so I feel I'm doin pretty good w/2+2.

But then in task mgr, it adds up to a total, which fluctuates from 85-94%, adding the unused portions of individual cores' usage together. So maybe with 4+4 the total will get closer to 100%, not a trivial jump.

Your prior ambiguity caused me to think. AviSynth is so amazing to me and it boggles my mind to even try to think about how it can even work. I've been assuming that InterFrame and SR are concurrent processes, that is, both running "at the same time". In a 1-core system, obviously the def. of concurrency helps us to see that time slicing lets both run but only one at a time. Knowing now that I have 4 cores, I was thinking of the need to allocate them out. But maybe InterFrame can use 4 cores for a bit (to create the new frame), then SR can use 4 cores for doing ITS task on that frame, and so each step takes it's turn using all resources while its up to bat.

Hey, I'm using the unknown (to me) SetMTmodes. My statements are:
SetMTMode(3,4)
SetMTMode(2)

If I try your idea of 4+4, what would I set those 3 mode values to?

SubJunk
22nd February 2015, 23:16
With those values, you're already using 4 cores; the second argument in SetMTMode is the number of cores to use.

TCmullet
22nd February 2015, 23:23
Then you're saying to leave the SetMTs alone. Great.

TCmullet
23rd February 2015, 01:30
Does anybody know how to increase motion search range or precision in order to eliminate "double leg effect"?

BTW. Source is 1080@25fps. I'm trying to achieve nice looking slow motion effect.
I skimmed pages 16 (in 2012) to the present (p. 37) again to look for any responses to Atak's question, and if the answer or even any significant discussion was there, I missed it.

Either it can be done (and what settings would accomplish it) or it cannot be done (and we need to be told that explicity or we--some of us--will be eternally wondering "what am I missing").

His photo doesn't show the problem as explicitly as does a current short clip of mine. Here's a link to a 21 frame Lag. file: (It was too big to attach here, so I'm hosting it at my own server.)
http://www.tomsgoodfiles.com/Tom's-test-clip2997.2015-02.avi

Here's a script:
SetMemoryMax(512)
SetMTMode(3,4)
AviSource("D:/Video-Work/Tom's-test-clip2997.2015-02.avi" )
ConvertToYV12()
SetMTMode(2)
InterFrame(Cores=2)

Clip is 21 frames long, and after running the script, frame 11 is probably the best one to show the problem. 10 and 12 show the original leg motion, with 11 being interpolated.

Subjunk will you please download my video and run this script (fudging path as needed), look at those 3 frames (10-12) and please explain whether InterFrame can be user-tweaked to prevent frame 11 (the leg portion) from looking like a blending of frames 10 and 12? And if not, could you please say so and (hopefully) explain why InterFrame can do "ball-left + ball-right ==> ball-middle" but cannot do "leg-left + leg-right ==> leg-middle"?

And if not, can you please theorize "out loud" what would have to be done to make it accomplish this?

(I may post the 3 stills involved, later if I can.)

TCmullet
23rd February 2015, 01:51
Here are frames 10, 11, and 12 in .jpg. 11 is the interpolation between frames 10 and 12.

(3 pics are worth at least a few dozens words, eh?)

SubJunk
23rd February 2015, 09:09
Using GPU=true increases the quality significantly, including with that clip.

TCmullet
23rd February 2015, 14:12
Using GPU=true increases the quality significantly, including with that clip.
But that doesn't make sense. I thought GPU was there only as a means to get extra cpu power in addition to the cores in the main computer, so as to speed up the conversion a bit (like having one additional core). Why would borrowing the processor in the graphics card have anything to do with the logic of Interframe beyond that? And why should it?? (Seems to me it should NOT.)

Any way, I tried:
InterFrame(Cores=2,GPU=true)

and it bombs immediately with a VirtualDub message:
Avisynth open failure:
SVSmoothFps: unable to load library given in 'compose' [c:\program files (x86)\AviSynth 2.5\plugins\svpflow_gpu.dll]
(InterFrame2.avsi, line 156)
(InterFrame2.avsi, line 58)

(then line 6 in my script)

So at the moment I'm not able to see what "great improvement" you are alleging.

StainlessS
23rd February 2015, 14:29
SVPFlow_GPU.dll requires OpenCL.dll, perhaps you dont have it. (I think it comes with graphics card, so perhaps yours [like mine] is incompatible).

TCmullet
23rd February 2015, 15:09
SVPFlow_GPU.dll requires OpenCL.dll, perhaps you dont have it. (I think it comes with graphics card, so perhaps yours [like mine] is incompatible).
My system has an OpenCL.dll file in the folder, C:\Program Files (x86)\SVP\ even though I don't have a separate graphics card beyond the builtin Intel adapter.

I await SubJunk's full analysis of all this. I am "disappointedly" eager to scrap days of processing I've already done, and start over correctly.

TCmullet
23rd February 2015, 15:24
While I am continuing to await SubJunk's full analysis of this problem, I searched on 3 systems and found that my video system (the i5 system w/quad-core--way the fastest system I have and on which I was intending to do all video processing) DOES have the file, as I already said. I also found it in C:\windows\system32 on another system (XP), a tiny Atom 4-core system.

So I have experimentally copied the file from my SVP folder to C:\windows\sysWOW64 and the error message that now comes up is a little different:

SVSmoothFps: unable to init FlowLib [code 0x10000]
instead of
SVSmoothFps: unable to load library given in 'compose'

(I'm not sure why I have an SVP folder; probably leftover from long-ago attempts.)

Groucho2004
23rd February 2015, 15:49
So I have experimentally copied the file from my SVP folder to C:\windows\sysWOW64 and the error message that now comes up is a little different:
OpenCl.dll usually comes with the driver of a specific GPU. Copying it from one system to another is a really bad idea.

TCmullet
23rd February 2015, 15:53
OpenCl.dll usually comes with the driver of a specific GPU. Copying it from one system to another is a really bad idea.
Thanks, Groucho. I'm just trying to redeem time and attempt to go forward a bit, while waiting for SubJunk to reply to all of this.

Groucho2004
23rd February 2015, 15:57
My system has an OpenCL.dll file in the folder, C:\Program Files (x86)\SVP\
Neither SVP nor the graphics driver install would put that file there.
Edit: I take that back, SVP does install OpenCL.dll.

TCmullet
23rd February 2015, 19:42
My adapter is "Intel HD Graphics". A friend suggested I google. I found Intel's
opencl_runtime_15.1_x64_setup.msi
which alleges to install both 32 and 64 bit versions of openCL.dll for MY builtin Intel graphics adapter.
I installed and rebooted.
I now have OpenCL.dll dated 01/25/2015 in both directories system32 and sysWOW64
Similar error message, but a little different:
SVSmoothFps: unable to init FlowLib [code 0x100FF]

Am greatly hoping we can get OpenCL and InterFrame "GPU=true" to run on this my fastest machine. (Unless the functionality that SubJunk briefly said was needed via GPU=true could be implemented via GPU=false.)

Groucho2004
23rd February 2015, 19:48
Am greatly hoping we can get OpenCL and InterFrame "GPU=true" to run on this my fastest machine. (Unless the functionality that SubJunk briefly said was needed via GPU=true could be implemented via GPU=false.)
I compared GPU true/false and I honestly cannot see a difference. Also, with "gpu=true" it's actually slower! Tested on a i5-2500K and Nvidia GT240.

TCmullet
23rd February 2015, 20:01
I compared GPU true/false and I honestly cannot see a difference. Also, with "gpu=true" it's actually slower! Tested on a i5-2500K and Nvidia GT240.
Oh, I tried it on my slow Atom 330 system and it was radically improved! Instead of a double exposure of the leg, it looked more like a single blurry leg!
edit: I was surprised that my 3 pics needed "approval" and a day later are still not visible. If they were, I'd be willing to post 2 more showing the interframe both with and without GPU=true.

It seems like SubJunk has some of his logic on the GPU without any fallback equivalent logic for GPU=false. That's what my gut tells me, but I'll eagerly wait for SubJunk's full explanation.

On my Atom330, it DID run faster, but even so, it is way too slow for my needs. I really gotta get InterFrame to work on my i5 system.

StainlessS
23rd February 2015, 20:18
A couple of months back a moderator suggested that the fastest way to get an attachment cleared was to 'Report' your own post, ie
click the little red triangle below your name (EDIT: Avatar) in your post, and tell them that attachment is awaiting approval.

creaothceann
23rd February 2015, 21:09
Or just use imgur.

TCmullet
23rd February 2015, 21:13
Or just use imgur.
What is "imgur", esp. in this context?

SubJunk
23rd February 2015, 23:10
But that doesn't make sense. I thought GPU was there only as a means to get extra cpu power in addition to the cores in the main computer, so as to speed up the conversion a bit (like having one additional core). Why would borrowing the processor in the graphics card have anything to do with the logic of Interframe beyond that? And why should it?? (Seems to me it should NOT.)Video cards are capable of doing types of calculations that CPUs aren't. That's why, for example, they are able to calculate much more complex protein folding tasks in reasonable periods of time.

Any way, I tried:
InterFrame(Cores=2,GPU=true)

and it bombs immediately with a VirtualDub message:
Avisynth open failure:
SVSmoothFps: unable to load library given in 'compose' [c:\program files (x86)\AviSynth 2.5\plugins\svpflow_gpu.dll]
(InterFrame2.avsi, line 156)
(InterFrame2.avsi, line 58)

(then line 6 in my script)

So at the moment I'm not able to see what "great improvement" you are alleging.This is a known issue with SVP, the thread for it is at http://www.svp-team.com/forum/viewtopic.php?pid=46959

Here's a comparison of default mode vs GPU mode on the 11th frame:

http://www.spirton.com/uploads/InterFrame/20150224-Default-2.png (http://www.spirton.com/uploads/InterFrame/20150224-Default-2.png)
http://www.spirton.com/uploads/InterFrame/20150224-DefaultWithGPU-2.png (http://www.spirton.com/uploads/InterFrame/20150224-DefaultWithGPU-2.png)

creaothceann
23rd February 2015, 23:29
What is "imgur", esp. in this context?

Just google it. (http://imgur.com/) It's super easy to use, you can even copy a picture to the clipboard and paste it on the site.

TCmullet
24th February 2015, 00:31
Yes, SubJunk, frame 11 shows a big difference. I already had seen it as I had managed to migrate to my 1.6ghz Atom330 while waiting to hear from you. Thanks for putting up both 11s for all to see.

My adapter is "Intel HD Graphics". A friend suggested I google. I found Intel's
opencl_runtime_15.1_x64_setup.msi
which alleges to install both 32 and 64 bit versions of openCL.dll for MY builtin Intel graphics adapter.
I installed and rebooted.
I now have OpenCL.dll dated 01/25/2015 in both directories system32 and sysWOW64
Similar error message, but a little different:
SVSmoothFps: unable to init FlowLib [code 0x100FF]

Am greatly hoping we can get OpenCL and InterFrame "GPU=true" to run on this my fastest machine. (Unless the functionality that SubJunk briefly said was needed via GPU=true could be implemented via GPU=false.)

I saw where over on SVP forum, you linked to this thread. Were you of the belief that if I had picked the correct .msi from Intel's site, which installs (copies) it's own openCL.dll file to both system folders, that InterFrame:GPU=true should have worked? Does the above err msg ("unable to init FlowLib 0x100FF") mean anything to you?

TCmullet
24th February 2015, 00:41
@Subjunk: I actually thought you were going to tell me to go out and buy an add-on video card. But Intel supposedly has lots of installers for openCL. Here's the link I got it at:
https://software.intel.com/en-us/articles/opencl-drivers#win32

I picked the first one that says "15.1" which says "64 bit and 32 bit". Therefore both system folders received the file. But I thought it would be different files. They both have an identical timestamp, so maybe they have code for both versions in the same file.

I wonder if there's some other way to test whether the openCL files I have are good. I never heard of openCL until it comes up in this InterFrame context.

SubJunk
24th February 2015, 02:02
I still get the issue myself (I haven't been able to use GPU=true in some contexts for a while) so I don't know of a fix. I've tried OpenCL stuff and it didn't work for me.

TCmullet
24th February 2015, 05:57
SubJunk,

Concerning the error message, "SVSmoothFps: unable to init FlowLib [code 0x100FF]", can't you at least tell me what it (or at least the code part) means and perhaps why it doesn't help you (or the SVP boys) to debug this problem?

A parallel question perhaps would be in order. Should I have been able to copy over the openCL.dll from my old SVP folder (2012) and expect it to work? When it didn't (and that Groucho fellow alerted me to the idea that maybe it's tailored to a particular graphics card--the one that installed it), I began to agree with him, and pursued the Intel one for my own chip (Intel HD Graphics is what it's simply called). Of course the openCL from my old SVP folder (which I had forgotten I had) is obviously old (2012).

SubJunk
24th February 2015, 06:19
I don't know what that error message means but to me it looks like a generic initialization error, and I'm not sure if locating the correct version of openCL.dll is the right approach.

Edit: In my case, I still have the issue despite having the correct openCL.dll file on my system, so that's probably not the fix.

Andrey /MAG/
24th February 2015, 08:23
TCmullet,
SubJunk is right. It is message about initialization error.
You don't need to install OpenCL alone. You don't need to copy it from SVP or another location. You just need to install later drivers for you videocard. For HD Graphics you need to go to intel site and download it. Select 32 or 64 bit by your OS ditdepth.

OpenCL.dll in SVP folder is a helper for the last way to determine OpenCL-compatibility to systems without OpenCL installed. It is not OpenCL to work with. SVP don't use it while smoothing. It use system OpenCL installed with graphic drivers.

SubJunk
24th February 2015, 10:42
Thanks to Mag's help I have fixed the issue for me - the problem was that MeGUI has a dummy version of OpenCL.dll in one of its folders and it works after deleting that.

TCmullet
25th February 2015, 03:59
TCmullet,
SubJunk is right. It is message about initialization error.
You don't need to install OpenCL alone. You don't need to copy it from SVP or another location. You just need to install later drivers for you videocard. For HD Graphics you need to go to intel site and download it. Select 32 or 64 bit by your OS ditdepth.

OpenCL.dll in SVP folder is a helper for the last way to determine OpenCL-compatibility to systems without OpenCL installed. It is not OpenCL to work with. SVP don't use it while smoothing. It use system OpenCL installed with graphic drivers.
Wow, you've given me hope, Mag! Thanks!

But I'm still a hurtin.

I had installed Intel's openCL runtime. (I had picked the one that installs both 32 and 64.) I see now (thanks to you) that I needed to update video adapter driver. I did go to Intel again per your suggestion, but a warning there implied that I should go to mobo mfgr as they may have modified things.

I went to Gigabyte and found VGA driver for my mobo and cpu. (Took quite a bit of searching to confirm that I have the Sandybridge i5 cpu. Gigabyte required that I know that.) The installer simply expanded itself as though I was creating a CD. I ran from what would be the CD's root dir, the "setup.exe" to completion (requiring reboot). One of the folders was "openCL", so I ran that exe next (which did not require reboot). However, the 2 openCL.dlls that I had installed earlier via the openCL-only package from Intel (with file dates 1/25/2015) were still there. Intuition told me that the current Gigabyte-picked driver's openCL installer "saw" the later dates and left both of them there in the two system folders. I unstalled the openCL runtime which did not remove the two 1/25 files. I deleted the 2 copies of openCL.dll manually. Then ran (again) the openCL installer that came with the Gigabyte-approved driver. It DID put 2 new dll files there (system32 and sysWOW64).

Here it gets a little interesting. The 2 prior dlls dated 1/25/2015 were bigger than the 50K dll in the SVP folder (2012), as I recall. But the ones there now (from the Gigabyte approved full driver package) are only 18K and dated 5/15/2012.

And sadly, InterFrame fails again.
SVSmoothFps: unable to init FlowLib [code 0x10000]

Help, please!

foxyshadis
25th February 2015, 05:22
Ouch. Forget that OEM junk, unless you want to work with a 2012 video driver. Stick with the latest Sandybridge (aka 2nd generation Core) driver direct from Intel -- despite the warning, OEMs don't really do any useful customization beyond slapping their logos on things, and everyone in the know goes direct.

SubJunk
25th February 2015, 06:44
I just checked VirtualDub and it worked for me so that might narrow the issue down.

Edit: what foxyshadis said

TCmullet
26th February 2015, 01:21
Ouch. Forget that OEM junk, unless you want to work with a 2012 video driver. Stick with the latest Sandybridge (aka 2nd generation Core) driver direct from Intel -- despite the warning, OEMs don't really do any useful customization beyond slapping their logos on things, and everyone in the know goes direct.
Did so. Multiple times. Still no go. (But I stand a bit wiser, uh "in the know" now, thanks to you, Foxyshadis.)

Should I add on the openCL runtime that Intel provides separately? It will definitely get a new pair of openCL.dlls in there. (The "current" intel driver puts them with 5/15/2012, still old - and older than when I ran the OpenCL runtime package earlier without the newer driver.)

TCmullet
26th February 2015, 01:32
I followed my own question. I attempted to install the new OpenCL runtime again. But it said I must uninstall the older one. I don't know if "older one" meant what I had erroneously installed earlier before I knew to update the graphics driver or if it meant the one installed by the new driver.

Either way, I went to control panel and found the Intel OpenCl runtime and unstalled it. Installed the new one I had gotten previously. Yes, the openCL.dlls are now 1/25/2015.

But InterFrame STILL fails to initialize!

What's NEXT?????

TCmullet
26th February 2015, 01:57
Me again, w/further news.

I discovered a simple tool called GPU-Z by TechPowerup. At bottom of it's main panel in which it shows lots of textboxes with display-only data about my adapter, it has a line saying "Multi-GPU: Disabled". That doesn't scare me as I woulda guessed I have only 1 GPU.

The next and last line says Computing: and has 4 checkboxes, each for one of "OpenCL", "CUDA", "PhysX" and "DirectCompute". All 4 are unchecked (and uncheckable). When I hover mouse over the first one, a pop-up says "OpenCL: Shows whether OpenCL is available on this adapter".

I'm scared. What does this imply for what I will have to do to get OpenCL to work??

SubJunk, can you be open to the idea of writing "fallback" code to emulate in non-GPU code what computations the GPU is doing when you do call the GPU? This is, I believe standard practice when writing code for multiple levels of hardware--"get the app to do in software what would be better done in hardware IF the hardware was available". Uh, maybe it's not SubJunk, but someone at SVP?? (But of course, I still would have as a goal getting my system to use OpenCL.)

SubJunk
26th February 2015, 02:08
It's possible your video card just doesn't support the things that SVP needs. It's possible Chainik would be able to implement the GPU code in CPU mode but when I asked about it years ago I think he said it isn't possible. Maybe he'll reply here to clear it up.

TCmullet
26th February 2015, 02:50
I was a computer programmer once (before I became obsolete too late). And it was always in the forefront of my mind that "any process that can be defined can be programmed". More explicity, if the algorithm is defined and implemented in one programming context, it should be able to be implemented in any other computing context. You're simply computing numbers, etc. Should be doable. Now whether it would be easy, that's another question. We were all gooey eyed when the Motorola 6809 processor was revealed and it had (big long drum roll....) HARDWARE multiply instruction! Before then you had to write subroutine to do simple multiply. I would think the same concept would apply here in the graphics computing arena. But of course I don't know the hardware/programming context, so I could be out to lunch, at least in part.

Had a chance to confirm things with a local tech. For sure these onboard adapters do not have openCL. Have to get a graphics adapter. He helped me to see that (1) the onboard adapter has no memory of it's own; (2) it steals memory from the main bank of 16GB, leaving 15.9GB "usable". That means I'm doing all my graphics on a mere 100MB! No money, but I DO have an old ATI w/512MB that might be DDR3 compatible (he says). Gotta do bit of research. If I have DDR3 (which I do) and the card is DDR3 compatible, and I have the right slot, I'll have my card and eat it too!

SubJunk
26th February 2015, 03:50
Hope the old ATI card works :)

foxyshadis
26th February 2015, 10:23
I was a computer programmer once (before I became obsolete too late). And it was always in the forefront of my mind that "any process that can be defined can be programmed". More explicity, if the algorithm is defined and implemented in one programming context, it should be able to be implemented in any other computing context. You're simply computing numbers, etc. Should be doable. Now whether it would be easy, that's another question. We were all gooey eyed when the Motorola 6809 processor was revealed and it had (big long drum roll....) HARDWARE multiply instruction! Before then you had to write subroutine to do simple multiply. I would think the same concept would apply here in the graphics computing arena. But of course I don't know the hardware/programming context, so I could be out to lunch, at least in part.

Had a chance to confirm things with a local tech. For sure these onboard adapters do not have openCL. Have to get a graphics adapter. He helped me to see that (1) the onboard adapter has no memory of it's own; (2) it steals memory from the main bank of 16GB, leaving 15.9GB "usable". That means I'm doing all my graphics on a mere 100MB! No money, but I DO have an old ATI w/512MB that might be DDR3 compatible (he says). Gotta do bit of research. If I have DDR3 (which I do) and the card is DDR3 compatible, and I have the right slot, I'll have my card and eat it too!

Sandy Bridge doesn't really work that way. Yes, it does have a unified memory architecture (as in, it steals from main memory), but it can address up to 1.7GB. Slowly.

I have several Sandy Bridge PCs at work I can test on tomorrow, but unfortunately I just found some bad news (https://software.intel.com/en-us/articles/opencl-sdk-frequently-asked-questions/#10): Ivy Bridge is the first Intel integrated GPU to support OpenCL. The Sandy Bridge OpenCL drivers must all be unsupported testing software that was never final, so it was never fixed to work.

Unfortunately, OpenCL code is very different from typical procedural CPU code, and because of the way OpenCL is built, it's not as simple as targeting it to the CPU. (Bizarrely, though, if your igpu supports OpenCL, only then can you run OpenCL code on the CPU instead. That's an Intel restriction.) Your AMD should be at least a 7000-series to support OpenCL 1.1 that SVP needs. Some 6000-series should work as well.

TCmullet
26th February 2015, 17:53
...(Bizarrely, though, if your igpu supports OpenCL, only then can you run OpenCL code on the CPU instead. That's an Intel restriction.)
All good stuff you said. But "running opencl code on the cpu instead" is not what I meant. I was speaking of rewriting the algorithmic portions necessary in native CPU code. I didn't know that there was such a thing as running opencl code on a cpu. If there is, great. But if not, native cpu code is what I meant.

TCmullet
26th February 2015, 18:09
Hope the old ATI card works :)
Thanks, Sub. But more bad news, doubly so.

That ATI turned out, which closer inspection of tiny model info on the card showed, to be an AGP card!

I have 2 main system. "Main" one is a big ol' Dell w/Pentium 4HT 3.0 ghz and hyperthreading. 24" very good LG monitor, "can't live without the 24 now that I'm hooked". I knew I had a graphics adapter so as to use DVI cable, but forgot what I had.

12/2012 I was able to acquire a custom-assembled i5-2400S quad-core. I do HD capture and all processing of video files there. (Only 22" monitor with vga cables.) It's worked great til this OpenCL issue.

I keep equip. boxes, and have box for Evga 210 card w/512mb, but couldn't remember where I installed it. Turns out it is in the P4HT! But the P4HT is way to slow to do video file processing. So I would remove the 210 card reverting to builtin adapter. It does do my 1920x Windows XP screen okay.

I put the Evga 210 into the i5 thinking "all will be well". Failed to even come after I changed the bios from "built-in adapter" to "auto".

Then I found the answer to everything. Evga box says "This graphics card requires: 300 watt or greater power supply with a minimum of 18 amps on the +12 volt rail". Not a problem. I'm "sure" the builder put one bigger than that in there. But had to be sure. Took case off, and drat, can't see labelling. Had to partially lift the supply out of the case to read this:
Output: 250W max
+12v: 14A

Raaaaaaaaats!

So I'll be running InterFrame only on my slow Atom330 (1.6 ghz) until can save up for a power supply. (This comes at a very bad dollar time.)

Need power supply to run video card. Need video card to run OpenCL. Need OpenCL to do best possible InterFrame (lacking non-GPU fallback code). Need InterFrame to create the videos I need for a major project. Such is life at times.

(100+GB Lagarith files will be slowly and frequently migrating between my systems for weeks now.)

SubJunk
26th February 2015, 20:48
I'd be happy to do some conversions for you. I have unlimited Internet bandwidth and a fairly fast computer.

TCmullet
26th February 2015, 21:01
I'd be happy to do some conversions for you. I have unlimited Internet bandwidth and a fairly fast computer.
You are very kind, friend. But each Lag. file is on order of 100GB output from InterFrame, then I'll feed that file into AviSynth again with nothing but SuperRes. (And it's not just the intermediate files that are big, but the finals will be too, even though the intial source is generally tiny FLVs.) I don't think we can tranfer the files between us as timely as would be necessary. And I still have research on final encoding parameters needed for this special project.

Plus this would be many such conversions in the days ahead. No, I have to tackle this myself. Will speed up once I get a pwr supply some weeks from now.

At present, I'm bombing so much with Lagarith as intermediate file that I'm currently evaling other codecs, notably x264vfw and the newly released MagicYUV. (The latter even as we speak.)

TCmullet
26th February 2015, 21:07
It's possible Chainik would be able to implement the GPU code in CPU mode but when I asked about it years ago I think he said it isn't possible. Maybe he'll reply here to clear it up.
I would guess he meant, "No it's not possible to EASILY fix this." - whether he meant get the GPU code to run in CPU mode or totally rewrite the GPU functional logic in native CPU instructions. (The latter is the only option I was suggesting.)

I'm sure that rewriting a non-GPU equivalent of the GPU portion of the code would be very tedious, even though I believe that conceptually it must be possible. (Just like it was possible to write a software Multiply instruction back in the days when the microprocessors didn't have a hardware Multiply.)

SubJunk
27th February 2015, 04:33
Cool, no problem. By the way, I recommend using H.265 for the intermediate files if you aren't already; even at lossless quality it should have a much smaller filesize than any other codec. It almost seems impossible how small the files get but I've done lots of encodings with it and sure enough it looks amazing. The jump between H.263 and H.264 was good but subtle if you knew the good XviD settings, but H.265 is so far beyond both of them it's no contest.

TCmullet
27th February 2015, 04:47
Cool, no problem. By the way, I recommend using H.265 for the intermediate files if you aren't already; even at lossless quality it should have a much smaller filesize than any other codec. It almost seems impossible how small the files get but I've done lots of encodings with it and sure enough it looks amazing. The jump between H.263 and H.264 was good but subtle if you knew the good XviD settings, but H.265 is so far beyond both of them it's no contest.Funny you suggest this now. It was early today that my exasperation at Lagarith blowing for unknown reasons drove me to discover and try MagicYUV and also act on my thin knowledge of x264 and x264vfw.

After experimenting all day, I'm starting to use x264vfw at cq=0 (lossless) with "Ultrafast" to generate the intermediate file output from Avisynth including InterFrame as the last step of that. And just now, also after much testing, I started a run of my first video (a 2 hour one) with x264vfw with cq=15.

And now you want me to drop all that and go with H265! I'm game, but pray tell where does one get a binary of it, especially one that is vfw so I can encode from VirtualDub?

SubJunk
27th February 2015, 05:38
x265 is the H.265 encoder I use, but I don't think they have a vfw version. However you can always switch to MeGUI for middle steps unless there's a reason you need VirtualDub for all stages

TCmullet
27th February 2015, 05:52
I need VirtualDub to run Video Enhancer (aka Super Res) as the only filter before the vfw encoding (or Super Res as Avisynth plugin).

I just got the x265, but it appears to be a command line only.

I just got the x265gui, aka "Internet Friendly Media Encoder", but seems like a piece of trash, as it doesn't tell you anything about setting it up to use x265 (like how to point to the cmd line executable for one), even in their online documentation. Crazy. I'm inclined to hate everything about it, esp. as the site that gave it and the cmdline x265 seemed to say you can use this gui with x265.

It's okay if no vfw IF I can pipe AviSynth into it.

Hey, why don't you tell me exactly what YOUR setup is like for executing a Vdub filter (or Avisynth output) and running it right into x265? (Please?)

SubJunk
27th February 2015, 06:08
My setup is just to use MeGUI for everything, since I find it to be a very transparent tool. If you see my guide for using InterFrame (http://www.spirton.com/convert-videos-to-60fps/) it explains what my setup is, just replace the script with your script, and use x265 instead of x264. MeGUI includes both of those encoders.

TCmullet
27th February 2015, 06:11
Okay I've cooled down a bit and studied it a bit more, including some info here:
http://www.softpedia.com/get/Multimedia/Video/Encoders-Converter-DIVX-Related/Internet-Friendly-Media-Encoder.shtml

Seems you're expected to have a source file all ready to convert to h265. No I want to run Avisynth into it, or run plugin Virtualdub filter, THEN output to an encoder. I don't see how I can use this, even if all I had was InterFrame as the needed task.

TCmullet
27th February 2015, 06:13
Oh, we were posting at the same time. Okay, I'll go back there and get MeGUI as per whatever it says there. (I'm trusting I can add a bunch more Avisynth items PRECEDING the invocation of InterFrame.) Thanks.

SubJunk
27th February 2015, 07:15
Like I said, use MeGUI instead of that program. It accepts AviSynth scripts, and even has a useful AviSynth templating interface (ctrl+r)

Edit: Cool, I hope it works well for you, and yes you can add whatever you want into the AviSynth script

TCmullet
27th February 2015, 14:43
Like I said, use MeGUI instead of that program. It accepts AviSynth scripts, and even has a useful AviSynth templating interface (ctrl+r)

Edit: Cool, I hope it works well for you, and yes you can add whatever you want into the AviSynth script

But will the output of that (a file encoded in x265) be inputable into VirtualDub??

And may I add an even more off-point question? I have been oblivious to the whole area of colorspace conversions. I'm not color-blind, but my eyes may be somewhat color insensitive, as I don't easily see subtle color differences. I've heard that a drawback to Vdub is that all output is RGB. Yet in Avisynth, some functions require me to convert to YV12 which I am ("ConvertToYV12()"). If Avisynth is outputting YV12 and I immediately read it in Vdub and do some things and send to an encoder, is Vdub converting it back to RGB needlessly before sending it out? Vdub has SO many features unknown. Can you advise a little, please? (And it may help someone else who reads this.) Seems to me I recall this issue is a reason why VirtualDubMod was born (VdubMod using YV12 instead of RGB), but it's rather obsolete I heard.

creaothceann
27th February 2015, 17:46
But will the output of that (a file encoded in x265) be inputable into VirtualDub??
Of course it will be if you use Avisynth for opening and have a h.265 decoder installed.

I have been oblivious to the whole area of colorspace conversions. I'm not color-blind, but my eyes may be somewhat color insensitive, as I don't easily see subtle color differences. I've heard that a drawback to Vdub is that all output is RGB.
All VirtualDub filters operate in RGB colorspace. If you do this (http://i.imgur.com/26fYir4.png) then the data will be passed directly to the encoder (and of course you can't use VirtualDub filters). I use VirtualDubMod because in the preferences I can set this mode to be the default one. (This was also explained in the link in my last post (http://www.animemusicvideos.org/guides/avtech/colorspace.html).)

Yet in Avisynth, some functions require me to convert to YV12 which I am ("ConvertToYV12()"). If Avisynth is outputting YV12 and I immediately read it in Vdub and do some things and send to an encoder, is Vdub converting it back to RGB needlessly before sending it out?
Yes, it'll immediately decode it to RGB unless you do the step above.

Seems to me I recall this issue is a reason why VirtualDubMod was born (VdubMod using YV12 instead of RGB), but it's rather obsolete I heard.
VirtualDubMod also uses RGB. And it's not obsolete if you only use it to connect Avisynth scripts, video files, decoders and encoders.

bxyhxyh
27th February 2015, 19:43
It is bit off topic to this thread. But I wanted to confirm this

Yes, it'll immediately decode it to RGB unless you do the step above.

Is what you wrote really true?

When I open YV12 video via Avisynth, its file information says Decompressor: Internal DIB Decoder (YV12) and in Option->Performance->AVI section, there is a checkbox labeled Directly Decode Uncompressed YCbCr (YUV) sources is checked. Even if I uncheck it, file information says Decompressor: Xvid MPEG-4 Codec (YV12)

Edit: Never mind, it was about input. Not output. Sorry.

creaothceann
27th February 2015, 20:22
When I open YV12 video via Avisynth, its file information says Decompressor: Internal DIB Decoder (YV12) and in Option->Performance->AVI section, there is a checkbox labeled Directly Decode Uncompressed YCbCr (YUV) sources is checked. Even if I uncheck it, file information says Decompressor: Xvid MPEG-4 Codec (YV12)
Save the file without selecting a compressor, then open it with AVISource("file2.avi").info - it'll say "RGB24" which means the original data has been converted.

Music Fan
28th February 2015, 10:20
With Virtual Dub, you can choose the decompression format and output format in video, color depth to let yv12 in yv12 (among others).

chainik_svp
3rd March 2015, 23:43
It's possible Chainik would be able to implement the GPU code in CPU mode but when I asked about it years ago I think he said it isn't possible. Maybe he'll reply here to clear it up.

:D

At the beginning OpenCL implementation was a "rewritten CPU code", pixel-to-pixel identical to MVTools output.
Now it's using some features GPU can do hell more efficient (difference is like tens times I think) so there's no way back :)

SubJunk
5th March 2015, 05:51
InterFrame 2.8.0 is released! It updates to the newest versions of SVP libraries and updates documentation, like descriptions and examples. Enjoy :)

TCmullet
5th March 2015, 06:15
Great! Thanks! Uh, it's not clear... Should we copy those 2 "dependency" dlls over the ones we have now? And should we do so even if they are smaller that the prior ones??

Sparktank
5th March 2015, 06:52
Great! Thanks! Uh, it's not clear... Should we copy those 2 "dependency" dlls over the ones we have now? And should we do so even if they are smaller that the prior ones??

Replace existing "svpflow1.dll" + "svpflow2.dll" with these newer ones.
Delete existing "svpflow_cpu.dll" + "svpflow_gpu.dll" if any because they are now merged into "svpflow2.dll".

Same goes for any installation if using SVP (http://www.svp-team.com/).

TCmullet
5th March 2015, 15:47
At this moment, upgrading is dangerous. Replacing the files svpflow1.dll and svpflow2.dll causes other things to blow up!

Here's the discussion going on right now (which is a discussion about GameDrop, a script to replace duplicated frames with generated ones):

http://www.svp-team.com/forum/viewtopic.php?pid=47325#p47325

On the surface, it looks like the new SVP code is defective, if using causes things to blow up that didn't before.

Sparktank
5th March 2015, 16:08
Here's the discussion going on right now (which is a discussion about GameDrop, a script to replace duplicated frames with generated ones):

http://www.svp-team.com/forum/viewtopic.php?pid=47325#p47325

Interframe gets its libraries from SVP developers.
http://forum.doom9.org/showthread.php?t=164554

Hardly anything in that thread directly related to Interframe.
Interframe is a much simpler alternative to SVP.

I would suggest you could bring this up in the "SVPflow motion interpolation" thread here, but you're already over there.

TCmullet
5th March 2015, 16:14
I suppose I can try the new dlls with the new InterFrame, and maybe the new InterFrame does not use the dll logic that is defective. But it simply seems dangerous to convert to new dlls when doing so causes scripts that were working to not work. (InterFrame isn't the only thing I use Avisynth or svpflow*.dll for.)

I posted there as part of the GameDrop script discussion, but added a warning here, as the new dlls are used by both.

TCmullet
5th March 2015, 18:00
I posted there as part of the GameDrop script discussion, but added a warning here, as the new dlls are used by both.
Mag79, one of the SVP developers, has noticed it there and is looking into it.

chainik_svp
5th March 2015, 21:34
SVConvert function is broken, but don't panic :D It isn't used by Interframe

TCmullet
5th March 2015, 22:16
SVConvert function is broken, but don't panic :D It isn't used by Interframe
Good to know. But I need to use GameDrop before I then use InterFrame on the same video program. (Doesn't it make sense? I recover lost frames with GameDrop, then take the repaired video and convert 30-to-60 fps.)

Can you assure me that the new dlls do not affect the video output of GameDrop? That is, they improve speed, but no difference in quality of frame generation. I could revert back to the prior dlls for GameDrop (which at least do not blow up), then go forward with the broken ones for the new InterFrame. But only if you (perhaps in consultation with SubJunk) affirm that GameDrop's functionality (the content of any generated frames) is not improved by the new dlls.

(And I do like those big smiling teeth of yours.) :)

SubJunk
5th March 2015, 22:21
@TCmullet you can easily verify it for yourself in probably less time than it took to write these replies ;) for what it's worth I tested the new DLLs before releasing the update (as I always do) and there is no difference in the quality, except that it has potentially improved when using the "Fastest" and "Animation" tunings

TCmullet
5th March 2015, 22:32
@TCmullet you can easily verify it for yourself in probably less time than it took to write these replies ;) for what it's worth I tested the new DLLs before releasing the update (as I always do) and there is no difference in the quality, except that it has potentially improved when using the "Fastest" and "Animation" tuningsI didn't write it so have no basis for NOT knowing that subtle things might have been changed (in the output of GameDrop, that is). Can't take weeks to look under every crevice, that's why a word from you all is the solution.

TCmullet
9th March 2015, 20:45
SubJunk,

Would you please look at these? I've created and uploaded 2 short AVIs encoded losslessly with the x264vfw codec. Though short, they're still too big to be attachments, so they are on my own server.

http://www.tomsgoodfiles.com/Test-ball-motion.x264v-q0.504p30.avi
http://www.tomsgoodfiles.com/Test-ball-motion.x264v-q0.504p60.avi

The foreground has two talking heads; ignore them as it's the action behind them that is of interest. (This is a good clip to study this problem.)

The first clip (p30) was input to InterFrame, and yes GPU was true.

Play them, then in the 2nd one (60fps output from InterFrame), please observe the "double" ball near the middle in frame 45.

Why am I not able to generate a frame that positions the ball at the spot between those two balls, but instead makes a "double exposure"? Especially in light of this promo graphic:
http://www.svp-team.com/wiki/File:Memc.jpg

chainik_svp
10th March 2015, 00:16
Why am I not able to generate a frame that positions the ball at the spot between those two balls

I think you know where to ask the question :D Definitely not here...
And just an advice - when you'll be asking, please attach two adjacent frames that make an aritifac plus the exact AVS script.

TCmullet
10th March 2015, 00:58
Why am I not able to generate a frame that positions the ball at the spot between those two balls

I think you know where to ask the question :D Definitely not here...
And just an advice - when you'll be asking, please attach two adjacent frames that make an aritifac plus the exact AVS script.
I just went thru (in recent days) great lengths to conclude that the place to ask anything about SubJunk's InterFrame WAS here and not there.

And I thought you all WOULD like a specially cut video showing the works in place in a real video. Okay, I'll repost there (http://www.svp-team.com/forum/viewforum.php?id=7 in a new thread), will include the links for the videos, plus will include 2 pics plus the generated one. (Oh, and also the script.)

(But SubJunk, if you want to address this, I welcome your thoughts.)

Chainik, perhaps you will say the reason for this is that SVP has the underlying code. Yes, I knew that. But I had thought that SubJunk and his thread here was the correct place. I'm trying...

TCmullet
10th March 2015, 01:18
Why am I not able to generate a frame that positions the ball at the spot between those two balls

I think you know where to ask the question :D Definitely not here...
And just an advice - when you'll be asking, please attach two adjacent frames that make an aritifac plus the exact AVS script.
I've done so, here:
http://www.svp-team.com/forum/viewtopic.php?id=2429

raffriff42
10th March 2015, 04:04
The ball is probably moving too fast for the given search radius. It's also quite small and moving behind foreground objects. A very difficult problem. Search radius (http://www.svp-team.com/wiki/SVP:Profile#Search_radius)
Limits the maximum length of motion vectors. Large radius is not always better than small, because the found "far" motion vector may be incorrect, resulting in more artifacts.

SubJunk
10th March 2015, 07:03
2.8.0.1 is released, which doesn't change anything to do with InterFrame so feel free to skip it unless you use SVPflow DLLs for something else :) Thanks chainik for the fix!

Sparktank
10th March 2015, 07:34
2.8.0.1

(it will probably be released as v2.8.1)

So close! :p
Wasn't entirely sure the udpate would be dire to InterFrame, but always nice for archival puproses. :)

SubJunk
10th March 2015, 08:04
Hahaha, I only did a different version to be difficult ;)

kide13
11th March 2015, 15:22
Thanks SubJunk, chainik_svp and others, this is very cool for most of scenes, i've only some problems with very fast moves,
I'm using this script with last dlls:
Setmemorymax(2048)
SetMTMode(3,12)
PluginPath = "C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
<input>.ConvertToYV12()
SetMTMode(2)
<deinterlace>
<crop>
<denoise>
<resize>
InterFrame(Cores=12, FrameDouble=true, GPU=true, Tuning="Smooth")
I saw on svp doc some "limits" parameters like "scene" and "block"
Can i use this parameters in the script ? and is it usefull ?

I would remove artifacts from very fast move or remove some frames maybe ? actually i've 48 fps but is it possible to skip some frames ? i could have 45 fps if some frames are skiped ?
ex: very fast move from pocket to the mouth
original: http://img11.hostingpics.net/pics/45444501LeRveil1repartiemkv001139168.jpg
interpolated frame i would fix or skip: http://img11.hostingpics.net/pics/70517501LeRveil1repartiemkv001139189.jpg
orignial http://img11.hostingpics.net/pics/90874201LeRveil1repartiemkv001139198.jpg
for fun http://img11.hostingpics.net/pics/51916601LeRveil1repartiemkv001140866.jpg
Thanks for your help.

SubJunk
11th March 2015, 21:23
kide13 if you remove Tuning="Smooth" you may like it more. It's subjective though. If you want to get more advanced, you can always edit InterFrame2.avsi to use whatever SVP commands you want

kide13
11th March 2015, 21:44
I used "smooth" preset cause i got artifacts with "Film" preset too :( but ty for your help i'll look at InterFrame2.avsi, i guess there is no perfect preset so i have to play with parameters, i'm working on the tv show "Lost" with lot of scenes in jungle so that's not easy ;)

LilScrappy
22nd March 2015, 19:10
Any progress with ghosting to be masking or invisible, when use for 23.976 materials to be 60fps ?

TCmullet
1st May 2015, 16:59
...12/2012 I was able to acquire a custom-assembled i5-2400S quad-core. I do HD capture and all processing of video files there. ... It's worked great til this OpenCL issue.

I put the Evga 210 into the i5 thinking "all will be well". Failed to even come up after I changed the bios from "built-in adapter" to "auto".

Then I found the answer to everything. Evga box says "This graphics card requires: 300 watt or greater power supply with a minimum of 18 amps on the +12 volt rail". Not a problem. I'm "sure" the builder put one bigger than that in there. But had to be sure. Took case off, and drat, can't see labelling. Had to partially lift the supply out of the case to read this:
Output: 250W max
+12v: 14A

Raaaaaaaaats!

Following up from Feb. debacle above, I've finally been able to acquire a 500w supply plus another Evga 210. Ahhhh, GPU=T R U E !

Sorry to have wasted that entire discussion about Open-CL, etc. Just needed a non-builtin video adapter, plus a big enough power supply to support. (Have a nifty Evga 500 watter, 3 yr warranty. Cool.)

So I will be proceeding with heavy GPU processing now! Thanks to all for the various helps, both then and in future.

TCmullet
1st May 2015, 22:31
Hahaha, I only did a different version to be difficult ;)
I'll make it more difficult. You left the source code comments at the top to say "2.8.1" instead of "2.8.0.1". :)

SubJunk
1st May 2015, 23:50
Glad you got the GPU mode working, and you're right about the versioning! Well now 2.8.1 is correct, it was just on a time delay ;)

2.8.1 is released, which updates SVP dependencies which increased speed by up to 15%

chainik_svp
5th May 2015, 22:02
There's a little confusing option in the latest libraries (starting from ver.2.0.0 of svpflow1/2)
search.main.coarse.width = 1050 by default

Default value leads to the very high CPU load for videos with the frame width less than 1050 pixels
Like 1.5 times higher compared to any previous libraries version

To get an old behavior one should set the option to zero.

Still it is very useful for 2K/4K videos so we'll revise default value in the next update.

aegisofrime
10th May 2015, 06:25
Hi, just wondering has anyone tried BlueskyFRC?

http://bluesky23.yukishigure.com/BlueskyFRC.html

Apparently it uses AMD Fluid Motion in Radeon GPUs to do the same thing that InterFrame does.

I'm wondering how's the quality of it. If it's good perhaps some work can be done to see if it can be used within InterFrame :)

Motenai Yoda
17th May 2015, 01:26
Hi, I've not update filters chain lately but with the last I get some nasty artifacts on the right...

mark0077
18th May 2015, 21:50
Guys, are there any documents that describe in lay mans terms what overlap setting means. I'm trying to see which I will use for my realtime playback settings. My machine can't handle Interframe defaults of 8 block size and 2 overlap. It can however handle 8 block, 0 overlap and 16 block with 2 overlap.

I just find it hard to decide which is better. Sometimes I think the higher block size of 16 actually looks better than block size of 8, with same overlap. I guess smaller isn't always better.

johnmeyer
18th May 2015, 22:29
Frame rate conversion often works better, in my experience, with larger block sizes, whereas I have found that smaller block sizes are better for denoising. That certainly is not a hard and fast rule, and others may disagree.

My understanding of overlap, which I'm sure is not entirely correct, is that it keeps you from having discontinuities when "things happen" at the boundaries between the blocks that the picture is broken up into.

This gets into the reason why we have blocks in the first place.

The underlying problem that I think is the reason for blocks is that if you were to analyze every pixel individually, that pixel has almost no information as to what the picture looks like. However, if you take a 4x4 pixel "block," you can begin to see (and so can the software) some structure that is recognizable as something, and which needs to be moved, duplicated, or denoised, depending on what you're doing with the motion estimation. The bigger the block size, the more recognizable the thing becomes, but it also means that everything within that block is going to be treated the same which eventually (as the block size is increased) will produce strange artifacts. One solution is to create multiple blocks that have different boundaries (e.g., pixels 1,2,3,4 in the horizontal and vertical direction, followed by 3,4,5,6 rather than 5,6,7,8,9). The software then overlaps these blocks, although I have no idea how the outcomes and calculations are done.

It is pretty clear that some overlap is going to produce better results, but not at all clear whether an overlap of 4 is going to produce significantly better results than 2.

You pretty much have to experiment, and I generally experiment each time I do a new project, because the nature of the video is also going to affect the end result.

mark0077
18th May 2015, 22:33
Wow thanks for the explanation. Yeah I think 16 blocks is looking better to be honest. Its of course frustrating that some scenes seem to benefit greatly from one setting, while causing negative effects in another :D

I think I'll stick with 16 blocks but as you say its not so clear whether overlap of 1, 2 or even 4 should be better or could even be worse than eachother.

I actually have purchased the Blu-Ray of Goldeneye (one of my old favs) and notice the first section where Bond walks with the gun sights (white circle moving on black background) even seems very challenging for SVP. Its very hard to find a setting where the white circle doesn't flicker or breakup. I guess more experimenting needed :D

SubJunk
21st May 2015, 07:14
InterFrame 2.8.2 is released, which improves speed by updating SVP dependencies. Thanks, SVP!

sofakng
12th June 2015, 16:46
I've compiled the latest FFmpeg with AviSynth support (so I can use InterFrame and SVP), but FMpeg says that it requires AviSynth 2.6 RC1 (or later), or AviSynth+ r1718 (or later).

Does AviSynth 2.6 (from here: http://sourceforge.net/projects/avisynth2/files/AviSynth_Alpha_Releases/AVS_2.6.0/) work with InterFrame and SVP?

Groucho2004
12th June 2015, 17:33
Does AviSynth 2.6 (from here: http://sourceforge.net/projects/avisynth2/files/AviSynth_Alpha_Releases/AVS_2.6.0/) work with InterFrame and SVP?
Interframe/SVP should work with any Avisynth version from 2.5.8 onwards. The plugins still use a avisynth.h with AVISYNTH_INTERFACE_VERSION 3.

sofakng
12th June 2015, 18:57
Thanks!

Should InterFrame/SVP be using all available CPU or is it limited in some way?

For example, I'm using ffmpeg with avisynth (2.6 mt) and interframe/svp. I'm using the NVidia encoder (nvenc) which performs h264 encoding on the GPU. If I don't use InterFrame, the video encodes at ~130 FPS with only 20 - 30% CPU.

However, once I add InterFrame (and still use nvenc/gpu encoding), the CPU stays at 30 - 40% and the encoding goes to 10 FPS.

Is this normal? I'm using "CORES=4" and SetMTMode(2,4). I have a quad-core cpu and I've tried increasing the CORES to 8 and higher but it has no affect.

Braum
9th July 2015, 14:31
Same problem here !

I use this script for realtime rendering :

SetMemoryMax(2048)
SetMTMode(3,4)
SetMTMode(2)
InterFrame(Cores=4, Preset="Faster", NewNum=30000, NewDen=1001, GPU=true, Tuning="Film")


My CPU and GPU are always around 40% but never over 50%.

If I change the preset to "Fast" my CPU and GPU stay around 40% and I got dropped frame, can't render at 29.97 fps :/

Why can't the cpu & gpu load go over 50% ?

With SVP I get around 70-95% for both cpu&gpu.

I can provide screenshots if needed.

:thanks:

edit : My rig : i5 3570K @4.2Ghz | AMD 7870XT OC drivers up to date.

Groucho2004
9th July 2015, 15:36
Same problem here !

I use this script for realtime rendering :

SetMemoryMax(2048)
SetMTMode(3,4)
SetMTMode(2)
InterFrame(Cores=4, Preset="Faster", NewNum=30000, NewDen=1001, GPU=true, Tuning="Film")


My CPU and GPU are always around 40% but never over 50%.

If I change the preset to "Fast" my CPU and GPU stay around 40% and I got dropped frame, can't render at 29.97 fps :/

Why can't the cpu & gpu load go over 50% ?

With SVP I get around 70-95% for both cpu&gpu.

I can provide screenshots if needed.

:thanks:

edit : My rig : i5 3570K @4.2Ghz | AMD 7870XT OC drivers up to date.
If you're using the script in ffdshow you have to add "Distributor()" at the end.

I just did a quick test with AVSMeter on a 1080p source (i5 2500K):
[Script]
LoadPlugin("E:\Apps\VideoTools\DGDecNV\DGDecodeNV.dll")
setmtmode(5, 4)
DGSource("test.dgi")
setmtmode(2)
InterFrame(Cores=4, Preset="Faster", NewNum=30000, NewDen=1001, GPU=true, Tuning="Film")


[Runtime info]
Frames processed: 1089 (0 - 1088)
FPS (min | max | average): 7.248 | 255682 | 79.71
Memory usage (phys | virt): 622 | 698 MB
Thread count: 18
CPU usage (average): 76%
Time (elapsed): 00:00:13.661

Also, your SetMemoryMax(2048) is overkill and a waste of precious memory. The default (512) is enough unless you add QTGMC() or similar.

Groucho2004
9th July 2015, 15:42
For comparison, here is the same script with preset "Medium":
[Runtime info]
Frames processed: 1089 (0 - 1088)
FPS (min | max | average): 3.366 | 210561 | 36.63
Memory usage (phys | virt): 709 | 801 MB
Thread count: 18
CPU usage (average): 88%
Time (elapsed): 00:00:29.727

sofakng
9th July 2015, 16:07
If you're using the script in ffdshow you have to add "Distributor()" at the end.
Is this also needed for ffmpeg? (with avisynth compiled in) I don't think the InterFrame example scripts show that.

If so, do I add Distributer() after the InterFrame() call?

Groucho2004
9th July 2015, 16:15
Is this also needed for ffmpeg? (with avisynth compiled in)
Don't know. Try it, if it is much faster then you know that it is needed.

If so, do I add Distributer() after the InterFrame() call?
You add it at the very end of the script. It's Distributor(), by the way.

sofakng
10th July 2015, 15:26
Thanks so much!

It more than doubled my framerate! Previously it used about 30% CPU during encoding/interpolating, but afterwards it went to 80-90% and was much, much faster.

By the way, what is the best (?) avisynth source filter for MKV/MP4 container (and mostly H.264 encoded) content? I'm using FFMpegSource2 but I dislike that it creates index files.

I'm thinking about using DirectShowSource but I'd need to install LAVFilters I think. (Normally I use MPC-HC for watching video which has internal LAVFilters)

friver
1st August 2015, 14:29
"GPU=true" doesn't work on Windows 10. Can anyone confirm this?

sausuke
8th August 2015, 06:12
can anyone please help me? I'm using this script and my processor is 5960x (8 core CPU)

Cores=8
SetMemoryMax(512)
SetMTMode(3,8)
PluginPath = "C:\Program Files (x86)\MeGui 60 FPS MOD\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
<input>.ConvertToYV12()
SetMTMode(2)
<deinterlace>
<crop>
<denoise>
<resize>
InterFrame(Cores=8)

and I love this script 'cause it uses 100% of cores when encoding in Megui. My question is how to use all the cores on normal encoding without using frame doubling.. I mean I record 60fps games and it doesn't need frame doubling anymore..

My fps on megui is 120fps when using the script above (100% cpu usage) and 45fps only when not using script (45% cpu usage only) I hope someone knows 'cause I googled and don't know the right script for normal encoding..

Thank you in advance.

StainlessS
8th August 2015, 10:41
Maybe something like this (removing svpflow and Interframe)

Cores=8
SetMemoryMax(512)
SetMTMode(3,8)
PluginPath = "C:\Program Files (x86)\MeGui 60 FPS MOD\tools\avisynth_plugin\"
<input>.ConvertToYV12()
SetMTMode(2)
<deinterlace>
<crop>
<denoise>
<resize>


However, the profile will still be called 60FPS (EDIT: as will your MeGUI program directory, ie MeGui 60 FPS MOD).
Or, delete the 60FPS profile and create a new one called eg CORES8.
Here link that you may have used to set it up in the first place (reminder for you): http://www.spirton.com/convert-videos-to-60fps/

traragorn
16th August 2015, 15:42
Hi, just wondering has anyone tried BlueskyFRC?

http://bluesky23.yukishigure.com/BlueskyFRC.html

Apparently it uses AMD Fluid Motion in Radeon GPUs to do the same thing that InterFrame does.

I'm wondering how's the quality of it. If it's good perhaps some work can be done to see if it can be used within InterFrame

Wow, this is the thing I was dreaming of. I have 8-core fx cpu with 280x gpu. I tried svp's player and this interframe and bluesky is the better imo. Easy to setup in mpc and doesn't make my pc hot as hell. (Maybe they are better in nvidia gpu's but with amd gpu this is very good)

aegisofrime
18th August 2015, 02:58
Hi SubJunk!

I'm sure you must have heard of the SVP4 project that the team is working on. I'm just wondering, will SVP4 still work with InterFrame? Will SVP4 even be based on Avisynth?

Thanks!

Sparktank
18th August 2015, 03:48
Hi SubJunk!

I'm sure you must have heard of the SVP4 project that the team is working on. I'm just wondering, will SVP4 still work with InterFrame? Will SVP4 even be based on Avisynth?

Thanks!

SVP has it's own scripts to work with (multiples).

InterFrame is a much simpler form of SVP.
But you can still do some customizations with the given scripts (if you know what you're doing).

This thread is for SVPflow libraries (directly associated with SVP):
http://forum.doom9.org/showthread.php?t=164554

This forum is dedicated to SVP (3.x versions and 4.x versions).
http://www.svp-team.com/forum/index.php
(dedicated English language section plus dedicated Russian language section)

SVP4 should still be running on Avsiynth.
They're still playing with Avisynth+, to see how stable they can keep it.
SVP4 details here: (for technical preview)
http://www.svp-team.com/wiki/SVP4_Technical_Preview

hydra3333
9th September 2015, 06:10
For various reasons (old plugins and scripts) I have to use TSP's old avisynth 2.5.7MT ... will interframe and SVPflow run under avisynth 2.5.7MT ?

MysteryX
10th September 2015, 06:34
For various reasons (old plugins and scripts) I have to use TSP's old avisynth 2.5.7MT ... will interframe and SVPflow run under avisynth 2.5.7MT ?
I don't think so, it's based on AviSynth 2.5.8 MT

Groucho2004
10th September 2015, 07:06
For various reasons (old plugins and scripts) I have to use TSP's old avisynth 2.5.7MT ... will interframe and SVPflow run under avisynth 2.5.7MT ?
2.5.7 and 2.5.8 have the same AVISYNTH_INTERFACE_VERSION. The "MT" extensions are the same, as far as I recall. It should work.

hydra3333
10th September 2015, 10:19
Thanks. It doesn't crash.
My use of Interframe here: http://forum.doom9.org/showthread.php?p=1738023#post1738023 (with a question about deblocking beforehand :))

kolak
17th September 2015, 13:06
Is 2.8.2 based on same dlls as SVP 3.17?

Music Fan
17th September 2015, 13:25
In Interframe 2.8.2,
-svpflow1.dll v2.0.3.0
-svpflow2.dll v2.0.2.0

In SVPflow 1.1.16 ;
-svpflow1.dll v2.0.4.0
-svpflow2.dll v2.0.2.0

And I guess SVPflow 1.1.16 use the same dlls than SVP 3.17.

sofakng
6th October 2015, 13:50
"GPU=true" doesn't work on Windows 10. Can anyone confirm this?
I'm having the exact same problem :(

MysteryX
6th October 2015, 17:05
I'm having the exact same problem :(
Works fine here.

aegisofrime
7th October 2015, 00:21
Works fine here.

I was having the same problem and found that you couldn't use GPU=true if your script also have DGSource in it; That is you can't use that flag if you also had your nvidia graphics card frameserving.

sofakng
22nd October 2015, 14:20
Hmmm, I've tried using FFMpegSource2 and DirectShowSource but neither works with GPU=TRUE.

What else can I use so that I can enable GPU=TRUE?

Groucho2004
22nd October 2015, 14:48
Hmmm, I've tried using FFMpegSource2 and DirectShowSource but neither works with GPU=TRUE.

What else can I use so that I can enable GPU=TRUE?
What exactly does "neither works with GPU=TRUE" mean? How do you determine this? What happens? Does your PC explode?

sofakng
22nd October 2015, 15:02
There seems to be a bug in the NVidia drivers for Windows 10 that causes the application freeze when using CUVID + Open CL.

Here are the discussions from the SVPFlow forum:

Windows 10 GPU-acceleration freeze (http://www.svp-team.com/forum/viewtopic.php?id=2515)
Windows 10 - video player hangs and/or crashes (http://www.svp-team.com/forum/viewtopic.php?id=2671)

However, I do not need GPU acceleration since I'm doing my conversions offline. I still care about quality though.

amayra
6th November 2015, 11:35
what codecs they need i dont went to use k-lile ?

amayra
6th November 2015, 11:56
can update svpflow dll normally ?

VideoFanatic
28th November 2015, 22:37
Is Interframe based on SVP4. If not, any idea when a version based on that will come out?

MysteryX
28th November 2015, 22:38
SVP4 only updated the manager, it is still using the same core libraries. I don't think there's anything to update... yet. Correct me if I'm wrong.

SpyMashine
27th January 2016, 21:19
I'm on Windows 7 64-bit and after updating "AMD Catalyst Drivers 15.11.1" to "AMD Crimson Edition" function "GPU=true" stopped working, but when I back to previous driver "AMD Catalyst Drivers 15.11.1" everything started working properly like it was before.

SVSmoothFps: unable to init GPU-based render [code 0x100FF]
(C:/.../InterFrame2.avsi, line 156)
(C:/.../InterFrame2.avsi, line 58)
(error line 4 in my script, with is GPU=true)

Edit:
I think the reason of this issue is placed in new .dll's installed with those new drivers, on System32 "amdocl64.dll" and SysWOW64 "amdocl.dll"

kristof
11th February 2016, 11:09
Hi, guys
Great collaborative effort this whole video magic!

My terrible problem is that after all interpolation processing audio gets out of sync.

The source is quite a poor condition, unfortuntely it's quite rare, so any better quality is out of reach.
I assume that base recording was avi, then rmvb and now it is flv. Ok, but coding it at 7.744 fps was a crime...
I figured interpolation seems the only solution to make it watchable.

source:
http://gs.video.tt/s?v=95Loalb3Q&t=1455185535&u=&r=2&c=15963991e773c6aca2189235f70b329148e1c6f7ec82106754cd4fecaa1806d90bb8d6ceba3aab998d7309eb5840cf8a&start=0

Used megui + all stuff as prescribed in #1 post of this thead
The script:

Cores=2
SetMemoryMax(512)
SetMTMode(3,Cores)
PluginPath = "C:\video\MeGUI\tools\avisynth_plugin\"
LoadPlugin(PluginPath+"svpflow1.dll")
LoadPlugin(PluginPath+"svpflow2.dll")
Import(PluginPath+"InterFrame2.avsi")
<input>.ConvertToYV12()
SetMTMode(2)
<deinterlace>
<crop>
<denoise>
<resize>
InterFrame(Preset="Fast", Cores=Cores, FrameDouble=true)

Mkv output's audio starts with ~2 s audio before video and develops to ~4 s of premature soundtrack.
I tried to fiddle with settings, but I have to wait 1 hour to check the effects, so tried just a few - all in vain.
Is it all hopeless or maybe there is a solution that would produce synchronized audio&video!?

Music Fan
11th February 2016, 14:11
Out of sync generally happens with variable framerate, is it the case of your video ? You can see it with MediaInfo.

kristof
11th February 2016, 14:35
Looks like constant both in video and audio

General
Unique ID : 205335626914220544381893522803225894184 (0x9A7A340858C8E7DD9F0BDA7BC4D19D28)
Complete name : D:\cyf2hl13.gbn\Ndinz e025.rmvb.mkv
Format : Matroska
Format version : Version 2
File size : 207 MiB
Duration : 48mn 31s
Overall bit rate : 597 Kbps
Encoded date : UTC 2016-02-03 12:31:06
Writing application : mkvmerge v8.5.2 ('Crosses') 32bit
Writing library : libebml v1.3.3 + libmatroska v1.4.4

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 48mn 29s
Bit rate : 533 Kbps
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 3:2
Frame rate mode : Constant
Frame rate : 15.497 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.099
Stream size : 185 MiB (89%)
Writing library : x264 core 148 r2638 7599210
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=155 / keyint_min=15 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No

Audio
ID : 2
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Mode extension : MS Stereo
Codec ID : A_MPEG/L3
Codec ID/Hint : MP3
Duration : 48mn 30s
Bit rate mode : Constant
Bit rate : 64.0 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Frame rate : 38.281 fps (1152 spf)
Compression mode : Lossy
Delay relative to video : 166ms
Stream size : 22.2 MiB (11%)
Writing library : LAMEUUULAME3.98.4
Language : English
Default : Yes
Forced : No

TCmullet
11th February 2016, 14:38
Yes, MediaInfo, Tree view. I have recently gotten lots of videos, some in FLV. And some of them are that d_m VFR (which IMO should be banned as we no longer need to save space these days in most cases). However, some kind soul pointed me to LSmash which I was already using but didn't know there was an option to smoothout VFR, adding and subtracting frames as needed to match a target framerate.

But also you might be having a drift (with or without VFR - I have it without VFR sometimes), which is a separate problem. I discovered TimeStretch function in Avisynth works nicely once you get the hang of it. Also found a short simple code fragment that does the needed math. Works great. Now if I can find it again....

...found it.
https://kb.speeddemosarchive.com/AviSynth#Progressive_audio_desync

kristof
11th February 2016, 14:47
thx
later today I will read and try to understand it ;)

Music Fan
11th February 2016, 15:14
I see that your file has a rmvb extension before its mkv extension ; if the rmvb has been opened as is in mkvmerge, there is maybe a problem with the header. Try to demux the video with MKVExtract and remux it or open the raw video in Avisynth.

kristof
11th February 2016, 21:02
First approach failed.
I have to postpone digging for weekend.

The "MKVExtract and remux" part is too much for now due to my poor tech abilities.
And similar - as tip in https://kb.speeddemosarchive.com/AviSynth#Progressive_audio_desync suggested - I inserted file sourcepath and tried to play avisynth script in media player (to have ability to preview eventual changes), but no success - mp shows some weird picture for 10s and turns off. I guess it can have sth to do with things mentioned in http://forum.doom9.org/archive/index.php/t-112883.html but I couldnt even install properly FLVSplitter.ax :(

lonely.myp
13th February 2016, 12:53
I do not understand why if I just want to encode the movie, then the process will take 6-8 hours?
If I watch a movie with SVP4, encoding in real time.
May I use the wrong settings?
How to set up the script to the movie recoding is not occupied for half a day?

StainlessS
13th February 2016, 14:25
If I watch a movie with SVP4, encoding in real time.
Presumably you mean 'not encoding it at all, ie just playing result of script".
Look to your encoding settings in MeGUI or whatever else you are using to really encode. As you do not mention
what you are using to encode, nor any settings, you are unlikely to get any assistance as no-one is going to have
the slightest idea what you are doing.

Music Fan
13th February 2016, 20:39
I do not understand why if I just want to encode the movie, then the process will take 6-8 hours?
If I watch a movie with SVP4, encoding in real time.
May I use the wrong settings?
How to set up the script to the movie recoding is not occupied for half a day?
Are you sure nothing else in the script uses lot of CPU ?
You can compare the script's speed with AVSMeter (I mean with and without Interframe).
If the CPU usage with your script don't exceed 30 or 40%, you can divide the video in several parts (with the trim function) and encode 2 or 3 scripts together to hit 100 %, then you join files (I do it in lossless -Lagarith- then join the files with a script and I make a single x264 encoding to avoid to join h264, which isn't always as accurate as lossless because of the GOPs).
The whole process will be faster than with a single script.

StainlessS
13th February 2016, 22:44
Musicfan ,methinks he is asking why it takes longer to both process and encode than to just process.

lonely.myp
15th February 2016, 14:16
As you do not mention
what you are using to encode, nor any settings, you are unlikely to get any assistance as no-one is going to have
the slightest idea what you are doing.
I do everything exactly on "Step-by-step guide on how to use InterFrame for beginners"

ordinary movie volume of 2-3 GB takes 8 hours.
I do not want to encode a movie, resize, or something to do with it, just to increase the frame rate.

StainlessS
15th February 2016, 21:05
I do not want to encode a movie, resize, or something to do with it, just to increase the frame rate

Yes you do.

I do not understand why if I just want to encode the movie, then the process will take 6-8 hours?
If I watch a movie with SVP4, encoding in real time.
May I use the wrong settings?
How to set up the script to the movie recoding is not occupied for half a day?

You want to, decode (some avisynth source reader), process to higher framerate using SVP, and then re-encode (ie re-compress using some codec/compressor). Compression (encode) takes time, especially for high compression, so it takes longer to Process (decode, SVP) and then re-encode (compress).

If you just watch output of SVP then you are not encoding at all, and so is much faster.

Groucho2004
15th February 2016, 23:06
I do everything exactly on "Step-by-step guide on how to use InterFrame for beginners"

ordinary movie volume of 2-3 GB takes 8 hours.
I do not want to encode a movie, resize, or something to do with it, just to increase the frame rate.
The guide you are referring to describes the process of re-encoding a movie with megui.

In order to just play a movie with increased frame rate you should probably read the documentation on svp-team.com or use a suitable script in ffdshow.

lonely.myp
16th February 2016, 09:46
Compression (encode) takes time, especially for high compression, so it takes longer to Process (decode, SVP) and then re-encode (compress).
How can I speed up the process?
Set minimal compression? Choose faster codec?

StainlessS
16th February 2016, 18:20
Well with MeGUI and x264, you could (Encoder Settings/Config, scratchpad/Preset), change from Slow (or whatever its set to), to eg Medium or Fast,
or Faster, or VeryFast or SuperFast or UltraFast.
But this is more a MeGUI issue than Avisynth, if need more assistance call on expert help in that forum, maybe here:- http://forum.doom9.org/showthread.php?t=105920&page=402

Groucho2004
16th February 2016, 18:49
@Stainless
You must possess a crystal ball or some mind reading device in order to figure out that he actually does want to encode even though he clearly stated that he does not want to encode - Pure magic. :D

StainlessS
17th February 2016, 02:47
Methinks lonely.myp was under the impression that he could increase the framerate internally in the movie file, without re-encode, but of course he cant.

lonely.myp, I once (a few years ago) encoded a triple episode extended DVD set (about 4hr:20mins per episode), and each episode took about
48hours of [EDIT: processing plus] encoding, so 8hrs is not so bad really. (LOTR)

VideoFanatic
21st June 2016, 21:38
I've used Interframe before to convert a rare SD 25p video to 720 x 576i. I used FFMS (frame accurate) in MeGUI since the source was an AVI inside an MKV container. The script worked correctly.

However this time I'm trying to convert a 1080i 25fps video to 720p 59.94fps. Here's my script:

Spline36Resize(1280,1080)
QTGMC(Preset="Slow")
Spline36Resize(1280,720)
InterFrame(Cores=1, Tuning="Smooth", GPU=true)

Doesn't seem to matter if I specify more cores or not as I get the same speed since I'm not running in MT mode. The video finishes encoding but the resulting video only has video for the first several minutes. When I try to go further the video just stays paused while I can hear the audio carry on playing.

How can I get this working correctly? I'm using DGDecodeNV as the indexer in MeGUI.

mpxman
18th July 2016, 13:07
How to increase artifact protection? Near borders I get this

http://i.imgur.com/r7kRFfC.jpg

Now I use
ChangeFPS(input, 25)
instead of
clip.InterFrame(NewNum=25, NewDen=1, Cores=4, tuning="film")
because of the artifacts.


This code from videoFred's script works well in that scene . The legs are sharp. Unfortunately that script fails in many scenes and causes disappearing text to morph (shrinking).


numerator= fps #numerator for the interpolator (final frame rate)
denumerator= 1 #denumerator example: 60000/1001= 59.94fps

block_size= 16 #block size of MVDegrainMulti()
block_size_v= 16
block_over= 8 #block overlapping of MVDegrainMulti()

super= clip.MSuper()
backward_vec= MAnalyse(super, blksize=block_size, blksizev= block_size_v, overlap=block_over, isb=true)
forward_vec= MAnalyse(super,blksize=block_size, blksizev= block_size_v, overlap=block_over, isb= false)

clip25fps4= clip.MFlowFps(super, backward_vec, forward_vec, num=numerator, den= denumerator, ml=100)

StainlessS
18th July 2016, 15:21
I tend to use Padding(), especially where using multiple MC filters, without it, you tend to get weird periodic
anomalies at frame edges. Think mv has arg to auto add/remove borders but I usually just do a Padding() followed by
crop() at end of processing.

I usually use Padding(16,16,16,16)

function Padding(clip c, int left, int top, int right, int bottom) {
# Didee: http://forum.doom9.org/showthread.php?p=1596804#post1596804
# eg, Padding(32,32,0,0).Padding(0,0,32,32)
w = c.width()
h = c.height()
c.pointresize( w+left+right, h+top+bottom, -left, -top, w+left+right, h+top+bottom )
}

mpxman
18th July 2016, 18:17
I tend to use Padding(), especially where using multiple MC filters, without it, you tend to get weird periodic
anomalies at frame edges. Think mv has arg to auto add/remove borders but I usually just do a Padding() followed by
crop() at end of processing.

I usually use Padding(16,16,16,16)

function Padding(clip c, int left, int top, int right, int bottom) {
# Didee: http://forum.doom9.org/showthread.php?p=1596804#post1596804
# eg, Padding(32,32,0,0).Padding(0,0,32,32)
w = c.width()
h = c.height()
c.pointresize( w+left+right, h+top+bottom, -left, -top, w+left+right, h+top+bottom )
}


Thanks. That helped. Result is not perferct but there's always two legs. Not four :)

johnmeyer
18th July 2016, 18:21
You didn't provide information on the resolution of your video, nor did you mention what version of MVTools2 you have installed (Interframe is simply a front end for MVTools2). I found some bugs in MVTools2 that only surface with certain resolution videos:

MVTools2 artifacts, but only at high resolution (http://forum.doom9.org/showthread.php?t=165075)

If you read that thread you will get ideas of how to work around the problem, if it is indeed the same one I found.

feisty2
18th July 2016, 18:31
You didn't provide information on the resolution of your video, nor did you mention what version of MVTools2 you have installed (Interframe is simply a front end for MVTools2). I found some bugs in MVTools2 that only surface with certain resolution videos:

MVTools2 artifacts, but only at high resolution (http://forum.doom9.org/showthread.php?t=165075)

If you read that thread you will get ideas of how to work around the problem, if it is indeed the same one I found.

Obsolete intel
That bug has been eliminated months ago.

feisty2
18th July 2016, 18:35
http://forum.doom9.org/showthread.php?p=1765458#post1765458
v2.5.11.21 (22.04.2016 by Fizick)
•MflowXXX: remove limit of motion vectors length (was 127/pel).

Reel.Deel
18th July 2016, 18:40
I tend to use Padding(), especially where using multiple MC filters, without it, you tend to get weird periodic
anomalies at frame edges.

When using Padding() it's also a good idea to set "hpad" and "vpad" to 0 in MSuper. "hpad" and "vpad" default to 8 and do the same thing as Padding() but only on the super clip.

You didn't provide information on the resolution of your video, nor did you mention what version of MVTools2 you have installed (Interframe is simply a front end for MVTools2). I found some bugs in MVTools2 that only surface with certain resolution videos:

MVTools2 artifacts, but only at high resolution (http://forum.doom9.org/showthread.php?t=165075)

If you read that thread you will get ideas of how to work around the problem, if it is indeed the same one I found.

Interframe uses SVPflow. Also, the MVTools issue mentioned in that thread issues have been fixed in the latest release.

2.5.11.21 (22.04.2016 by Fizick)


MflowXXX: remove limit of motion vectors length (was 127/pel).


Beat by feisty2

StainlessS
18th July 2016, 19:29
When using Padding() it's also a good idea to set "hpad" and "vpad" to 0 in MSuper. "hpad" and "vpad" default to 8 and do the same thing as Padding() but only on the super clip.

Thanks RD, I do set hpad,ypad to 0 in one part of my standard render script, but use MCDegrain() where it is not setting hpad,ypad to anything, think I'll havta inline the MCDegrain script so as to have more complete control.

Again thanks for the poke in the ribs.

Music Fan
18th July 2016, 19:52
http://forum.doom9.org/showthread.php?p=1765458#post1765458
There is a link for v2.5.11.22 but I have the v2.6.0.5 since 2015, are there parallel dev ?
Which one should be used ?

Reel.Deel
18th July 2016, 20:02
There is a link for v2.5.11.22 but I have the v2.6.0.5 since 2015, are there parallel dev ?
Which one should be used ?

This version includes Fizick's recent changes as well as the changes from v2.6.0.5: http://forum.doom9.org/showthread.php?t=173356

Music Fan
18th July 2016, 22:38
This version includes Fizick's recent changes as well as the changes from v2.6.0.5: http://forum.doom9.org/showthread.php?t=173356
Thanks, do you mean the first link of the first post ?

Sparktank
18th July 2016, 23:05
The wiki has also been updated to replace Firesledge's binary:
http://avisynth.nl/index.php/MVTools

v2.5.11.22 is linked to Fizick.

While the pfmod is linked to printerf's own GitHub with binaries, which includes 2.5.11.22.
"mvtools2 2.7.0.22 x64/x86. Sync'd with 2.5.11.22"

johnmeyer
19th July 2016, 01:54
I guess you're right that Interframe uses SVPFlow, and not its progenitor, MVTools2. I don't use Interframe, but when I looked at the header of the script, this is what my version says:#------------------------------------------------------------------------------#
# #
# InterFrame 2.0pre2 by SubJunk, DeathTheSheep #
# #
# A frame interpolation script that primarily uses MVTools2 for making #
# accurate estimations about the content of non-existent frames #
# Its main use is to give videos higher framerates like newer TVs do #
#------------------------------------------------------------------------------#



However, looking at the actual code later in the script, the calls are definitely SVPFlow calls, not MVTools2.

So, I guess I was wrong, but at least I wasn't entirely crazy. At my age, I'll take that.

StainlessS
19th July 2016, 02:06
IIRC, it started out using mvtools, and then at some point changed to SVPFlow, guess that reference to mvtools managed to escape editing.

Sparktank
19th July 2016, 02:16
Since SVP has gone Pro, I don't know how far behind public releases of SVPFlow are compared to Pro that you can update the day of new releases.
(I mean I don't know how long they intend to not update the public releases)

Public release:
https://www.svp-team.com/wiki/Download
SVPflow 4.0.0.128

But the changelog linked at the top of the page:
https://www.svp-team.com/wiki/Changelog

Shows last SVPflow update was:
SVPflow - 4.0.0.135 - 2016-04-30

Reel.Deel
19th July 2016, 02:43
IIRC, it started out using mvtools, and then at some point changed to SVPFlow, guess that reference to mvtools managed to escape editing.

John's script is pretty old (2.0pre2), the latest version does not mention MVTools anymore.

Since SVP has gone Pro, I don't know how far behind public releases of SVPFlow are compared to Pro that you can update the day of new releases.
(I mean I don't know how long they intend to not update the public releases)

Public release:
https://www.svp-team.com/wiki/Download
SVPflow 4.0.0.128

But the changelog linked at the top of the page:
https://www.svp-team.com/wiki/Changelog

Shows last SVPflow update was:
SVPflow - 4.0.0.135 - 2016-04-30

The SVPflow binaries have always been the same as in their 'pro' version. If I'm not mistaken, SVP is legally obligated to release the SVPflow binaries used in their 'pro' version since it uses GPL code from MVTools2. The reason v4.0.0.135 has not been publicly released is probably because it only introduced a temporary fix and it sounds like it's just an old version anyways. Read here for more info: http://www.svp-team.com/forum/viewtopic.php?id=3314

Sparktank
19th July 2016, 04:22
That makes a lot of sense.
Thanks for clearing that up.

I've just recently switched to the latest AVS+ that's been posted not too long ago.

Reel.Deel
20th July 2016, 02:01
For the reason stated in the SVP thread I'm still using v1.1.17 (https://www.dropbox.com/s/eegzjv76nhbtvo1/svpflow-1.1.17.zip?dl=1) with AviSynth+. The newer version (v4.0.0.128) does not introduce anything new other than VapourSynth support. If you use v1.1.17 with MT, just remember to set it to mode 2.

amayra
20th July 2016, 11:09
Shows last SVPflow update was:
SVPflow - 4.0.0.135 - 2016-04-30
where can i get svpflow 4.0.0.135 ?

Sparktank
20th July 2016, 17:47
where can i get svpflow 4.0.0.135 ?

You have to buy the Pro version.
I don't know if the Free version of SVP has it.

amayra
21st July 2016, 10:23
You have to buy the Pro version.
I don't know if the Free version of SVP has it.
thanks you free version of SVP has it

kolak
28th July 2016, 17:04
For file conversion new MVtools for vapoursynth offer better quality, but they are slow.

SubJunk
28th July 2016, 23:59
For file conversion new MVtools for vapoursynth offer better quality, but they are slow.Can you expand on what you mean by "better quality"? If it offers better interpolation than SVP maybe there could be an InterFrame for vapoursynth

kolak
29th July 2016, 10:28
Yes, less artefacts, but also waaay slower than svp.
It also supports up to 16bit 4:4:4.

amayra
30th July 2016, 00:04
so interframe need to be updated to vapoursynth and new MVtools ?

johnmeyer
30th July 2016, 00:49
Why is it slower under vapoursynth?

Reel.Deel
30th July 2016, 01:14
Can you expand on what you mean by "better quality"? If it offers better interpolation than SVP maybe there could be an InterFrame for vapoursynth

HolyWu already ported InterFrame to VapourSynth, which also uses SVPflow.

For file conversion new MVtools for vapoursynth offer better quality, but they are slow.

Fizick updated MVTools2 not too long ago, there was a few bug fixes and other things. I don't know if that has anything to do with it. I have not compared the two recently. Regarding MVTools2 for VS, other than 16-bit and the additional color spaces it should produce the same quality as the AviSynth version.

kolak
30th July 2016, 13:20
HolyWu already ported InterFrame to VapourSynth, which also uses SVPflow.



Fizick updated MVTools2 not too long ago, there was a few bug fixes and other things. I don't know if that has anything to do with it. I have not compared the two recently. Regarding MVTools2 for VS, other than 16-bit and the additional color spaces it should produce the same quality as the AviSynth version.

Yes, and this is what I'm using (vs version) and quality is better than svp, although way slower.

I'm not saying that avs version is different than vs (did not try avs), but that latest mvtools produce better results than svp. (maybe it was always a case).

bcn_246
30th July 2016, 15:53
Yes, and this is what I'm using (vs version) and quality is better than svp, although way slower.

I'm not saying that avs version is different than vs (did not try avs), but that latest mvtools produce better results than svp. (maybe it was always a case).
SVP needs a bit of tweaking, remember by default it is set so a Core 2 Duo can run it in real-time (so tweaking to have it run at 5fps yields much better results). Otherwise its an unfair test, like comparing yadif (realtime) with QTGMC (about 10fps at default values). I it is leaps and bounds above MVTools (they credit it as the building blocks for SVP). IMO it is better than even the paid Adobe Premier Pro/After Effects plug-ins.

kolak
30th July 2016, 16:18
I tweaked main interframe script, but it's still not as good as new mvtools. The beauty is GPU support, but quality wise every new version is getting rather worse. I used it at the very beginning and quality was better- all later versions added speed, but not really quality.
Adobe's motion adaptive engine is rather poor. If you wan compare svp, mvtools than you need to use pro solutions as a reference.

Reel.Deel
30th July 2016, 21:59
If you wan compare svp, mvtools than you need to use Alchemist OD and Tachyon as a reference.

Would you happen to have some samples? I don't have access to such hardware/software. I'm sure I'm not the only one. :)

kolak
31st July 2016, 00:05
It's about the same level as new mvtools.
Both codes are GPU based.
You can get trial of Alchemist OD- it's bit fussy about GPU, but modern GTX should work.

SubJunk
1st August 2016, 01:09
HolyWu already ported InterFrame to VapourSynth, which also uses SVPflow.Cool, where is it? I must have missed that

johnmeyer
1st August 2016, 01:18
It's about the same level as new mvtools.Which "new MVtools" are you referring to? There is a Fizick build in April (v2.5.11.22), but then there is also a "pfmod" version. I haven't updated for awhile and I should probably be using one of these, but which one?

Reel.Deel
1st August 2016, 02:39
Cool, where is it? I must have missed that

Here: http://forum.doom9.org/showthread.php?t=166582

Which "new MVtools" are you referring to? There is a Fizick build in April (v2.5.11.22), but then there is also a "pfmod" version. I haven't updated for awhile and I should probably be using one of these, but which one?

He's refering to MVTools from VapourSynth which is essentially the same as Fizicks latest version for AviSynth (minus what was mentioned in post #898 (http://forum.doom9.org/showpost.php?p=1775818&postcount=898)).

There is a Fizick build in April (v2.5.11.22), but then there is also a "pfmod" version. I haven't updated for awhile and I should probably be using one of these, but which one?

The pfmod version includes all of the recent updates from the latest MVTools by Fizick. It also includes all the extra features and functions from cretindesalpes' modified MVTools.

Additional functions: MDegrainN, MRestoreVect, MScaleVect, MStoreVect

Additional features: all of the MDegrain filters can output 16-bit video. The plugin is also internally multi-threaded and can be enabled for those who do not use a multi-threaded AviSynth. Lastly it includes a 64-bit binary which can be used with AviSynth+.

It should be a no brainier on which one to use. :)

johnmeyer
1st August 2016, 06:16
It should be a no brainier on which one to use. :)I'll see if I can figure it out. Thanks for the help!!

amayra
6th August 2016, 12:01
i try to update SVPflow but i failed can any one do something about it ?

Magik Mark
10th August 2016, 08:01
Subjunk,

Thanks for this great script. I just would like to know if you have a version that would work on Avisynth+ via Staxrip?

Tried the script found on the first post and I'm getting initial error of unknown variables in the preset

amayra
30th September 2016, 09:49
can use interframe without MeGUI ?

SubJunk
30th September 2016, 23:10
can use interframe without MeGUI ?Yeah you can, it's just an AviSynth script. I've also used it with FFmpeg and MEncoder

urukazuto
22nd October 2016, 10:11
Hello I'm new to this forum and impressive with this interframe. I want to ask how to use Framedoubling using mvtools ? The first page does the explanation of using avisyth + interframe + svplugin.

but how about mvtools? it's usable on avistyh also? or does it only available to vapoursyth?

StainlessS
22nd October 2016, 11:25
urukazuto, Perhaps you should post in an mvtools thread instead of a 'competitor to mvtools' thread.
Having said that, there does not seem to be an mvtools v2.0 thread in Avisynth Usage (only in Avisynth Development section).

But, you could do worse than to read the examples provided in mvtools v2.0 docs, ie


# To double fps with MFlowFps for 'best' results (but slower processing):
AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
# assume progressive PAL 25 fps or NTSC Film 23.976 source
super = MSuper(pel=2)
backward_vec = MAnalyse(super, overlap=4, isb = true, search=3)
# Use block overlap, halfpixel accuracy and Exhaustive search
forward_vec = MAnalyse(super, overlap=4, isb = false, search=3)
MFlowFps(super, backward_vec, forward_vec, num=2*FramerateNumerator(last), \
den=FramerateDenominator(last))

Groucho2004
22nd October 2016, 11:56
I like MBlockFPS:

function foo(clip source, int "multi")
{
last = source
multi = default(multi, 2)

super = MSuper(source, pel = 2, hpad = 0, vpad = 0, rfilter = 4)
backward_1 = MAnalyse(super, chroma = false, isb = true, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
forward_1 = MAnalyse(super, chroma = false, isb = false, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
backward_2 = MRecalculate(super, chroma = false, backward_1, blksize = 8, searchparam = 1, search = 3)
forward_2 = MRecalculate(super, chroma = false, forward_1, blksize = 8, searchparam = 1, search = 3)
backward_3 = MRecalculate(super, chroma = false, backward_2, blksize = 4, searchparam = 0, search = 3)
forward_3 = MRecalculate(super, chroma = false, forward_2, blksize = 4, searchparam = 0, search = 3)
MBlockFps(source, super, backward_3, forward_3, FramerateNumerator(last) * multi, FramerateDenominator(last), mode = 0)

return last
}

kolak
22nd October 2016, 12:03
Why do you do 3 times vectors? Does this improves their quality, os over all quality?
Can I use it with flowfps?

StainlessS
22nd October 2016, 12:37
Kolak,
Post here by Feisty2 (although concerns more Vapoursynth):- http://forum.doom9.org/showthread.php?p=1737136#post1737136

(As I understand it) First BlkSize=16, is fast but a little imprecise. As further iterations at lower BlkSize, so refines precision (but gets slower).
MBlockFps is pretty much interchangeable with MFlowFps, although there may be some caveats. (Actually, I prefer MBlockFps too).

Groucho2004
22nd October 2016, 14:05
Kolak,
Post here by Feisty2 (although concerns more Vapoursynth):- http://forum.doom9.org/showthread.php?p=1737136#post1737136

(As I understand it) First BlkSize=16, is fast but a little imprecise. As further iterations at lower BlkSize, so refines precision (but gets slower).
MBlockFps is pretty much interchangeable with MFlowFps, although there may be some caveats. (Actually, I prefer MBlockFps too).
There is some info about the redefinition of "blksize" in the MVTools2 documentation. I put this function together based on hints and snippets from various sources. It's a bit slow but I certainly prefer it to SVP which produces terrible artefacts in my opinion. Other people's mileage may vary, the result also depends heavily on the nature of the source.

feisty2
22nd October 2016, 15:38
Kolak,
Post here by Feisty2 (although concerns more Vapoursynth):- http://forum.doom9.org/showthread.php?p=1737136#post1737136

(As I understand it) First BlkSize=16, is fast but a little imprecise. As further iterations at lower BlkSize, so refines precision (but gets slower).
MBlockFps is pretty much interchangeable with MFlowFps, although there may be some caveats. (Actually, I prefer MBlockFps too).

depending on how you define "precision", I would just say smaller block size does not necessarily equal higher precision, like it picks a smaller neighborhood to estimate the local status, the estimation gets closer to the exact local status as the neighborhood shrinks down, and a box weighted bilateral is the mathematical limit of neighborhood -> 0, and obviously bilateral is lame cuz a zero length neighborhood also makes zero use of self similarity
and by the way smaller block size produces less coherent motion vectors which are toxic to slo-mo kinda stuff

Groucho2004
22nd October 2016, 15:43
depending on how you define "precision", I would just say smaller block size does not necessarily equal higher precision, like it picks a smaller neighborhood to estimate the local status, the estimation gets closer to the exact local status as the neighborhood shrinks down, and a box weighted bilateral is the mathematical limit of neighborhood -> 0, and obviously bilateral is lame cuz a zero length neighborhood also makes zero use of self similarity
and by the way smaller block size produces less coherent motion vectors which are toxic to slo-mo kinda stuff
OK Sensei. Any suggestions to optimize that function for SloMo?

feisty2
22nd October 2016, 15:49
OK Sensei. Any suggestions to optimize that function for SloMo?

I would just go with a large block size like motion vector coherence MATTERS to frame interpolation...
blksize = 16 seems like a balanced choice to me..

Groucho2004
22nd October 2016, 15:50
I would just go with a large block size like motion vector coherence MATTERS to frame interpolation...
blksize = 16 seems like a balanced choice to me..
Thanks, I'll try it later.

kolak
23rd October 2016, 00:14
Kolak,
Post here by Feisty2 (although concerns more Vapoursynth):- http://forum.doom9.org/showthread.php?p=1737136#post1737136

(As I understand it) First BlkSize=16, is fast but a little imprecise. As further iterations at lower BlkSize, so refines precision (but gets slower).
MBlockFps is pretty much interchangeable with MFlowFps, although there may be some caveats. (Actually, I prefer MBlockFps too).

Well, I found that for HD source block 32 (with 8 or 16 overlap) gives the best results and latest mvtools in vapourysnth produce way less artefacts than svp. As some people mentioned smaller blocks size quite often causes more artefacts. I actually asked for bigger blocks sizes in mvtools. Search parameter and DCT for me affect quality the most. DCT=1 is way the best one, but sooooo slow (and we are not talking about flashes etc, but even on "normal" frames). As I said few times maybe things like 2 pass analysis with adaptive block switching and search parameter would be optimal. I assume this would be crazy slow.

StainlessS
23rd October 2016, 02:21
Kolak, If you come up with a 'one size fits all' solution, be sure to post it, thank you sir. EDIT: or, A one size fits nearly all.

johnmeyer
23rd October 2016, 03:06
Is the MVTools for vapousynth substantially different than MVTools for AVISynth? I keep putting off using vapoursynth, but if I can get visibly better results, then I'll take the time to install and learn.

feisty2
23rd October 2016, 05:33
Is the MVTools for vapousynth substantially different than MVTools for AVISynth? I keep putting off using vapoursynth, but if I can get visibly better results, then I'll take the time to install and learn.

you were obviously gratified with how I fixed that Iceland footage last time, and you gave up anyways..
why should this time be any different?

kolak
23rd October 2016, 10:36
Kolak, If you come up with a 'one size fits all' solution, be sure to post it, thank you sir. EDIT: or, A one size fits nearly all.

There maybe solution, which is adaptive block :)
The things is that Groucho2004 is not using 1 command with a block size, but recalculate option, which I assume may help with quality.

kolak
23rd October 2016, 10:38
Is the MVTools for vapousynth substantially different than MVTools for AVISynth? I keep putting off using vapoursynth, but if I can get visibly better results, then I'll take the time to install and learn.

I think it's the same. Not sure about speed, but there is new version for vs coming with some speed optimisation.

feisty2
23rd October 2016, 13:33
There maybe solution, which is adaptive block :)
The things is that Groucho2004 is not using 1 command with a block size, but recalculate option, which I assume may help with quality.

It definitely helps with denoising and stuff like that, not with frame interpolation

kolak
23rd October 2016, 13:45
Thanks, but I have some idea.

Some scenes benefit from search=6 or search=7 (they produce double edges but no artefacts which is better when watched in full motion), so if I use 3 step re-calculate: search=4, then search=6, then search=7 then in theory I should get better interpolation (assuming best vectors are picked properly). No?
This is almost like my 2 pass adaptive search/block idea.

feisty2
23rd October 2016, 14:01
Thanks, but I have some idea.

Some scenes benefit from search=6 or search=7 (they produce double edges but no artefacts which is better when watched in full motion), so if I use 3 step re-calculate: search=4, then search=6, then search=7 then in theory I should get better interpolation (assuming best vectors are picked properly). No?
This is almost like my 2 pass adaptive search/block idea.

Recalculate works by minimizing the vector SAD, it recalculates a vector if its SAD is above the threshold
You get search=3 by picking vectors calculated by exhaustive search in different (horizontal or vertical) directions based on SAD
and you claimed that search=3 sucked,,,

kolak
23rd October 2016, 14:20
Yes, search=3,4 or 5 maybe produced best vectors SAD wise, but they introduce artefacts on some scenes (e.g. car going quickly across the frame). In such a case search=7 will do bit of double edges, but this is way better than artefacts from e.g. search=3.

feisty2
23rd October 2016, 14:27
Then your recalculating different kinds of searching algorithms method won't work cuz it's basically a less efficient search=3

kolak
23rd October 2016, 14:40
I thought this will use search=3 for most frames and than just switch to eg. search=7 only for some frames (or none).
I'm running test now which then I will compare against pure search=3 mode (PSNR wise).

kolak
23rd October 2016, 18:50
Looks like this makes most frames about the same as pure search=3, but then some of them (those with artefacts) are different as they are coming from search=7. So it does behave sort of hybrid and gives different result than pure search=3. Speed suffers a lot also :(
but... some scenes don't look good on TV- bit juddery...
DCT=1 is stil best bet for quality and slow speed :)

StainlessS
24th October 2016, 01:19
In my humble opinion the Feisty2, is the replacement for Didee [EDIT: time will tell if of worth] , the big dog, on the block.
Unfortunately, he is not that nice.
He is what he is, we have to accept that and deal with it, not nice I know, but that is the Feisty2, thing.

Me Loves him, but what a pain. (Feisty, had a few beers, Forgive me or die)
:) [EDIT: You might want to specify how you will die, ie tragic accident etc]

johnmeyer
24th October 2016, 03:47
In my humble opinion the Feisty2, is the replacement for Didee [EDIT: time will tell if of worth] , the big dog, on the block.
Unfortunately, he is not that nice.
He is what he is, we have to accept that and deal with it, not nice I know, but that is the Feisty2, thing.

Me Loves him, but what a pain. (Feisty, had a few beers, Forgive me or die)
:) [EDIT: You might want to specify how you will die, ie tragic accident etc]He just took another minor shot at me, but I don't mind it because he's just trying to tell grandpa to get off his butt and get on with it.

He is not entirely wrong about that.

And I agree with the Didée comparison: neither of them suffer fools (which, I guess, includes me), but they both have pretty unique ways of looking at video problems and therefore develop very unusual solutions to problems.

The only real downside is that very few of us can understand how the scripts work and the presentation is often more cryptic than it really needs to be. This makes it very difficult to build on their work or take it in a new direction. This is my only real complaint: both "open source" and the work done in these forums requires a collegial approach because one person can seldom do everything needed to create great software.

urukazuto
25th October 2016, 16:30
Thank you for the explanation and Suggestion.

I want to ask about MBlockFps Processing Mode, a lot of people apparently using mode = 0 (the fastest), and I read the documentation, it seems the mode 3 to 8 mentioning masking, are they further increased masking and quailty also? Anyone that try this?

StainlessS
6th November 2016, 00:49
I like MBlockFPS:

function foo(clip source, int "multi")
{
last = source
multi = default(multi, 2)

super = MSuper(source, pel = 2, hpad = 0, vpad = 0, rfilter = 4)
backward_1 = MAnalyse(super, chroma = false, isb = true, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
forward_1 = MAnalyse(super, chroma = false, isb = false, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
backward_2 = MRecalculate(super, chroma = false, backward_1, blksize = 8, searchparam = 1, search = 3)
forward_2 = MRecalculate(super, chroma = false, forward_1, blksize = 8, searchparam = 1, search = 3)
backward_3 = MRecalculate(super, chroma = false, backward_2, blksize = 4, searchparam = 0, search = 3)
forward_3 = MRecalculate(super, chroma = false, forward_2, blksize = 4, searchparam = 0, search = 3)
MBlockFps(source, super, backward_3, forward_3, FramerateNumerator(last) * multi, FramerateDenominator(last), mode = 0)

return last
}


Perhaps might try this mod


Function foo2(clip source, int "multi") {
last = source
multi = default(multi, 2)
prefilt = DeGrainMedian() # some smoothing
superfilt = MSuper(prefilt, hpad=16, vpad=16) # all levels for MAnalyse
super = MSuper(source, pel = 2, hpad = 16, vpad = 16, rfilter = 4) # one level is enough for MRecalculate
bw_1 = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
fw_1 = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
bw_2 = MRecalculate(super, chroma = false, bw_1, blksize = 8, searchparam = 1, search = 3)
fw_2 = MRecalculate(super, chroma = false, fw_1, blksize = 8, searchparam = 1, search = 3)
bw_3 = MRecalculate(super, chroma = false, bw_2, blksize = 4, searchparam = 0, search = 3)
fw_3 = MRecalculate(super, chroma = false, fw_2, blksize = 4, searchparam = 0, search = 3)
MBlockFps(source, super, bw_3, fw_3, FramerateNumerator(Source) * multi, FramerateDenominator(Source), mode = 0, Blend=False)
return last
}


Hpad, and vpad are recommended in docs
In MVTools before v2.0 the value of padding = block size was always used internally. Now it is not strict but recommended value.
With hpad=0, you can get oscillating (disappearing/reappearing) verticals at left and right edges when things move near screen edges.
Same top and bottom if vpad=0.
EDIT: I have not been able to reproduce this during current testing, but have noticed it in the past.

during some test comparisons, not using MRecalculate() produced some blockiness that was squashed by a single MRecalculate(blksize = 8).

I really dont like Blend=True default, it makes detecting scene changes bloody impossible.

This is probably what I will use in future, unless someone can suggest something better.

Function DoubleRate(clip c) {
c
prefilt = DeGrainMedian() # some smoothing
superfilt = MSuper(prefilt, hpad=16, vpad=16, rfilter = 4) # all levels for MAnalyse
super = MSuper(pel=2, hpad=16, vpad=16,rfilter=4,levels=1) # one level is enough for MRecalculate
bw_1 = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
fw_1 = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
bw_2 = MRecalculate(super, chroma = false, bw_1, blksize = 8, searchparam = 1, search = 3)
fw_2 = MRecalculate(super, chroma = false, fw_1, blksize = 8, searchparam = 1, search = 3)
MBlockFps(super, bw_2, fw_2, num=0, den=0, mode=0, Blend=false)
Return Last
}


EDIT: Maybe Overlap of say 2, could improve a little (on MRecalculate). ???
EDIT: Scratch above EDIT, produces weird flashing with Overlap=2 in MRecalculate.

feisty2
6th November 2016, 01:03
Perhaps might try this mod


Function foo2(clip source, int "multi") {
last = source
multi = default(multi, 2)
prefilt = DeGrainMedian() # some smoothing
superfilt = MSuper(prefilt, hpad=16, vpad=16) # all levels for MAnalyse
super = MSuper(source, pel = 2, hpad = 16, vpad = 16, rfilter = 4) # one level is enough for MRecalculate
bw_1 = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
fw_1 = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
bw_2 = MRecalculate(super, chroma = false, bw_1, blksize = 8, searchparam = 1, search = 3)
fw_2 = MRecalculate(super, chroma = false, fw_1, blksize = 8, searchparam = 1, search = 3)
bw_3 = MRecalculate(super, chroma = false, bw_2, blksize = 4, searchparam = 0, search = 3)
fw_3 = MRecalculate(super, chroma = false, fw_2, blksize = 4, searchparam = 0, search = 3)
MBlockFps(source, super, bw_3, fw_3, FramerateNumerator(Source) * multi, FramerateDenominator(Source), mode = 0, Blend=False)
return last
}


Hpad, and vpad are recommended in docs

With hpad=0, you can get oscillating (disappearing/reappearing) verticals at left and right edges when things move near screen edges.
Same top and bottom if vpad=0.

during some test comparisons, not using MRecalculate() produced some blockiness that was squashed by a single MRecalculate(blksize = 8).

I really dont like Blend=True default, it makes detecting scene changes bloody impossible.

This is probably what I will use in future, unless someone can suggest something better.

Function DoubleRate(clip c) {
c
prefilt = DeGrainMedian() # some smoothing
superfilt = MSuper(prefilt, hpad=16, vpad=16, rfilter = 4) # all levels for MAnalyse
super = MSuper(pel=2, hpad=16, vpad=16,rfilter=4,levels=1) # one level is enough for MRecalculate
bw_1 = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
fw_1 = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
bw_2 = MRecalculate(super, chroma = false, bw_1, blksize = 8, searchparam = 1, search = 3)
fw_2 = MRecalculate(super, chroma = false, fw_1, blksize = 8, searchparam = 1, search = 3)
MBlockFps(super, bw_2, fw_2, num=0, den=0, mode=0, Blend=false)
Return Last
}


Make "overlap" > 0 and the blockiness will disappear
And then you'll see why small blocks suck at frame interpolation

feisty2
6th November 2016, 01:16
MAnalyse(blksize=16, overlap=8, ...)
And no extra pointless MRecalculate

StainlessS
6th November 2016, 01:27
These two are garbage, I must have screwed up somewhere (weird flashing, EDIT: Green and Pink frames).


Function DoubleRate3(clip c) {
c
prefilt = DeGrainMedian() # some smoothing
superfilt = MSuper(prefilt, hpad=16, vpad=16, rfilter = 4) # all levels for MAnalyse
super = MSuper(pel=2, hpad=16, vpad=16,rfilter=4)
bw_1 = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
fw_1 = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
MBlockFps(super, bw_1, fw_1, num=0, den=0, mode=0, Blend=false)
Return Last
}

Function DoubleRate4(clip c) {
c
super = MSuper(pel=2, hpad=16, vpad=16,rfilter=4)
bw_1 = MAnalyse(super, chroma = false, isb = true, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
fw_1 = MAnalyse(super, chroma = false, isb = false, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
MBlockFps(super, bw_1, fw_1, num=0, den=0, mode=0, Blend=false)
Return Last
}

But this works ok

Function DoubleRate2(clip c) {
c
prefilt = DeGrainMedian() # some smoothing
superfilt = MSuper(prefilt, hpad=16, vpad=16, rfilter = 4) # all levels for MAnalyse
super = MSuper(pel=2, hpad=16, vpad=16,rfilter=4,levels=1) # one level is enough for MRecalculate
bw_1 = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16, OverLap=2, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
fw_1 = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=2, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
bw_2 = MRecalculate(super, chroma = false, bw_1, blksize = 8, searchparam = 1, search = 3)
fw_2 = MRecalculate(super, chroma = false, fw_1, blksize = 8, searchparam = 1, search = 3)
MBlockFps(super, bw_2, fw_2, num=FramerateNumerator(c) * 2, den=FramerateDenominator(c), mode=0, Blend=false)
Return Last
}

feisty2
6th November 2016, 01:31
Overlap=8
Plus whirling and blockiness, you can only avoid one

StainlessS
6th November 2016, 01:45
The two above Garbage functions still fail with Overlap=8, Green, Pink and Gray frames (sometimes), and jumping backwards and forwards in time.

EDIT: The two Garbage functions above, both work ok if changed to MFlowFps() and removing mode=0 (not an arg to MFlowFps).

Looks like something may be broken in latest (I think) mvtools MBlockFps.

feisty2
6th November 2016, 02:00
The two above Garbage functions still fail with Overlap=8, Green, Pink and Gray frames (sometimes), and jumping backwards and forwards in time.

So chroma was screwed, gotcha
Append "convettoy8()" at the end of the script and check if luma is okay
If it is, then that's probably an mvtools bug

StainlessS
6th November 2016, 02:04
See previous edit feisty.

EDIT: I'de say definite bug, not just the chroma that is screwed up, and temporal chaos.

feisty2
6th November 2016, 02:30
See previous edit feisty.

EDIT: I'de say definite bug, not just the chroma that is screwed up, and temporal chaos.

well, I ain't used avisynth for a while but blockfps in vaporsynth mvtools works
give it a go

import vapoursynth as vs
core = vs.get_core()

clp = blah blah blah
super = core.mv.Super(clp,pel=4,hpad=16,vpad=16,rfilter=4)
bw_1 = core.mv.Analyse(super,isb=True,blksize = 16,overlap=8,search=3,badrange =-24)
fw_1 = core.mv.Analyse(super,isb=False,blksize = 16,overlap=8,search=3,badrange =-24)
clp = core.mv.BlockFPS(clp, super, bw_1, fw_1, num=0, den=0, mode=0, blend=False)

clp.set_output()

StainlessS
6th November 2016, 02:47
I'de love to 'give it a go', unfortunately I is on XP32, and nobody cares bout us lil ol' XP users :)

With 4 window stack display, Garbage function, Good function, Subract(Garbage,Good), Subract(Garbage,Good),
If I play (in VDUB) say some part of early clip, and then jump to near the end of clip,
and play, then will sporadically show frames from the early part of clip that was recently played. Sometimes it shows
what looks to be frames from a diagnostic Subtract that is showing in one of the windows.
Looks like its totally Mucked up (substitute an alternate first letter of your choice).

EDIT MvTools2 that I'm using is v2.5.11.20.

EDIT: The problem seems to occur if OverLap used in creating final BackWards and Forwards vectors supplied to MBlockFps,
ie MAnalyse(Overlap=whatever) if MRecalculate not used, and in final MRecalculate(Overlap=whatever) if used.

This works ok without Overlap in final vectors

Function foo2(clip source, int "multi") {
last = source
multi = default(multi, 2)
prefilt = DeGrainMedian() # some smoothing
superfilt = MSuper(prefilt, hpad=16, vpad=16) # all levels for MAnalyse
super = MSuper(source, pel = 2, hpad = 16, vpad = 16, rfilter = 4) # one level is enough for MRecalculate
bw_1 = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
fw_1 = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
bw_2 = MRecalculate(super, chroma = false, bw_1, blksize = 8, OverLap=4, searchparam = 1, search = 3)
fw_2 = MRecalculate(super, chroma = false, fw_1, blksize = 8, OverLap=4,searchparam = 1, search = 3)
bw_3 = MRecalculate(super, chroma = false, bw_2, blksize = 4, searchparam = 0, search = 3) # No Overlap
fw_3 = MRecalculate(super, chroma = false, fw_2, blksize = 4, searchparam = 0, search = 3) # No Overlap
MBlockFps(source, super, bw_3, fw_3, FramerateNumerator(Source) * multi, FramerateDenominator(Source), mode = 0, Blend=False)
return last
}


But think I'll be using this until fixed at least.

Function DoubleRate(clip c,Bool "Blend") {
c
Blend=Default(Blend,False) # Avoid blends at scene change (copy previous frame)
prefilt = DeGrainMedian() # some smoothing
superfilt = MSuper(prefilt, hpad=16, vpad=16, rfilter = 4) # all levels for MAnalyse
super = MSuper(pel=2, hpad=16, vpad=16,rfilter=4,levels=1) # one level is enough for MRecalculate
bw_1 = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16, OverLap=2, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
fw_1 = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=2, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
bw_2 = MRecalculate(super, chroma = false, bw_1, blksize = 8, searchparam = 1, search = 3) # No Overlap (currently broken for final vectors)
fw_2 = MRecalculate(super, chroma = false, fw_1, blksize = 8, searchparam = 1, search = 3) # No Overlap
MBlockFps(super, bw_2, fw_2, num=FramerateNumerator(c) * 2, den=FramerateDenominator(c), mode=0, Blend=Blend)
Return Last
}

feisty2
6th November 2016, 02:50
and BlockFPS is definitely more or less better than FlowFPS in general
FlowFPS

import vapoursynth as vs
core = vs.get_core()

clp = xxx
clp = core.fmtc.bitdepth(clp,bits=32,fulls=False,fulld=True)
super = core.mvsf.Super(clp,pel=4,hpad=16,vpad=16,rfilter=4)
bw_1 = core.mvsf.Analyze(super,isb=True,blksize = 16,overlap=8,search=3,badrange =-24)
fw_1 = core.mvsf.Analyze(super,isb=False,blksize = 16,overlap=8,search=3,badrange =-24)
clp = core.mvsf.FlowFPS(clp, super, bw_1, fw_1, num=0, den=0, blend=False)

clp.set_output()

http://i.imgur.com/7qxG8QF.png
http://i.imgur.com/i0kNuz0.png
BlockFPS

import vapoursynth as vs
core = vs.get_core()

clp = xxx
clp = core.fmtc.bitdepth(clp,bits=32,fulls=False,fulld=True)
super = core.mvsf.Super(clp,pel=4,hpad=16,vpad=16,rfilter=4)
bw_1 = core.mvsf.Analyze(super,isb=True,blksize = 16,overlap=8,search=3,badrange =-24)
fw_1 = core.mvsf.Analyze(super,isb=False,blksize = 16,overlap=8,search=3,badrange =-24)
clp = core.mvsf.BlockFPS(clp, super, bw_1, fw_1, num=0, den=0, blend=False)

clp.set_output()

http://i.imgur.com/qK1QrgG.png
http://i.imgur.com/D1R03LQ.png

StainlessS
6th November 2016, 03:07
Perhaps all posts relating to MvTools2 should be separated into a new thread, Its really about time MvTools2 had a thread in the Avisynth Usage forum,
and Interframe dont need lots of posts about it's competitor.
I suggest from post #915 (to put Groucho2004 in command) and maybe insert the two posts 913 and 914 after the first post, if possible.

All those in favour, say "Aye!".

Groucho2004
6th November 2016, 15:10
The two above Garbage functions still fail with Overlap=8, Green, Pink and Gray frames (sometimes), and jumping backwards and forwards in time.

EDIT: The two Garbage functions above, both work ok if changed to MFlowFps() and removing mode=0 (not an arg to MFlowFps).

Looks like something may be broken in latest (I think) mvtools MBlockFps.
I'm still using mvtools2 v2.5.11.3 since the newer versions crash/throw exceptions when multi-threaded. In this older version, MBlockFps actually throws an error when using "overlap" > 0 in MAnalyse(). So, MFlowFps may be a better choice in this case.

kolak
6th November 2016, 19:05
and BlockFPS is definitely more or less better than FlowFPS in general


Is -24 for badrange is "better". Default is 24.

Groucho2004
6th November 2016, 19:11
Is -24 for badrange is "better". Default is 24.
From MVTools2 doc:
badrange: the range (radius) of wide search for bad blocks. Default is 24 (image pixel units). Use positive value for UMH search and negative for Exhaustive search.

kolak
6th November 2016, 19:49
Yes, rtfm (properly) :)

pinterf
8th November 2016, 09:55
These two are garbage, I must have screwed up somewhere (weird flashing, EDIT: Green and Pink frames).


Function DoubleRate3(clip c) {
c
prefilt = DeGrainMedian() # some smoothing
superfilt = MSuper(prefilt, hpad=16, vpad=16, rfilter = 4) # all levels for MAnalyse
super = MSuper(pel=2, hpad=16, vpad=16,rfilter=4)
bw_1 = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
fw_1 = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
MBlockFps(super, bw_1, fw_1, num=0, den=0, mode=0, Blend=false)
Return Last
}

Function DoubleRate4(clip c) {
c
super = MSuper(pel=2, hpad=16, vpad=16,rfilter=4)
bw_1 = MAnalyse(super, chroma = false, isb = true, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
fw_1 = MAnalyse(super, chroma = false, isb = false, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24))
MBlockFps(super, bw_1, fw_1, num=0, den=0, mode=0, Blend=false)
Return Last
}


Indeed. There is a missing copy of the 16 bit internal buffers back to 8 bit result when overlap is used. I will fix it in my pfmod branch in the next release.

StainlessS
8th November 2016, 16:17
I will fix it in my pfmod branch in the next release.

Oooh, lovely :)

I'm doing a little bit of work on DoubleRate deinterlace/Interpolation and need the overlap thing. It caught me a bit by surprise that when dealing with
hybrid source (with possibility of single interlaced frame in progressive sequence), that single non-combed status of progressive frame is not enough
to deal with it properly, a third combed status is required. 0)=Interlaced, 1)=Progressive current+progressive next, 2)=Progressive current & Interlaced Next.
If not taken into account, then Interpolated frames will use Progressive current + Interlaced next as sources. Perhaps this was obvious to you lot, but
was not to me. To fix it, I'm using Progressive current + deinterlaced first field of next for interpolation. I guess that QTGMC already copes with this.

DanilaZabiaka
9th March 2020, 21:47
My version based on new libraries :)

https://forum.doom9.org/showthread.php?p=1903412#post1903412

markfilipak
17th February 2021, 07:17
Hi Y'all,

I've successfully transcoded 24/1.001fps samples to 60/1.001fps (and also to 120/1.001fps) via the Windows cmd scripts below.
But when I use the same script to transcode SubJunk's 24/1.001fps sample (http://www.spirton.com/uploads/InterFrame/20110618-Sample-Original.mkv), the transcode comes out unexpectedly and I wonder why.

This transcodes to 60/1.001fps as expected:

ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=60000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video = core.std.AssumeFPS(video, fpsnum=60000, fpsden=1001)>>Mark's.vpy
ECHO video.set_output()>>Mark's.vpy
vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-60fps.mkv


This transcodes to 60fps instead of to 60/1.001fps:

ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=120000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video = core.std.AssumeFPS(video, fpsnum=120000, fpsden=1001)>>Mark's.vpy
ECHO video.set_output()>>Mark's.vpy
vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -filter_complex "tinterlace=mode=drop_odd" -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-120fps-to-60fps.mkv


Of course, the problem could be with 'tinterlace=mode=drop_odd', so I tried it without 'tinterlace':

ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=120000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video = core.std.AssumeFPS(video, fpsnum=120000, fpsden=1001)>>Mark's.vpy
ECHO video.set_output()>>Mark's.vpy
vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-120fps.mkv

but it transcodes to 120fps instead of to 120/1.001fps. Anyone know why? I just can't see it.

poisondeathray
17th February 2021, 08:30
Hi Y'all,

I've successfully transcoded 24/1.001fps samples to 60/1.001fps (and also to 120/1.001fps) via the Windows cmd scripts below.
But when I use the same script to transcode SubJunk's 24/1.001fps sample (http://www.spirton.com/uploads/InterFrame/20110618-Sample-Original.mkv), the transcode comes out unexpectedly and I wonder why.

This transcodes to 60/1.001fps as expected:

ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=60000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video = core.std.AssumeFPS(video, fpsnum=60000, fpsden=1001)>>Mark's.vpy
ECHO video.set_output()>>Mark's.vpy
vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-60fps.mkv


This transcodes to 60fps instead of to 60/1.001fps:

ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=120000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video = core.std.AssumeFPS(video, fpsnum=120000, fpsden=1001)>>Mark's.vpy
ECHO video.set_output()>>Mark's.vpy
vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -filter_complex "tinterlace=mode=drop_odd" -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-120fps-to-60fps.mkv


Of course, the problem could be with 'tinterlace=mode=drop_odd', so I tried it without 'tinterlace':

ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=120000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video = core.std.AssumeFPS(video, fpsnum=120000, fpsden=1001)>>Mark's.vpy
ECHO video.set_output()>>Mark's.vpy
vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-120fps.mkv

but it transcodes to 120fps instead of to 120/1.001fps. Anyone know why? I just can't see it.




It has nothing to do with interframe

When debugging scripts, strip everything down , eliminate variables, and check each step, each output node. Same with ffmpeg. Start with something simple like blankclip(). Label the framenumbers.

vapoursynth and the input pipe into ffmpeg are fine; it's the output in ffmpeg that is the problem - even with NUL - the output is rounded. There might be some switch or command to prevent this, not sure

vspipe --y4m 1.vpy - | ffmpeg -f yuv4mpegpipe -i - -an -f null NUL
Input #0, yuv4mpegpipe, from 'pipe:':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(progressive), 640x48
0, 119.88 fps, 120 tbr, 119.88 tbn, 119.88 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> wrapped_avframe (native))
Output #0, null, to 'NUL':
Metadata:
encoder : Lavf58.67.100
Stream #0:0: Video: wrapped_avframe, yuv420p(progressive), 640x480, q=2-31, 20
0 kb/s, 120 fps, 120 tbn




Another option is to perform the operations vapoursynth or avisynth

tinterlace=mode=drop_odd is the same thing as selecteven() in avisynth, or clip = clip[::2] in vapoursynth

2.vpy

import vapoursynth as vs
core = vs.get_core()
clip = core.std.BlankClip(format=vs.YUV420P8, length=240, color=[16, 128, 128])
clip = core.text.FrameNum(clip)
clip = core.std.AssumeFPS(clip, fpsnum=120000, fpsden=1001)
clip = clip[::2]
clip.set_output()


vspipe --y4m 2.vpy - | ffmpeg -f yuv4mpegpipe -i - -an -f null NUL
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(progressive), 640x48
0, 59.94 fps, 59.94 tbr, 59.94 tbn, 59.94 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> wrapped_avframe (native))
Output #0, null, to 'NUL':
Metadata:
encoder : Lavf58.67.100
Stream #0:0: Video: wrapped_avframe, yuv420p(progressive), 640x480, q=2-31, 20
0 kb/s, 59.94 fps, 59.94 tbn


actual encode
vspipe --y4m 2.vpy - | ffmpeg -f yuv4mpegpipe -i - -c:v libx264 -preset:v fast -crf 20 -an 2.mp4


ffmpeg -i 2.mp4
Duration: 00:00:02.00, start: 0.000000, bitrate: 48 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480, 39
kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)

Looks ok, frames are correct when examined




Also, I would avoid mkv if you want more accurate timestamps. mkv uses a timebase of 1/1000s so there is rounding and some jitter

markfilipak
17th February 2021, 09:30
It has nothing to do with interframe
I agree wholeheartedly. Why? Because it worked for SubJunk. I assume SubJunk didn't pipe to ffmpeg.

I love doom9. You guys are the best. You, and ... well, I'm not going to name names because I fear I would leave someone out. You all are Heroes of the Revolution. :thanks:

You've given me a lot to examine. Do you think the difference is because ffmpeg works via PTSs instead of frame numbers? I've been getting that feeling but ffmpeg docs hardly even mention "PTS". Certainly the filter docs don't mention what they do regarding either reading or writing PTSs.

It's funny you should mention "tinterlace=mode=drop_odd is the same thing as selecteven() in avisynth" because my first ffmpeg drop_odd approach was to use 'select=eq(mod(n\,2)\,0)' but PTSs don't get updated (as seen in MPV) and the results are unpredictable.

You're obviously well informed. I've been struggling with ffmpeg for half a year but, tell me: Do you think I should abandon ffmpeg?

markfilipak
17th February 2021, 09:40
Also, I would avoid mkv if you want more accurate timestamps. mkv uses a timebase of 1/1000s so there is rounding and some jitter
What do you prefer?

Edit: I think MPEG streams use 1/90000s. What transports also use 1/90000s? All my sources will be DVD & BD movies.

poisondeathray
17th February 2021, 15:34
Do you think the difference is because ffmpeg works via PTSs instead of frame numbers? I've been getting that feeling but ffmpeg docs hardly even mention "PTS". Certainly the filter docs don't mention what they do regarding either reading or writing PTSs.

That's a difference, but not the full explanation here. That rounding observation needs to be investigated farther, it's unexpected

It's avisynth that is CFR only, frame only. vapoursynth is actually both



It's funny you should mention "tinterlace=mode=drop_odd is the same thing as selecteven() in avisynth" because my first ffmpeg drop_odd approach was to use 'select=eq(mod(n\,2)\,0)' but PTSs don't get updated (as seen in MPV) and the results are unpredictable.

For frame manipulations like that, they are automatically adjusted in avisynth and mostly in vapoursynth too.


Do you think I should abandon ffmpeg?

No.

They are just tools, pros/cons to each of them. Often there are multiple ways to get something done, but certain operations are often better/faster in one or the other.




Also, I would avoid mkv if you want more accurate timestamps. mkv uses a timebase of 1/1000s so there is rounding and some jitter


What do you prefer?
For general use MP4, because it's more compatible with devices, web, NLE's - basically all scenarios

richardpl
17th February 2021, 15:55
Hi Y'all,

I've successfully transcoded 24/1.001fps samples to 60/1.001fps (and also to 120/1.001fps) via the Windows cmd scripts below.
But when I use the same script to transcode SubJunk's 24/1.001fps sample (http://www.spirton.com/uploads/InterFrame/20110618-Sample-Original.mkv), the transcode comes out unexpectedly and I wonder why.

This transcodes to 60/1.001fps as expected:

ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=60000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video = core.std.AssumeFPS(video, fpsnum=60000, fpsden=1001)>>Mark's.vpy
ECHO video.set_output()>>Mark's.vpy
vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-60fps.mkv


This transcodes to 60fps instead of to 60/1.001fps:

ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=120000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video = core.std.AssumeFPS(video, fpsnum=120000, fpsden=1001)>>Mark's.vpy
ECHO video.set_output()>>Mark's.vpy
vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -filter_complex "tinterlace=mode=drop_odd" -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-120fps-to-60fps.mkv


Of course, the problem could be with 'tinterlace=mode=drop_odd', so I tried it without 'tinterlace':

ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=120000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video = core.std.AssumeFPS(video, fpsnum=120000, fpsden=1001)>>Mark's.vpy
ECHO video.set_output()>>Mark's.vpy
vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-120fps.mkv

but it transcodes to 120fps instead of to 120/1.001fps. Anyone know why? I just can't see it.

You clearly cant read filter documentation. Drop odd mode of tinterlace filter drops odd fields.
While for some reason unknown to universe you expect it will make video into smaller fps.

First you invent problem that does not actually exist. Then you claim tool have issue.
And the only issue from start is you.

poisondeathray
17th February 2021, 16:25
You clearly cant read filter documentation. Drop odd mode of tinterlace filter drops odd fields.
While for some reason unknown to universe you expect it will make video into smaller fps.


You must not be awake yet, Paul

https://ffmpeg.org/ffmpeg-filters.html#tinterlace


‘drop_odd, 2’

Only output even frames, odd frames are dropped, generating a frame with unchanged height at half frame rate.


Drops odd frames, which implies keeps even frames

It also says "half frame rate" , which implies a lower fps

Also, in video world, non ffmpeg, frames are very different than fields.


What do you make of the rounding issue without any filters, without any containers ?

markfilipak
17th February 2021, 19:54
What do you [Paul Mahol] make of the rounding issue without any filters, without any containers ?

How can MKV affect PTS? PTS (and DTS) are part of the elemental stream, not part of the container. The following is my parse from an MPEG2 movie ('--' is a byte, '----' is a nibble, '[####.#]' is hex offset '.' bit offset). Look:

Ref: stnsoft.com/DVD/pes-hdr.html | ... PES_HEADER_EXTENSION__________________
PTS (presentation time stamp) | ... 31 00 01 5B C9 -- -- -- -- -- -- -- --
[0017] [0000] ????? | 0011 ---- ---- ---- ---- ---- ---- ---- ---- ----
[0017.4] [0000.4] PTS | ---- 000- 0000 0000 0000 000- 0101 1011 1100 100- ... = 11748; PTS = (11748)/(90000) seconds = 00:00:00.130533333
[0017.7] [0000.7] (marker bit) | ---- ---1 ---- ---- ---- ---- ---- ---- ---- ----
[0019.7] [0002.7] (marker bit) | ---- ---- ---- ---- ---- ---1 ---- ---- ---- ----
[001B.7] [0004.7] (marker bit) | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---1
DTS (decoding time stamp) | ... -- -- -- -- -- 11 00 01 09 AD -- -- --
[001C] [0005] ????? | 0001 ---- ---- ---- ---- ---- ---- ---- ---- ----
[001C.4] [0005.4] DTS | ---- 000- 0000 0000 0000 000- 0000 1001 1010 110- ... = 1238; DTS = (1238)/(90000) seconds = 00:00:00.013755555
[001C.7] [0005.7] (marker bit) | ---- ---1 ---- ---- ---- ---- ---- ---- ---- ----
[001E.7] [0007.7] (marker bit) | ---- ---- ---- ---- ---- ---1 ---- ---- ---- ----
[0020.7] [0009.7] (marker bit) | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---1


Am I misinterpreting things?

poisondeathray
17th February 2021, 20:49
How can MKV affect PTS? PTS (and DTS) are part of the elemental stream, not part of the container.

Am I misinterpreting things?



2 separate issues are being referred to

1) One is your original 120000/1001 vs. 120.0 fps issue . The input in my little test is clearly 119.88fps

Stream #0:0, 11, 1001/120000: Video: rawvideo (I420 / 0x30323449), yuv420p(progressive), 640x480, 119.88 fps, 120 tbr, 119.88 tbn, 119.88 tbc


But the output is rounded to 120fps -this is a null stream, no container

Stream #0:0, 0, 1/120: Video: wrapped_avframe, yuv420p(progressive), 640x480, q=2-31, 200 kb/s, 120 fps, 120 tbn


exerpt from -report

[graph 0 input from stream 0:0 @ 0000000afe895840] Setting 'frame_rate' to value '120/1'


Why is ffmpeg setting frame rate to 120/1 ? Over to Paul...



2) Second is the general issue of MKV container default 1/1000s timebase resulting in rounded timestamps. It's fine for playback. Not ok for other workflows with intermediates - potential for propogating errors

eg.

The same 24000/1001 video is encoded using MP4 container vs. MKV container

The resulting timestamps look like this

MKV

0
42
83
125
167
.
.
.


MP4

0
41.7083333333333
83.4166666666667
125.125
166.833333333333
.
.
.


Why is MP4 more precise? - Because of the MP4 timebase scale

Read this for the math
https://www.nmm-hd.org/newbbs/viewtopic.php?t=219&start=290#p10428

markfilipak
17th February 2021, 21:17
2) Second is the general issue of MKV container default 1/1000s timebase resulting in rounded timestamps. It's fine for playback. Not ok for other workflows with intermediates - potential for propogating errors

I confess that I don't know MKV, but what about this: http://forum.doom9.org/showthread.php?p=1936167?


Read this for the math
https://www.nmm-hd.org/newbbs/viewtopic.php?t=219&start=290#p10428

To me, that looks like lipstick on a pig.

If, in addition to the PES's 'PES_HEADER_EXTENSION', the MKV container also stores PTS (but truncated to milliseconds), then MKV is seriously flawed. But I find it hard to believe that MKV (or any container TS) does that. I can't say it doesn't because, as I said, I don't know MKV formatting, but I can say that it would be really strange.

Edit: I would say, stick with the PTSs as stored in the PES and ignore what MKV has in the TS (if, indeed, it does that).

markfilipak
17th February 2021, 23:39
vspipe --y4m 1.vpy - | ffmpeg -f yuv4mpegpipe -i - -an -f null NUL

Would you post '1.vpy' so I can replicate your findings?

poisondeathray
18th February 2021, 00:09
what about this: http://forum.doom9.org/showthread.php?p=1936167?


Not sure. How does it cover VFR situations ? e.g. smartphones video, webcams, etc.. Currently they are handled by external timestamps ("container") , not in the ES.





Would you post '1.vpy' so I can replicate your findings?

It's the same thing as 2.vpy without selecteven, or you can comment it out


import vapoursynth as vs
core = vs.get_core()
clip = core.std.BlankClip(format=vs.YUV420P8, length=240, color=[16, 128, 128])
clip = core.text.FrameNum(clip)
clip = core.std.AssumeFPS(clip, fpsnum=120000, fpsden=1001)
clip.set_output()

poisondeathray
18th February 2021, 00:40
For the 120fps vs. 120000/1001 - you can encode 1.vpy with other tools like x264cli, x265cli, it results in the proper 120000/1001 output. You can check the encoded framerate and timestamps with other tools, they all agree, even ffprobe/ffmpeg says the x264cli output is 119.88fps not 120fps

The ffmpeg " Setting 'frame_rate' to value '120/1' " I think is not intended behaviour

markfilipak
18th February 2021, 03:52
Regarding an MPEG2 PES,Not sure. How does it cover VFR situations ? e.g. smartphones video, webcams, etc.. Currently they are handled by external timestamps ("container") , not in the ES.
Hmmm... I checked a bunch of BDs & DVDs. Some extras and previews are VFR. A few DVD features are VFR if they start with a studio splash at 30fps -- assumed: That it was a "Home Video" splash jammed on for DVD but that wasn't seen in theaters.

The change is, of course, perfectly okay if the fps change happens at a keyframe. In fact, it can happen solely at keyframes.

Currently, I transcode for the main part of the feature or extra, not the opener or splash. I don't care about them. Often, I cut them out.

What I infer from what you write is that ffmpeg (and other tools) don't allow for VFR coming out of the decoder. Am I correct? If so, that's too bad and aught to be fixed. Putting framerate in the transport stream is a poor choice from an architectural point of view. Oh, well.

I understand what you mean now when you say that MKV is a bad choice. And I agree. I picked it solely because it's popular, everthing seems to play it, Handbrake & MKVToolNix, and people said to avoid MP4.

markfilipak
18th February 2021, 04:05
The ffmpeg " Setting 'frame_rate' to value '120/1' " I think is not intended behaviour

I'm no longer surprised by what passes for "intended behavior". I submitted the following

tinterlace broken - SAR & DAR wrong

ffmpeg -report -i source.mkv -vf "tinterlace=mode=merge" -c:a copy -c:s copy -dn tinterlace.mkv

I made source.mkv from a VOB:
ffmpeg -ss 1.00 -to 2.00 -i g:\VIDEO_TS\VTS_06_1.VOB -vf separatefields -c:a copy -c:s copy -dn source.mkv
That's why source.mkv is MPEG-4 AVC & 720x240 @ 60/1.001 FPS:
Stream #0:0: Video: h264 (High), yuv420p(tv, smpte170m, progressive), 720x240 [SAR 8:9 DAR 8:3], 59.94 fps, 59.94 tbr, 1k tbn, 119.88 tbc (default)

Therefore, tinterlace.mkv should be 720x480 @ 30/1.001 FPS [SAR 8:9 DAR 4:3] but it's not. tinterlace.mkv is:
Stream #0:0: Video: h264 (High), yuv420p(tv, smpte170m, top coded first (swapped)), 720x480 [SAR 16:9 DAR 8:3], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)

Though I've never done it before, I think I can force SAR & DAR, but tinterlace really needs to be fixed.

Thanks,
Mark.

and Paul said it was intended.

He is diddling SAR based, not on differential resampling of source pixels at a different sample aspect, but on what makes other things work -- at least, that's what I think (sort of offsetting penalties in various use-cases).

poisondeathray
18th February 2021, 04:41
I understand what you mean now when you say that MKV is a bad choice. And I agree. I picked it solely because it's popular, everthing seems to play it, Handbrake & MKVToolNix, and people said to avoid MP4.


I never said "bad choice" ; I said


I would avoid mkv if you want more accurate timestamps. mkv uses a timebase of 1/1000s so there is rounding and some jitter

It's perfectly fine for final playback purposes. Don't overlook the other advantages that MKV has over other containers in stream support, A/V format support, sub support, attachments, ordered chapters. There are pros/cons to everything.

markfilipak
18th February 2021, 08:06
I never said "bad choice" ...

Oops! Indeed, you did not. Kindly excuse me. I'm still attempting to determine the properties of the various TS containers. It's not an easy task as there's much contradictory info/opinions.

markfilipak
19th February 2021, 05:16
[MKV is] perfectly fine for final playback purposes. Don't overlook the other advantages that MKV has over other containers in stream support, A/V format support, sub support, attachments, ordered chapters. There are pros/cons to everything.

You are so far down the road I'm trudging... May I ask: What if I transcode to MP4 and then remux to MKV? Would that be the best of both worlds? Would that be the best solution in my quest for perfection?

poisondeathray
19th February 2021, 15:36
You are so far down the road I'm trudging... May I ask: What if I transcode to MP4 and then remux to MKV? Would that be the best of both worlds? Would that be the best solution in my quest for perfection?

Remux with mkvmerge or similar? - No difference in terms of timestamps, the end result will be the same without the MP4 step

markfilipak
19th February 2021, 23:46
Remux with mkvmerge or similar? - No difference in terms of timestamps, the end result will be the same without the MP4 step

Oh! I get it (I think). The problem isn't just that MKV has a 1 kHz timebase. It's that the ffmpeg filter pipeline also uses a 1 kHz TB. So, using a PES that has a 90 kHz TB wouldn't make any difference -- the resolution just isn't there.

Is that what you demonstated by writing to NULL? Do I have that right?

Oh, dear. I guess 1 kHz TB is baked into the decoder, right? If so, then there is no 'better' tool, or is there? Do all transcoding apps use the same decoders?

poisondeathray
20th February 2021, 01:03
Oh! I get it (I think). The problem isn't just that MKV has a 1 kHz timebase. It's that the ffmpeg filter pipeline also uses a 1 kHz TB. So, using a PES that has a 90 kHz TB wouldn't make any difference -- the resolution just isn't there.

Is that what you demonstated by writing to NULL? Do I have that right?

Oh, dear. I guess 1 kHz TB is baked into the decoder, right? If so, then there is no 'better' tool, or is there? Do all transcoding apps use the same decoders?




What you start with doesn't matter in this MKV tbn regard ("tbn" what ffmpeg labels the container timebase), as soon as you put it into MKV, you use the 1K tbn. It doesn't matter what you use to parse the MKV . It does not matter if you non-ffmpeg/libavcodec tools either

You would expect (or I expected from prior tests years past) there to be no difference with using MP4 step - and I retested it again today, then read the timestamps in the output MKV file, and it confirms no difference. Those little rounding differences are not a problem for regular end playback situations. You have to be superhuman to perceive some difference. But it can be an issue for intermediates and some types of workflows


NUL is partly to help avoid all the other variables. It's part of the "basic scientific method (TM)". Eliminate all the other confounding variables like filters, containers, audio etc.. eg. Maybe adding of subtitles screws up timing; Maybe muxing audio screws something else up, etc... Strip it down to the smallest elements that can reproduce the issue. The issue was the 120000/1001 to 120 fps change. So that's what you test. Don't go testing other stuff or adding extraneous things unless you find out it's contributing to the problem. For debugging nobody want to wait for libx265 to complete. Nobody wants to download a big file to test, unless it's actually part of the problem. If you can simplify everything, each test run observation goes faster. If you can reproduce with blankclip or something like testsrc2 in ffmpeg, all the better. Do some of the legwork - so if there is a real bug - the developer does not have to spend extra time working things out

markfilipak
26th February 2021, 03:57
Because of excellent help here -- thank you ChaosKing & lansing & poisondeathray -- I succeeded piping vspipe to ffmpeg.

Now, I need to go in the opposite direction. I did a ton of reading and head scratching, then I guessed (and failed twice).

What's wrong?

Failure #1
ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source=-)>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=60000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video.set_output()>>Mark's.vpy
ffmpeg -i INPUT.MKV -vf "...works.skipping..." -f rawvideo - | vspipe --y4m Mark's.vpy OUTPUT.MKV
...
Output #0, rawvideo, to 'pipe:':
Metadata:
encoder : Lavf58.65.101
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(tv, smpte170m, progressive), 240x236 [SAR 32:27 DAR 640:531], q=2-31, 16296 kb/s, 23.98 fps, 23.98 tbn (default)
Metadata:
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
BPS-eng : 642744
DURATION-eng : 00:00:05.739000000
NUMBER_OF_FRAMES-eng: 172
NUMBER_OF_BYTES-eng: 461089
_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-12-21 04:14:21
DURATION : 00:00:05.739000000
encoder : Lavc58.119.100 rawvideo
Script evaluation failed:
Python exception: invalid syntax (Mark's.vpy, line 2)

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2241, in vapoursynth.vpy_evaluateScript
File "Mark's.vpy", line 2
video = core.ffms2.Source(source=-)
^
SyntaxError: invalid syntax

av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipetime=00:00:00.04 bitrate=16296.2kbits/s speed=0.453x
frame= 1 fps=0.3 q=-0.0 Lsize= 83kB time=00:00:00.04 bitrate=16296.2kbits/s speed=0.0121x
video:83kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
Conversion failed!

Failure #2
ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source=-)>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=60000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video.output(OUTPUT.MKV)>>Mark's.vpy
ffmpeg -i INPUT.MKV -vf "...works.skipping..." -f rawvideo - | vspipe --y4m Mark's.vpy
...
Output #0, rawvideo, to 'pipe:':
Metadata:
encoder : Lavf58.65.101
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(tv, smpte170m, progressive), 240x236 [SAR 32:27 DAR 640:531], q=2-31, 16296 kb/s, 23.98 fps, 23.98 tbn (default)
Metadata:
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
BPS-eng : 642744
DURATION-eng : 00:00:05.739000000
NUMBER_OF_FRAMES-eng: 172
NUMBER_OF_BYTES-eng: 461089
_STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-12-21 04:14:21
DURATION : 00:00:05.739000000
encoder : Lavc58.119.100 rawvideo
av_interleaved_write_frame(): Invalid argument
Error writing trailer of pipe:: Invalid argument00:00:00.04 bitrate=16296.2kbits/s speed= 0.4x
frame= 1 fps=0.0 q=-0.0 Lsize= 83kB time=00:00:00.04 bitrate=16296.2kbits/s speed=0.18x
video:83kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
Conversion failed!

poisondeathray
26th February 2021, 04:40
Failure #1
[CODE]ECHO from vapoursynth import core>Mark's.vpy
ECHO video = core.ffms2.Source(source=-)>>Mark's.vpy
ECHO import havsfunc as havsfunc>>Mark's.vpy
ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=60000, NewDen=1001, GPU=True)>>Mark's.vpy
ECHO video.set_output()>>Mark's.vpy
ffmpeg -i INPUT.MKV -vf "...works.skipping..." -f rawvideo - | vspipe --y4m Mark's.vpy OUTPUT.MKV






ffmpeg raw pipe to vpy can be done with vsrawsource
https://github.com/HolyWu/vsrawsource/releases/

But vapoursynth usually is not used to write an output file directly without other libraries, typically you'd pipe to something else to write the final file (such has ffmpeg or similar)

It would look like this


ffmpeg -i "input.mkv" -vf..... -f rawvideo - | vspipe --y4m script.vpy - | ffmpeg -f yuv4mpegpipe -i - ..... "output.mkv"



Where the source filter in the vpy would look something like this. A rawvideo pipe require you to enter dimensions, pixel format, and framerate. yuv4mpegpipe does not. Since you're sending rawvideo from ffmpeg into the vpy script, you have to enter those parameters

video = core.raws.Source("-", width=1920, height=1080, src_fmt="YUV420P8", fpsnum=24000, fpsden=1001)



It would usually make more sense to do the filtering in vapoursynth since you're already using it for interframe, then to ffmpeg to write the final file . Piping back and forth adds overhead (slower, more memory consumption). A simplified workflow, fewer steps is generally preferred, unless there are some ffmpeg operations that you cannot emulate in vapoursynth

And if your desired output is in MKV container , it's still going to have a timebase of 1/1000s

markfilipak
26th February 2021, 06:12
ffmpeg raw pipe to vpy can be done with vsrawsource ...
Thanks for the push. Maybe I can get the rest of the way out of the ditch on my own. I'll try. I'm doing a lot of processing because the source was telecined, then a frame dropped back to 24fps, then a frame repeated back to 30fps... not by me, but I assume by a video engineer who did not have the intermediates -- originals had probably been discarded -- and the engineer needed to integrate the result in with a mix of other telecined material and NTSC video and 30fps progressive. It's a mess, but I can get the original 24fps with just a single frame that's field repeated at 60fps. Whew! I'll need to review the VS functions to see whether there's coverage of all the gymnastics I'm doing in ffmpeg. I doubt I'll be able to do it as, in the ffmpeg filter chain, I have to do a lot of intermediate 'setpts's and 'fps's to get the whole process to work out without mixing up the frame order.
And if your desired output is in MKV container , it's still going to have a timebase of 1/1000s
I would prefer to avoid 1kHz TB until the very end, and a suggestion how I can do that would be very welcome, but I suspect that the ffmpeg filter chain also uses 1kHz TB. I've not been successful getting an answer to the question of decoder/pipeline TB from the ffmpeg devs, and I don't know how to ascertain that answer on my own: I don't read 'C', and I don't know how to probe the filter pipeline.

I've noticed that, with all the processing I do (the gymnastics), the ffmpeg TB winds up being '23.98 tbn' in the stage just prior to interpolating to 60fps. :(

poisondeathray
26th February 2021, 06:49
I'm doing a lot of processing because the source was telecined, then a frame dropped back to 24fps, then a frame repeated back to 30fps... not by me, but I assume by a video engineer who did not have the intermediates -- originals had probably been discarded -- and the engineer needed to integrate the result in with a mix of other telecined material and NTSC video and 30fps progressive. It's a mess, but I can get the original 24fps with just a single frame that's field repeated at 60fps. Whew! I'll need to review the VS functions to see whether there's coverage of all the gymnastics I'm doing in ffmpeg. I doubt I'll be able to do it as, in the ffmpeg filter chain, I have to do a lot of intermediate 'setpts's and 'fps's to get the whole process to work out without mixing up the frame order.



It suspect it would be easier to do in vapoursynth or avisynth without all the pts gymnastics.



I would prefer to avoid 1kHz TB until the very end, and a suggestion how I can do that would be very welcome, but I suspect that the ffmpeg filter chain also uses 1kHz TB. I've not been successful getting an answer to the question of decoder/pipeline TB from the ffmpeg devs, and I don't know how to ascertain that answer on my own: I don't read 'C', and I don't know how to probe the filter pipeline.

I've noticed that, with all the processing I do (the gymnastics), the ffmpeg TB winds up being '23.98 tbn' in the stage just prior to interpolating to 60fps. :(



"-i INPUT.mkv"

When you start with MKV, you start with that 1/1000s timebase. If you're doing other operations that require precise timing instead of rounded timestamps....don't start with MKV. In ffmpeg, a vob from DVD-video , or .m2ts from BD has a tbn of 1/90000s. You can check/verify the timestamps after each step, each filter, by inserting a -vf showinfo . You can set null output and use -report -loglevel quiet

markfilipak
26th February 2021, 07:12
When you start with MKV, you start with that 1/1000s timebase. If you're doing other operations that require precise timing instead of rounded timestamps....don't start with MKV.
Oooooohhhh! I see. I get it now. FFmpeg is using what it's given, eh?

Well, I've been using MKV sources just for development. My eventual sources will all be VOBs and M2TSs.

BTW, ChaosKing included vsrawsource in his distro (which I jumped on), so I can use it 'out of the box' so to speak. :)

You guys have saved my life. I would have committed 'sewercide' by now if it wasn't for y'all.

flossy_cake
26th March 2024, 16:21
Is this bit correct in InterFrame2.avsi?


# Create SuperString
Preset == "Fastest" ? Eval("""
SuperString = "{pel:2,"
""") : Preset == "Fast" || Preset == "Faster" ? Eval("""
SuperString = "{pel:1,"
""") : Eval("""
SuperString = "{"
""")

Because...


"pel:" The accuracy of the motion estimation. Value can only be 1, 2 or 4. 1 means a precision to the pixel, 2 means a precision to half a pixel, 4 - to quarter pixel (not recommended to use).


It sounds like 4 is highest quality, 1 is lowest. I'm assuming by "quarter pixel" they mean subpixel precision?

By the way to anyone reading this who might be wondering how to get InterFrame working in 64-bit Avisynth+ without requiring SVPManager to be running just use the v4.2.0.142 dlls from the link above. InterFrame is basically just presets for SVPFlow - not that this diminishes its usefulness.

Then you can go something like...


InterFrame(GPU=true, tuning="film", preset="medium", Cores=8).Prefetch(8)

I'm not sure if I'm doing the multithreading correctly though, only tested with 576p files so far. My CPU and GPU barely breaking a sweat though - would like to crank up the quality more to see if artefacts can be mitigated further.

edit: okay increasing cores & prefetch to 8 makes 1080p possible now but still quite CPU heavy - I thought this was going to be mostly done on the GPU. Oh well it's still very cool, makes 576p25 streaming service Top Gear episodes look more like broadcast version.

DTL
26th March 2024, 20:06
"It sounds like 4 is highest quality, 1 is lowest. I'm assuming by "quarter pixel" they mean subpixel precision?"

Yes. Also performance greatly depends on pel value so fastest is pel=1 and slowest is pel=4 (quater size of MV length in the inter-samples virtual distance).