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

asarian
5th April 2016, 00:42
Is that the correct .dll or a typo ?

In the older version I'm using it's vsfs.dll , not vsvfw.dll

Things might have changed, if it's vsvfw.dll, try calling it with vsvfw neela.vpy

Also there might some differences with portable vs installed version. I'm using an old installed version


Yeah, that was a typo. :) (I looked at the wrong dll). This is from the cmd output:

F:\jobs>pfm register "C:\Program Files (x86)\VapourSynth\core64\vsfs.dll"
Registering formatter "C:\Program Files (x86)\VapourSynth\core64\vsfs.dll".

F:\jobs>vsfs neela.vpy
'vsfs' is not recognized as an internal or external command,
operable program or batch file.

F:\jobs>start vsfs neela.vpy
The system cannot find the file vsfs.

poisondeathray
5th April 2016, 00:50
How did you run AVFS ? If are running an older pismo mount package, then it's right click in the context menu => mount

Otherwise, I don't know, sorry

asarian
5th April 2016, 01:10
How did you run AVFS ? If are running an older pismo mount package, then it's right click in the context menu => mount

Otherwise, I don't know, sorry


Odd. I installed the latest Pismo File Mount Audit Package build 181 (just installed everything VS two days ago); yet it still has a context right-click 'mount' option (wasn't that supposed to be gone?!). And the mount option, surprisingly, is actually the thing that works. :) The Pismo system shows 'vsfs' as a registered package, so it's all good.

Not sure why I can't make 'vsfs' work from a command prompt; but, then again, I'm thinking it maybe really was meant to only work via that mount option.

Anyway, thank you kindly for your assistence! :)

asarian
5th April 2016, 09:39
Hmm, this gives me green borders:

vid = core.std.AddBorders (clip=vid, left=240, right=240, top=0, bottom=0, color=[0, 0, 0])

That can't be right. :) (Found the syntax for AddBorders on this forum, btw: manual doesn't say how, does it?)

Myrsloik
5th April 2016, 09:41
Hmm, this gives me green borders:

vid = core.std.AddBorders (clip=vid, left=240, right=240, top=0, bottom=0, color=[0, 0, 0])

That can't be right. :) (Found the syntax for AddBorders on this forum, btw: manual doesn't say how, does it?)

Sure it's right. If ypu have a yuv clip you need to specify the color as yuv, not rgb. Or skip iy since it defaults to black anyway.

asarian
5th April 2016, 09:44
Ah yes, LOL, that would explain it. :) Thx.

asarian
5th April 2016, 11:30
So, what is needed then to make QTGMC work under VS 64-bit?! Cuz I'm having the hardest time getting it to even load. (See below). Several things, like MaskTools for VapourSynth, I can't even find anywhere. I call it as follows:

import vapoursynth as vs
import havsfunc as haf
import mvsfunc as mvf
import adjust

core = vs.get_core ()

vid = core.lsmas.LWLibavSource ("f:/video/neela.mkv")

vid = haf.QTGMC (vid, InputType=0, Preset="Very Slow", TR2=3, TFF=True)

Errors:

Script evaluation failed:
Python exception: No attribute with the name scd exists. Did you mistype a plugin namespace?
Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 1489, in vapoursynth.vpy_evaluateScript (src\cython\vapoursynth.c:26885)
File "f:\jobs\neela.vpy", line 10, in <module>
vid = haf.QTGMC (vid, InputType=0, Preset="Very Slow", TR2=3, TFF=True)
File "C:\Program Files\Python35\lib\site-packages\havsfunc.py", line 978, in QTGMC
if TR0 > 0: ts1 = TemporalSoften(bobbed, 1, 255 << shift, CMts << shift, 28 << shift, 2) # 0.00 0.33 0.33 0.33 0.00
File "C:\Program Files\Python35\lib\site-packages\havsfunc.py", line 4287, in TemporalSoften
clip = set_scenechange(clip, scenechange)
File "C:\Program Files\Python35\lib\site-packages\havsfunc.py", line 4319, in set_scenechange
sc = core.scd.Detect(sc, thresh)
File "src\cython\vapoursynth.pyx", line 1103, in vapoursynth.Core.__getattr__ (src\cython\vapoursynth.c:20711)
AttributeError: No attribute with the name scd exists. Did you mistype a plugin namespace?

Are_
5th April 2016, 11:46
The same as for avisynth you need to download all needed plug-ins.
If you search this thread for "list" you will find some of them: http://forum.doom9.org/showthread.php?p=1753688&highlight=list#post1753688
That being said, maybe the script changed and you will need some more... or not. scd makes reference to SceneChange.
In an ideal world the author will maintain an updated list somewhere, because this script is a monster.

asarian
5th April 2016, 12:21
The same as for avisynth you need to download all needed plug-ins.
If you search this thread for "list" you will find some of them: http://forum.doom9.org/showthread.php?p=1753688&highlight=list#post1753688
That being said, maybe the script changed and you will need some more... or not. scd makes reference to SceneChange.
In an ideal world the author will maintain an updated list somewhere, because this script is a monster.

Thanks for your reply. I already have the following dll's loaded:

Directory of C:\Program Files (x86)\VapourSynth\plugins64

05-Apr-16 13:11 <DIR> .
05-Apr-16 13:11 <DIR> ..
09-Jun-15 10:37 316,928 DFTTest.dll
25-Mar-16 17:01 1,206,272 fmtconv.dll
15-Mar-14 18:29 2,545,034 libfftw3-3.dll
15-Mar-14 18:29 2,604,934 libfftw3f-3.dll
15-Mar-14 18:30 1,191,702 libfftw3l-3.dll
03-Apr-16 15:12 3,522,048 libmvtools.dll
24-Jan-16 14:59 824,320 libnnedi3.dll
01-Oct-13 11:31 115,930 libtemporalsoften.dll
05-Nov-14 20:00 127,488 templinearapproximate.dll
07-Mar-16 11:13 16,264,192 vslsmashsource.dll
10 File(s) 28,718,848 bytes
2 Dir(s) 102,245,715,968 bytes free


Not SceneChange yet, though (couldn't find 64-bit version of it yet). I shall try to acquire that too.

Are_
5th April 2016, 12:33
http://forum.doom9.org/showthread.php?p=1694970#post1694970
Chikuzen stuff is somewhat unmaintained by him, so you need to find updated versions somewhere in the middle of the threads :/

asarian
5th April 2016, 12:52
^^ Brilliant! Thx. :) For a moment I thought my project would strand on the absence of a 64-bit scenechange dll.

asarian
5th April 2016, 22:33
Just want to say, VapourSynth rocks! I was looking at a 90 hours job, with AviSynth and MCTD, and now, in VapourSynth and TempLinearApproximateMC (similar settings), I'm looking at an eta of ~11 hours! As expected/hoped, VapourSynth does an astounding, thread-safe job occupying your full CPU! And all in 64-bit!

Took me a bit to get it all straightened out, but this is gold, I tell you. Pure gold! :)

Myrsloik
6th April 2016, 20:41
Try out R32 RC2 (https://dl.dropboxusercontent.com/u/73468194/VapourSynth-R32-RC2.exe). It will be released in a day or two if no serious issues are found.

Changes:
r32:
fixed cache not being automatically added for filters with nfmakelinear flag set (jackoneill)
assvapour now has integrated blending (jackoneill)
added the experimental function setfieldbased for convenience, expect it to change in the future
the tff argument is now optional and ignored for doubleweave when the _field property is present in a valid combination, _fieldbased will also be properly set now
the tff argument is now optional and ignored for separatefields when the _fieldbased property is present
added support for interlaced resizing
extended avisynth mvtools compatibility hack to work for 64bit version as well
fixed regression from r29 that would make compatyuy2 conversions vertically flipped
vspipe now outputs planar rgb in gbr plane order to better match what other software expects as input
now has a slightly more informative error message when the wrong type is passed as an argument in python
vsvfw now prints per frame errors on the corresponding frame
splicing two incompatible clips could sometimes give a confusing error message
removed planeaverage

asarian
6th April 2016, 23:43
^^ Thx for (soon to be) R32!

When it is released, will I just be able to install it over the existing R31 (never done this before with VapourSynth), or do I need to preserve plugins64 directory and such first?!

RiCON
7th April 2016, 15:44
The installer shouldn't do anything to the third party plugins directory, so you can just install over it.

asarian
7th April 2016, 17:06
The installer shouldn't do anything to the third party plugins directory, so you can just install over it.

Thx. :) Hoping R32 Final will follow soon thereafter.

asarian
7th April 2016, 20:50
Btw, does anyone know of a filter like AutoAdjust (64-bit) for VS? Would really love to see that one day. :)

Or at least maybe someone knows of a way to adjust brightness/contrast?

luigizaninoni
7th April 2016, 21:30
Adjust.py is a script that adjusts contrast brightness and saturation

jackoneill
7th April 2016, 21:51
Btw, does anyone know of a filter like AutoAdjust (64-bit) for VS? Would really love to see that one day. :)

Or at least maybe someone knows of a way to adjust brightness/contrast?

You could always nag/bribe the author of AutoAdjust to support VapourSynth.

asarian
7th April 2016, 21:57
Adjust.py is a script that adjusts contrast brightness and saturation

Thx. ;) I'll have a look at that. For this job I just adjusting manually will suffice. But I've really come to love AutoAdjust.

asarian
8th April 2016, 11:47
Blu-ray IDX/SUB filters (the kind extracted with BDSup2Sub, for example), is it possible to incorporate those in VS too?! That would be sweet, as I like my subs (like for Japanese material) to be unmodified.

EDIT: Looking for something like SupTitle.

jackoneill
8th April 2016, 12:42
Blu-ray IDX/SUB filters (the kind extracted with BDSup2Sub, for example), is it possible to incorporate those in VS too?! That would be sweet, as I like my subs (like for Japanese material) to be unmodified.

EDIT: Looking for something like SupTitle.

I think there is no such filter for VapourSynth (yet?), but you can do it with mpv:

mpv video.mov --sub-file subtitles.idx --vf vapoursynth=script.py --ovc libx264 --oac libvorbis -o output.mkv

It will filter video.mov using script.py, then it will render the subtitles and encode the result with x264.

asarian
8th April 2016, 13:05
^^ Brilliant! :) Thank you!

Myrsloik
8th April 2016, 16:15
R32 has been released. Full changelog in the first post. The release has fixes not in the RC.

The usual blog post (http://www.vapoursynth.com/2016/04/r32-interlaced-resizing-is-evil/).

Mostly bug fixes, one of them important since it fixes caches not always being properly added since the nfMakeLinear addition in R30.

And interlaced resizing. Because the world is a horrible place.

asarian
8th April 2016, 21:14
Thank you!! :)

asarian
10th April 2016, 15:09
Hmm, how do I tackle this one?

vid = core.avisource.AVISource ("f:/jobs/test.avi")

Script evaluation failed:
Python exception: AVISource: couldn't locate a decompressor for fourcc DX50
Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 1491, in vapoursynth.vpy_evaluateScript (src\cython\vapoursynth.c:26897)
File "f:\jobs\test.vpy", line 7, in <module>
vid = core.avisource.AVISource ("f:/jobs/test.avi")
File "src\cython\vapoursynth.pyx", line 1383, in vapoursynth.Function.__call__ (src\cython\vapoursynth.c:25204)
vapoursynth.Error: AVISource: couldn't locate a decompressor for fourcc DX50

stax76
10th April 2016, 15:13
install either

DivX, XviD or ffdshow VFW decomressor

or use ffms2 or l-smash-works

LigH
10th April 2016, 15:15
Do you have a VfW decoder for DivX 5+ installed? (Assuming that AVISource requires installed VfW codecs as decoder...)

stax76
10th April 2016, 15:19
Do you have a VfW decoder for DivX 5+ installed? (Assuming that AVISource requires installed VfW codecs as decoder...)

vs AVISource uses VFW like avs AVISource so vs AVISource can open avs for instance to use avs DGSource.

asarian
10th April 2016, 15:19
install either

DivX or ffdshow VFW decomressor

or use ffms2 or l-smash-works

About the latter, 'core.lsmas.LWLibavSource' made the process crash immediately. I'll try ffms2, and I'll look into getting the other 2 to work with VS. Thanks!

Darn AVI! I hate that format!

asarian
10th April 2016, 15:43
'vid = core.ffms2.Source' can't make head or tails out of it either. It just keeps blabbing about needing to crop (and even when I do, it makes no difference):


Python exception: Crop: cropped area needs to have mod 2 height offset
Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 1491, in vapoursynth.vpy_evaluateScript (src\cython\vapoursynth.c:26897)
File "F:\jobs\test.vpy", line 9, in <module>
vid = core.std.CropRel (clip=vid, left=0, right=0, top=1, bottom=0)
File "src\cython\vapoursynth.pyx", line 1383, in vapoursynth.Function.__call__ (src\cython\vapoursynth.c:25204)
vapoursynth.Error: Crop: cropped area needs to have mod 2 height offset

sneaker_ger
10th April 2016, 15:47
"mod 2" means you can only achieve even numbers of pixel dimension. You cannot crop just one pixel away, you have to crop away 2 or 4 or 6 or 8 etc. This depends on the colorspace. For progressive YUV 4:2:0 you need to use mod 2.

asarian
10th April 2016, 15:50
"mod 2" means you can only achieve even numbers of pixel dimension. You cannot crop just one pixel away, you have to crop away 2 or 4 or 6 or 8 etc. This depends on the colorspace. For progressive YUV 4:2:0 you need to use mod 2.

The AVI in question has a height of 225; so cropping per 2 is going to prove difficult; but I can add a border first. :) Thx.

EDIT: Yeah, AddBorders isn't going to work either, for the same reason. Sigh.

LigH
10th April 2016, 16:03
Must be quite a *censored* who produced such videos ... I wonder if you have a chance to ask the codec to return RGB24 or RGB32 (with their respective ffmpeg style format strings).
__

Different question:

Does anyone provide binaries of plugins ported by VFR-maniac, but only linked as source repos on the plugins list (http://www.vapoursynth.com/doc/pluginlist.html) (FFT3DFilter (https://github.com/VFR-maniac/VapourSynth-FFT3DFilter), ReduceFlicker (https://github.com/VFR-maniac/VapourSynth-ReduceFlicker), TNLMeans without OpenCL (https://github.com/VFR-maniac/VapourSynth-TNLMeans))?

asarian
10th April 2016, 16:22
Must be quite a *censored* who produced such videos ...

I'll say. ;)

This is totally silly. I can resize it first, but then I can't deblock it properly any more. Arghh.

asarian
10th April 2016, 16:37
I'll say. ;)

This is totally silly. I can resize it first, but then I can't deblock it properly any more. Arghh.

On that note, could I use some sort of Overlay() in VS? (So as to crop things later) Didn't find an Overlay() function in VS, but I'm sure it supports something similar.

LigH
10th April 2016, 21:58
I remember that in AviSynth, you could resize a clip rectangle, optionally. Not sure if VapourSynth supports this syntax too.

asarian
10th April 2016, 23:21
I remember that in AviSynth, you could resize a clip rectangle, optionally. Not sure if VapourSynth supports this syntax too.

I had to fall back to AviSynth, for the moment, and do the OverLay() trick: not particularly elegant, but it works. I simply start with a static 400x240 background image, and overlay the oddly coded 400x225 vid over it (at x=0, y=0), and then crop -16 from the bottom, when all deblocking/denoising etc is done.

Really would love to see Overlay() in VS too, one day. :)

feisty2
11th April 2016, 03:27
I had to fall back to AviSynth, for the moment, and do the OverLay() trick: not particularly elegant, but it works. I simply start with a static 400x240 background image, and overlay the oddly coded 400x225 vid over it (at x=0, y=0), and then crop -16 from the bottom, when all deblocking/denoising etc is done.

Really would love to see Overlay() in VS too, one day. :)

Overlay is lame sh*t, the fancy way to do such thing is doing it under gray color space, 3 gray clips, one for each plane

asarian
11th April 2016, 03:33
^^ Maybe you should have told me that 4 posts ago?! :) Anyway, 'quick and dirty' works for me.

Elegant
11th April 2016, 04:16
Does anyone provide binaries of plugins ported by VFR-maniac, but only linked as source repos on the plugins list (http://www.vapoursynth.com/doc/pluginlist.html) (FFT3DFilter (https://github.com/VFR-maniac/VapourSynth-FFT3DFilter), ReduceFlicker (https://github.com/VFR-maniac/VapourSynth-ReduceFlicker), TNLMeans without OpenCL (https://github.com/VFR-maniac/VapourSynth-TNLMeans))?

I've been searching for this as well; it shouldn't be that bad to do it by hand though.

l33tmeatwad
11th April 2016, 23:14
Does anyone provide binaries of plugins ported by VFR-maniac, but only linked as source repos on the plugins list (http://www.vapoursynth.com/doc/pluginlist.html) (FFT3DFilter (https://github.com/VFR-maniac/VapourSynth-FFT3DFilter), ReduceFlicker (https://github.com/VFR-maniac/VapourSynth-ReduceFlicker), TNLMeans without OpenCL (https://github.com/VFR-maniac/VapourSynth-TNLMeans))?
Ask and ye shall receive:
FFT3DFilter (http://www.mediafire.com/download/ajq0cbsg94qhpc5/VapourSynth-FFT3DFilter.7z)
ReduceFlicker (http://www.mediafire.com/download/7bna7baoaqe1gue/VapourSynth-ReduceFlicker_r2.7z)
TNLMeans (http://www.mediafire.com/download/rnv4hqp6edz4x66/VapourSynth-TNLMeans_r30.7z)

I only tested the x64 versions of each...

LigH
11th April 2016, 23:23
A bunch of :thanks: to you...

littlepox
12th April 2016, 17:48
There is a bug in using Expr:

import vapoursynth as vs
import sys


core = vs.get_core()

core.max_cache_size=1000

a = "anysource.mkv"
src8 = core.lsmas.LWLibavSource(a,threads=1)

res = core.std.Expr(src8, ["128 x - 1 < 128 128 ?",""])
res.set_output()


the vapoursynth.dll shall crash.
However, once can just avoid it by using "x - 128 -1 > 128 128 ?"

Waiting for replies, thanks.

jackoneill
12th April 2016, 19:48
There is a bug in using Expr:

import vapoursynth as vs
import sys


core = vs.get_core()

core.max_cache_size=1000

a = "anysource.mkv"
src8 = core.lsmas.LWLibavSource(a,threads=1)

res = core.std.Expr(src8, ["128 x - 1 < 128 128 ?",""])
res.set_output()


the vapoursynth.dll shall crash.
However, once can just avoid it by using "x - 128 -1 > 128 128 ?"

Waiting for replies, thanks.

Fixed now. It affects expressions that use the ternary operator, where its first operand is an expression that begins with a constant.

littlepox
13th April 2016, 04:15
Fixed now. It affects expressions that use the ternary operator, where its first operand is an expression that begins with a constant.

Thanks dude. So efficient.:thanks:

BakaProxy
16th April 2016, 07:29
Just a thought I had recently but is it actually possible to use vpy within c++ without having to call python scripts snd whatnot. I'm talking about calling vpy functions and plugins from within the cpp project.

For example I have a cpp project that generates an image and I want to resize that image without fully making my own resize function, could I then call vpy's internal resize function to do the work or even call the nnedi3 plugin?

feisty2
16th April 2016, 09:02
see
https://github.com/dubhater/vapoursynth-nnedi3/commit/51ad1bd6aec7362f146552939c141e8f874a1f87

jackoneill
16th April 2016, 09:05
Just a thought I had recently but is it actually possible to use vpy within c++ without having to call python scripts snd whatnot. I'm talking about calling vpy functions and plugins from within the cpp project.

For example I have a cpp project that generates an image and I want to resize that image without fully making my own resize function, could I then call vpy's internal resize function to do the work or even call the nnedi3 plugin?

Yes, it's possible. You can build a filter graph in C/C++. Here is an example that happens to invoke the internal resizer: https://github.com/vapoursynth/vapoursynth/blob/master/src/filters/assvapour/assvapour.c#L504 . For your particular case, you'll also need to implement a VapourSynth source filter in your application.

If it's only the internal resizer you want, you should use zimg directly. It has C (https://github.com/sekrit-twc/zimg/blob/master/src/zimg/api/zimg.h) and C++ (https://github.com/sekrit-twc/zimg/blob/master/src/zimg/api/zimg++.hpp) APIs.

sofakng
18th April 2016, 18:16
Has anybody been able to cross-compile VapourSynth using Linux?

I'm trying to use MXE (M Cross Environment; mingw32-w64 toolchain builder) and it compiles mpv without any problems, but VapourSynth requires Python 3.4 and I'm stumped on how to properly compile the VapourSynth DLL...