Log in

View Full Version : Vapoursynth


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 [72] 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

Myrsloik
3rd October 2019, 22:01
R48-test1 64bit (https://www.dropbox.com/s/njngo2q2z1rsd87/VapourSynth64-R48-test1.exe?dl=1)

Changes:
r48:
it's now possible to select which optimized code path is used for internal filters (sekrit-twc)
avx2 optimization in many filters, previously the internal ones were mostly sse2 (sekrit-twc)
expr filter can now better optimize expressions (sekrit-twc)
the portable version now includes all the plugins bundled with the normal installer again

Go test it so there can be a faster release soon. Should fix all known bugs in merge filters.

Btw, official audio support is probably coming soon as well.

poisondeathray
3rd October 2019, 22:09
Overlay / maskedmerge works as expected now with R48test1

Great to "hear" :D about the upcoming audio support

_Al_
4th October 2019, 01:29
Btw, official audio support is probably coming soon as well.
Christmas is coming early this year? :) ,wow

~ VEGETA ~
4th October 2019, 03:49
I have this problem: https://imgur.com/a/76QEOYb

My system is windows 10 pro x64 with vapoursynth x64 the 47.2 version (latest from website).

Seems like Tcanny and EEDI3 can't be loaded for some reason.

~ VEGETA ~
4th October 2019, 11:11
Does the latest NNEDI3CL load successfully?

Here is the log:


/!\ Only Plugins and no Scripts are tested /!\
VapourSynth Video Processing Library
Copyright (c) 2012-2019 Fredrik Mellbin
Core R47
API R3.6
Options: -


OS: Microsoft Windows 10 Pro
Is 64Bit OS?: True
CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
CPU Cores: 8

Python location: C:\python37\python.exe
Loaded VapourSynth dll: C:\python37\lib\site-packages\vapoursynth.dll

Found an installation in HKEY_LOCAL_MACHINE\SOFTWARE\VapourSynth
- Path: C:\Program Files\VapourSynth
- PythonPath: C:\python37\
- Version: R47.2

============================================================

Checked Plugins: 54, Notices: 5, Errors: 2

Plugin Paths:
• C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64
• C:\Program Files\VapourSynth\plugins


🔥 Error unknown:
------------------------------------------------------------
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\EEDI3m.dll
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\TCanny.dll


🤨 Unidentified DLLs (maybe also Plugin dependencies?):
------------------------------------------------------------
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\cudart64_80.dll
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\libfftw3-3.dll
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\libfftw3f-3.dll
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\libmfxsw64.dll
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\w2xc.dll


👍 Successfully loaded Plugins:
------------------------------------------------------------
AddGrain.dll
Bilateral.dll
BM3D.dll
CTMF.dll
d2vsource.dll
DCTFilter.dll
Deblock.dll
DFTTest.dll
DGMVCSourceVS.dll
EdgeFixer.dll
EEDI2.dll
ffms2.dll
fft3dfilter.dll
FFTSpectrum.dll
flash3kyuu_deband.dll
fmtconv.dll
KNLMeansCL.dll
libawarpsharp2.dll
libbifrost.dll
libdecross.dll
libdescale.dll
libfluxsmooth.dll
libhqdn3d.dll
libmedian.dll
libmsmoosh.dll
libmvtools.dll
libmvtools_sf_em64t.dll
libnnedi3.dll
libsangnom.dll
libtcomb.dll
libtedgemask.dll
LSMASHSource.dll
NNEDI3CL.dll
Retinex.dll
RGSF_x64.dll
TColorMask.dll
TDeintMod.dll
tonemap.dll
TTempSmooth.dll
vapoursynth-dpid.dll
VSFilter.dll
VSFilterMod.dll
vslsmashsource.dll
vsznedi3.dll
Waifu2x-w2xc.dll
xy-VSFilter.dll
Yadifmod.dll




So I guess yes it does but what about TCanny also? and why this issue to begin with since the dlls are there?

ChaosKing
4th October 2019, 11:33
Here is the log:


/!\ Only Plugins and no Scripts are tested /!\
VapourSynth Video Processing Library
Copyright (c) 2012-2019 Fredrik Mellbin
Core R47
API R3.6
Options: -


OS: Microsoft Windows 10 Pro
Is 64Bit OS?: True
CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
CPU Cores: 8

Python location: C:\python37\python.exe
Loaded VapourSynth dll: C:\python37\lib\site-packages\vapoursynth.dll

Found an installation in HKEY_LOCAL_MACHINE\SOFTWARE\VapourSynth
- Path: C:\Program Files\VapourSynth
- PythonPath: C:\python37\
- Version: R47.2

============================================================

Checked Plugins: 54, Notices: 5, Errors: 2

Plugin Paths:
• C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64
• C:\Program Files\VapourSynth\plugins


�� Error unknown:
------------------------------------------------------------
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\EEDI3m.dll
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\TCanny.dll


�� Unidentified DLLs (maybe also Plugin dependencies?):
------------------------------------------------------------
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\cudart64_80.dll
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\libfftw3-3.dll
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\libfftw3f-3.dll
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\libmfxsw64.dll
C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\w2xc.dll


�� Successfully loaded Plugins:
------------------------------------------------------------
AddGrain.dll
Bilateral.dll
BM3D.dll
CTMF.dll
d2vsource.dll
DCTFilter.dll
Deblock.dll
DFTTest.dll
DGMVCSourceVS.dll
EdgeFixer.dll
EEDI2.dll
ffms2.dll
fft3dfilter.dll
FFTSpectrum.dll
flash3kyuu_deband.dll
fmtconv.dll
KNLMeansCL.dll
libawarpsharp2.dll
libbifrost.dll
libdecross.dll
libdescale.dll
libfluxsmooth.dll
libhqdn3d.dll
libmedian.dll
libmsmoosh.dll
libmvtools.dll
libmvtools_sf_em64t.dll
libnnedi3.dll
libsangnom.dll
libtcomb.dll
libtedgemask.dll
LSMASHSource.dll
NNEDI3CL.dll
Retinex.dll
RGSF_x64.dll
TColorMask.dll
TDeintMod.dll
tonemap.dll
TTempSmooth.dll
vapoursynth-dpid.dll
VSFilter.dll
VSFilterMod.dll
vslsmashsource.dll
vsznedi3.dll
Waifu2x-w2xc.dll
xy-VSFilter.dll
Yadifmod.dll




So I guess yes it does but what about TCanny also? and why this issue to begin with since the dlls are there?


Are you using the integrated graphics card? you're probably missing the OpenCL dependency. https://software.intel.com/en-us/articles/opencl-drivers

~ VEGETA ~
4th October 2019, 12:49
As for openCl, I installed the latest driver and still the same log file and errors appear.

Here is one of the messages: https://imgur.com/a/76QEOYb

Problematic stuff is in Tcanny.dll and EEDI3m.dll

Also, after updating the plugins and scripts... and using havfunc's aaf function, I get this:


Failed to evaluate the script:
Python exception: int() argument must be a string, a bytes-like object or a number, not 'list'

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 1946, in vapoursynth.vpy_evaluateScript
File "src\cython\vapoursynth.pyx", line 1947, in vapoursynth.vpy_evaluateScript
File ".....\ep02.vpy", line 21, in
#aa = haf.aaf(grain)
File ".....\Python\Python37\site-packages\havsfunc.py", line 5149, in aaf
return core.rgvs.Repair(aa, inputClip, mode=[repMode])
File "src\cython\vapoursynth.pyx", line 1832, in vapoursynth.Function.__call__
File "src\cython\vapoursynth.pyx", line 648, in vapoursynth.typedDictToMap
TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'



while it worked perfectly before with the same script.

So I have these 2 problems.

patxitron
4th October 2019, 12:59
http://vapoursynth.com/doc/installation.html#linux-and-os-x-compilation-instructions:


https://packages.ubuntu.com/bionic/cython:


That is your problem. Update Cython. Or just scroll up a little bit where VapourSynth is now available directly through pip.

Ok I see. However, I think the configure script should check the correct version.


checking for cython3... cython3


Best regards.

ChaosKing
4th October 2019, 13:08
As for openCl, I installed the latest driver and still the same log file and errors appear.

Here is one of the messages: https://imgur.com/a/76QEOYb


Could you first run this in cmd or powershell? I would like to know what the error code / error msg is:

python -c "import vapoursynth; c=vapoursynth.core; c.std.LoadPlugin(r'C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\EEDI3m.dll')"
python -c "import vapoursynth; c=vapoursynth.core; c.std.LoadPlugin(r'C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\TCanny.dll')"

~ VEGETA ~
4th October 2019, 13:45
Could you first run this in cmd or powershell? I would like to know what the error code / error msg is:

python -c "import vapoursynth; c=vapoursynth.core; c.std.LoadPlugin(r'C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\EEDI3m.dll')"
python -c "import vapoursynth; c=vapoursynth.core; c.std.LoadPlugin(r'C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\TCanny.dll')"



Traceback (most recent call last):
File "<string>", line 1, in <module>
File "src\cython\vapoursynth.pyx", line 1852, in vapoursynth.Function.__call__
vapoursynth.Error: Failed to load C:\Users\hossa\AppData\Roaming\VapourSynth\plugins64\EEDI3m.dll. GetLastError() returned 127.

~ VEGETA ~
4th October 2019, 13:50
Thanks. Fixed on github now.

can i update using vsrepo gui now?

ChaosKing
4th October 2019, 14:15
vsrepo can't update in realtime.

error 127 indicates that there is an appropriate DLL found but a required procedure export is missing. So maybe the "opencl requirements" for TCanny changed in the latest version? Or you need to install a different opencl version.

~ VEGETA ~
4th October 2019, 14:20
vsrepo can't update in realtime.

error 127 indicates that there is an appropriate DLL found but a required procedure export is missing. So maybe the "opencl requirements" for TCanny changed in the latest version? Or you need to install a different opencl version.

Ok, i will update the script manually.

As for opencl, I installed latest driver which should include latest opencl. what should i do now?

_Al_
6th October 2019, 18:00
Doing numpy operations I discovered that returning frame from within ModifyFrame() could be numpy image and vapoursynth does not object at all. Or rather to say it is vapoursynth type of object, but they are the same. So there is no need to copy image to a new frame using f.get_write_array(), which takes time. So for example with this simple numpy operation , drawing two cross lines into vapoursynth frame takes about 10 times faster.
this it with copying a new frame:
import vapoursynth as vs
from vapoursynth import core
import numpy as np
import timeit

def numpy_process(n,f):
start = timeit.default_timer()
fout = f.copy()
for p in range(3):
plane = np.asarray(f.get_read_array (p))
plane_out = np.asarray(fout.get_write_array(p))
#numpy operation with numpy image (two dimensional, because using one plane only)
plane[360,0:1280] = 255
plane[0:720,640] = 255
np.copyto(plane_out, plane)
print(timeit.default_timer()-start)
return fout
clip = core.std.BlankClip(width=1280, height=720, format = vs.RGB24)
clip = core.std.ModifyFrame(clip, clip, numpy_process)
clip.set_output()
times for rendering a frame:
0.0011401229999998819
0.0011680329999999017
0.0011924130000000588
0.001274217999999827
0.0011475010000001618
0.001175732000000096
then this code:
def numpy_process(n,f):
start = timeit.default_timer()
for p in range(3):
plane = np.asarray(f.get_read_array (p))
plane[360,0:1280] = 255
plane[0:720,640] = 255
print(timeit.default_timer()-start)
return f
clip = core.std.BlankClip(width=1280, height=720, format = vs.RGB24)
clip = core.std.ModifyFrame(clip, clip, numpy_process)
clip.set_output()
renders these times for frame:
0.00011035500000033949
0.00011580899999863448
0.00011709199999998532
0.00011292100000126482
0.00011163799999991397
0.00016841999999961388
0.0001109970000001681
Was surprised by that that those frames could be overwritten directly, is there some drawback?

Myrsloik
6th October 2019, 18:15
Memory corruption. Don't do it.

_Al_
6th October 2019, 18:17
I wanted to ask what it means, but I guess corruption means corruption, so it might fail. Thank you.

poisondeathray
7th October 2019, 02:15
Spoke too soon. Getting an overlay bug, probably related to mask in R48test1 . Works ok in R46, R47.2 . But in R48test1 it's discolored


orig = core.ffms2.Source(r'testchart.png')
ovr = core.ffms2.Source(r'rgba_overlay.png')

orig_10bit444 = core.resize.Bicubic(orig, format=vs.YUV444P10, matrix_s="709")
ovrf_10bit444 = core.resize.Bicubic(ovr[0], format=vs.YUV444P10, matrix_s="709", range_s="full")
ovrm_10bit444 = core.resize.Bicubic(ovr[1], format=vs.YUV444P10, matrix_s="709", range_s="full")

overl = haf.Overlay(orig_10bit444, ovrf_10bit444, mask=ovrm_10bit444)


Image assets
https://www.mediafire.com/file/hf27ncfihfjiee9/testchart%2Coverlay.rar/file

Myrsloik
7th October 2019, 09:38
Spoke too soon. Getting an overlay bug, probably related to mask in R48test1 . Works ok in R46, R47.2 . But in R48test1 it's discolored


orig = core.ffms2.Source(r'testchart.png')
ovr = core.ffms2.Source(r'rgba_overlay.png')

orig_10bit444 = core.resize.Bicubic(orig, format=vs.YUV444P10, matrix_s="709")
ovrf_10bit444 = core.resize.Bicubic(ovr[0], format=vs.YUV444P10, matrix_s="709", range_s="full")
ovrm_10bit444 = core.resize.Bicubic(ovr[1], format=vs.YUV444P10, matrix_s="709", range_s="full")

overl = haf.Overlay(orig_10bit444, ovrf_10bit444, mask=ovrm_10bit444)


Image assets
https://www.mediafire.com/file/hf27ncfihfjiee9/testchart%2Coverlay.rar/file

Does it work if you add core.std.SetMaxCPU("none") to the top of the script?

poisondeathray
7th October 2019, 14:27
Does it work if you add core.std.SetMaxCPU("none") to the top of the script?

Yes . Do you have to specify it manually now , no autodetection ?

This was on a Haswell with AVX2 only

DJATOM
7th October 2019, 16:22
Yes . Do you have to specify it manually now , no autodetection ?

This was on a Haswell with AVX2 only

No, auto-detection is still works, but now we can set lower instruction set (or fallback to C routines) on purpose. For example, if there are some bugs with avx2 optimizations, you can fallback to slower but well working functions.

Myrsloik
9th October 2019, 11:06
Several bugs were found already. Will post a new build soon when they're fixed. Apparently Expr is broken too in some cases.

poisondeathray
9th October 2019, 16:17
Several bugs were found already. Will post a new build soon when they're fixed. Apparently Expr is broken too in some cases.

Was it from any of the Expr AVS+ code from pinterf? If so, is AVS+ affected too ?

Myrsloik
9th October 2019, 18:36
Was it from any of the Expr AVS+ code from pinterf? If so, is AVS+ affected too ?

No and no. Also it could be a bug in the expression itself now that we've investigated it a bit...

_Al_
10th October 2019, 04:48
about wrapping/decorating vapoursynth core functions:
import vapoursynth as vs
from vapoursynth import core
import functools
clip = core.std.BlankClip(width=640, height=360, format=vs.YUV420P8)

def CropAbs_extra(f):
@functools.wraps(f)
def wrapper(*args, **kwargs):
print('some extra work')
return f(*args, **kwargs)
return wrapper

#this does not work:
#core.std.CropAbs = CropAbs_extra(core.std.CropAbs)
#clip = core.std.CropAbs(clip, 360,240, 0,0) #to crop + some extra work
#AttributeError: 'vapoursynth.Plugin' object has no attribute 'CropAbs'

#this works but script lines would need to be rewritten:
temp = CropAbs_extra(core.std.CropAbs)
clip = temp(clip, 360,240, 0,0) #to crop + some extra work
I edited code above, because it did not work before.
Is there any way to keep :
clip = core.std.CropAbs(clip, 360,240, 0,0) and use a wrapper to it?
Thanks.

this does not work also:
setattr(core.std, 'CropAbs', CropAbs_extra(core.std.CropAbs))
#AttributeError: 'vapoursynth.Plugin' object has no attribute 'CropAbs'

jackoneill
10th October 2019, 22:34
about wrapping/decorating vapoursynth core functions:
import vapoursynth as vs
from vapoursynth import core
import functools
clip = core.std.BlankClip(width=640, height=360, format=vs.YUV420P8)

def CropAbs_extra(f):
@functools.wraps(f)
def wrapper(*args, **kwargs):
print('some extra work')
return f(*args, **kwargs)
return wrapper

#this does not work:
#core.std.CropAbs = CropAbs_extra(core.std.CropAbs)
#clip = core.std.CropAbs(clip, 360,240, 0,0) #to crop + some extra work
#AttributeError: 'vapoursynth.Plugin' object has no attribute 'CropAbs'

#this works but script lines would need to be rewritten:
temp = CropAbs_extra(core.std.CropAbs)
clip = temp(clip, 360,240, 0,0) #to crop + some extra work
I edited code above, because it did not work before.
Is there any way to keep :
clip = core.std.CropAbs(clip, 360,240, 0,0) and use a wrapper to it?
Thanks.

this does not work also:
setattr(core.std, 'CropAbs', CropAbs_extra(core.std.CropAbs))
#AttributeError: 'vapoursynth.Plugin' object has no attribute 'CropAbs'

I think it's a lot more work than you want, but you can replace vs.get_core with a function that returns a fake core, which will be a wrapper object around the real core:

import vapoursynth as vs
vs.get_core = function that returns fake core

import other, stuff

core = vs.get_core()
...


I'm not sure this actually works.

WolframRhodium
11th October 2019, 07:57
Agree with jackoneill, the cython part of VS prevents you from modifying attributes of "core" and its attribute "plugin". You should define your own "core" instead.

_Al_
11th October 2019, 16:06
thank you guys,
WolframRhodium thank you for the script, it might be over my head , I'll tackle it though, thank you

_Al_
11th October 2019, 16:44
At the end of vapoursynth2.py I put:
print(core.version())
if hasattr(core, 'ffms2'):
print('ffms2 is loaded')
else:
print('ffms2 is not loaded')
clip = core.ffms2.Source(video.mp4)
#clip = core.std.BlankClip(width=640, height=360)#BlankClip does not create VideoNode as well
if isinstance(clip, vs.VideoNode):
print('clip was created')
else:
print('clip is not vs.VideoNode')
def CropAbs_extra(f):
@functools.wraps(f)
def wrapper(*args, **kwargs):
print('working in wrapper')
return f(*args, **kwargs)
return wrapper
print(clip)
core.std.CropAbs = CropAbs_extra(core.std.CropAbs)
clip = core.std.CropAbs(clip, 360,240,0,0)
print(clip)
I got output:
VapourSynth Video Processing Library
Copyright (c) 2012-2018 Fredrik Mellbin
Core R45
API R3.5
Options: -

ffms2 is loaded
clip is not vs.videoNode
<__main__._VideoNode object at 0x00000000037B2A58>
so i t prints clip is a videonode but it does not work as a regular clip
But it does not throw any error trying to wrap that core.std.CropAbs function though, but also it is not in that wrapper.

Anyway , it might take a while to grasp it all.

WolframRhodium
12th October 2019, 00:50
Sorry for the confusion, for your code here (https://gist.github.com/WolframRhodium/3ca2342b7f27904db91bdc7ac4441e28) is a tiny example.

_Al_
12th October 2019, 01:44
Thank you so much.
So far I got quickly this together:

tinyvs.py:
import vapoursynth as vs
from vapoursynth import core as _vscore
import functools
class _Plugin:
def __init__(self, namespace):
self.__dict__.update((name, getattr(namespace, name)) for name in dir(namespace)) # func_name : func

class _Core:
def __init__(self):
self.__dict__.update((name, get_plugin(name)) for name in dir(_vscore)) # (namespace : (func_name : func)) or (attr_name : attr)

def get_plugin(name):
attr = getattr(_vscore, name)
if isinstance(attr, vs.Plugin):
return _Plugin(attr)
else:
return attr

core = _Core()

def CropAbs_extra(f):
@functools.wraps(f)
def wrapper(*args, **kwargs):
print('extra work with calling vs function')
c= f(*args, **kwargs)
return c
return wrapper

core.std.CropAbs = CropAbs_extra(core.std.CropAbs)

and actual script could be:
import importlib
import tinyvs
importlib.reload(tinyvs) #mandatory reload so wrapper always works

core = tinyvs.core

clip = core.std.BlankClip(width=640, height=360)
clip = core.std.CropAbs(clip, 360,240, 0,0)
output:
extra work with calling vs function
Thanks

_Al_
12th October 2019, 05:55
Looking at that tinyvs.py, ...,this is a magic. How can you come up with stuff like this ,:)
core object is not copied, not wrapped but instead its attributes, plugins dir is just forwarded/copied to a new object so domains can be hijacked in script but functionality is kept. :o

Cary Knoop
12th October 2019, 06:42
It must be me but I fail to see any benefit in overriding Vapoursynth core functions, I only see disadvantages.

WolframRhodium
12th October 2019, 09:32
Looking at that tinyvs.py, ...,this is a magic. How can you come up with stuff like this ,:)
core object is not copied, not wrapped but instead its attributes, plugins dir is just forwarded/copied to a new object so domains can be hijacked in script but functionality is kept. :o

I just want it to be tiny to show that it's possible. If you want certain level of safety, consider protections like using __getattr__ method to get attribute from "core".

_Al_
12th October 2019, 22:21
It must be me but I fail to see any benefit in overriding Vapoursynth core functions, I only see disadvantages.
you could branch to the whole lot of stuff, checking for correct cmd , returning error that is easier to understand, launch helper utility , program, gui for cropping and returning those values...

I just want it to be tiny to show that it's possible. If you want certain level of safety, consider protections like using __getattr__ method to get attribute from "core".
so would this be any safer?, I don't know really why. It just creates an attribute if needed:
import vapoursynth as vs
from vapoursynth import core as _vscore
import functools

class _Core:
def __getattr__(self, name):
attr = getattr(_vscore, name)
if isinstance(attr, vs.Plugin):
self.__dict__.update({name : _Plugin(attr)})
return _Plugin(attr)
else:
self.__dict__.update({name : attr})
return attr

class _Plugin:
def __init__(self, namespace):
self.__dict__.update((name, getattr(namespace, name)) for name in dir(namespace)) # func_name : func

def CropAbs_extra(f):
@functools.wraps(f)
def wrapper(*args, **kwargs):
print('in wrapper')
c = f(*args, **kwargs)
return c
return wrapper

core = _Core()
core.std.CropAbs = CropAbs_extra(core.std.CropAbs)
clip = core.std.BlankClip(width=640, height=360, format = vs.YUV420P8)
clip = core.std.CropAbs(clip, 360,240, 0,0)
at the moment I try to pass that vs.Plugin attribute to __getatttr__as well so it is _Plugin does not go thru the all namespace dir functions

Cary Knoop
12th October 2019, 22:32
you could branch to the whole lot of stuff, checking for correct cmd , returning error that is easier to understand, launch helper utility , program, gui for cropping and returning those values...

Sure, but the classical way is to use wrappers with your own functions.

Redefining API's to me is like writing a novel while changing the meaning of the words. It's possible, but what would be the point?

Please don't get me wrong, if you feel like doing it you certainly can, and if you want to do it don't let me stop you, but I personally think it is not a good idea. :)

_Al_
12th October 2019, 23:07
It might be a dumb idea, I don't deny it and dealing should be done using outputs only.

Myrsloik
12th October 2019, 23:21
If you really want to change the API that much it's a lot easier to just poke the cython code that generates the module directly. It's basically normal python with a few extensions.

Myrsloik
13th October 2019, 22:38
R48-test2 64bit (https://www.dropbox.com/s/arqbfygyynqvrmx/VapourSynth64-R48-test2.exe?dl=1)

Nothing new as such, just fixes all found regressions. Give it a try again. Speed comparisons with R46 also welcome.

Myrsloik
16th October 2019, 21:33
R48 RC1 (https://github.com/vapoursynth/vapoursynth/releases/tag/R48-RC1)

Go test it everywhere. Once again all known regressions have been fixed. Mask all the things!

r48:
it's now possible to select which optimized code path is used for internal filters (sekrit-twc)
avx2 optimization in many filters, previously the internal ones were mostly sse2 (sekrit-twc)
expr filter can now better optimize expressions (sekrit-twc)
the 7zip executable is now bundled with vsrepo
the portable version now includes the documentation as well
the portable version now includes all the plugins bundled with the normal installer again

ChaosKing
20th October 2019, 20:13
Now that python 3.8 is final, will R48 support it?

Myrsloik
20th October 2019, 20:18
Now that python 3.8 is final, will R48 support it?

Nope, there's no cython release with proper 3.8 support yet.

Myrsloik
21st October 2019, 17:55
R48-RC2 (https://github.com/vapoursynth/vapoursynth/releases/tag/R48-RC2)

More bugs and minor issues fixed. Should be the final RC unless someone finds a serious bug within a week. Test the new add to PATH option a bit extra.

r48:
it's now possible to select which optimized code path is used for internal filters (sekrit-twc)
avx2 optimization in many filters, previously the internal ones were mostly sse2 (sekrit-twc)
expr filter can now better optimize expressions (sekrit-twc)
the 7zip executable is now bundled with vsrepo
the portable version now includes the documentation as well
the portable version now includes all the plugins bundled with the normal installer again
fixed deadlock when setMessageHandler is called a second time
added an option to add vspipe, avfs and vsrepo to path in the installer
added registry entries for the path to vspipe and vsrepo
imwri is now included in the installer
the overwrite argument in imwri now also disables the requirement for output filesnames to contain a number
fixed corrupt output from imwri when requesting alpha output but the read image doesn't have an alpha channel

ChaosKing
21st October 2019, 18:15
The PATH stuff works for me (vspipe, vsrepo, avfs). Green stripes are fixed too.

l00t
21st October 2019, 18:25
Unfortunately I still have the pink borders, when bbmod (from latest havsfunc) is used. See sample pics:

R47.2:
https://images2.imgbox.com/21/ee/LCxpNQn8_o.png

R48-RC2:
https://images2.imgbox.com/f0/df/Nlp16rcQ_o.png

Relevant part of the VS code:
clip = core.std.SetFieldBased(clip, 0)
clip = core.std.CropRel(clip=clip, left=0, right=0, top=20, bottom=20)
clip = core.fb.FillBorders(clip, left=0, right=0, top=1, bottom=1, mode="fillmargins")
clip = havsfunc.bbmod(clip, cTop = 2, cBottom = 2, cLeft = 0, cRight = 0, thresh = 128, blur = 999)
clip = core.resize.Spline36(clip, width=clip.width-0-0, height=clip.height-1-1, src_left=0, src_top=1, src_width=clip.width-0-0, src_height=clip.height-1-1)

I used the portable version of R47.2 and R48-RC2 (both x64) with VSEditor r19 and Python 3.7.5 (embedded). Video is loaded with dgdecodenv.DGSource, most recent version.

Myrsloik
21st October 2019, 18:35
Unfortunately I still have the pink borders, when bbmod (from latest havsfunc) is used. See sample pics:

R47.2:
https://images2.imgbox.com/21/ee/LCxpNQn8_o.png

R48-RC2:
https://images2.imgbox.com/f0/df/Nlp16rcQ_o.png

Relevant part of the VS code:
clip = core.fb.FillBorders(clip, left=0, right=0, top=1, bottom=1, mode="fillmargins")
clip = havsfunc.bbmod(clip, cTop = 2, cBottom = 2, cLeft = 0, cRight = 0, thresh = 128, blur = 999)
clip = core.resize.Spline36(clip, width=clip.width-0-0, height=clip.height-1-1, src_left=0, src_top=1, src_width=clip.width-0-0, src_height=clip.height-1-1)

I used the portable version of R47.2 and R48-RC2 (both x64) with VSEditor r19 and Python 3.7.5 (embedded). Video is loaded with dgdecodenv.DGSource, most recent version.

Can't reproduce. CPU and input video format+resolution?

l00t
21st October 2019, 18:43
Can't reproduce. CPU and input video format+resolution?

CPU: Intel i7-9750H
Video format: YUV420P8; 25fps; input resolution: 1920x1080; final resolution: 1920x1038

(added 2 more lines, which might be important as well...)

Myrsloik
21st October 2019, 18:47
CPU: Intel i7-9750H
Video format: YUV420P8; 25fps; resolution: 1920x1038

(added 2 more lines, which might be important as well...)

Added how? Ideally I want a way to reproduce it using blankclip as the source and a complete script.

l00t
21st October 2019, 18:52
Added how? Ideally I want a way to reproduce it using blankclip as the source and a complete script.

Sorry for being a bit misleading, these were already in the script, when the pictures were taken... (I just wanted to emphasize, that something is happening in bbmod, the script looks fine without it). Nevermind, here's the complete script:

clip = core.dgdecodenv.DGSource(r'some_hd_video.dgi')
clip = core.resize.Spline36(clip, matrix_in_s="709", transfer_in_s="709", primaries_in_s="709", range_s="limited")
clip = core.std.AssumeFPS(clip, fpsnum=25000, fpsden=1000)
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
clip = core.std.SetFieldBased(clip, 0)
clip = core.std.CropRel(clip=clip, left=0, right=0, top=20, bottom=20)
clip = core.fb.FillBorders(clip, left=0, right=0, top=1, bottom=1, mode="fillmargins")
clip = havsfunc.bbmod(clip, cTop = 2, cBottom = 2, cLeft = 0, cRight = 0, thresh = 128, blur = 999)
clip = core.resize.Spline36(clip, width=clip.width-0-0, height=clip.height-1-1, src_left=0, src_top=1, src_width=clip.width-0-0, src_height=clip.height-1-1)
clip = core.remap.ReplaceFramesSimple(baseclip=clip, sourceclip=core.f3kdb.Deband(clip, range=20, grainy=32, grainc=24, sample_mode=2, dither_algo=3, keep_tv_range=1, blur_first=1, dynamic_grain=0), mappings="[0 1070]")
clip.set_output()

Myrsloik
22nd October 2019, 16:49
R48-RC3 (https://github.com/vapoursynth/vapoursynth/releases/tag/R48-RC3)

Fixes the aformentioned pink line at top and bottom (general expr bug) and another 32bit bug in expr as well. Keep testing it.

l00t
22nd October 2019, 18:12
Wow, so fast, thank you very much! The pinkies are now gone, hooray :)