Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
1st August 2017, 22:38 | #1 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
VapourSynth Available Plugins
I'm facing performance issues in Avisynth with MvTools2, which affects SMDegrain and FrameRateConverter, especially when using DCT=1 (where it freezes with MT), so I'm looking for workarounds.
Is MvTools2 stable with VapourSynth? I heard it is stable even with DCT=1. DCT=1 mode is extremely slow in Avisynth, but is the computation performance the same or has it been improved somehow? To consider VapourSynth, I have to look at my other needs, whether there are replacements. - Any updates on audio support? That was the main issue. - SMDegrain has been ported to VapourSynth, correct? - According to my tests, the best deshaker is Deshaker 3.1 for VirtualDub ... does that work with VapourSynth, or is there a better alternative? It's a bit hard to use but gives clearer outputs than any other I tested. - I use RoboCrop to auto-detect borders, is there a replacement for it? - FrameRateConverter and AvisynthShader haven't been ported to VapourSynth. Oh right... I wrote those. Sorry. So... how is VapourSynth on the above points? The main thing is audio, which might require running both VapourSynth and Avisynth in parallel, which could be an option too.
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 1st August 2017 at 23:12. |
1st August 2017, 23:16 | #2 | Link | |||||
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
Quote:
Quote:
Quote:
Is that how you are using it ? deshaker in avisynth ? or you can use intermediate file out of vdub/deshaker Quote:
|
|||||
2nd August 2017, 00:55 | #3 | Link | |||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
EDIT: Quote:
EDIT: Quote:
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 2nd August 2017 at 01:02. |
|||
2nd August 2017, 00:57 | #4 | Link | |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Quote:
At its core, it uses jm_fps script which has the same issues Code:
# Motion Protected FPS converter script by johnmeyer from Doom9 # Slightly modified interface by manolito # Requires MVTools V2 and RemoveGrain # Also needs fftw3.dll in the System32 or SysWOW64 folder function jm_fps(clip source, float "fps") { fps = default(fps, 25.000) fps_num = int(fps * 1000) fps_den = 1000 prefiltered = RemoveGrain(source, 22) super = MSuper(source, hpad = 16, vpad = 16, levels = 1) # one level is enough for MRecalculate superfilt = MSuper(prefiltered, hpad = 16, vpad = 16) # all levels for MAnalyse backward = MAnalyse(superfilt, isb = true, blksize = 16, overlap = 4, search = 3, dct = 0) forward = MAnalyse(superfilt, isb = false, blksize = 16, overlap = 4, search = 3, dct = 0) forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100) backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100) out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2) return out } Having to run parts in Avisynth and parts in Vapoursynth would just complicate things further and wouldn't really solve much. For Deshaker, it can run within Avisynth just fine. |
|
2nd August 2017, 02:39 | #5 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
DCT1 simply can't be further improved, fftw is doing all the dirty work when dct is on and it's slow as fuck (even tho it's already highly optimized, dft is just gonna take some time cuz it's complex)
You should bitch to the fftw folks |
2nd August 2017, 03:14 | #7 | Link | |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Quote:
When doing it in several segments and merging the files, I've seen cases where some frames were at the wrong location. I'm suspecting this to be due to when the script froze -- causing frame corruption somehow. Or maybe it's unrelated. "slow as f*ck", I don't mind. But when it uses 20% CPU at half the CPU's max frequency, I can't help but think it could be better. Is the problem related to MvTools or FFTW? I don't know. Perhaps MvTools2 issues should be resolved first (with DCT=0) before looking at improving the code passing through FFTW. With DCT=1, it uses internal code with BlkSize=8. We'll have to test whether those issues appear there. I haven't run that test yet.
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 2nd August 2017 at 03:19. |
|
2nd August 2017, 03:44 | #8 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Which avs version ? avisynth 64+ MT ? or have you tested "vanilla" MT yet ?
Does that occur with jm_fps + MT only ? can you reproduce it with that only? Or do you need FrameRateConverter ? The reason I ask is if you want to test it , the avs version has to be "translated" into equivalent "vapoursynth-ese" . (obviously, just running an avs script within vapoursynth will demonstrate nothing of value). And I probably can' t do the translation |
2nd August 2017, 04:14 | #9 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
mvtools got this little "temporal" parameter that requires a linear frame request, it's incompatible with multi threading and got removed in the VS versions (both jackoneill's and mine)
Maybe it was on in ur avs mt mess and got the shit all fucked up |
2nd August 2017, 06:58 | #10 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Yes , I can replicate the avisynth MT issue in this post , despite trying some manipulations like mod16 (1280x720 instead of 1288x720), tried reducing prefetch value etc.. . Crashes very quickly . Always.
https://forum.doom9.org/showthread.p...95#post1813995 It's stable in vpy with dct=1, 100% CPU usage . I only tested for a few minutes, but the crash in avs occurred everytime in seconds or less. But I used an image instead of colorbarshd() source (I don't see equivalent in vapoursynth), and removegrain mode=22 might be different. In the vpy documentation mode=22 is reported as "to do" , but I doubt those would make a big difference http://www.vapoursynth.com/doc/plugins/rgvs.html Code:
import vapoursynth as vs core = vs.get_core() clip = core.lsmas.LWLibavSource(r'F:\image720.png') clip = clip * 100000 clip = core.std.AssumeFPS(clip, fpsnum=30, fpsden=1) clip = core.resize.Bicubic(clip, format=vs.YUV420P8, matrix_s="709") prefiltered = core.rgvs.RemoveGrain(clip, mode=22) super = core.mv.Super(clip, hpad = 16, vpad = 16, levels = 1) superfilt = core.mv.Super(prefiltered, hpad = 16, vpad = 16) backward = core.mv.Analyse(superfilt, isb = True, blksize = 8, overlap = 4, search = 3, dct = 1) forward = core.mv.Analyse(superfilt, isb = False, blksize = 8, overlap = 4, search = 3, dct = 1) forward_re = core.mv.Recalculate(super, forward, blksize = 4, overlap = 2, thsad = 100) backward_re = core.mv.Recalculate(super, backward, blksize = 4, overlap = 2, thsad = 100) clip = core.mv.FlowFPS(clip, super, backward_re, forward_re, num = 60, den = 1, blend = False, ml = 200, mask = 2) # prefiltered = RemoveGrain(source, 22) # super = MSuper(source, hpad = 16, vpad = 16, levels = 1) # superfilt = MSuper(prefiltered, hpad = 16, vpad = 16) # all levels for MAnalyse # backward = MAnalyse(superfilt, isb = true, blksize = 8, overlap = 4, search = 3, dct = 1) # forward = MAnalyse(superfilt, isb = false, blksize = 8, overlap = 4, search = 3, dct = 1) # forward_re = MRecalculate(super, forward, blksize = 4, overlap = 2, thSAD = 100) # backward_re = MRecalculate(super, backward, blksize = 4, overlap = 2, thSAD = 100) # out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2) clip.set_output() Last edited by poisondeathray; 2nd August 2017 at 07:00. |
2nd August 2017, 07:10 | #12 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
(vpy is case sensitive, but I can be lazy with avisynth ) |
|
2nd August 2017, 07:18 | #13 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
I changed blksize of both manalyze to 16 and it's been running >10min with no slowdown |
|
2nd August 2017, 07:39 | #14 | Link | |
Registered User
Join Date: Jan 2016
Posts: 98
|
Quote:
I tried changing MRecalculate with the same blocksize and overlap you used in MAnalyse. This effectively prevents the crash in your script. Although it unfortunately is not what you intend to do, I hope this helps to find/fix a potential bug in MVTools pfmod. |
|
2nd August 2017, 07:57 | #15 | Link |
Registered User
Join Date: Jan 2012
Posts: 104
|
Error loading plugin libimwri
Newest Vapoursynth was installed from ppa on ubuntu 16.04.
Trying to load plufin imwrif, because autoload doesn't load it, gives error: PHP Code:
|
2nd August 2017, 17:46 | #16 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
As I look into the possibility of using VapourSynth in my encoding software, the next roadblock is that this requires Python: an extra 29.1MB download and component to maintain. For my software, this makes the list of dependencies too long: .NET, Avisynth, bunch of Avisynth plugins, and then adding Python and Python plugins would make the installer size grow much bigger. That's the 2nd reason why I haven't looked into VapourSynth yet.
|
2nd August 2017, 18:27 | #17 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
But I agree it's a big hassle maintaining all those versions, plugins, dependencies ; especially if you need a certain python version for other programs too |
|
2nd August 2017, 19:33 | #20 | Link | |
Registered User
Join Date: Feb 2016
Posts: 6
|
Quote:
So you could link your software to the VapourSynth library without the Python dependency depending on what you want to do with it. What is your encoding software where adding Python and VapourSynth is too big of an overhead? I can't imagine the existing installer is very small with .NET already in there. |
|
|
|