View Full Version : Vapoursynth
vcmohan
1st October 2014, 03:55
Thanks. Sorry I forgot about it @mysteryKeeper.
I want to know whether there is any player that accepts all these formats? On XP vdub was playing RGB, but on my win8.1, it does not and complains that the vfw has no decompressor for it.Tried to install ffdshow (sorry name may not be correct) but it did not allow me unless I allow a task bar, change default search engine etc; So got vexed and did not install it.
vcmohan
1st October 2014, 04:02
There's no easy way to make sure your plugin will never have the same namespace as someone else's. Just look at the already existing plugins to see what they used. I probably should make a list of the already taken ones for easy reference.
I find there are many threads for plugins and becomes difficult to select a unique namespace. Can a special (sticky preferably) thread be started wherin plugin developers are forced to list the namespace? Possibly it may be too much work if a master list is maintained by the vapoursynth team.
Mystery Keeper
1st October 2014, 08:54
Thanks. Sorry I forgot about it @mysteryKeeper.
I want to know whether there is any player that accepts all these formats? On XP vdub was playing RGB, but on my win8.1, it does not and complains that the vfw has no decompressor for it.Tried to install ffdshow (sorry name may not be correct) but it did not allow me unless I allow a task bar, change default search engine etc; So got vexed and did not install it.I'll try to make my editor preview all VapourSynth supported formats sometime soon.
foxyshadis
1st October 2014, 09:27
Thanks. Sorry I forgot about it @mysteryKeeper.
I want to know whether there is any player that accepts all these formats? On XP vdub was playing RGB, but on my win8.1, it does not and complains that the vfw has no decompressor for it.Tried to install ffdshow (sorry name may not be correct) but it did not allow me unless I allow a task bar, change default search engine etc; So got vexed and did not install it.
The links from the home page (http://ffdshow-tryout.sourceforge.net/download.php) do NOT contain any adware, Sourceforge-provided or otherwise. I don't know where you got the others, but you might want to scan your system in case anything did get installed despite cancelling.
vcmohan
2nd October 2014, 03:57
I clicked on the home page and I was taken to that page. So I did not download it. I will try again.
vcmohan
3rd October 2014, 03:22
I have output a avi file from virtualdub. When I read it directly by vdub or through avisynth with avisource it renders correctly. But with vapoursynth avisource.AVISource it appears upside down. Is there a problem?
RTW47
3rd October 2014, 12:44
I remember there was a problem in the past, then converting from/to COMPATBGR32. But if (after some colorspace conversions or for other reasons) output is flipped upside down you can always include core.std.FlipVertical afterwards.
vcmohan
4th October 2014, 03:27
I know that one can get around by doing turnleft twice, but first of all rendering must be correct. When I use pixel position coordinates in several processings like rotate, correct for barrel and pincushion aberrations, quadrilateral perspective etc, I need to know how the frame is rendered. Topside down or normal. But avisource.AVISource rendering appears to be incorrect.
vcmohan
20th October 2014, 04:07
How do I access from core numThreads? core->numThreads is a compiler error.
Myrsloik
20th October 2014, 08:52
How do I access from core numThreads? core->numThreads is a compiler error.
You probably shouldn't use the number of threads explicitly in a filter. Exactly why do you need to know the number of threads?
YamashitaRen
20th October 2014, 08:56
Hello,
Removegrain can't be compiled on my ARM board (cause of SSE2 things if I understood clearly). Is it a known issue or should I write something on github ?
Myrsloik
20th October 2014, 09:23
Hello,
Removegrain can't be compiled on my ARM board (cause of SSE2 things if I understood clearly). Is it a known issue or should I write something on github ?
Post the compilation errors in a bug report. It should compile everywhere.
vcmohan
21st October 2014, 03:22
You probably shouldn't use the number of threads explicitly in a filter. Exactly why do you need to know the number of threads?
I use libFFTW3f-3.dll in my fftquiver plugin. It is thread safe but needs to be initialized with calls fftw_init_threads and then fftw_with_nthreads(nthreads). So I would like to get this info from vapoursynth and use it here.
Selur
21st October 2014, 10:35
@Mystery Keeper: Reading that you are using a portable Winpython, did you manage to get Vapoursynth portable? (I like the idea of having vapoursynth on an usb stick) If you did manage to create a portable Vapoursynth package, could you share it or write a small guide on how to set it up?
Mystery Keeper
21st October 2014, 17:04
@Selur: I've never tried. VapourSynth uses Windows registry to get both its own and Python paths. "Portable" Python modifies these entries to be accessible from any folder. But that's likely something you wouldn't like to do from USB stick on different PCs. In short: while VapourSynth uses Python, there's no convenient way to make it portable. Maybe there's some way to emulate registry, but I don't know about it.
By the way, VapourSynth as it is does not depends on Python. Python is used for filters graph construction. Other language can be created for that with its own interpreter. But that's a lot of work. I personally haven't got knowledge for such task.
Myrsloik
21st October 2014, 17:39
@Mystery Keeper: Reading that you are using a portable Winpython, did you manage to get Vapoursynth portable? (I like the idea of having vapoursynth on an usb stick) If you did manage to create a portable Vapoursynth package, could you share it or write a small guide on how to set it up?
Patches or suggestions on what to change to make it portable are welcome. Personally I never need to drag applications around that way so I just don't keep it in mind.
Myrsloik
21st October 2014, 17:40
I use libFFTW3f-3.dll in my fftquiver plugin. It is thread safe but needs to be initialized with calls fftw_init_threads and then fftw_with_nthreads(nthreads). So I would like to get this info from vapoursynth and use it here.
HolyWu probably has the right answer for you then. It should be a reasonable default value at least.
Mystery Keeper
21st October 2014, 17:58
Patches or suggestions on what to change to make it portable are welcome. Personally I never need to drag applications around that way so I just don't keep it in mind.
Application launcher with code injector for registry access functions is the only way I can think of.
Limit64
23rd October 2014, 19:33
Python's default search path for modules contains the cwd. If you put all needed libraries into the cwd it should work. Alternatively you can just put the sys and os module into the cwd and use them to modify Python's search path in your script.
import sys
import os
sys.path.append(os.getcwd() + "/my_python_libraries")
# Your normal script
Mystery Keeper
24th October 2014, 15:15
@Limit64, problem is: both VapourSynth and Python are used as libraries. CWD is CWD of different programs that load them.
Selur
24th October 2014, 15:24
may be the path could be taken from an .ini file,...
Mystery Keeper
24th October 2014, 16:43
may be the path could be taken from an .ini file,...
And where could .ini file be taken from? Again, CWD can differ.
nu774
24th October 2014, 16:49
I think the following procedure should work (Registry is not required).
1) Open command prompt and set up PYTHONHOME and PATH environment variable by SET command. Both of location of python DLLs and Vapoursynth DLLs have to be included in the PATH environment variable so that they could be loaded.
2) After that, launch any program that uses Vapoursynth from the command prompt.
Path rule for Python on MS Windows is written in:
https://github.com/python/cpython/blob/master/PC/getpathp.c.
chainik_svp
24th October 2014, 22:26
Just curious - is there any chance VapourSynth will be available from ffdshow as a post processing filter or may be directly built into some video player (like AVS processing now built in Daum PotPlayer)
???
foxyshadis
25th October 2014, 00:13
Not without a patch. clsid is the only current maintainer of ffdshow, and he only makes trivial changes or commits patches.
Mystery Keeper
25th October 2014, 00:44
Just curious - is there any chance VapourSynth will be available from ffdshow as a post processing filter or may be directly built into some video player (like AVS processing now built in Daum PotPlayer)
???Probably can easily be built in. But the program will have to care about loading plugins and building the graph.
Myrsloik
2nd November 2014, 21:50
Just curious - is there any chance VapourSynth will be available from ffdshow as a post processing filter or may be directly built into some video player (like AVS processing now built in Daum PotPlayer)
???
It should be fairly easy to integrate into ffdshow or any other player in the same way as avisynth itnegration works. If I didn't hate the ffdshow codebase so much in general because it's a huge mess maybe I'd try to add it myself...
JEEB
3rd November 2014, 17:40
The mplayer{,2} fork mpv (http://mpv.io/) has already integrated VapourSynth for filtering purposes, so it is very much possible.
Myrsloik
3rd November 2014, 17:44
The mplayer{,2} fork mpv (http://mpv.io/) has already integrated VapourSynth for filtering purposes, so it is very much possible.
It also found a few bugs in the VS code by doing so. The next release will be the first one working well I think (or if you use git).
chainik_svp
3rd November 2014, 23:00
It should be fairly easy to integrate into ffdshow or any other player in the same way as avisynth itnegration works. If I didn't hate the ffdshow codebase so much in general because it's a huge mess maybe I'd try to add it myself...
I really think you should make this move. ffdshow integration is a good point to start to spread VS over the world :) the only thing is ffdshow is almost dead too, as the Avisynth is...
May be you could find a way to work together with nevcairiel as he was mentioned about possibility of integration VS into LAV?
The mplayer fork mpv (http://mpv.io/) has already integrated VapourSynth for filtering purposes, so it is very much possible.
thanks, will try it!
YamashitaRen
4th November 2014, 03:00
It also found a few bugs in the VS code by doing so. The next release will be the first one working well I think (or if you use git).
Ah ! So I assume that you're expecting VS to ~always compile ?
Didn't dare to bring the issue before R25 release ^^'
I have currently trouble building the cython wrapper. Bug report tomorrow ;)
Myrsloik
4th November 2014, 08:10
Ah ! So I assume that you're expecting VS to ~always compile ?
Didn't dare to bring the issue before R25 release ^^'
I have currently trouble building the cython wrapper. Bug report tomorrow ;)
Yes, it should compile most of the time. AND NEVER SAVE ISSUES UNTIL AFTER RELEASE.
Myrsloik
4th November 2014, 20:00
Does anyone actually use avisource? I'm beginning to think it's already kinda obsolete as a filter.
Mystery Keeper
4th November 2014, 21:14
I do use avisource.
Reel.Deel
5th November 2014, 03:41
Does anyone actually use avisource? I'm beginning to think it's already kinda obsolete as a filter.
I still use AviSource. Lately I've started using the MagicYUV (http://magicyuv.com/) codec and since there's currently no decoder for FFmpeg /Libav I'm force to use AviSource. (I don't keep up with FFmpeg/Libav development so I'm assuming this is still true)
Myrsloik
5th November 2014, 23:24
Here's R25 test 1 (https://www.dropbox.com/s/1jknougdnaf88ut/vapoursynth-r25-test1.exe?dl=0). Test it and all that. It should be realease quality.
The most interesting additions are the verticalcleaner filter and dot syntax like avisynth:
core.Source('Rule 6 violation.mkv').FlipVertical().FlipHorizontal()[:100].set_output()
A few important points (get it?):
Namespaces may still be used in combination with dots if so desired
If there are multiple functions with the same name in different namespaces an exception will be thrown. Prefix the function with its namespace to disambiguate.
Lowercase only function names won't work without being prefixed by a namespace even if accept_lowercase it set.
The full list of changes:
r25:
DuplicateFrames and DeleteFrames no longer needs to have the frame number argument sorted
fixed handling of indeterminate length clips in DuplicateFrames and DeleteFrames
added experimental . syntax, for example core.BlankClip().VFM(order=1) will now work, if multiple functions have the same name they still need to be prefixed with the namespace
now uses the proper python exception for missing attributes
added getPluginPath function to the api so it's possible for plugins to load resources in relative paths in a reliable way, the returned paths are always absolute and use forward slashes
registerFormat now returns null instead of terminating the program on invalid formats, this is so plugin developers won't have to duplicate logic and instead can simply try if a format is valid
frame data is now exposed in a more python friendly way, use the get_read_frame and get_write_frame methods to get fast and efficient arrays
enabled x86 mmx state checks on all platforms
fixed a filter error propagation issue that could lead to crashes
fixed a race condition that could lead to too many threads being spawned to do nothing
added verticalcleaner and missing repair modes to rgvs (HolyWu)
fixed negative single frame indexing of clips in python
vspipe now reports the correct number of frames as output when a non-zero start frame is specified
fixed ctrl-c handling in clip.output() and some other small adjustments
clip.output() now accepts normal python file-like objects
automatically generated names for runtime registered yuv formats now make sense
TurboPascal7
7th November 2014, 12:50
It was correctly pointer out on IRC that optional namespaces feature is fundamentally broken - the same script can silently get completely different behavior when executed with different set of loaded plugins (another system/same system some time later/just a different script).
So, even though the feature is nice and definitely removes some useless verbosity from the script, it's too late to introduce it now and it should probably be removed or at least strongly discouraged/enabled explicitly.
Myrsloik
7th November 2014, 12:59
It was correctly pointer out on IRC that optional namespaces feature is fundamentally broken - the same script can silently get completely different behavior when executed with different set of loaded plugins (another system/same system some time later/just a different script).
So, even though the feature is nice and definitely removes some useless verbosity from the script, it's too late to introduce it now and it should probably be removed or at least strongly discouraged/enabled explicitly.
Yes, I'll probably remove the no namespace thing completely in the release. It causes more problems than it solves.
Just like accept_lowercase is a bad idea too I want to kill off some day...
TurboPascal7
7th November 2014, 13:04
Just like accept_lowercase is a bad idea too I want to kill off some day...
I couldn't agree more. It might also cause problems if someone writes a script with lowercase names, tests it on his PC and it works, then distributes it to someone else and the script fails because the core was created with accept_lowercase=False.
So yeah, it should be removed and the function lookup should always be case-insensitive/accept lowercase names. :)
vcmohan
13th November 2014, 12:10
I have 3 problems|
1. I have a parameter plane:int[];opt; I check with numElements. If zero I have default values, otherwise check the numElements to be 3, if not error message. In script if I omit plane, I am always getting an error. How do I get over this problem?
2. In imwri if my image name starts with t, then It appears to interpret as a tab, and does not find the file. I am on windows
3. I have one reverse url. I use this for different plugins. loading more than one plugin gets an error. Do I need to conjure a different URL for each separate plugin?
Myrsloik
13th November 2014, 13:29
I have 3 problems|
1. I have a parameter plane:int[];opt; I check with numElements. If zero I have default values, otherwise check the numElements to be 3, if not error message. In script if I omit plane, I am always getting an error. How do I get over this problem?
2. In imwri if my image name starts with t, then It appears to interpret as a tab, and does not find the file. I am on windows
3. I have one reverse url. I use this for different plugins. loading more than one plugin gets an error. Do I need to conjure a different URL for each separate plugin?
1. Look closely, you have a ; instead of :
2. Will try it later
3. It has to be unique for every plugin, you can't load several plugins with the same id
TheFluff
13th November 2014, 17:11
2. In imwri if my image name starts with t, then It appears to interpret as a tab, and does not find the file. I am on windows
\t expands to a tab in a regular Python string, could it be that? Possible solutions: prefix the string with r (so r"folder\t.jpg"; this tells python to not expand backslash stuff like \t and \n), use a / instead, or escape the backslash (so \\t).
vcmohan
18th November 2014, 03:53
1. Look closely, you have a ; instead of :
2. Will try it later
In my code it is : not :. While typing in this message I did wrong. So the issue remains.
i[Quote}3. It has to be unique for every plugin, you can't load several plugins with the same id issue still remains. {\Quote]
That means both reverse url and namespace need to be unique.
Myrsloik
20th November 2014, 13:43
In my code it is : not :. While typing in this message I did wrong. So the issue remains.
i[Quote}3. It has to be unique for every plugin, you can't load several plugins with the same id issue still remains. {\Quote]
That means both reverse url and namespace need to be unique.
Then I don't know why it happens. It would help to see both the source code (or at least the full string declaring arguments) and the test script you use. There's nothing obviously wrong.
vcmohan
22nd November 2014, 08:35
The string is
registerFunc("Median", "clip:clip;maxgrid:int:opt;plane:int[]:opt;", adaptivemedianCreate, 0, plugin);
The code to test is
[code]
int temp = 0;
temp = vsapi->propNumElements(in, "plane");
if( temp == 0)
{
d.yy = 1, d.uu = 0, d.vv = 0;
}
else if(temp < 3)
{
vsapi->setError(out, "Median: values of each of 3 planes as one or zero must be specified");
vsapi->freeNode(d.node);
return;
}
elsetemp = 0;
temp = vsapi->propNumElements(in, "plane");
if( temp == 0)
{
d.yy = 1, d.uu = 0, d.vv = 0;
}
else if(temp < 3)
{
vsapi->setError(out, "Median: values of each of 3 planes as one or zero must be specified");
vsapi->freeNode(d.node);
return;
}
else
vcmohan
22nd November 2014, 08:42
Then I don't know why it happens. It would help to see both the source code (or at least the full string declaring arguments) and the test script you use. There's nothing obviously wrong.
The string is
registerFunc("Median", "clip:clip;maxgrid:int:opt;plane:int[]:opt;", adaptivemedianCreate, 0, plugin);
The code to test is
int temp = 0;
temp = vsapi->propNumElements(in, "plane");
if( temp == 0)
{
d.yy = 1, d.uu = 0, d.vv = 0;
}
else if(temp < 3)
{
vsapi->setError(out, "Median: values of each of 3 planes as one or zero must be specified");
vsapi->freeNode(d.node);
return;
}
else ................
I do not get zero as numElements if this optional parameter is not specified.
Myrsloik
22nd November 2014, 11:48
If an argument isn't spwcified at all then numElements is -1.
You should check if (temp <= 0) as the first condition.
Mystery Keeper
23rd November 2014, 17:49
This thread should be made sticky.
LoRd_MuldeR
23rd November 2014, 19:16
This thread should be made sticky.
Accomplished.
Myrsloik
24th November 2014, 00:20
Windows XP support will be dropped in the next version. Supporting Vista+ is enough for me and I don't want to have different plugin loading behavior in different versions.
You have 24 hours to object.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.