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

Are_
18th December 2015, 20:19
That's because the name of that variables is a little bit missleading in that script:

clip = core.mv.BlockFPS(clip, super, bv, fv, num=30000, den=1001)

Myrsloik
20th December 2015, 00:28
Here's R30 test1 (https://dl.dropboxusercontent.com/u/73468194/vapoursynth_installer_r30_test1.exe) with AVISYNTH 2.6 PLUGIN SUPPORT FOR BOTH 32 AND 64 BIT!!!!!111111

(no 2.5 plugin support for 64 bit stuff though)

r30:
planeaverage is now deprecated, use planestats instead
added planestats, a function that calculates min, max, average and difference of a frame at the same time
removed planedifference, deprecated since r28
added avisynth 2.6 and x64 support, note that x64 can only load 2.6 but not 2.5 plugins
no longer installs vsvfw.dlls into system dirs
added nfMakeLinear, this flag will make the immediately following cache do its best to make requests more linear, set it on source filters where seeking is slow
the installer will no longer fail if a newer than expected version of the visual studio runtimes are installed
vspipe now displays the correct number of total frames when -s is used

Lynx_TWO
21st December 2015, 13:43
Hello!

It appears the Sinc re-size algorithm is no longer present in VapourSynth R29. Any chance of getting that added back in?

feisty2
21st December 2015, 14:17
Hello!

It appears the Sinc re-size algorithm is no longer present in VapourSynth R29. Any chance of getting that added back in?

go get fmtconv

Myrsloik
21st December 2015, 14:42
Hello!

It appears the Sinc re-size algorithm is no longer present in VapourSynth R29. Any chance of getting that added back in?

No, it probably won't be added back. And as feisty2 says fmtconv has a higher quality version of it anyway.

The spline resizers were also changed to be morr like the ones in avisynth than the swscale stuff.

Lynx_TWO
22nd December 2015, 00:51
Oh, yes that works great! To use with Staxrip:

clip = core.fmtc.resample(clip, %target_width%, %target_height%, kernel="sinc", taps=128)

feisty2
22nd December 2015, 02:21
Why do you want 128-tap sinc...
You do realize there's something called ringing right?...
Never mind..

cretindesalpes
22nd December 2015, 10:42
Ringing appears with a just few taps with sinc, because this kernel has a slow decrease. So if you feel the need use it, you want it with many taps.

Myrsloik
3rd January 2016, 21:54
R30 RC1 (https://dl.dropboxusercontent.com/u/73468194/vapoursynth_installer_r30_rc1.exe). The only thing left to do is to test imwri thoroughly and then I'll release it.

Try out all four 64 bit Avisynth 2.6 plugins and report your findings.

Changes:
r30:
added half precision float input/output to expr on cpus that have the f16c extension (ivy bridge or later)
added the possibility for plugins to print messages through the standard logging as well, don't use it unless you really have to
the build system should now autodetect which optional libraries are available
fixed ycocg conversions
planeaverage is now deprecated, use planestats instead
added planestats, a function that calculates min, max, average and difference of a frame at the same time
removed planedifference, deprecated since r28
added avisynth 2.6 and x64 support, note that x64 can only load 2.6 but not 2.5 plugins
no longer installs vsvfw.dlls into system dirs
added nfMakeLinear, this flag will make the immediately following cache do its best to make requests more linear, set it on source filters where seeking is slow
the installer will no longer fail if a newer than expected version of the visual studio runtimes are installed
vspipe now displays the correct number of total frames when -s is used

salty1
6th January 2016, 16:05
Hello,
i suggest to seperate the props of Planestats.
in r30 RC minmax is in one props,not very easy to use.

i'm sorry for my poor english.
thank you very much

Myrsloik
6th January 2016, 16:20
Hello,
i suggest to seperate the props of Planestats.
in r30 RC minmax is in one props,not very easy to use.

i'm sorry for my poor english.
thank you very much

Why do you think it's hard to use? Example?

salty1
6th January 2016, 16:42
Why do you think it's hard to use? Example?

for example:
if Ymax < 180 do something with this frame
else do something with this frame

i dont know how to use current props to complete that.
i am a rookie ripper and i dont know python at all...
so i suggest to seperate min and max:thanks:

Myrsloik
6th January 2016, 18:42
Hint, it's an array:
if Yminmax[1] < 180:

salty1
7th January 2016, 01:45
Hint, it's an array:
if Yminmax[1] < 180:

:thanks::thanks::thanks:

LigH
9th January 2016, 11:13
It seems that the media-autobuild_suite supports compiling mpv with support for VapourSynth, but only if VapourSynth is installed. So I wonder, how would I install VapourSynth inside an MSYS2/MinGW building environment? I guess I would more or less follow Linux installation steps, but I don't know if MSYS2 prefers different package managers...
__

P.S.:

VapourSynth installed in Windows is recognized only when it was installed to the default "Program Files (x86)" folder. In addition, it is not meant to recognize *.vpy files as media source now; but you might be able to use VapourSynth video filters inside mpv then (e.g. dare to apply QTGMC to a decoded video stream)... check if it is available:

mpv -vf help

Myrsloik
14th January 2016, 00:27
It seems that the media-autobuild_suite supports compiling mpv with support for VapourSynth, but only if VapourSynth is installed. So I wonder, how would I install VapourSynth inside an MSYS2/MinGW building environment? I guess I would more or less follow Linux installation steps, but I don't know if MSYS2 prefers different package managers...
__

P.S.:

VapourSynth installed in Windows is recognized only when it was installed to the default "Program Files (x86)" folder. In addition, it is not meant to recognize *.vpy files as media source now; but you might be able to use VapourSynth video filters inside mpv then (e.g. dare to apply QTGMC to a decoded video stream)... check if it is available:

mpv -vf help

That's an unsupported solution really, nobody does that. You're probably actually better off modifying the mpv build so it'll find the headers needed. If you really want to try that. Or poking wm4 to demand better windows support.

Myrsloik
14th January 2016, 00:34
I made a portable version of VapourSynth for those of you who hate installing things. Simply get the appropriate embedded python (https://www.python.org/downloads/release/python-351/) and unzip VapourSynth in the same directory (overwrite existing files).

Obviously only vspipe works for output (vfw and vsfs require installed files).

It's possible to use VapourSynth Editor if extracted into the python/vapoursynth dir as well.

64bit (https://dl.dropboxusercontent.com/u/73468194/vapoursynth64-portable-test.7z)
32bit (https://dl.dropboxusercontent.com/u/73468194/vapoursynth32-portable-test.7z)

LigH
14th January 2016, 01:26
I made a portable version of VapourSynth for those of you who hate installing things.

Hooray! Selur (Hybrid) will praise you for this version! :D

Selur
14th January 2016, 05:46
Nice! -> Doing some testing over the weekend. :)

an3k
15th January 2016, 11:52
Is it normal that there is no auto completion for the core functions? Eg. for core.[TAB][TAB] or core.std.[TAB][TAB]

First I thought something is broken but print(core.get_plugins()) (and a manual formatting afterwards) showed me all available plugins, their names and functions and a simple tryout of core.lsmas.LibavSMASHSource() showed that it is actually available and working.

I know it's Python but to be honest I'm not using VapourSynth to learn Python but as an replacement for AviSynth on Linux. The documentation definitely needs to be improved, eg. remove the Python reference and instead add a short howto of how users can find out how to load a given plugin as well as a list of basic functions like set_output()
Currently most of the doc (even the one of each plugin) is written for Windows which is kind of useless because AviSynth is still much better and since VS is running inside of Python there shouldn't be a difference between VS on Windows and VS on Linux beside path formatting.

I'm sorry for sounding ungrateful. I'm definitely not. I'm just a bit tired to trying things out when there could be a doc giving you hints so you know where to look (again, Python reference is not a hint). I actually made a build script that installs all dependencies (apt-get), grabs the latest sources for yasm, libenca, ffmpeg, x264, L-SMASH, etc. and builds these into your home directory so that you have a kind-of-portable user-installation of VapourSynth. It already builds without errors and VS is working but it's in preAlpha stage thus I haven't released it yet but definitely will.

Myrsloik
15th January 2016, 11:59
Is it normal that there is no auto completion for the core functions? Eg. for core.[TAB][TAB] or core.std.[TAB][TAB]

First I thought something is broken but print(core.get_plugins()) (and a manual formatting afterwards) showed me all available plugins, their names and functions and a simple tryout of core.lsmas.LibavSMASHSource() showed that it is actually available and working.

I know it's Python but to be honest I'm not using VapourSynth to learn Python but as an replacement for AviSynth on Linux. The documentation definitely needs to be improved, eg. remove the Python reference and instead add a short howto of how users can find out how to load a given plugin as well as a list of basic functions like set_output()
Currently most of the doc (even the one of each plugin) is written for Windows which is kind of useless because AviSynth is still much better and since VS is running inside of Python there shouldn't be a difference between VS on Windows and VS on Linux beside path formatting.

I'm sorry for sounding ungrateful. I'm definitely not. I'm just a bit tired to trying things out when there could be a doc giving you hints so you know where to look (again, Python reference is not a hint). I actually made a build script that installs all dependencies (apt-get), grabs the latest sources for yasm, libenca, ffmpeg, x264, L-SMASH, etc. and builds these into your home directory so that you have a kind-of-portable user-installation of VapourSynth. It already builds without errors and VS is working but it's in preAlpha stage thus I haven't released it yet but definitely will.

What's windows specific in the docs? Apart from maybe one or two example paths which linux users easily should identify as such.

If you have no intention of learning any Python at all you're going to have a horrible day. That's the way it is.

And WHY would I ever remove the parts of the docs that are useful for people who know Python? That makes absolutely no sense.

Hint:
core.list_functions() for formatted string output

an3k
15th January 2016, 12:36
What's windows specific in the docs? Apart from maybe one or two example paths which linux users easily should identify as such.

If you have no intention of learning any Python at all you're going to have a horrible day. That's the way it is.

And WHY would I ever remove the parts of the docs that are useful for people who know Python? That makes absolutely no sense.

Hint:
core.list_functions() for formatted string output

Nobody would have to learn Python if the documentation would be written for the users point of view. Just as an example: http://www.vapoursynth.com/doc/functions/crop.html says that eg. std.CropRel(clip,0,0,132,132) will work. It doesn't. You know how to call CropRel corrently because you wrote VS but beginners (= those who need a documentation and for whose the documentation was written) don't and wonder what's going on. I know that core (or c or whatever the user chooses) has to specified before and depending on what is specified the std.CropRel() path is different but just use some defaults, eg. core, clip, etc. because it doesn't matter at all if you use core, C0R3, c or whatever to specify vs.get_core().
That way users can copy&paste from the documentation and learn what's the difference between eg. core.std.CropRel() and core.lsmas.LSMASHVideoSource()

People who know Python do need the Python reference? Nevermind. Remove it from the Documentation not from the website or put it into the "Advanced Users" section. It just discourages new users to get into VapourSynth like "Why do I need all of this, I just want to do simple cropping and deinterlacing." Python reference for advanced users is fine.

EDIT: I'm sorry, I mixed two links. Instead of Python Reference I meant the Python Tutorial. "If you don’t know the basics of Python, you may want to check out the tutorial." - If a new user don't know Python he definitely does NOT want to read the whole 16 chapters of Python documentation or digg through it, especially NOT after just getting VapourSynth installed. A better approach would be to post an example script that creates a eg. 10 second video with the text "Yeah, VapourSynth is alive and kickin'" or something you prefer but also cheers the users victory of being done. And with comments in the script the user will learn what to use, etc.

As I said: you wrote the documentation from your point of view but since you know Python very well and also how VS works it's 100% clear to you what each bit of the doc means. From the users point of view it's just confusing.


Whatsoever, you feel affronted and very likely will me ignore completely from now on. That's funny because I just said that the documentation could be improved and AFAIK you are not a professional technical documentation writer!?!

Myrsloik
15th January 2016, 14:27
Nobody would have to learn Python if the documentation would be written for the users point of view. Just as an example: http://www.vapoursynth.com/doc/functions/crop.html says that eg. std.CropRel(clip,0,0,132,132) will work. It doesn't. You know how to call CropRel corrently because you wrote VS but beginners (= those who need a documentation and for whose the documentation was written) don't and wonder what's going on. I know that core (or c or whatever the user chooses) has to specified before and depending on what is specified the std.CropRel() path is different but just use some defaults, eg. core, clip, etc. because it doesn't matter at all if you use core, C0R3, c or whatever to specify vs.get_core().
That way users can copy&paste from the documentation and learn what's the difference between eg. core.std.CropRel() and core.lsmas.LSMASHVideoSource()

People who know Python do need the Python reference? Nevermind. Remove it from the Documentation not from the website or put it into the "Advanced Users" section. It just discourages new users to get into VapourSynth like "Why do I need all of this, I just want to do simple cropping and deinterlacing." Python reference for advanced users is fine.

EDIT: I'm sorry, I mixed two links. Instead of Python Reference I meant the Python Tutorial. "If you don’t know the basics of Python, you may want to check out the tutorial." - If a new user don't know Python he definitely does NOT want to read the whole 16 chapters of Python documentation or digg through it, especially NOT after just getting VapourSynth installed. A better approach would be to post an example script that creates a eg. 10 second video with the text "Yeah, VapourSynth is alive and kickin'" or something you prefer but also cheers the users victory of being done. And with comments in the script the user will learn what to use, etc.

As I said: you wrote the documentation from your point of view but since you know Python very well and also how VS works it's 100% clear to you what each bit of the doc means. From the users point of view it's just confusing.


Whatsoever, you feel affronted and very likely will me ignore completely from now on. That's funny because I just said that the documentation could be improved and AFAIK you are not a professional technical documentation writer!?!

I don't know Python very well. I just look up what I need in the python docs usually... For some reason they have a scary similarity to the VapourSynth doc structure... I wonder why.

And reading the python tutorial is of course optional too. I simply didn't see any reason to spend the time to recreate something that says almost the same things. Basic control flow you have to learn whether you want it or not. Normal Avisynth barely does it so yes, you need to know more to use VapourSynth.

No, I'm not a technical documentation writer. You can tell I'm not because the documentation doesn't start with 5 pages of legal disclaimers such as "don't lick the power cord while in use". Are you?

Selur
15th January 2016, 19:20
I made a portable version of VapourSynth for those of you who hate installing things.
Tried it and failed,...


Here's what I did:

created a folder named Vapoursynth
extracted vapoursynth64-portable-test into that folder (after downloading it from https://dl.dropboxusercontent.com/u/73468194/vapoursynth64-portable-test.7z)
extracted python-3.5.1-embed-amd64 into that folder (after downloading it from https://www.python.org/ftp/python/3.5.1/python-3.5.1-embed-amd64.zip)
extracted the vslsmashsource.dll from L-SMASH-Works-r859-20160109-64bit into a subfolder of Vapoursynth\vapoursynth64\plugins named LSmashSource (after downloading L-SmASH-Works from https://www.dropbox.com/sh/3i81ttxf028m1eh/AAABkQn4Y5w1k-toVhYLasmwa?dl=0)
created a new Temp-folder and saved a test.vpy file in it:
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(path=r'G:\Hybrid\VapourSynth\vapoursynth64\plugins\vslsmashsource.dll')
clip = core.lsmas.LWLibavSource(source="F:\TestClips&Co\test.avi")
clip.set_output().
opened a Windows command prompt and changed into the Vapoursynth folder.
called the following call:
VSPipe.exe h:\Temp\test.vpy - --y4m | g:\Hybrid\x264.exe --demuxer y4m -o h:\Output\test.264 -
and got this:
y4m [info]: 640x352p 0:0 @ 25/1 fps (cfr)
No frame returned at the end of processing by LWLibavSourcex264 [
info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [info]: profile High, level 3.0
right before I got a 'VSPipe.exe has stopped working'


I'm new to Vapoursynth, so did I miss something obvious?

Cu Selur

Ps.: I really like the idea of a portable Vapoursynth version for Windows. :)

TheFluff
15th January 2016, 20:53
words
While it is true that Vapoursynth could definitely use a better tutorial/more gentle introduction on how to do things, I don't think you should criticize the reference documentation for being reference documentation. It has its place.

That being said, if you don't have at least basic programming knowledge and/or are willing to learn, Vapoursynth is probably not for you. With Avisynth you can get away with not really being a coder, you can just copypaste a bunch of filter lines, but with VS you sorta need to write actual code. Or at least you should, because the possibility of doing that is kinda the raison d'etre of VS.

Myrsloik
15th January 2016, 21:45
Tried it and failed,...


Here's what I did:
...

I'm new to Vapoursynth, so did I miss something obvious?

Cu Selur

Ps.: I really like the idea of a portable Vapoursynth version for Windows. :)

I tried in a completely clean windows 10 x64 vm with all updates. And used the same links as you in order. It works.

The only thing I had to change was comment out the loadplugin line (since it's already autoloaded when placed in vapoursynth64\plugins) and to add an r to escape the source path which your script doesn't.

So I have no idea why it won't work for you. Try simplifying it, like encode a blankclip with instead of lsmash source. Or run "vspipe -v" which will fail if vapoursynth is completely broken. Maybe you can narrow it down a bit more.

Btw, OS?

Selur
15th January 2016, 22:03
Btw, OS?
Win 10 pro 64bit
Or run "vspipe -v"
reports:
VapourSynth Video Processing Library
Copyright (c) 2012-2015 Fredrik Mellbin
Core R30
API R3.4
Options: -

and to add an r to escape the source path which your script doesn't.
using:
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(path=r'G:/Hybrid/VapourSynth/vapoursynth64/plugins/LSmashSource/vslsmashsource.dll')
clip = core.lsmas.LWLibavSource(source=r"F:/TestClips&Co/test.avi")
clip.set_output() still crashes VSPipe.exe.

using:
import vapoursynth as vs
core = vs.get_core()
#core.std.LoadPlugin(path=r'G:/Hybrid/VapourSynth/vapoursynth64/plugins/LSmashSource/vslsmashsource.dll')
#clip = core.lsmas.LWLibavSource(source=r"F:/TestClips&Co/test.avi")
clip = core.std.BlankClip()
clip.set_output()
gives me:
import vapoursynth as vs
core = vs.get_core()
#core.std.LoadPlugin(path=r'G:/Hybrid/VapourSynth/vapoursynth64/plugins/LSmashSource/vslsmashsource.dll')
#clip = core.lsmas.LWLibavSource(source=r"F:/TestClips&Co/test.avi")
clip = core.std.BlankClip()
clip.set_output()

using:
import vapoursynth as vs
core = vs.get_core()
#core.std.LoadPlugin(path=r'G:/Hybrid/VapourSynth/vapoursynth64/plugins/LSmashSource/vslsmashsource.dll')
#clip = core.lsmas.LWLibavSource(source=r"F:/TestClips&Co/test.avi")
clip = core.std.BlankClip(format=vs.YUV420P8)
clip.set_output() works,... (using YUV420P16 instead of YUV420P8 works too)

Not sure if it helps, but the test.avi I use can be downloaded through my GoogleDrive (https://drive.google.com/folderview?id=0B_WxUS1XGCPASUZibG5XZkRfeTg&usp=sharing).

Cu Selur

Myrsloik
15th January 2016, 22:25
Actually it seems like LWLibavSource simply doesn't like your test.avi. It crashes here too and it's because it returns a null frame without setting an error. Definitely a bug in the plugin.

Selur
15th January 2016, 22:30
Okay, still it seems strange that VSPipe is crashing, so even if the plugin crashes, VSPipe should throw an error but not crash the way it does.

Myrsloik
15th January 2016, 22:42
Okay, still it seems strange that VSPipe is crashing, so even if the plugin crashes, VSPipe should throw an error but not crash the way it does.

It's actually a check in the core. I do this to catch naughty plugin writers. Turns out that people only report things when they crash and ignore huge warning output otherwise...

Selur
15th January 2016, 22:49
Okay, if that is how it's supposed to be. :)
btw. is http://www.vapoursynth.com/doc/pluginlist.html kept up-to-date or is there another resource to look for Vapoursynth plugins?

Myrsloik
15th January 2016, 22:51
Okay, if that is how it's supposed to be. :)
btw. is http://www.vapoursynth.com/doc/pluginlist.html kept up-to-date or is there another resource to look for Vapoursynth plugins?

It's mostly up to date. There may be a few less common ones at https://github.com/HomeOfVapourSynthEvolution I forgot but that's it.

jackoneill
16th January 2016, 22:28
Is it normal that there is no auto completion for the core functions? Eg. for core.[TAB][TAB] or core.std.[TAB][TAB]


But there is. (I had no idea the Python interpreter has tab completion.)

vs.[tab][tab], core.[tab][tab], and core.std.[tab][tab] work here. core.[tab][tab] doesn't list the namespaces because they are looked up on demand, if I remember correctly. The functions are listed, though.

Lynx_TWO
16th January 2016, 23:59
Ringing appears with a just few taps with sinc, because this kernel has a slow decrease. So if you feel the need use it, you want it with many taps.

You are correct. The sinc function implemented in AviSynth 2.6(?) used 256 taps, however, for some reason you can only use a maximum of 128 taps in fmtconv (at least, using more gave me an error). The best re-size I have ever seen was sinc used with 1024 taps (it took a while to resize). As taps increase, you get closer and closer to a perfect resize, albeit at significant calculation cost, and the differences become less and less clear on an exponential scale. The movie industry has known this for a long time, hence the reason they prefer the sinc algorithm. I would love to have the ability to use sinc with 2048 or 4096 taps in fmtconv. I suspect the ringing would become a non-issue... Anyone willing to try it? :)

an3k
17th January 2016, 03:29
So I have this script:import vapoursynth as vs
import havsfunc as havs
core = vs.get_core()

clip = core.lsmas.LWLibavSource("/var/tmp/S01E01_1.vob")
clip = havs.QTGMC(clip,Preset="Slow",FPSDivisor=2,Sharpness=1.2,SLMode=1,EZDenoise=2.5,NoisePreset="Slow",TFF=True)
# left, right, top, bottom
clip = core.std.CropRel(clip,4,4,4,2)
clip = core.resize.Lanczos(clip,960,720)

clip.set_output()Command line is:vspipe vs_qtgmc_1.78.vpy - | x264 --level 4.0 --crf 22 --deblock -3:-3 --keyint 240 --ref 4 --chroma-qp-offset -2 --vbv-bufsize 31250 \
--vbv-maxrate 25000 --me umh --sar 1:1 --fps 25 --input-res 960x720 --input-csp i420 -o /var/tmp/recoded.264 -And I get this:
http://i.imgur.com/qNgl3vD.png

and this

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

With the very same script (but for AviSynth) on my ~8 year old Core2Quad Q9650 with 8 GB RAM on Windows 7 Professional 64-Bit I also get ~8 fps and 100% CPU usage. Where does this huge performance impact comes from?LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\mvtools2.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\mt_masktools-26.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\nnedi3.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RemoveGrainSSE2.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RepairSSE2.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\SSE2Tools.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\FFT3DFilter.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\dfttest.dll")
Import("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\QTGMC-3.32.avsi")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("C:\RIPS\Neon Genesis Evangelion\S01E01\S01E01.d2v", cpu=4, info=3)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
QTGMC(Preset="Slow",FPSDivisor=2,Sharpness=1.2,SLMode=1,EZDenoise=2.5,NoisePreset="Slow")
crop(4, 4, -4, -2)
Lanczos4Resize(960,720)
ConvertToYV12()

feisty2
17th January 2016, 11:01
You are correct. The sinc function implemented in AviSynth 2.6(?) used 256 taps, however, for some reason you can only use a maximum of 128 taps in fmtconv (at least, using more gave me an error). The best re-size I have ever seen was sinc used with 1024 taps (it took a while to resize). As taps increase, you get closer and closer to a perfect resize, albeit at significant calculation cost, and the differences become less and less clear on an exponential scale. The movie industry has known this for a long time, hence the reason they prefer the sinc algorithm. I would love to have the ability to use sinc with 2048 or 4096 taps in fmtconv. I suspect the ringing would become a non-issue... Anyone willing to try it? :)

ideal sinc (something like taps=infinite) is like, some "theoretically" perfect low pass filter...
there are other methods that have better "visual" quality than sinc
downscaling: bicubic (b=-1,c=0) (http://forum.doom9.org/showthread.php?p=1748631#post1748631) or bicubic (-0.5,0.25) (http://forum.doom9.org/showthread.php?p=1748922#post1748922)
upscaling: EEDI3, NNEDI3

LigH
17th January 2016, 11:19
And I get this:


and this



With the very same script...

This is what I see. There are no images for me. The IMG tag may require static URLs to image files sometimes, depending on the forum software, often they don't support PHP locations with parameters as image URLs.

There are a few cooperative and simple image hosters out in the web, like imgur.com or frupic.frubar.net; may be recommendable instead of trying to embed attachments.

foxyshadis
17th January 2016, 12:52
This is what I see. There are no images for me. The IMG tag may require static URLs to image files sometimes, depending on the forum software, often they don't support PHP locations with parameters as image URLs.

There are a few cooperative and simple image hosters out in the web, like imgur.com or frupic.frubar.net; may be recommendable instead of trying to embed attachments.

They were attached but were deleted by another mod. I didn't see them so I dunno why.

Sangan
17th January 2016, 13:36
While it is true that Vapoursynth could definitely use a better tutorial/more gentle introduction on how to do things, I don't think you should criticize the reference documentation for being reference documentation. It has its place.

That being said, if you don't have at least basic programming knowledge and/or are willing to learn, Vapoursynth is probably not for you. With Avisynth you can get away with not really being a coder, you can just copypaste a bunch of filter lines, but with VS you sorta need to write actual code. Or at least you should, because the possibility of doing that is kinda the raison d'etre of VS.
Well... I kind of support the gist of an3k's post there... It looks like a massive amount of learning Phyton if you havent done that before and arent really a coder, before you could start using VS. I would really like to use VS for encoding, because it runs native on a Mac, not like AviSynth using Wine on 32 bit. I just really lack a starting point. Most people wanting to use VS actually come from AS, so it might be a help for starting, if you perhaps could put a small section in, that kind of explains steps, like taking an AS section/loading the index of a file/applying one filter... and show the code, that would be the appropriate one in VS. People learn in different ways, but I think some kind of practical starting point would be nice.

Maybe some time :)

sneaker_ger
17th January 2016, 13:46
http://www.vapoursynth.com/doc/gettingstarted.html
?

Sangan
17th January 2016, 13:54
http://www.vapoursynth.com/doc/gettingstarted.html
?
Yes, and no. It hasn't clicked yet... Maybe I should just brood some more.

an3k
17th January 2016, 23:48
I've linked the screenshots to imgur now.

Anyway, firstly you are using different source filter in your scripts. Why don't you use d2vsource in the vpy script as well? Secondly, to compare pure performance of the script, you should simply use vspipe --progress for vpy and AVSMeter for avs, without the encoder getting involved.

1) I don't want to use d2vsource as I did on Windows because it would be another circumstance (Indexing on Windows, moving the files onto linux, editing the d2v file). What's the problem with L-SMASH Works?
2) vspipe --progress shows just at what frame vapoursynth currently is. It doesn't show what plugin is eating up 100% cpu power.

Myrsloik
18th January 2016, 00:27
I've linked the screenshots to imgur now.



1) I don't want to use d2vsource as I did on Windows because it would be another circumstance (Indexing on Windows, moving the files onto linux, editing the d2v file). What's the problem with L-SMASH Works?
2) vspipe --progress shows just at what frame vapoursynth currently is. It doesn't show what plugin is eating up 100% cpu power.

1. I guess it should work. I haven't tried it much though. You can also try the new d2v creation thingy I guess.

2. The answer is probably mvanalyse. It usually is. Per filter instance cpu statistics are actually on my todo list... some day.

I'm curious. What hardware are you running it on since you have 24 threads? There could also be some issue with too many threads tripping over each other. Try vs.get_core(threads=6) or 12 or 18 or just some more random numbers smaller than 24 and see if it improves things. That'd be a great help.

I only regularly test things with 12 threads.

sl1pkn07
18th January 2016, 00:49
dgindex works with wine(-staging)

I also have 24 threads (double xeon x5650), for me works ok. but i'm not sure what is the problem

an3k
18th January 2016, 08:37
1. I guess it should work. I haven't tried it much though. You can also try the new d2v creation thingy I guess.

2. The answer is probably mvanalyse. It usually is. Per filter instance cpu statistics are actually on my todo list... some day.

I'm curious. What hardware are you running it on since you have 24 threads? There could also be some issue with too many threads tripping over each other. Try vs.get_core(threads=6) or 12 or 18 or just some more random numbers smaller than 24 and see if it improves things. That'd be a great help.

I only regularly test things with 12 threads.Sorry, I didn't understand what you mean in 1. and 2.

Hardware is a Xeon E5-2680 v3 (12 real cores + HyperThreading). I tried with threads=12, 4, 2 and 1 (thought there is a multi-threading issue) but processing just got slower and slower.
The source and target file is read from/written to /var/tmp. /var is on a 4-HDD RAID 0. If I just have to crop I do native encoding with x264 itself and here I get more than 100 fps for a 1920x1080p so I doubt the issue is caused by slow reading from/writing to HDD.

an3k
18th January 2016, 09:39
Ok, I did some more tests and I guess the problem is dfttest:

System A:
Intel Core2Quad Q9650
8 GB DDR2 RAM
Windows 7 Professional 64-Bit
System B:
Intel Xeon E5-2680 v3
32 GB DDR4 RAM
Ubuntu Server 14.04.3 64-Bit

Script AA:LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\mvtools2.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\mt_masktools-26.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\nnedi3.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RemoveGrainSSE2.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RepairSSE2.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\dfttest.dll")
Import("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\QTGMC-3.32.avsi")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("E:\RIPS\Neon Genesis Evangelion\S01E01\S01E01.d2v", cpu=4, info=3)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
QTGMC(Preset="Slow",FPSDivisor=2,Sharpness=1.2,SLMode=1,EZDenoise=2.5,NoisePreset="Slow")
crop(4, 4, -4, -2)
Lanczos4Resize(960,720)
ConvertToYV12()results in ~2,60 fps on System A with ~60 % CPU usage

Script BA:LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\mvtools2.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\mt_masktools-26.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\nnedi3.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RemoveGrainSSE2.dll")
Import("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\QTGMC-3.32.avsi")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("E:\RIPS\Neon Genesis Evangelion\S01E01\S01E01.d2v", cpu=4, info=3)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
QTGMC(FPSDivisor=2)
crop(4, 4, -4, -2)
Lanczos4Resize(960,720)
ConvertToYV12()results in ~6 fps on System A with ~40 to ~50 % CPU usage

Script AB:import vapoursynth as vs
import havsfunc as havs
core = vs.get_core()

core.std.LoadPlugin("libvslsmashsource.so.868")
core.std.LoadPlugin("libfmtconv.so")
core.std.LoadPlugin("libscenechange.so")
core.std.LoadPlugin("libtemporalsoften2.so")
core.std.LoadPlugin("libmvtools.so")
core.std.LoadPlugin("libdfttest.so")
core.std.LoadPlugin("libnnedi3.so")

clip = core.lsmas.LWLibavSource("/var/tmp/S01E01_1.vob")
clip = havs.QTGMC(clip,Preset="Slow",FPSDivisor=2,Sharpness=1.2,SLMode=1,EZDenoise=2.5,NoisePreset="Slow",TFF=True)
clip = core.std.CropRel(clip,4,4,4,2)
clip = core.resize.Lanczos(clip,960,720)

clip.set_output()results in ~8,50 fps on System B with ~100 % CPU usage

Script BB:import vapoursynth as vs
import havsfunc as havs
core = vs.get_core()

core.std.LoadPlugin("libvslsmashsource.so.868")
core.std.LoadPlugin("libfmtconv.so")
core.std.LoadPlugin("libscenechange.so")
core.std.LoadPlugin("libtemporalsoften2.so")
core.std.LoadPlugin("libmvtools.so")
core.std.LoadPlugin("libnnedi3.so")

clip = core.lsmas.LWLibavSource("/var/tmp/S01E01_1.vob")
clip = havs.QTGMC(clip,FPSDivisor=2,TFF=True)
clip = core.std.CropRel(clip,4,4,4,2)
clip = core.resize.Lanczos(clip,960,720)

clip.set_output()results in ~32 fps on System B with ~66 % CPU usage

sl1pkn07
18th January 2016, 10:41
@an3k

for creating d2v on linux you can use this: http://forum.doom9.org/showthread.php?t=173090 or this https://dl.dropboxusercontent.com/u/6596386/dgindex-modoki-20100428.tar.bz2. all CLI

an3k
18th January 2016, 17:04
@an3k

If you have a decent GPU in your rig, I'd suggest trying Denoiser='KNLMeansCL' instead of the default DFTTest/FFT3DFilter denoiser in QTGMC. It's probably faster.

Thanks for that suggestion but the problem is a) There is no space for a GPU, b) GPU Deinterlacer are really bad regards quality and c) It wouldn't be that slow if there weren't a bottleneck in dfttest. On Windows it is much faster than this port is on Linux.

feisty2
18th January 2016, 17:13
Thanks for that suggestion but the problem is a) There is no space for a GPU, b) GPU Deinterlacer are really bad regards quality and c) It wouldn't be that slow if there weren't a bottleneck in dfttest. On Windows it is much faster than this port is on Linux.

except knlmeanscl is not a deinterlacer..

Stephen R. Savage
18th January 2016, 17:45
You are correct. The sinc function implemented in AviSynth 2.6(?) used 256 taps, however, for some reason you can only use a maximum of 128 taps in fmtconv (at least, using more gave me an error). The best re-size I have ever seen was sinc used with 1024 taps (it took a while to resize). As taps increase, you get closer and closer to a perfect resize, albeit at significant calculation cost, and the differences become less and less clear on an exponential scale. The movie industry has known this for a long time, hence the reason they prefer the sinc algorithm. I would love to have the ability to use sinc with 2048 or 4096 taps in fmtconv. I suspect the ringing would become a non-issue... Anyone willing to try it? :)

Just use Nfinity-tap Lanczos. It converges (http://fooplot.com/plot/t9szbkz8ik)to sinc, and should in fact have lower error than a truncated sinc.