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. |
![]() |
#3061 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,497
|
It's really not. It can easily eat all the RAM you have when the script is initialized and it takes quite a lot of time for VS to release the excess memory so your computer is pretty much frozen. I've settled down for 10240 on my 16 GB system as I can just manage that with BD to 720p encodes.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
![]() |
![]() |
![]() |
#3063 | Link | |
Registered User
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 137
|
Quote:
PHP Code:
|
|
![]() |
![]() |
![]() |
#3064 | Link | |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 522
|
Quote:
Here is a much simpler script to reproduce: PHP Code:
|
|
![]() |
![]() |
![]() |
#3065 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 543
|
You could also use edi_rpow2.py https://gist.github.com/YamashitaRen...7524e794779d9c (or just copy the shifting code)
__________________
Search and denoise |
![]() |
![]() |
![]() |
#3066 | Link | |
Registered User
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 137
|
Quote:
PHP Code:
|
|
![]() |
![]() |
![]() |
#3067 | Link |
Registered User
Join Date: Oct 2009
Location: crow-land
Posts: 519
|
Yay, vapoursynth ffmpeg integration seems to be in its way.
http://ffmpeg.org/pipermail/ffmpeg-d...il/229137.html I also hold some hope for "for dummies" vapoursynth library build instructions leading to building of a static ffmpeg.exe (including python libs and any other dependencies) ... |
![]() |
![]() |
![]() |
#3068 | Link | |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 5,758
|
Quote:
To open .vpy-scripts you at least some sort of a Python (runtime) environment. Cu Selur Ps.: To open .avs-scripts you need the avisynth.dll (and dependencies). |
|
![]() |
![]() |
![]() |
#3069 | Link |
Registered User
Join Date: Oct 2009
Location: crow-land
Posts: 519
|
Ah. I'd hoped, since youtube-dl manages to do it resulting in a standalone .exe ...
For some, unless maybe it could use vapoursynth portable in the same folder, non-static would be as useful as teats on a bull ![]() Last edited by hydra3333; 28th April 2018 at 07:07. |
![]() |
![]() |
![]() |
#3070 | Link | |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 5,758
|
Quote:
Yes once could also wrap a whole hdd this way and create one large binary, but that isn't statically compiling that is basically the same thing Mac does with it's .app files. (Provide mostly standalone packages which are basically a folder structure which contains dependencies&co.) Cu Selur |
|
![]() |
![]() |
![]() |
#3071 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 543
|
Is it possible to compare the value of f.props.PlaneStatsAverage in a FrameEval function with the previous and the next frame (n-1 and n+1)? Sould I use get_frame_async() for that?
Code:
def g(n, f, clip, d_clip): clip=clip.text.Text("current: "+ f.props.PlaneStatsAverage) clip=clip.text.Text("\nPrev: "+ ???) clip=clip.text.Text("\n\nNext: "+ ???) return clip clip = clip.std.FrameEval(functools.partial(g, d_clip=d_clip, clip=clip), prop_src=x) This works but feels more like a hack. Code:
x= clip.std.PlaneStats() x1= clip.std.PlaneStats().std.DuplicateFrames(0) #prev x2= clip.std.PlaneStats().std.Trim(1) #next clip = clip.std.FrameEval(functools.partial(g, d_clip=d_clip, clip=clip), prop_src=[x, x1, x2])
__________________
Search and denoise Last edited by ChaosKing; 30th April 2018 at 01:11. |
![]() |
![]() |
![]() |
#3072 | Link | |
Quality Checker
Join Date: Aug 2013
Posts: 218
|
Quote:
__________________
I love Doom9 |
|
![]() |
![]() |
![]() |
#3073 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 1,885
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#3074 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,757
|
@ amayra:
Users will probably not benefit directly from debugging switches, because users will usually prefer the fastest possible execution. You may have read that these additional runtime checks will "have a big impact on performance" (see your quote), which means that it will run a lot slower and report a lot of warnings, even of less probable conditions. But if a developer can use this mode to discover risky code and fix bugs (possibly even before they cause noticeable issues), then users may benefit indirectly from an advanced release build. |
![]() |
![]() |
![]() |
#3075 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 543
|
@Myrsloik
Ok, thx. I found a strange behaviour while playing with FrameEval func. The very same function gives different output if it's called within FrameEval. Is it a bug or did I miss something? Here's an animated gif of my problem (correct output is in the middle): ![]() And my script (You'll need also Single Precision MVTools https://github.com/IFeelBloated/vapo...h-mvtools-sf): Code:
import sys import os import functools import vapoursynth as vs import mvsfunc as mvf #https://github.com/HomeOfVapourSynthEvolution/mvsfunc/blob/master/mvsfunc.py import havsfunc as haf import mvmulti as mv #https://github.com/IFeelBloated/vapoursynth-mvtools-sf/blob/master/src/mvmulti.py import fvsfunc as fvf #https://github.com/Irrational-Encoding-Wizardry/fvsfunc/blob/master/fvsfunc.py core = vs.get_core() def myFilter(clip): pre = haf.SMDegrain(clip, tr=2, pel=2, contrasharp=False, thSAD = 1200, thSADC = 1200, prefilter=2) pre = pre.flux.SmoothT(temporal_threshold=6) pre = haf.DitherLumaRebuild(pre, s0=1) pre = fvf.Depth(pre, 32, range_in=1) clip = mvf.Depth(clip, 32) super = core.mvsf.Super(pre,16,16,1,0) vectors = mv.Analyze(super, blksize=16, overlap=8, search=4, tr=6) super = core.mvsf.Super(clip,16,16,1,1) blur_clip = mv.DegrainN(clip, super, vectors, thsad=600, tr=6) grain = blur_clip.grain.Add(var=1200.0, constant=True)#.std.BoxBlur(hradius=1, hpasses=1, vradius=1, vpasses=1) #return grain diff_clip = core.std.Expr([clip, blur_clip], 'x y - abs').std.Inflate(threshold=200/255).std.Inflate(threshold=200/255) mask_clip = diff_clip.std.Binarize(threshold=[3.3/219, 3.3/224], v0=0, v1=80/255) clip = core.std.MaskedMerge(clipa=blur_clip, clipb=grain, mask=mask_clip) return mvf.Depth(clip, 8) clip = core.std.BlankClip(format=vs.YUV420P8, width=120*2, height=80*2, length=100, color=[206,235,135]) g_static = clip.grain.Add(var=100.0, constant=True) g_dynamic = clip.grain.Add(var=100.0, constant=False) clip = core.std.StackHorizontal([ core.std.StackVertical([g_static, g_static]), core.std.StackVertical([g_static, g_dynamic]) ]) goal = core.std.StackHorizontal([ core.std.StackVertical([g_static, g_static]), core.std.StackVertical([g_static, g_static]) ]) orig=clip def asd(n, c): return myFilter(c) feval = clip.std.FrameEval(functools.partial(asd, c=clip)) def comp(a, b, crop=0): return core.std.StackHorizontal([ core.std.CropRel(a, crop,crop,0,0), \ core.std.CropRel(b, crop,crop,0,0), \ ]) nofeval = myFilter(clip) clip = comp(feval.text.Text("Function inside FrameEval").std.AddBorders(right=2), nofeval.text.Text("No FrameEval").std.AddBorders(right=2), crop=0) clip = comp(clip, orig.text.Text("unfiltered"), crop=0) clip.set_output()
__________________
Search and denoise Last edited by ChaosKing; 2nd May 2018 at 14:22. |
![]() |
![]() |
![]() |
#3076 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 1,885
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#3077 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 543
|
Seems it only happens if mvtools-sf is in the filter chain.
Edit: Is there a way (hack) to avoid this problem without modifying mvtools? I mean except putting it outside of FrameEval, bcs it's very slow and I need it only for many short scenes. I will report this bug to feisty2 but who knows when and if he's gonna fix it.
__________________
Search and denoise Last edited by ChaosKing; 2nd May 2018 at 14:50. |
![]() |
![]() |
![]() |
#3078 | Link |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 522
|
Generally I don't recommend invoking filters within FrameEval unless unavoidable, because that introduces extra overhead.
PHP Code:
|
![]() |
![]() |
![]() |
#3079 | Link | |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 543
|
Quote:
![]()
__________________
Search and denoise |
|
![]() |
![]() |
![]() |
#3080 | Link |
Registered User
Join Date: Aug 2006
Location: Taiwan
Posts: 522
|
Sorry, the above sample was invalid. Because one called FrameEval but the other didn't, the comparison was not under fair condition. So here is another proper sample.
PHP Code:
|
![]() |
![]() |
![]() |
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|