View Full Version : Vapoursynth
Myrsloik
14th November 2018, 12:49
Please update the doc (http://vapoursynth.com/doc/) to R45 :thanks:
Done. But not really any big changes...
lansing
24th November 2018, 16:39
I don't know if this is a bug or just me, when I opened a script with avfs.exe, pressing crtl+c did not exit the program.
Myrsloik
24th November 2018, 16:41
I don't know if this is a bug or just me, when I opened a script with avfs.exe, pressing crtl+c did not exit the program.
It's an exciting new bug. Python 3.7 probably changed something about how it's handled.
asarian
5th December 2018, 02:01
Finally upgraded to R45 (from R32 even). I can no longer mount my .vpy scripts, though. :( I have the AV FileSystem, and the Pismo filesystem. What am I missing?
poisondeathray
5th December 2018, 03:09
Finally upgraded to R45 (from R32 even). I can no longer mount my .vpy scripts, though. :( I have the AV FileSystem, and the Pismo filesystem. What am I missing?
is script valid ?
vspipe --info script.vpy -
is there error message?
are you using current avfs.exe that came with vapoursynth?
asarian
5th December 2018, 03:27
is script valid ?
vspipe --info script.vpy -
is there error message?
are you using current avfs.exe that came with vapoursynth?
Thx for the swift reply. :)
Yes, the script is valid:
F:\jobs>vspipe --info test.vpy -
Width: 720
Height: 480
Frames: 6307
FPS: 30000/1001 (29.970 fps)
Format Name: YUV420P8
Color Family: YUV
Alpha: No
Sample Type: Integer
Bits: 8
SubSampling W: 1
SubSampling H: 1
Core freed but 537600 bytes still allocated in framebuffers
Also, I can simply run avfs.exe test.vpy, and it will mount the .vpy file. What I can no longer do, though, is 'contextually' mount it, with the Pismo system (right-click, and mount the script), like I used to be able to.
And yes, I use the 119 KB avfs.exe that the R45 (apparently) installed.
poisondeathray
5th December 2018, 03:56
Also, I can simply run avfs.exe test.vpy, and it will mount the .vpy file. What I can no longer do, though, is 'contextually' mount it, with the Pismo system (right-click, and mount the script), like I used to be able to.
It doesn't use Pismo anymore, or the context menu
The older Pismo context menu still can work for avs scripts (I have it concurrently working for 32bit), I don't think it can run vpy scripts (or maybe it can run 32bit vapoursynth, not sure)
lansing
5th December 2018, 05:31
Yeah the right click->quick mount context menu is missing now, what I do now is make a avfs.exe shortcut and paste it into folders where I need it, and then just drag the vpy into the shortcut to mount it.
asarian
5th December 2018, 05:51
Yeah the right click->quick mount context menu is missing now, what I do now is make a avfs.exe shortcut and paste it into folders where I need it, and then just drag the vpy into the shortcut to mount it.
Aww, too bad that functionality is gone: I really liked it. Thx guys.
Good tip on the shortcut, btw. :) Thx.
kypec
9th December 2018, 12:08
Hi Myrsloik,
I am trying to build vapoursynth from git repo on LinuxMint 19 Tara (distro is based upon Ubuntu 18.04) and followed your instructions carefully. Btw, your required packages are missing one component automake which was easy to discover and install. I also cloned and built latest zimg without problems.
I autogenerated and configured your cloned repo successfully but make process fails with some cython error, complete make log is pasted here (https://pastebin.com/WhNvSqAc). Also, there are lots of warnings too :confused:
Please advice how to rectify this problem, :thanks:
Myrsloik
9th December 2018, 12:47
Hi Myrsloik,
I am trying to build vapoursynth from git repo on LinuxMint 19 Tara (distro is based upon Ubuntu 18.04) and followed your instructions carefully. Btw, your required packages are missing one component automake which was easy to discover and install. I also cloned and built latest zimg without problems.
I autogenerated and configured your cloned repo successfully but make process fails with some cython error, complete make log is pasted here (https://pastebin.com/WhNvSqAc). Also, there are lots of warnings too :confused:
Please advice how to rectify this problem, :thanks:
Cython compilation errors usually mean the cython version is too old. Update cython with pip to the latest version.
kypec
9th December 2018, 15:16
Cython compilation errors usually mean the cython version is too old. Update cython with pip to the latest version.
Thanks for the hint but I don't know how precisely am I supposed to update my cython. I have tried the following:kypec@acer:~/vapoursynth$ pip install Cython
Collecting Cython
Downloading https://files.pythonhosted.org/packages/b3/b8/31ce8eb5fc8dd7a8900d0bc7ed4291fc823e7356c9db136c208d74b04353/Cython-0.29.1-cp27-cp27mu-manylinux1_x86_64.whl (2.0MB)
100% |████████████████████████████████| 2.0MB 600kB/s
Installing collected packages: Cython
Successfully installed Cython-0.29.1
kypec@acer:~/vapoursynth$ cython3 --version
Cython version 0.26.1
Then I tried:kypec@acer:~/vapoursynth$ pip install --upgrade Cython
Collecting Cython
Using cached https://files.pythonhosted.org/packages/b3/b8/31ce8eb5fc8dd7a8900d0bc7ed4291fc823e7356c9db136c208d74b04353/Cython-0.29.1-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: Cython
Successfully installed Cython-0.29.1
kypec@acer:~/vapoursynth$ cython3 --version
Cython version 0.26.1
Although the install/upgrade process reports success, the version check always yields Cython version 0.26.1
How the heck is one supposed to UPGRADE that package then? :angry:
StainlessS
9th December 2018, 18:57
Kypec,
I tried install of VS some time ago, (and eventually gave up as Ubuntu apparently had some packages missing/broken),
but see here (pip3), maybe it helps, no idea (linux/VS virgin):- https://forum.doom9.org/showthread.php?p=1794992#post1794992
EDIT: Ill probably try again on Mint & Gentoo soon.
[pip3 = python v3.xx version of pip(v2.7)]
qyot27
9th December 2018, 20:19
You have to install Cython to the system, not the user area. Use sudo with pip/pip3.
Or just use the package from Ubuntu 18.10 and install it with dpkg. (https://packages.ubuntu.com/cosmic/cython)
kypec
10th December 2018, 12:58
Thank you StainlessS & qyot27 for suggestions. Yes, I fixed the problem by using pip3 install --upgrade cython instead of (legacy?) pip but forgot to reply here. The last obstacle was to resolve issues with environment variables LD_LIBRARY_PATH and PYTHONPATH but finally -> vspipe runs as expected!
Selur
20th January 2019, 15:55
Is there a Vapoursynth plugin which can show the wave front of an audio clip? (I'd like to see the wave front when deciding there to cut/trim a source.)
F1nkster
22nd January 2019, 14:16
Having an issue on Win10 using a custom Python library path with VapourSynth. I add the path to PYTHONPATH and everything works fine from the Python CLI. I then go into VSEdit and add the path in Settings. It works fine only when I run VSEdit as Admin. It fails to find my libraries if I run as my normal user account.
At first, I thought it was an issue with VSEdit. However, I am having the same problem loading a VPY script into VDub2. I have to run VDub2 as Admin for the custom path to work, which makes me think there's something else going on beyond VSEdit.
I gave my user account full rights to the Python37, VapourSynth, and VapourSynth Editor directories and everything in them. And my account already has full access to the custom library path. I reinstalled Python37 with support for All Users. None of this helped.
Btw, my normal user account works fine with the standard Python37\Lib\site-packages\vapoursynth directory. No issues there. So that's my fallback.
Just seeing if anyone else has thoughts.
Revan654
25th January 2019, 04:38
Is there any on going issues currently with Windows 10 that's causing any kind of issues with Python or VapourSynth? It seems like I'm doing nothing but fighting with these two parts. I checked Registry and file locations everything is pointing to the correct path / files. Not even VS Editor wants to load now.
Last night it was fine, then when I booted up today nothing. I know last night Windows updated something, along with VS 2017.
Revan654
25th January 2019, 20:01
Finally Fixed it after hours of Playing around with python. It worked after I installed Numpy & Pillow.
_Al_
26th January 2019, 09:20
Hi, I know this is wrong:
clip = core.resize.Bicubic(clip, vs.RGB24)
but it causes crash for all apps loading script, that error is not caught by script evaluations, perhaps vs.RGB24 is being loaded into wrong place. It gives out legit VideoNode though. RAM overruns even with core.max_cache_size set.
Revan654
26th January 2019, 19:33
Hi, I know this is wrong:
clip = core.resize.Bicubic(clip, vs.RGB24)
but it causes crash for all apps loading script, that error is not caught by script evaluations, perhaps vs.RGB24 is being loaded into wrong place. It gives out legit VideoNode though. RAM overruns even with core.max_cache_size set.
Your missing format syntax. You should only leave out the syntax if you know exactly the order of the variables are.
clip = core.resize.Bicubic(clip, format=vs.RGB24)
You could also Use this:
clip = core.fmtc.resample (clip, css="444")
clip = core.fmtc.matrix (clip, mat="709", col_fam=vs.RGB)
clip = core.fmtc.bitdepth (clip, bits=8)
_Al_
26th January 2019, 22:43
Yes, I wanted to bring up if anyone makes this line it freezes and crashes, because Vapoursynth takes 2000010 (id for vs.RGB24) as width.
Argument width, does not have to be explicitly stated, width=something. But that resize is quite complex thing. Color spaces conversions etc., maybe it should be mandatory to state width=something, format=something. Not gravely important, sure.
This is one of those things to repel newcomers to use Vapoursynth. Resize is almost used in every script. So format has to be specified, but not width, not a consistent somehow. It is hard to understand if you are a video guy, not a programmer. But again, I do not expect this to be fixed, I take it as a flag if someone googles it or whatever.
poisondeathray
26th January 2019, 23:19
No pathway . That's the error message.
If "clip" is YUV, you need to specify matrix_in_s="709" (or whatever matrix) , if it's not already specified in the clip props
_Al_
26th January 2019, 23:40
I understand that. It took me some hours though to figure that out last year. It takes that value from props, if it is usable, it uses it. Sometimes it is in props , sometimes not, it depends if source filter registers that taking it from video. If not , it has to be specified, if it is needed and not specified error is returned. Which in a sense is great, because we do not want to have any defaults in background going on. If those values loaded by source plugin taken from video are correct ones is another issue of course.
Also values in props are numerical (int) and to get corresponding string value, other script lines are needed to put it on screen. Which you of course can mess you up if you are learning it. :-) matrix table of numerical values with corresponding string values:
matrix_ITU = {0:'rgb', 1:'709', 2:'unspec', 3:'reserved', 4:'fcc',
5:'470bg', 6:'170m', 7:'240m', 8:'ycgco', 9:'2020ncl',
10:'2020cl' , 100:'OPP',
}
matrix_USABLE_ITU = ['709', 'fcc', '470bg', '170m', '240m', 'ycgco', '2020ncl', '2020cl', 'OPP']
myrsloik website explains that but those numbers are not matching, I pulled them from here (https://www.itu.int/rec/T-REC-H.265-201802-I/en)
page 430 Table E.5 Matrix coefficients interpretation
lansing
27th January 2019, 00:31
Yes, I wanted to bring up if anyone makes this line it freezes and crashes, because Vapoursynth takes 2000010 (id for vs.RGB24) as width.
Yup the error handling is missing, it should return the error instead of crashing the program.
qyot27
27th January 2019, 01:55
This is one of those things to repel newcomers to use Vapoursynth. Resize is almost used in every script. So format has to be specified, but not width, not a consistent somehow. It is hard to understand if you are a video guy, not a programmer. But again, I do not expect this to be fixed, I take it as a flag if someone googles it or whatever.
The problem was that the parameter order wasn't obeyed, so when you told it width=vs.RGB24 (which is what you did by omitting actual width and height and then not explicitly declaring format=), it did exactly what it was told and interpreted 'vs.RGB24' as an integer.
video,848,480,vs.RGB24 = this will work
video,vs.RGB24 = this won't work
AviSynth works exactly the same way concerning parameter order - if you drop one parameter in the middle, everything after that requires explicitly declaring the parameter name too for the values to be set to the right option.
The actual source of the immediate crash is that resizing to 2 million pixels wide is going to cause problems *somewhere* in the chain.
asarian
1st February 2019, 05:33
Can you set a (vertical) offset to core.sub.ImageFile? Really looking to lower the subs a bit.
jackoneill
1st February 2019, 13:01
Can you set a (vertical) offset to core.sub.ImageFile? Really looking to lower the subs a bit.
No, but if you pass blend=False you get only the subtitles, and you can use Crop and AddBorders to move them. Of course then you have to blend them manually with your video clip.
http://www.vapoursynth.com/doc/plugins/subtext.html
asarian
1st February 2019, 15:11
No, but if you pass blend=False you get only the subtitles, and you can use Crop and AddBorders to move them. Of course then you have to blend them manually with your video clip.
http://www.vapoursynth.com/doc/plugins/subtext.html
Thanks.
I tried to whip out the old SupTitle.dll (as I remembered it can do 'relocation'), but that wouldn't run somehow:
core.avs.LoadPlugin ("C:/VS/plugins/SupTitle.dll")
Should still work, right?!
EDIT: Yeah, that's an old 32-bit filter. :) Nevermind.
lansing
2nd February 2019, 02:25
Would it be a good idea for vapoursynth to implicitly set the value of an argument to its default value when we declared it without giving it a value? Something like this
fm = core.vivtc.VFM(clip, order)
instead of this
fm = core.vivtc.VFM(clip, order=0) # assuming 0 is the default
Sometime when I'm testing a filter, I would display all its arguments with vs editor's autocomplete feature, and I don't want to go into the manual to enter the default value manually for everyone of them.
Boulder
3rd February 2019, 13:07
I was trying to load pinterf's MVTools2 build in Vapoursynth, but the functions don't appear in the avs namespace (using core.avs.MAnalyze just says that the function doesn't exist). I get this error in the VapourSynth Editor log, is it the reason?
Avisynth Compat: varargs not implemented so I'm just gonna skip importing MStoreVect
Myrsloik
3rd February 2019, 18:47
I was trying to load pinterf's MVTools2 build in Vapoursynth, but the functions don't appear in the avs namespace (using core.avs.MAnalyze just says that the function doesn't exist). I get this error in the VapourSynth Editor log, is it the reason?
Avisynth Compat: varargs not implemented so I'm just gonna skip importing MStoreVect
Support for avisynth mvtools was removed in R40 due to the ugly hacks needed that slowed down all avisynth filter creation. And and a native version has existed for a long time now.
You can probably grab the avscompat.dll from R39 and use that if you really want to test things though.
Boulder
3rd February 2019, 19:51
Thanks, looks like I'll skip it then. I was just thinking about testing it in case Zopti starts crashing the native plugin which probably doesn't have all the fixes and tweaks from the AVS version. It's been quite some time since the last commit.
Myrsloik
3rd February 2019, 20:03
Thanks, looks like I'll skip it then. I was just thinking about testing it in case Zopti starts crashing the native plugin which probably doesn't have all the fixes and tweaks from the AVS version. It's been quite some time since the last commit.
Just report the bugs you find and they should probably get fixed quite quickly.
gonca
3rd February 2019, 22:26
https://forum.doom9.org/showthread.php?t=154696Thanks.
I tried to whip out the old SupTitle.dll (as I remembered it can do 'relocation'), but that wouldn't run somehow:
core.avs.LoadPlugin ("C:/VS/plugins/SupTitle.dll")
Should still work, right?!
EDIT: Yeah, that's an old 32-bit filter. :) Nevermind.
zorr
3rd February 2019, 23:04
Thanks, looks like I'll skip it then. I was just thinking about testing it in case Zopti starts crashing the native plugin which probably doesn't have all the fixes and tweaks from the AVS version. It's been quite some time since the last commit.
The latest released version crashes... a lot. :) I recommend using the version jackoneill shared after fixing this issue (https://github.com/dubhater/vapoursynth-mvtools/issues/35) (download link available at that url).
Just report the bugs you find and they should probably get fixed quite quickly.
I have another issue open, hopefully that one can be fixed as well. But I totally understand it can take time, the author is doing this on his free time after all.
Fabulist
4th February 2019, 05:32
Hello,
May I ask if there is some kind of guide or documentation to help me make VapourSynth work with PotPlayer (more specifically, with madVR/SVP)? I have been researching this for days; I run multiple different installations of both VapourSynth and PotPlayer, seemingly appropriate, but I simply cannot make it work with PotPlayer itself, and of course not with anything else - I have no idea what I am missing.
Sorry to bother, and I am sorry if this is not the right place to ask.
Thanks.
hydra3333
12th February 2019, 07:31
Intel claim to speed up python runtime by 20x, for free
https://www.infoworld.com/article/3314716/software/accelerated-python-give-python-an-even-bigger-boost-with-no-code-changes.html?cid=em-elq-43417&utm_source=elq&utm_medium=email&utm_campaign=43417&elq_cid=4495538
Intel’s distribution is a tuned version of the open source Python we all normally use. It’s been prebuilt to deliver much higher performance by a variety of methods, but most importantly by relying on the Intel Performance Libraries to accelerate x86 and x86-64 performance. This means that performance improvements can come without changing our Python code.
I suppose this does not have any relevance to vapoursynth ?
Cheers
asarian
12th February 2019, 11:17
Intel claim to speed up python runtime by 20x, for free
https://www.infoworld.com/article/3314716/software/accelerated-python-give-python-an-even-bigger-boost-with-no-code-changes.html?cid=em-elq-43417&utm_source=elq&utm_medium=email&utm_campaign=43417&elq_cid=4495538
I suppose this does not have any relevance to vapoursynth ?
Cheers
Probably none. :) The real work is done in the filters.
RainyDog
13th February 2019, 14:17
Vapoursynth newbie here.
Can anyone help me get this (https://pastebin.com/YMBnDLE4) bbmod AVS port to work please?
I assume it should be something along the lines of the below syntax but with the correct instruction to replace the *?
clip = core.*.bbmod2(c, cTop = 0, cBottom = 0, cLeft = 0, cRight = 0, thresh = 128, blur = 999)
Thanks.
Selur
13th February 2019, 16:00
assuming you named the file DUMMY.py and placed int into the autoloading folder (http://www.vapoursynth.com/doc/autoloading.html),
# Import the script
import DUMMY
# ... whatever you do otherwise in your script
# call the script
clip = DUMMY.bbmod(c=clip, cTop = 0, cBottom = 0, cLeft = 0, cRight = 0, thresh = 128, blur = 999)
if you keep the file inside another folder than the autoload folder for example e:/vsfilters you need to to use something like:
# Imports
import os
import sys
# Import scripts folder
scriptPath = 'e:/vsfilters'
sys.path.append(os.path.abspath(scriptPath))
# Import script
import DUMMY
# ... whatever you do otherwise in your script
# call the script
clip = DUMMY.bbmod(c=clip, cTop = 0, cBottom = 0, cLeft = 0, cRight = 0, thresh = 128, blur = 999)
DJATOM
13th February 2019, 16:22
It should be DUMMY.py, not vpy.
Selur
13th February 2019, 16:45
Yup, fixed :)
Mystery Keeper
13th February 2019, 19:51
Intel claim to speed up python runtime by 20x, for free
https://www.infoworld.com/article/3314716/software/accelerated-python-give-python-an-even-bigger-boost-with-no-code-changes.html?cid=em-elq-43417&utm_source=elq&utm_medium=email&utm_campaign=43417&elq_cid=4495538
I suppose this does not have any relevance to vapoursynth ?
Cheers
No, it does not. Python scripts are used to build the filters graph and pretty much for nothing else. VapourSynth doesn't really depend on Python. Someone could make a new language for it. But it would be hard to beat Python's vast infrastructure.
Selur
16th February 2019, 08:17
Is there something like Wavefront for Vapoursynth?
I'd like to do something along the (Avisynth) lines of:
LoadPlugin("I:\MkvCutter\ffms2.dll")
LoadPlugin("I:\MkvCutter\waveform.dll")
function m4(float x) {return(x<16?16:int(round(x/4.0)*4))}
V = FFVideoSource("F:\Family.mkv", cachefile="F:\Family.ffindex", threads=1).ConvertToYv12()
A = FFAudioSource("F:\Family.mkv", cache=false).ConvertToMono
V = V.BicubicResize(Ceil(V.Width*1)-(Ceil(V.Width*1)) % 4, V.Height)
AudioDub(V,A).WaveForm(window=1, height=m4(V.Height/4.0))
which is
a. taking audio and video from a source
b. converting the audio to mono
c. overlaying the audio wavefront onto the video
Did some googling, but couldn't find anything.
So does someone know how to do this with Vapoursynth or is it simply not possible atm. ?
Cu Selur
Mystery Keeper
16th February 2019, 21:39
Is there something like Wavefront for Vapoursynth?
I'd like to do something along the (Avisynth) lines of:
LoadPlugin("I:\MkvCutter\ffms2.dll")
LoadPlugin("I:\MkvCutter\waveform.dll")
function m4(float x) {return(x<16?16:int(round(x/4.0)*4))}
V = FFVideoSource("F:\Family.mkv", cachefile="F:\Family.ffindex", threads=1).ConvertToYv12()
A = FFAudioSource("F:\Family.mkv", cache=false).ConvertToMono
V = V.BicubicResize(Ceil(V.Width*1)-(Ceil(V.Width*1)) % 4, V.Height)
AudioDub(V,A).WaveForm(window=1, height=m4(V.Height/4.0))
which is
a. taking audio and video from a source
b. converting the audio to mono
c. overlaying the audio wavefront onto the video
Did some googling, but couldn't find anything.
So does someone know how to do this with Vapoursynth or is it simply not possible atm. ?
Cu SelurLikely not done by anyone. Implementable by making a source filter that reads audio from media files and generates the waveform video.
tebasuna51
17th February 2019, 13:12
@Selur, remember than VapourSynth don't support audio.
Don't exist any xxAudioSource() or AudioDub().
waveform.dll can't read audio data inside VapourSynth.
Like Mystery Keeper say a new source filter must do all the job:
a. taking audio from a source
b. converting the audio to mono
c. supply the waveform converted to video
Selur
17th February 2019, 13:18
Yeah, I hoped I missed something and that there already were filters to do all this. :)
-> Thanks for confirming, that there currently isn't a filter in Vapoursynth to do what I wanted. :)
asarian
17th February 2019, 16:11
@Selur, remember than VapourSynth don't support audio.
Nor should it, IMHO. There's absolutely no point letting VS do audio conversions, when you can just use eac3to to convert/extract your audio outside the VS process.
lansing
17th February 2019, 20:44
Nor should it, IMHO. There's absolutely no point letting VS do audio conversions, when you can just use eac3to to convert/extract your audio outside the VS process.
There can a point when he's trimming the video in the script, there he would have to set the same trim on the audio as well so they can be in sync.
Some audio trimming programs can takes in a cut_list file and trim the audio according to the cut points in that file. It would be nice to have vapoursynth or vs editor to output these cut_list file as well according to the trimming in the script.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.