GithubHelp home page GithubHelp logo

vs_avsreader's Introduction

vsavsreader.dll -- AviSynth Script Reader plugin for VapourSynth

 Author: Oka Motofumi (chikuzen.mo at gmail dot com)
-----------------------------------------------------------------


requirement:
VapourSynth r30 or later
Avisynth2.6 / Avisynth+
Microsoft Visual C++ 2015 Redistributable Packages


sourcecode:
https://github.com/chikuzen/VS_AvsReader


******************************************************************************
 how to use:
******************************************************************************

# Preparation
>>> import vapoursynth as vs
>>> core = vs.get_core()
>>> core.std.LoadPlugin('vsavsreader.dll')

# Case 'Import'
>>> clip = core.avsr.Import('C:/foo/bar/script.avs')

# Case 'Eval'
>>> clip = core.avsr.Eval('ColorBars(320, 240, "YV12")')
or
>>> lines = '''
... LoadPlugin("C:/foo/bar/RawSource.dll")
... v1 = RawSource("D:/fizz/buzz/video.y4m")
... v1.ConvertToYV24().Spline64Resize(1280, 720)
... v2 = AVISource("E:/herp/derp/video2.avi").ConvertToYV24()
... return v1 + v2
... '''
>>> clip = core.avsr.Eval(lines=lines)



****************************************************************************
 how to use(advanced):
****************************************************************************

VsAvsReader is able to convert Dither's interleaved MSB/LSB format into a
compatible Vapoursynth YUV4xxP9/10/16 format.
Dither's MSB/LSB must be interleaved, stacked format is not supported.
Only YUV planar formats are allowed.


example 1:
Use VsAvsReader's Import function to load external Avisynth script.

Vapoursynth script
# Core
>>> import vapoursynth as vs
>>> core = vs.get_core(accept_lowercase=True)

# Import plugins
>>> core.std.LoadPlugin('C:/vsavsreader.dll')

# Use "Import" to load interleaved MSB/LSB Avisynth script.
>>> clip = core.avsr.Import('C:/script.avs', bitdepth=16)

External Avsiynth script being imported.

#script.avs
LoadPlugin("C:/plugins/DGDecode.dll")
LoadPlugin("C:/plugins/Dither.dll")
Import("C:/scripts/Dither.avsi")
MPEG2Source("D:/source.d2v")
Dither_convert_8_to_16()
Dither_resize16(1280, 720)
Dither_convey_yuv4xxp16_on_yvxx()


Example 2:
Use VsAvsReader's Eval function to create Avisynth script inside a Vapoursynth script.

Vapoursynth script

# Core
>>> import vapoursynth as vs
>>> core = vs.get_core(accept_lowercase=True)

# Import plugins
>>> core.std.LoadPlugin('C:/vsavsreader.dll')

# Use "Eval" to load interleaved MSB/LSB Avisynth script.
>>> lines = '''
... LoadPlugin("C:/plugins/DGDecode.dll")
... LoadPlugin("C:/plugins/Dither.dll")
... Import("C:/scripts/Dither.avsi")
... MPEG2Source("D:/source.d2v")
... Dither_convert_8_to_16()
... Dither_resize16(1280, 720)
... Dither_convey_yuv4xxp16_on_yvxx()
... '''
>>> video = core.avsr.Eval(lines=lines, bitdepth=16)

*****************************************************************************
 note
*****************************************************************************
When input pixel type of avs is RGB32, this filter returns a list which has two clips.
clip[0] is base clip. clip[1] is alpha clip.

vs_avsreader's People

Contributors

chikuzen avatar maki-rxrz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.