View Full Version : SVPflow motion interpolation (Avisynth + Vapoursynth, Linux, Mac?)
chainik_svp
25th March 2015, 13:01
circle positions are easily seen by halos from the cover/uncover mask
it's not an easy scene (and not a typical one) for MVs search
it just gives good explanation of different frame rendering modes
kaefert
25th March 2015, 14:09
hmm, yes okey. but one question - is there an additional red circle on the left/top of the blue one or is this only an artefact of the blue circles' red border moving?
lansing
15th April 2015, 06:55
chainik_svp you should update the svp installer package as well. I was using version 3.1.6 and it still uses the old svpflow plugin.
I was having issue with stuttering video playback on progressive video for a long time until I just found out that there's a update to the plugin today, and it fixes the issue.
chainik_svp
24th April 2015, 09:31
SVPflow 1.1.14
= up to 15% faster
= 2nd attempt to fix broken SVConvert function NOT fixed in 1.1.13
direct link (http://www.svp-team.com/files/gpl/svpflow-1.1.14.zip)
up to 15% performance improvement got mainly from the usage of Intel's compiler instead of VC++2013 (in versions 1.1.x) and VC++2003 (in versions 1.0.x)
Sparktank
24th April 2015, 09:42
This is wonderful news! I'm already enjoying the previous update so much.
Thanks for the update.
mark0077
24th April 2015, 11:06
Thanks Chainik!
SubJunk
24th April 2015, 23:23
Cool, thanks!
billqs
27th April 2015, 14:18
I'm attempting to use SVP along with madVR to scale and play 1080P & 720P videos at 2160p. I have a R9280x Radeon which unfortunately limits playback at 2160p to 30fps. Is there anyway I could get SVP to work in this situation? My Home Theater rig:
MSI Z79 Socket 2011 motherboard, i7 3820 3.6 CPU 16GB Ram. Result runs through a Denon X7200 Receiver and to my Sony 500ES 4k Projector. Any help would be appreciated.
kolak
27th April 2015, 16:03
Send HD 60p signal and let projector to do scaling.
billqs
28th April 2015, 00:19
Send HD 60p signal and let projector to do scaling.
Thanks. I do this quite a lot. I was told, however, that madVR can produce video equal in quality to lumagen video processors. The Sony projector does a great job for scaling except it introduces ringing for fake sharpness.
I am still experimenting with madVR settings, but even with settings not completely high, I'm getting a wonderful, sharp image without ringing.
All I'm missing is what I do enjoy about the Sony which is MotionFlow, which is why I want to use SVP. I'm under the assumption that SVP won't work with 30fps output which my AMD card is limited too. Is this correct?
marcellus
11th May 2015, 15:36
Hello SVP-Team,
Many thanks for your nice plugin!
I have some questions regarding SVPflow but let me explain first what I'm using it for. I have a chinese "GoPro-like" sport camera (in fact is this very one, bought under another brand name from Auchan: IronXCam DXG 5G9V HD (http://www.ironxcam.com/products_detail?sn=34&type=1) ) and want to stabilize what I shot from my chest mount. I record in 1280x960@29.970 FPS (camera is able to shot 1280x720@59.94 but it's not the widest angle available). I use SVP for motion analysis, then I convert the analysis in MVTools2 format, then I use MDepan and DepanStabilize to deshake it. To get rid of black borders I apply though DepanStabilize to another clip, obtained overlaying (with a blured mask) the original clip over a blured MSuper clip pel=1 resized to 1920x1080 (yes, creative use of hpad and vpad edge pixels repeating :) ). This way I shot two birds: get rid of distracting black border (I don't like the way Deshaker does it) and obtain a full HD clip. And while I am at it I finally use SVPflow to double the frame rate. All is then encoded with x264. I use AviSynth+ r1779 MT.
This is the script:
SetMemoryMax(1024)
global threads=2
SetFilterMTMode("DEFAULT_MT_MODE", 2)
SetFilterMTMode("FFVideoSource", 3)
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins\DePan.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins\svpflow1.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins\svpflow2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins\mvtools2.dll")
LoadCPlugin("C:\Program Files (x86)\AviSynth+\plugins\ffms2.dll")
source=FFVideoSource("C:\!Backup SD\CBLM 2015-04-25\FILE0006.mp4") #source is H,264 1280x960 30000/1001 FPS
source_blur=source.BicubicResize(32,24,1,0).BicubicResize(128,96,1,0) #blured + reduced source
super_blur=source_blur.MSuper(hpad=32,vpad=6,pel=1,levels=1,mt=true).BicubicResize(1920,1080,1,0) # MSuper of blured source with specific padding (for edge pixels repeating), blured further more and resized to 1920x1080
blur_mask=source.BlankClip(width=126,height=94,color=$FFFFFF).AddBorders(2, 2, 2, 2, color=$000000).ColorYUV(levels="TV->PC").BicubicResize(1300,980,1,0).Crop(10,10,1280,960,align=true).FreezeFrame(0,-1,0) # Soft blured mask for overlaying source over blured MSuper
combined=super_blur.Overlay(source,320,60,mask=blur_mask)
super_svp=source.SVSuper("{gpu:1}")
vectors_svp=super_svp.SVAnalyse("{}")
convert_svp=vectors_svp.SVConvert()
depan_data=source.MDepan(convert_svp,error=999,thSCD2=255,zoom=false,rot=false) # I have no scenes or zoom, and rotation is kind of incontrolable and annoying
stabilized=combined.DePanStabilize(depan_data,mirror=15,dxmax=320,dymax=60,zoommax=1,rotmax=0,cutoff=0.20,damping=1.00)
super_svp_60=stabilized.SVSuper("{gpu:1}")
vectors_svp_60=super_svp_60.SVAnalyse("{refine:[{}]}")
final=stabilized.SVSmoothFps(super_svp_60, vectors_svp_60, "{algo:1,cubic:1}", url="www.svp-team.com", mt=threads)
return final.Prefetch(threads)
"Before" clip frame:
http://i60.tinypic.com/jzwhlz.jpg
"After" clip frame:
http://i62.tinypic.com/2wc36ky.jpg
I like very much the result, there are little artifacts if you watch it frame by frame with a magnifying glass but nobody should judge this way.
But there is one problem: speed. Encoding runs at about 2.5 - 3.5 FPS (which is excruciating given the fact that I get double number of frames comparing to the original). What can I do to speed it up?
The main bottleneck is DepanStabilize, actually I managed to optimize the script for it with about 1-1.5 FPS because initially I was first doubled the frame rate and then stabilize it (getting ~1.5 FPS this way :( ). No wonder because Depan had to work on double number of frames. Aparently Depan is much slower at moving the picture to it's right place than it is SVPFlow at motion analyse + motion interpolated frame generation.
So my questions are:
1. SVPflow use any GPU for motion analysis? Because when I only do the SVAnalyse->SVConvert->MDepan->DePanStabilize step the GPU load is 0 (checking with GPU-Z) even though i have set {gpu:1}. Only when I throw in the frame doubling step GPU load shows some activity (5-6%).
2. Do the quality settings in NVidia driver Control Panel affect the speed/quality of the result? I tried some variations but I couldn't figure out for myself what is the reality for sure.
http://i57.tinypic.com/15hg5g8.png
http://i60.tinypic.com/2w33iuu.png
2. Because my clips have no scenes I want to disable completely scene detection and if possibly improve this way the motion detection / frame doubling speed or quality. What settings should I use?
3. Is there any way to use SVPflow or MVtools functions to replace DepanStabilize? Or could that functionality be implemented in SVPFlow / MVTools2 (yeah, I know, wishful thinking :) )
4. Rolling shutter problem, any way to deal with it? Some SVPFlow / MVTools tricks? It's kind of tolerable with my clips, as they are wide angle, but it would be nice to do something about it.
Many thanks again and best regards!
chainik_svp
11th May 2015, 22:18
marcellus
1. Nope. GPU is only active in SVFlowFps.
2. They shouldn't unless you're using some hardware decoder. All the video driver settings are for DXVA decoding only.
2. (again :D) Scene changes detection doesn't affect performance at all.
3,4. I have no idea :D
Try to figure out what is a real bottleneck in your script. What's the performance difference with removed DePanStabilize - "stabilized=combined"?
First option I'd play with is "subpixel - pixel interpolation accuracy (default = 2)". Setting this one to zero should help a lot.
chainik_svp
13th May 2015, 13:17
SVPflow 1.1.15
= fixed performance issues with the default main.search.coarse.width value (introduced in 1.1.12)
direct link (http://www.svp-team.com/files/gpl/svpflow-1.1.15.zip)
mark0077
13th May 2015, 19:31
Thanks Chainik
chainik_svp
15th May 2015, 23:12
64-bit build added under the same 1.1.15 version.
direct link (http://www.svp-team.com/files/gpl/svpflow-1.1.15a.zip)
This build is mainly for testing purposes.
It is (should be) fully functional, but it lacks some assembler code for up-/down-scaling in the super clip compared to the 32-bit version.
So the performance of SVSuper() may be hurt, especially with pel>=2 and upscaling method different from bilinear.
Luckily there's no point in measuring performance of standalone SVSuper() and usually it isn't a bottleneck in real processing chains.
Still this build seems to be faster (in some cases) than 32-bit one by up to 10-15%.
May be it's faster due to some bug ;)
Reel.Deel
15th May 2015, 23:45
64-bit build added under the same 1.1.15 version.
direct link (http://www.svp-team.com/files/gpl/svpflow-1.1.15a.zip)
This build is mainly for testing purposes.
It is (should be) fully functional, but it lacks some assembler code for up-/down-scaling in the super clip compared to the 32-bit version.
So the performance of SVSuper() may be hurt, especially with pel>=2 and upscaling method different from bilinear.
Luckily there's no point in measuring performance of standalone SVSuper() and usually it isn't a bottleneck in real processing chains.
Still this build seems to be faster (in some cases) than 32-bit one by up to 10-15%.
May be it's faster due to some bug ;)
Awesome, thank you very much for the x64 build. Will definitely test it out. One little feature request, any interest in adding a chroma (true/false) parameter? This would be useful on black and white clips.
chainik_svp
16th May 2015, 00:03
Reel.Deel
any interest in adding a chroma (true/false) parameter? This would be useful on black and white clips.
usefulness of what kind do you expect? performance / quality / both / smth else?
Reel.Deel
16th May 2015, 00:06
usefulness of what kind do you expect? performance / quality / both / smth else?
I would hope performance (MVTools has a chroma parameter and it's indeed faster when set to false). Also some people have said that chroma=false on greyscale clips does improve quality a bit, I have not tested this so I cannot confirm.
Morte66
26th June 2015, 16:29
Hi, I've been trying SvpAnalyse vectors with Medgrain. I get brief "blank clumps" in the output, usually around moving legs and near scene changes. These are not present with MAnalyse.
I'm using AviSynth 2.6.0 release and SVPFlow1.dll v2.0.3.0. I have had similar problems with earlier SVP releases.
I made a sample: https://dl.dropboxusercontent.com/u/80519209/AmeliaTest.zip
AmeliaTest.mkv is the input cut from my BluRay, the MVTools/SVP scripts and output files AmeliaTest.mvd.mkv/AmeliaTest.svp.mkv are included. You'll see the problem around the woman's legs as the clip opens and again at about the five second mark.
Here's the SVP script I'm using:
SetMemoryMax(1000)
SetMtMode(3,5)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("E:\zzzVideo\SVP Test\AmeliaTest.mkv")
SetMtMode(2)
AssumeFrameBased()
ColorYUV(levels="TV->PC")
#MDegrain(3)
SvpDegrain3()
return last
function SvpDegrain3(clip source) {
super = SVSuper(source,"{}")
v1=super.SVAnalyse("{block:{w:16,overlap:3}}")
v2=super.SVAnalyse("{block:{w:16,overlap:3},special:{delta:2}}")
v3=super.SVAnalyse("{block:{w:16,overlap:3},special:{delta:3}}")
bv3=v3.SVConvert(isb=true)
bv2=v2.SVConvert(isb=true)
bv1=v1.SVConvert(isb=true)
fv1=v1.SVConvert(isb=false)
fv2=v2.SVConvert(isb=false)
fv3=v3.SVConvert(isb=false)
sourceSuper = source.MSuper(pel=2, hpad=0, vpad=0, sharp=2)
MDegrain3(source, sourceSuper, bv1, fv1, bv2, fv2, bv3, fv3, thSAD=300)
}
function MDegrain3(clip source)
{
super = source.MSuper(pel=2, hpad=16, vpad=16, sharp=2)
backward_vec3 = MAnalyse(super, blksize=16, isb = true, delta = 3, overlap=8)
backward_vec2 = MAnalyse(super, blksize=16, isb = true, delta = 2, overlap=8)
backward_vec1 = MAnalyse(super, blksize=16, isb = true, delta = 1, overlap=8)
forward_vec1 = MAnalyse(super, blksize=16, isb = false, delta = 1, overlap=8)
forward_vec2 = MAnalyse(super, blksize=16, isb = false, delta = 2, overlap=8)
forward_vec3 = MAnalyse(super, blksize=16, isb = false, delta = 3, overlap=8)
MDegrain3(source, super, backward_vec1, forward_vec1, backward_vec2, forward_vec2, backward_vec3, forward_vec3, thSAD=300)
}
I wonder...
- Am I doing something wrong in my script to convert the vectors?
- If not, is there anything I should do with SVP parameters to tackle this issue?
- Does this happen to anybody else?
chainik_svp
27th June 2015, 12:46
Hmm...
First one is at the frame edge and 2nd one is right before scene change.
And both scene changes detection algorithm and handling of edges was significantly changed in SVPflow.
An investigation is required :)
chainik_svp
29th June 2015, 17:38
OK, the main reason is different SAD absolute values in MVs.
The next question is "why they're so different" but the quick solution is to adjust threshold values is MVTools (thSAD, thSCD1/2)
For instance, thSCD1=300 (instead of default value = 400) solves issues on scene changes.
Morte66
30th June 2015, 09:55
OK, the main reason is different SAD absolute values in MVs.
The next question is "why they're so different" but the quick solution is to adjust threshold values is MVTools (thSAD, thSCD1/2)
For instance, thSCD1=300 (instead of default value = 400) solves issues on scene changes.
Thanks chainik.
It seems setting ShSCD1 = 2*thSAD/3 is a solution to the sort of gross artifact that happens on frames 117-119. Wow, I've been using MDegrain for years and I never even looked at thSCD1 before. :eek:
But it doesn't solve the trailing edge seen from frame 0, unfortunately. [Unless I set thSCD1/2 so low that I'm getting a scene change on every frame, which switches off overall denoising.]
chainik_svp
8th July 2015, 19:05
Ver. 1.1.16
= fixed random crash in svpflow1.dll found by SVP 3.1.7 users
the fix may also affect motion vectors quality
link (http://www.svp-team.com/files/gpl/svpflow-1.1.16.zip)
Sparktank
9th July 2015, 12:03
Great work!
I'm already seeing significant improvement over last release.
This fix really improves quality.
I noticed (but haven't thoroughly tested) that the previous release ended up causing artefacting, more than usual.
Mostly just outlined artefacting. Quite severe compared to previous versions.
But now this fix, I can get back into even 60fps interpolation. :)
travolter
30th July 2015, 23:54
@Chainik
Really big thanks for the last updates!!! The performance is becoming better on each version thanks to the code optimizations.
Many coders rely on brute force and the classic reply: "buy new hardware".. few ones try to optimize nowadays.
Im oldie in the motion interpolation and I love when I need less cpu usage of my machine doing same tasks along these years ;)
tsk1979
10th September 2015, 10:03
In the changelog it says 64bit is available. But I am unable to find 64bit version on the download page. Any links?
chainik_svp
22nd February 2016, 15:43
SVPflow 4 (rev.128)
The libraries from upcoming multi-OS release of SVP 4.
The main difference is that both Avisynth and Vapoursynth plugins are built from the very same sources for all platforms.
So right now we have:
- Windows / Avisynth / 32 / 64
- Windows / Vapoursynth / 32 / 64
- Linux / Vapoursynth / 32 / 64
- Mac / Vapoursynth / 64 <===== soon
Now all the functions (SVSuper/SVAnalyse/SVSmoothFps) are compatible with MT mode 1.
Note that Linux ones built on Ubuntu 14.04 and as of now depend on Qt5 libs (Core, Network).
See the Vapoursynth sample script inside the arch.
link (http://www.svp-team.com/files/gpl/svpflow-4.0.0.128.zip)
mark0077
1st March 2016, 21:28
Thanks Chainik. Which would you personally recommend at this moment in time in terms of getting the most performance out of ones machine, avisynth (with mt mode 1) or vapoursynth. Are there any other changes in the latest version 4 over 3 that are worth updating for, ie quality improvements?
chainik_svp
3rd March 2016, 09:06
Vapoursynth seems much more efficient and stable in terms of multithreading, however the peak performance is the same as with Avisynth.
Picture quality is the same as with SVP ver.3.
bennynihon
10th March 2016, 18:30
Vapoursynth seems much more efficient and stable in terms of multithreading, however the peak performance is the same as with Avisynth.
Picture quality is the same as with SVP ver.3.
I'm trying to use the latest 64-bit SVPflow plugins with AVISynth and its complaining about no function SVConvert existing. This is version svp-4.0.0.128. And Avisynth has no trouble finding SVSuper and SVAnalyse, so its not as if the plugin dll isn't being found. Can you ensure this latest version actually has this SVConvert function, or if it's changed names? thanks!
FYI, the 32-bit version does in fact have SVConvert. So seems to be an issue limited to the 64-bit plugin.
amayra
27th March 2016, 15:32
can you give full list of new features ?
kolak
27th March 2016, 18:59
Vapoursynth seems much more efficient and stable in terms of multithreading, however the peak performance is the same as with Avisynth.
Picture quality is the same as with SVP ver.3.
No quality improvements? Shame:(
Alchemist OD (software version of their expensive hardware box) gained quality and now clearly outperforms SVP (for the cost of speed and resource requirements).
Also- is it just my imagination or SD content keeps much better quality than HD after SVP conversion (are there some internal compromises on SD+ frame sizes)?
Bloax
27th March 2016, 20:24
Also- is it just my imagination or SD content keeps much better quality than HD after SVP conversion (are there some internal compromises on SD+ frame sizes)?
HD content does contain more accurate data on what's actually going on, but this comes at the price of having to do many more calculations to come forward to the same results as SD.
And since pretty accurate motion estimation on SD is already pretty expensive, getting the same kind of quality in HD would be really demanding on the hardware.
kolak
27th March 2016, 23:21
For file conversions SVP speed is very good, so I'm happy with eg. 3x slower mode which will also keep relatively good quality on HD.
I'm happy to do some test- got access to K80 Tesla card :)
amayra
24th August 2016, 00:01
is this project is no long open source ?
Reel.Deel
24th August 2016, 00:17
is this project is no long open source ?
What makes you think that? From the SVP website:
(https://www.svp-team.com/w/index.php?title=Plugins:_SVPflow)
svpflow1
This is a motion vectors search plugin which is a refactored version of MVTools2 2.5 so this plugin is distributed under terms of the GNU GPL license.
svpflow2
A closed-source frame rendering plugin.
It has always been this way, as the documentation states, you can find the svpflow1 source code here: http://www.svp-team.com/files/gpl/svpflow1-src.zip
Floatingshed
22nd September 2016, 11:25
I am completely confused by this!
How do I use SVPflow to change fps from 60 to 50 without involving the GPU?
Thanks.
StainlessS
22nd September 2016, 12:47
Floaty, try Interframe if having problems, is simple. Just put dll's in Plugins and also the Interframe2.avsi script, then simple as
num=30000 # EDIT: or for 50FPS num=50 den=1
den=1001
Cores=4
Interframe(NewNum=num,NewDen=den,cores=Cores)
from Interframe2 script
function InterFrame(clip Input, string "Preset", string "Tuning", int "NewNum", int "NewDen", bool "GPU", string "InputType",
\ int "OverrideAlgo", int "OverrideArea", int "Cores", bool "FrameDouble") {
# Defaults
Preset = default(Preset , "Medium")
NewNum = default(NewNum , 0 )
NewDen = default(NewDen , 0 )
Tuning = default(Tuning , "Film" )
GPU = default(GPU , false )
InputType = default(InputType , "2D" )
OverrideAlgo = default(OverrideAlgo, 0 )
OverrideArea = default(OverrideArea, 0 )
FrameDouble = default(FrameDouble , false )
Floatingshed
22nd September 2016, 21:47
Hello, thanks for the suggestion, but I seem to have an unidentifiable issue with interframe.
I encode to h264 but the encode stops at random points each time, no obvious reason (sometimes after a few frames, sometimes after several minutes or an hour). If I use motionprotectedfps I have no problems, I could use this but was looking/hoping for a more modern filter with fewer artifacts...
StainlessS
22nd September 2016, 23:04
Just curious, does stop if rendering to lossless avi via for instance ut-vidio or magicyuv ?
Floatingshed
23rd September 2016, 08:11
No it doesn't, in fact that is how I have been getting around it, render to lossless then run a second process to convert the lossless to h264. I am guessing that it is a memory issue but there's nothing obvious (to me anyway!)
StainlessS
23rd September 2016, 14:32
@FloatingShed, Could this perhaps be related to you issue:- http://forum.doom9.org/showthread.php?t=173908
Perhaps get together and compare systems.
EDIT: I dont know what SVP player is.
EDIT: Full quote.
This is some serius annoying troubel ive had lately on svp player, ive removed ervreything and did a fresh re-install of the whoe package but for some reason after like 3 seconds of playing on media player classic, the entire danm thing freezes up.
amayra
30th September 2016, 10:06
What makes you think that? From the SVP website:
(https://www.svp-team.com/w/index.php?title=Plugins:_SVPflow)
It has always been this way, as the documentation states, you can find the svpflow1 source code here: http://www.svp-team.com/files/gpl/svpflow1-src.zip
svpflow1 in svp-team in website is 4.0.0.128 and in "SVP 4\plugins" have 4.0.0.132
Reel.Deel
8th April 2017, 04:48
@chainik_svp
According to the changelog here (https://www.svp-team.com/wiki/Changelog), there's been a handful of updates to SVPflow. The first post and the the download section of the SVP wiki still list version 4.0.0.128. :confused:
SVPflow - 4.1.0.141 - 2017-04-05
= fixed high CPU load with frame interpolation off
SVPflow - 4.1.0.140 - 2017-03-03
+ rendering in 10 bit color depth (Vapoursynth only)
SVPflow - 4.0.0.137 - 2016-08-25
= fixed random crash in mpv and VLC
SVPflow - 4.0.0.136 - 2016-08-18
= fixed video corruption with smooth.cubic=0
SVPflow - 4.0.0.135 - 2016-04-30
= Win: fixed random crash in some cases
SVPflow - 4.0.0.132 - 2016-03-18
- Win: dropped legacy Avisynth 2.5 interface support
+ Win: added SVConvert function in 64-bit version
SVPflow - 4.0.0.131 - 2016-03-04
= Mac: initial public release
- Linux: removed Qt dependencies
SVPflow - 4.0.0.130 - 2016-02-27
= may fix crashes in some cases
= fixed wrong colors in SVPlight
SVPflow - 4.0.0.129 - 2016-02-23
= fixed crash with SVPlight enabled
kolak
8th April 2017, 23:03
Looks like anything above 4.0.0.128 is not available for download.
https://www.svp-team.com/wiki/Plugins:_SVPflow
still shows 4.0.0.128 as latest version for download.
cork_OS
9th April 2017, 10:03
Here are svpflow libs from the latest SVP4 update: https://www.dropbox.com/s/9wjx4uq07sgy9qw/SVP4-svpflow.zip?dl=0
Selur
17th April 2017, 19:11
@cork_OS: do you also have the latest libs for Vapoursynth?
cork_OS
17th April 2017, 23:27
@cork_OS: do you also have the latest libs for Vapoursynth?
No, but MysteryX have just asked (http://www.svp-team.com/forum/viewtopic.php?pid=64786#p64786) Chainik to update the libs:
Nothing can stop anyone to take .dll/.so/.dylib from the SVP installation ;)
But I agree that it should be updated. We'll do it soon enough...
However there's nothing useful in the Avisynth part since rev.128
Selur
9th July 2017, 10:04
Using:
# Imports
import os
import sys
import ctypes
Dllref = ctypes.windll.LoadLibrary("G:/Hybrid/vsfilters/Support/libfftw3f-3.dll")
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("G:/Hybrid/vsfilters/Support/OpenCL.dll")
import vapoursynth as vs
core = vs.get_core()
# Import scripts folder
scriptPath = 'G:/Hybrid/vsscripts'
sys.path.append(os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/FrameFilter/Interframe/svpflow2_vs64.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/FrameFilter/Interframe/svpflow1_vs64.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/DenoiseFilter/FFT3DFilter/vsfft3dfilter.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/DenoiseFilter/KNLMeansCL/KNLMeansCL.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/ResizeFilter/NNEDI3/libnnedi3.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/Support/temporalsoften.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/SourceFilter/FFMS2/ffms2.dll")
# Import scripts
import havsfunc as havsfunc
# Loading C:\Users\Selur\Desktop\source.avi using FFMS2
clip = core.ffms2.Source(source="C:/Users/Selur/Desktop/source.avi",cachefile="H:/Temp/avi_3ed4c33894e101eeafef5c603ca7faab_4827.ffindex",format=vs.YUV422P8,alpha=False)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg")
# making sure input color range is set to TV (16-235) scale.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# setting field order to what QTGMC should assume
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=True)
# adjusting frame count with Interframe/SVP
clip = havsfunc.InterFrame(clip, NewNum=60, NewDen=1)
# Output
clip.set_output()
I get a 'Python exception: SVSuper: Clip must be YV12' since I wanted to stick with 4:2:2 for the output I was wondering:
What would be the most lossless way to apply Interframe/SVP and getting 4:2:2 as output?
Cu Selur
MysteryX
10th July 2017, 02:33
SVP supports only YV12. If you want to use it, you need to convert to YV12 and can then convert back to YV16 if you want.
Alternatively, my implementation FrameRateConverter (https://forum.doom9.org/showthread.php?p=1810223#post1810223) supports YV16 or YV24, but is much slower especially with multi-threading -- but with considerably better quality.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.