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

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 27th December 2017, 22:07   #1  |  Link
Stephen R. Savage
Registered User
Stephen R. Savage's Avatar
Join Date: Nov 2009
Posts: 341
How to run Avisynth scripts within VapourSynth

Embed 32-bit Avisynth 2.6 or Avisynth+ environment within 64-bit VapourSynth.

avsw.Eval(string script, clip[] "clips", string[] "clip_names", string "avisynth", string "slave", string "slave_log")
script - Avisynth script fragment
clips - VapourSynth clips ("nodes") to inject into Avisynth environment
clip_names - Avisynth variable name corresponding to injected clip
avisynth - Path to Avisynth DLL. The default uses the process DLL search path.
slave - Path to avshost_native.exe slave procecss. The plugin path is searched by default.
slave_log - Log file for slave process.

The function returns the result of the Avisynth script, which may be an integer, float, string, or clip. If the result is a clip, the name of the return value is "clip", otherwise it is "result".
import vapoursynth as vs

core = vs.get_core()

red = core.std.BlankClip(color=[255, 0, 0])
green = core.std.BlankClip(color=[0, 255, 0])
# Before executing the Avisynth script, "r" and "g" are set to the bound clips.
c = core.avsw.Eval("Merge(r, g)", clips=[red, green], clip_names=["r", "g"])

Last edited by Stephen R. Savage; 13th January 2018 at 17:48.
Stephen R. Savage is offline   Reply With Quote

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 10:59.

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