Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
24th May 2018, 20:33 | #1 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Just starting out with VapourSynth
I wrote several plugins for Avisynth including FrameRateConverter and AvisynthShader. I'm finally taking a first look into VapourSynth to see whether it would be easy to convert those filters.
In doing so I have a few questions. 1. How is ConditionalFilter done in VapourSynth? I had written ConditionalFilterMT to make it work in MT but I guess that shouldn't be necessary here. 2. How are string arguments handled in VapourSynth? 3. What are the main differences to look for in supporting VapourSynth vs Avisynth? Anything else I should know? |
24th May 2018, 22:35 | #2 | Link |
Guest
Posts: n/a
|
Pretty much everything you're asking about is covered by the Vapoursynth docs. It even has a section called "common pitfalls".
|
25th May 2018, 02:32 | #3 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
1. pretty much all of the avisynth runtime stuff is doable with some combination of core.std.FrameEval and general purpose Python scripting
2. what? 3. some things off the top of my head in no particular order: - getframe is asynchronous - frames can have metadata (even other frames or entire clips) attached to them so a lot of scripting things that are really awkward or require global state in avisynth are trivially easy - planar rgb only - the scripting layer isn't nearly as tightly bound to the api as in avisynth - alpha isn't stored as a color channel, instead you attach the alpha "channel" in the form of a separate grayscale clip as metadata to the original clip Last edited by TheFluff; 25th May 2018 at 02:39. |
25th May 2018, 06:45 | #4 | Link |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
2. Everything's supposed to be UTF8, so that's how you should save your scripts too. It Just Works.
3. Try to make your plugins usable in Linux and OS X too.
__________________
Buy me a "coffee" and/or hire me to write code! |
28th May 2018, 23:12 | #6 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
I thought the best way to learn VapourSynth SDK would be to back-port a VapourSynth plugin to Avisynth. Porting Deblock right now; so far things are going well.
I notice there's more code in VapourSynth to parse parameters, handle errors and handle calls from the core. I'm also wondering, is it possible for the same DLL to support both VapourSynth and Avisynth, or it needs to be 2 separate projects? |
28th May 2018, 23:49 | #8 | Link |
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
Yes, a single DLL that can support both is easy to make. The challenge, as DJATOM points out, is to do it without having to duplicate code. I still haven't found a good solution and just bite the bullet and duplicate what I have to.
|
Thread Tools | Search this Thread |
Display Modes | |
|
|