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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th May 2018, 20:33   #1  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
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?
MysteryX is offline   Reply With Quote
Old 24th May 2018, 22:35   #2  |  Link
amichaelt
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".
  Reply With Quote
Old 25th May 2018, 02:32   #3  |  Link
TheFluff
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.
TheFluff is offline   Reply With Quote
Old 25th May 2018, 06:45   #4  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
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!
jackoneill is offline   Reply With Quote
Old 25th May 2018, 16:50   #5  |  Link
amayra
Quality Checker
 
amayra's Avatar
 
Join Date: Aug 2013
Posts: 284
2) - you should have some knowledge about python as first step
__________________
I love Doom9
amayra is offline   Reply With Quote
Old 28th May 2018, 23:12   #6  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
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?
MysteryX is offline   Reply With Quote
Old 28th May 2018, 23:19   #7  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
https://forum.doom9.org/showthread.php?t=175339
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 28th May 2018, 23:49   #8  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Quote:
Originally Posted by MysteryX View Post
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?
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.
videoh is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:20.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.