-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathreadme.txt
107 lines (79 loc) · 3.1 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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.