View Full Version : New Avisynth+ Functions
blaze077
19th December 2016, 04:32
Is there a page of some sort with the description of the new Avisynth+ functions?
For example with ConvertTo16Bit, I can conjecture what the function does but it has various parameters which I do not understand.
If there isn't a page, could someone explain the parameters of that specific function?
Thank you.
pinterf
19th December 2016, 09:25
Until I (or someone) have time for proper documentation:
http://forum.doom9.org/showthread.php?p=1783714#post1783714
Wilbert
19th December 2016, 14:44
Made it sticky until there is proper documentation.
Reel.Deel
19th December 2016, 15:01
The link above and a lot more information in on the wiki page: http://avisynth.nl/index.php/AviSynth%2B
Regarding proper documentation, I'm still working on it, but I've been swamped these past months.
TheFluff
19th December 2016, 17:32
Made it sticky until there is proper documentation.
Speaking of stickies, how about you unstick the yv12 faq from 2002 and the denoiser speed test from 2003? I really don't feel like either is so helpful that it warrants a sticky thread (interest in comparing convolution3d vs pixiedust does not seem to be at an all time high, for example) and, uh, the yv12 faq link has been broken for many, many years now.
I mean it's kinda d9's gimmick that there's five sticky threads with information that has been outdated since before the pleistocene epoch at the top of every subforum but it's never too late to get with the times...
blaze077
19th December 2016, 21:49
Thank you, pinterf. That gave me some new information.
The link above and a lot more information in on the wiki page: http://avisynth.nl/index.php/AviSynth%2B
Regarding proper documentation, I'm still working on it, but I've been swamped these past months.
I remember your post giving a short preview of your work on a new documentation a while back so was wondering when it would come out. So as long as it comes out, I'll be grateful. :)
Thank you.
Wilbert
20th December 2016, 01:01
@TheFluff, you are right. I unstickied them. That was a long time ago 2002 and 2003. Thanks!
pinterf
20th December 2016, 09:54
Thank you, pinterf. That gave me some new information.
I remember your post giving a short preview of your work on a new documentation a while back so was wondering when it would come out. So as long as it comes out, I'll be grateful. :)
Thank you.
My problem is that I always find new and interesting things to do. The modifications are really not that big from the user point of view, most internal filters work seamlessly when feeding with high bit depth clips. Where old packed RGB is used, you can have now planar RGB.
Now I really need to summarize the non-trivial modifications - new functions, maybe one or two new parameters - winter holiday is coming soon, uh-oh, poor me :-)
Reel.Deel
23rd December 2016, 01:05
Just a friendly reminder, there's the AviSynth+ documentation (http://forum.doom9.org/showthread.php?t=173643) thread I started a while back. I do plan on posting more questions on that thread, there's a few things I would like to confirm (MT, GScript, and others).
mikeytown2
1st March 2017, 19:13
Is there anything like ImageSequence (http://avisynth.nl/index.php/ImageSequence) in AviSynth+? ImageSource doesn't work. Creating a startrail timelapse and I run out of ram on the 32bit version of AviSynth. JPGs are 6000x4000
#16 FPS.
ImageSource("DSC0%d.jpg", 3944,5353, 16)
# Cheap NR.
TemporalSoften(10, 5, 30, 50, 2)
# 16/9.
Crop(0, 626, 0, 0)
# 4 frame star trail.
clipB=DeleteFrame(last,last.FrameCount)
clipB=DuplicateFrame(clipB,0).Levels(0, 1, 255, 0, 220)
clipC=DeleteFrame(clipB,last.FrameCount)
clipC=DuplicateFrame(clipC,0).Levels(0, 1, 255, 0, 200)
clipD=DeleteFrame(clipC,last.FrameCount)
clipD=DuplicateFrame(clipD,0).Levels(0, 1, 255, 0, 180)
clipAB=overlay(last,clipB, mode="lighten")
clipCD=overlay(clipC, clipD, mode="lighten")
clipABCD=overlay(clipAB,clipCD, mode="lighten")
overlay(last,clipABCD, mode="lighten")
# Software zoom from lower left to center and target 5k youtube.
KenBurnsEffect(startZoomFactor=120, endZoomFactor=100, startAlign=9, endAlign=5, width=5120, height=2880, ResizeMethod="Spline36Resize")
Groucho2004
1st March 2017, 19:34
Creating a startrail timelapse and I run out of ram on the 32bit version of AviSynth.Have you tried the 64 bit version?
mikeytown2
2nd March 2017, 06:51
Have you tried the 64 bit version?
I have, but I can't find a way to easily load an image sequence.
Groucho2004
2nd March 2017, 09:42
I must be missing something, let's try again:
Is there anything like ImageSequence (http://avisynth.nl/index.php/ImageSequence) in AviSynth+?
Does ImageSequence not work with AVS+ (32 bit)?
ImageSource doesn't work. Creating a startrail timelapse and I run out of ram on the 32bit version of AviSynth. JPGs are 6000x4000
I have, but I can't find a way to easily load an image sequence.The script you posted above uses ImageSource() so I guess you do have a way to load an image sequence. Your statements are confusing, could you elaborate?
mikeytown2
3rd March 2017, 09:40
Think the issue is I used AviSynth+ r2294 as it's the latest version with an installer. I think it was missing ImageSeq.dll from plugins64+ dir. Installing the stable AviSynth+ r1576 and it appears to be working now.
StainlessS
3rd March 2017, 12:53
Hi MikeyTown2, dont think I've seen you for a while,
I updated your TWriteAVI some time ago, here:- http://forum.doom9.org/showthread.php?t=172837&highlight=twriteavi
Copes now with audio.
mikeytown2
6th March 2017, 06:19
Hey StainlessS!
Yeah I've been lurking for the last couple of years. Thought I found an issue but looks like I got bit by a dev only bug. Awesome to hear that the plugin is still alive!
raffriff42
11th April 2017, 03:08
Is there a page of some sort with the description of the new Avisynth+ functions?While waiting for one to appear, I have prepared a crude list by diffing the source code - AVS 2.60 vs. AVS+ r2455.
Function signatures copied from source verbatim. You can decipher most of them fairly easily:
'c'=clip; 's'=string; 'f'=float; 'i'=integer; 'b'=boolean;
'a'=(new type) array; '.'=any variable type accepted.
'*' means zero or more of the previous argument. '+' means one or more. I don't know what '#' means.
Words in preceding a type char are argument names, implying the argument is optional.
EDIT rough group by category; add 'changed' list. [B]ADDED:
Array .#
Array .+
ArrayAdd .i*
ArrayDel .i
ArrayGet a.+
ArrayGet ai
ArrayGet as
ArrayIns .i
ArraySize a
IsArray .
// arrays disabled temporarily - see next post
AddAutoloadDir s[toFront]b
AutoloadPlugins
ClearAutoloadDirs
Prefetch c[threads]i
SetFilterMTMode si[force]b
FunctionExists s
InternalFunctionExists s
replacestr sss
LogMsg si
SetLogParams [target]s[level]i
AddAlphaPlane c[mask].
CombinePlanes c[planes]s[source_planes]s[pixel_type]s[sample_clip]c
CombinePlanes cc[planes]s[source_planes]s[pixel_type]s[sample_clip]c
CombinePlanes ccc[planes]s[source_planes]s[pixel_type]s[sample_clip]c
CombinePlanes cccc[planes]s[source_planes]s[pixel_type]s[sample_clip]c
RemoveAlphaPlane c
ColorSpaceNameToPixelType s
// eg, ColorSpaceNameToPixelType("YV12") = $a0000008
ConvertBits ci[truerange]b[dither]i[scale]f[dither_bits]i[fulls]b[fulld]b
ConvertTo16bit c[bits]i[truerange]b[dither]i[scale]f[dither_bits]i[fulls]b[fulld]b
ConvertTo8bit c[bits]i[truerange]b[dither]i[scale]f[dither_bits]i[fulls]b[fulld]b
ConvertToFloat c[bits]i[truerange]b[dither]i[scale]f[dither_bits]i[fulls]b[fulld]b
ConvertToPlanarRGB c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s
ConvertToPlanarRGBA c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s
ConvertToRGB48 c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s
ConvertToRGB64 c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s
ConvertToY c[matrix]s
ConvertToYUV411 c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s
ConvertToYUV420 c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s[ChromaOutPlacement]s
ConvertToYUV422 c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s
ConvertToYUV444 c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s
ConvertFromDoubleWidth c[bits]i
ConvertFromStacked c[bits]i
ConvertToDoubleWidth c
ConvertToStacked c
ExtractA c
ExtractB c
ExtractG c
ExtractR c
ExtractU c
ExtractV c
ExtractY c
PlaneToY c[plane]s
ShowU c[pixel_type]s
ShowV c[pixel_type]s
ShowY c[pixel_type]s
ComponentSize c
NumComponents c
HasAlpha c
Is420 c
Is422 c
Is444 c
IsPackedRGB c
IsPlanarRGB c
IsPlanarRGBA c
IsRGB48 c
IsRGB64 c
IsY c
IsY8 c
IsYUVA c
AverageB c[offset]i
AverageG c[offset]i
AverageR c[offset]i
BitsPerComponent c
BPlaneMax c[threshold]f[offset]i
GPlaneMax c[threshold]f[offset]i
RPlaneMax c[threshold]f[offset]i
BPlaneMedian c[offset]i
GPlaneMedian c[offset]i
RPlaneMedian c[offset]i
BPlaneMin c[threshold]f[offset]i
GPlaneMin c[threshold]f[offset]i
RPlaneMin c[threshold]f[offset]i
BPlaneMinMaxDifference c[threshold]f[offset]i
GPlaneMinMaxDifference c[threshold]f[offset]i
RPlaneMinMaxDifference c[threshold]f[offset]i
BDifference cc
GDifference cc
RDifference cc
BDifferenceFromPrevious c
GDifferenceFromPrevious c
RDifferenceFromPrevious c
BDifferenceToNext c[offset]i
GDifferenceToNext c[offset]i
RDifferenceToNext c[offset]i
// new global options
OPT_Enable_Y3_10_10 // use Y3[10][10] instead of P210 (VfW)
OPT_Enable_Y3_10_16 // use Y3[10][16] instead of P216 (VfW)
OPT_Enable_b64a // use b64a instead of BRA[64] (VfW)
OPT_Enable_PlanarToPackedRGB // convert Planar RGB to packed RGB (VfW)
[B]REMOVED:
TCPServer
TCPSource
// replaced w/ TCPDeliver - see next post
CHANGED:
Load_Stdcall_Plugin // multiple sources are allowed
LoadCPlugin // multiple sources are allowed
ConvertTo___ // add new matrix="rec2020"
ColorBars // add [staticframes]b
ColorBarsHD // add [staticframes]b
Histogram // add [bits]i
MaskHS // add [realcalc]b
Tweak // add [realcalc]b[dither_strength]f
// realcalc: "force no-lookup (pure float calculation pixel)"
// "dither_strength 1.0 = +/-0.5 on the 0.255 range, scaled for others"
Layer
// add support for RGB64
Overlay // add [use444]b
// if false, "use conversionless mode for filters that are ready to use it"
// "except: RGB must be converted to 444 for Luma and Chroma operation"
Info // add [font]s[size]f[text_color]i[halo_color]i
I chacked and their are no misteaks!
pinterf
11th April 2017, 07:41
Thanks, a few remarks, those script array related functions are disabled temporarily, because the array concept is incompatible with plugins using avs 2.5 interface.
TCPDeliver is updated by DJAtom: https://github.com/DJATOM/TCPDeliver/releases
vcmohan
19th December 2019, 12:53
It is good that the script is getting more capable with all these new additions. I have felt some problem a couple of times while coding plugins. These are:
1.The array has to be specified always at the beginning of the parameter string as array can have no name. Whether this can be changed.
2.two or more arrays of same data type can not be specified.
Whether this facility can be incorporated in avisynth+?
wonkey_monkey
19th December 2019, 14:22
2.two or more arrays of same data type can not be specified.
They can if a variable of another type appears between them. I did this on my ColourWarp plugin so you can specify non-clip-specific points first, then the clips, then the clip-specific points.
Thanks, a few remarks, those script array related functions are disabled temporarily, because the array concept is incompatible with plugins using avs 2.5 interface.
Wait, does that mean plugins which make use of arrays won't work on recent versions of AviSynth? What makes it incompatible?
StainlessS
19th December 2019, 16:22
Wait, does that mean plugins which make use of arrays won't work on recent versions of AviSynth? What makes it incompatible?
I believe they may be commented out in avs+ source [not sure], but only for script, not plugins.
[ie arrays not yet implemented for scripts, you is ok for plugs, they have always worked, cannot be implemented for script so long as v2.5 interface is supported for plugins (or something like that)]
Some Links (Search on "array", in Avisynth Devs forum, user Pinterf, posts only):-
(in reverse order as they appear in search)
http://forum.doom9.org/showthread.php?p=1860458#post1860458
http://forum.doom9.org/showthread.php?p=1824560#post1824560
remove script array (new AVSValue schema) feature, cannot make it compatible with Invoke from v2.5 plugins until I figure out a workaround or such plugins would slowly distinct. <sniff> <sniff>
http://forum.doom9.org/showthread.php?p=1789325#post1789325
http://forum.doom9.org/showthread.php?p=1788632#post1788632
http://forum.doom9.org/showthread.php?p=1788529#post1788529
http://forum.doom9.org/showthread.php?p=1785318#post1785318
http://forum.doom9.org/showthread.php?p=1785253#post1785253
http://forum.doom9.org/showthread.php?p=1784879#post1784879
http://forum.doom9.org/showthread.php?p=1784619#post1784619
http://forum.doom9.org/showthread.php?p=1784532#post1784532
http://forum.doom9.org/showthread.php?p=1784081#post1784081
It turned out that it is a filter using avisynth 2.5 plugin interface.
I'm not happy, now I have a deeper clue about the caveats of keeping the backward compatibility with that what is called "baked code".
In its current form I am not able to keep the compatibility between avisynth 2.5 interface and my new AVSValue handling schema. The problem affects arrays (and such, the filter parameter passing). Although the array creation is transparent when 2.6 interface is used and automatically uses the new mechanism for creating and copying AVSValue types, but plugins using "baked code" avs 2.5 interface are not knowing about the feature and use the array creation codes hardcoded in the 2.5 interface.
And since I simply not able to check, what kind of interface made a call to ScriptEnvironment::Invoke, I have to revert that array feature. O.K. having script arrays are only a nice addition to the language but there was quite a bit of work with this feature.
So it seems that I have to revert my nice new array mechanism, even from the dev version of my builds. As there are still some plugins out there with the 2.5 interface, I cannot make avs+ incompatible with them and cause users inconveniance.
http://forum.doom9.org/showthread.php?p=1789252#post1789252
Above links may or may not be relevant [I skipped a few links that seemed not relevant].
vcmohan
20th December 2019, 12:18
They can if a variable of another type appears between them. I did this on my ColourWarp plugin so you can specify non-clip-specific points first, then the clips, then the clip-specific points.
I am under the impression that since the default input clip is 'last', it always must be specified first. still can a string like
.*c.+[dat]i.*
be used?
wonkey_monkey
20th December 2019, 12:28
Not sure about that. I would expect the "last" clip to be matched on the ".*", not on the "c". In fact everything will probably end up in the first array until it encounters a named parameter.
My filter still uses the default first input clip, but it allows you to specify further clips as colour sources. I probably did something like
ci*c*i*
pinterf
20th December 2019, 12:42
Arrays, as they appear for plugin writers are working fine, no change in them. Some years ago I was experimenting, made an attempt to support arrays in the script level as well. e.g.
color = [255, 233, 101]
or
values = [[0,"black"],[255,"white"]]
color = values[0,0]
But it broke compatibility (=crashed :) ) - I think plugins using avs 2.5 "baked code" concept and even avspmod was not compatible with it. The remnants are still there in my source under NEW_AVSVALUE define.
StainlessS
20th December 2019, 12:42
Not sure about that. I would expect the "last" clip to be matched on the ".*", not on the "c". In fact everything will probably end up in the first array until it encounters a named parameter.
My filter still uses the default first input clip, but it allows you to specify further clips as colour sources. I probably did something like
ci*c*i*
+1, yes.
EDIT: [After seeing Pinterf post above] Perhaps v2.5 support should be dropped soon/immediately. [I would be happy to do same].
Groucho2004
20th December 2019, 12:48
Perhaps v2.5 support should be dropped soon/immediately.Seriously? Can you imagine the scream of a million voices of those who use 2.5 plugs? Me included?
StainlessS
20th December 2019, 12:50
Who cares bout them, or you ! https://www.cosgan.de/images/smilie/frech/o080.gif
EDIT: Can still provide v2.5 plug, and separate v2.6 plug, v2.58 will still be able to use existing 2.5 plugs.
That there bullet will one day need biting. [whenever you do it, some will not like it] https://www.cosgan.de/images/smilie/frech/o010.gif
Groucho2004
20th December 2019, 13:05
Can still provide v2.5 plug, and separate v2.6 plug, v2.58 will still be able to use existing 2.5 plugs.
1. I don't want to use 2.5.8, I want to use AVS+.
2. There are 2.5 plugs for which there is no source code.
StainlessS
20th December 2019, 13:05
We need a list of 'invaluable' v2.5 plugins that are not yet converted to v2.6 interface, and some that will take on conversions, I am prepared to help in this where I am able.
And list of v2.5 invaluable plugs for which there is no source. [Some/Most LaTo will likely be in this list]
EDIT: Entire Gavino Grunt compatibility in avs+ would be a good idea (where not already implemented).
Both Grunt and GScript should have been adopted way back in Avs v2.60 Standard, as suggested by some.
real.finder
20th December 2019, 16:03
Arrays, as they appear for plugin writers are working fine, no change in them. Some years ago I was experimenting, made an attempt to support arrays in the script level as well. e.g.
color = [255, 233, 101]
or
values = [[0,"black"],[255,"white"]]
color = values[0,0]
But it broke compatibility (=crashed :) ) - I think plugins using avs 2.5 "baked code" concept and even avspmod was not compatible with it. The remnants are still there in my source under NEW_AVSVALUE define.
can it be like http://avisynth.nl/index.php/RemapFrames#Usage_5 to fix this?
edit: or the same way that used to load 2.0 plugins in avs 2.5 (by LoadPluginEx.dll (https://forum.doom9.org/showthread.php?p=570435#post570435), so it will be LoadPlugin25.dll or something)?
+ aside from that, still waiting for expr changes :)
qyot27
20th December 2019, 17:00
The remnants are still there in my source under NEW_AVSVALUE define.
'Remnants' meaning that it was just shuffled behind the define so it wouldn't cause compatibility issues, or that even if it is active, it's incomplete (per 2.6+, where it would presumably work)?
I ask, because I actually was considering having NEW_AVSVALUE active for Linux/OSX builds (at least once I actually get libavisynth.so in a working* state). We don't have to worry about retaining compatibility with 2.5 plugins on those platforms because there's practically none that were ported while AvxSynth was a thing. Like, there's maybe 5 in total.
*it builds, but because of some of the Win32-specific things that had to be disabled on non-Windows, it currently fails to load. And I haven't reconciled the changes enough so that it doesn't impede MSVC's ability to build the codebase on Windows.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.