View Full Version : new VirtualDub Filters Import File, v1.2
Wilbert
23rd April 2002, 16:33
I attached a new version of the VirtualDub Filters Import File (v1.2), since there's nothing happening on Donalds webpage.
The main changes:
- changed Smart Deinterlace script and tested with v2.7b2
- script-list added which contains a list of all scripts present in
vdub_filters
- added filters:
- Smart Smoother HiQ by Klaus Post, tested with v1.1
- QS Deinterlace (optimized versions of Smart Deinterlace for
pentium II, III or IV users) by Pavel Kuznetsov, tested with
v0.50b and v0.52b
- Zoom by Avery Lee and Donald Graft, tested with v1.2
- rewrote the script for LogoAway by Krzysztof Wojdon, tested with
v3.5fix1
dividee
23rd April 2002, 19:03
Thanks Wilbert! I'll ask Donald to put it on his site as soon as he comes back.
hakko504
23rd April 2002, 19:58
Beautiful! Well done Wilbert:D
Hanty
23rd April 2002, 20:58
I can't tell you how pleased I am with this update. I simply cannot find the words. I'm now running my encoding with a 25% boost from putting all my filters in avisynth.
The only thing that could now possible be improved upon is to implent "Tolerance" in Transparency for the Logo filter.
A+ work.
Pko
24th April 2002, 14:02
Originally posted by Hanty
The only thing that could now possible be improved upon is to implent "Tolerance" in Transparency for the Logo filter.
I have the settings to use all the options of "logo" filter, but unfortunately not here; I will post them this afternoon...
There are a few settings missing in "logo" filter, not only tolerance... Also, the filter has a bug (imho) when using animated logos (first image is showed twice, so the animation does not cycle well), I have a workaround for that but it is not very elegant. I do not know if that bug appears only when used from Avisynth (btw, when you use MANY times the plugin in a single script, Virtual Dub does not "like" it; it hangs or does some weird things. But the script compresses OK withe CCE)
A GREAT plugi, but slow... I hope Neuron2 will someday make an avisynth-native version
Pko
24th April 2002, 19:37
Here it is.
# Complete definition of "logo" plugin
global VirtualDub_plugin_directory = "D:\Virtual Dub\plugins"
function VD_Logo(clip clip, int "x", int "y", int "alpha", bool "transparent",
\ int "xr", int "xg", int "xb", int "tolerance", string "filename",
\ bool "animate", int "start", int "duration", int "loops",
\ int "fadein", int "fadeoutend", int "fadeoutlen")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\logo.vdf", "_VD_Logo", 1)
return clip._VD_Logo(default(x,0), default(y,0), default(alpha,128),
\ default(transparent,true)?1:0, default(xr,0), default(xg,0), default(xb,255),
\ default(tolerance,0), default(filename,"d:\virtual dub\plugins\logo.bmp"),
\ default(animate,false)?1:0, default(start,0), default(duration,0), default(loops,0),
\ default(fadein,0), default(fadeoutend,0), default(fadeoutlen,0))
}
# End of definition of plugin; the rest of the script is just an example
#Simplified versions of the interface to facilitate manipulation
# For animated logo in a static position
function RE(clip clip, int "h", int "v", int "start", int "loops") {
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\logo.vdf", "_VD_Logo", 1)
return clip._VD_Logo(default(h,0), default(v,0), 128,
\ 1, 0, 0, 0,
\ 0, "E:\Movies\Recu0001.bmp",
\ 1, default(start,0), 1, default(loops,1),
\ 0, 0, 0)
}
# For moving a static logo across the screen
function MV(clip clip, int "h", int "v", int "start", int "duration") {
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\logo.vdf", "_VD_Logo", 1)
return clip._VD_Logo(default(h,0), default(v,0), 128,
\ 1, 0, 0, 0,
\ 0, "E:\Movies\Recu0001.bmp",
\ 0, default(start,0), default(duration,0), 0,
\ 0, 0, 0)
}
# Now the example
# V01.d2v is simply a 480x480 NTSC video; use any you have at hand
# it MUST be NTSC and MUST be 480x480; uncomment "ConvertFPS(29.97)"
# and/or "BicubicResize(480,480)" below to convert if necessary
mpeg2source("E:\Movies\V01.d2v")
#ConvertFPS(29.97)
#BicubicResize(480,480)
#This shows an animated translucid box (contained in "Recu0001.bmp"
#to "Recu0011.bmp") across the screen in 10 different positions
#also moves a static version of the box from position to position
RE(33,33,0,20)
animate(240,300,"MV",33,33,240,1,117,33,300,1)
RE(117,33,301,20)
animate(540,600,"MV",117,33,540,1,201,33,600,1)
RE(201,33,601,20)
animate(840,900,"MV",201,33,840,1,285,33,900,1)
RE(285,33,901,20)
animate(1140,1200,"MV",285,33,1140,1,369,33,1200,1)
RE(369,33,1201,20)
animate(1440,1500,"MV",369,33,1440,1,33,369,1500,1)
RE(33,369,1501,20)
animate(1740,1800,"MV",33,369,1740,1,117,369,1800,1)
RE(117,369,1801,20)
animate(2040,2100,"MV",117,369,2040,1,201,369,2100,1)
RE(201,369,2101,20)
animate(2340,2400,"MV",201,369,2340,1,285,369,2400,1)
RE(285,369,2401,20)
animate(2640,2700,"MV",285,369,2640,1,369,369,2700,1)
RE(369,369,2701,25)
It is very slow and does not display 100% OK in Virtual Dub, but compresses well in CCE.
I attach the "Recu*.bmp" files converted to PNG and then compressed. You should decompress them and convert them back to BMP.
Notice that files 2 & 3, 4 & 5, 6 & 7, 8 & 9, 10 & 11 are the same; this is because of a bug in the plugin: the first file in the animation appears twice, so to have smooth animation I show *ALL* files twice. Since there are 6 different images that show in 2 frames each, the image cycles aprox. 5 times each 2 seconds.
Hanty
24th April 2002, 21:23
Awesome stuff Pko, to think I placed a request for this just 24 hours ago.
Just to make sure I have all the variabels correct:
VD_Logo(0,0,0,transparent=true,0,0,128,30,c:\HaTE.bmp,animate=false,10,10,0,0,0)
Will correspond to this in vdub :
http://dingo.care-mail.com/pictures/42/423/300/423007283.jpg
Right?
Pko
25th April 2002, 09:55
Originally posted by Hanty
Just to make sure I have all the variabels correct:
VD_Logo(0,0,0,transparent=true,0,0,128,30,c:\HaTE.bmp,animate=false,10,10,0,0,0)
Will correspond to this in vdub :
http://dingo.care-mail.com/pictures/42/423/300/423007283.jpg
Right?
No, I think it is not correct... at least it is not clear (for me) if it is, since the third parameter is 0 and that means "alpha=0", so all the BMP will be transparent and nothing will appear! also, you should put quotes around the file name. BTW, IMHO it is not a good idea to mix named parameters with unnamed parameters... That is, or call the plugin with all parameters in order or call it with just the ones you need using them with their name, but do not mix because I do not know if a named parameter uses a "slot" in the naming order or not... it is difficult to debug and probably will not be accepted by Avisynth.
So, if I am not mistaken, you can call the plugin with the parameters that appear in the JPG in any of this ways:
1) unnamed parameters
VD_Logo(last,0,0,128,1,0,0,0,30,"c:\hate.bmp",0,10,10,0,0,0,0)
2) named parameters (only pass those that are different from defaults, and you can put them in any order)
VD_Logo(xb=0,tolerance=30,filename="c:\hate.bmp",start=10,duration=10)
LotharZ
26th April 2002, 16:39
@Wilbert
I saw in the scripts.txt file that optimized 2D Cleaner by Jaan Kalda works under yuv-space, but i tried and nothing. It says that only RGB32 is suported
Any idea?
Here is the .avs file:
--------------------
# PLUGINS
LoadPlugin("C:\DivX\GK\mpeg2dec.dll")
#
# SOURCE
mpeg2source("F:\DVDs\SilencioCorderos\Trailer\xvid\trailer.d2v")
#
# CROPPING
crop(10,12,704,551)
#
# RESIZING
BicubicResize(640,352,0.333,0.333)
#
# FILTERS
Import("F:\DVDs\vdub_filters.avs")
#ConvertToRGB()
VD_2DCleaneroptk7(5,2,2)
#ConvertToYUY2()
------------------------
Wilbert
2nd May 2002, 09:34
Sorry for the late response, but I took a few days off :) You right, all the VDub plugins work under in RGB32 space and not in YUV space (I had some misunderstanding and did some mistesting, sorry about that).
@Pko,
I will add this script in the next version. Can you sent me/attach the bmp files? I'm also very interested in your guide about this stuff ...
Acaila
12th May 2002, 14:50
A few days ago sh0dan posted the new version of his Smart Smoother High Quality filter in the VirtualDub forum. The new version 2.01 requires an updated function to work in Avisynth, I've taken the liberty of writing it. Could you put this in your new VDFilters file?
##########################################
# Smart Smoother HiQ by Klaus Post, v2.01#
# #
# diameter (3-13, odd), #
# threshold (1-200), amount (1-254) #
# difference (0-50) #
# mode = "average" or "weighted" #
##########################################
function VD_SmartSmoothHiQ(clip, int "diameter", int "threshold", int "amount", string "mode",
\ bool "grayscale", bool "weighted_difference", int "maintain_diffweight")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\SmoothHiQ.vdf", "_VD_SmartSmoothHiQ")
mode = default(mode, "weighted")
mode = (mode=="average") ? 0 : (mode=="weighted") ? 1 : -1
Assert(mode>=0, """VD_SmartSmoothHiQ: "mode" parameter must be "average" or "weighted"""")
return clip._VD_SmartSmoothHiQ(default(diameter,5), default(threshold,50), 0, default(amount,254),
\ mode, default(grayscale,false)?1:0, default(weighted_difference,true)?1:0, default(maintain_diffweight,0))
}
# example:
# ConvertToRGB()
# VD_SmartSmoothHiQ(5,50,254,"weighted")
# ConvertToYUY2()
Wilbert
13th May 2002, 09:03
Very nice! I will add it in the next version...
sh0dan
16th May 2002, 11:37
Very nice - I'll include a reference to the include file in the documentation for the next release.
"weighted_average" is perhaps a bit misleading. In the documentation I refer to this as "weighed with difference". That way it'll be called the same as in VD.
Acaila
16th May 2002, 12:30
I had confused it with the weighted average boolean (which is already in "mode").
I corrected the script.
Thanks.
Wilbert
22nd May 2002, 10:47
@sh0dan
I will add your newest version (v2.11) in the coming version.
@all
I have a question about the preroll argument of this script (and the script of SmartSmoother itself)
########################################
# Smart Smoother by Donald Graft, v1.1 #
# not written by me ... #
########################################
function VD_SmartSmoother(clip clip, int "diameter", int "threshold", bool "interlaced")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\smooth.vdf", "_VD_SmartSmoother", 1)
return clip._VD_SmartSmoother(default(diameter,5),
\ default(threshold,25), default(interlaced,false)?1:0)
}
I noticed that the preroll (third argument of LoadVirtualdubPlugin) is taken to be one here. While it is now being defined as zero in SSHiQ which is based on SmartSmoother. Since it doesn't crash and I assume it doesn't use future frames it should be ok?
Is there any reason it is taken as one in SmartSmoother or can we take it also as zero ?
Acaila
22nd May 2002, 15:50
As I understood it, the preroll value is for buffering that amount of frames before the filter starts processing. Since neither SmartSmoother nor SmartSmootherHiQ use future or past frames to do their work they don't need any frames buffered.
At least that's what I assumed when writing that script a few posts up. As since it works....
Wilbert
23rd May 2002, 09:09
SmartSmoother has an option interlaced:true/false. Maybe setting interlaced to true uses future frames?
sh0dan
23rd May 2002, 11:53
No - Smart Smoother does not use previous frames. Enabling Interlaced mode just skips every second line when blurring. So it must be a misunderstanding.
Wilbert
24th May 2002, 09:21
So, the filter operates only on the top field? Is that the case with every filter where you can select interlaced?
Isn't it better to seperate the fields and apply the filter on both fields and combine them together again (except that it takes twice as long)?
dividee
24th May 2002, 23:36
I think it does exactly what you suggest (filter each field separately), but it doesn't take twice as long, since each field only as half the number of pixels and most filters speed is linear regarding framesize.
In avisynth, such an option wouldn't be needed since you could just do
SeparateFields.SmartSmoother(...).Weave
Wilbert
30th May 2002, 09:20
I attached a new version of the VirtualDub Filters Import File (v1.3), in time it will be on Donalds webpage.
The main changes:
- rewrote Smart Smoother HiQ by Klaus Post tested for v2.11
- Logo by Donald Graft tested with v1.3b4
- Smart Smoother IQ by Tim Park tested with v0.5
- Deinterlace (area based) by Gunar Thalin tested with v1.3
I want to thank the people who helped me with first two scripts.
Dali Lama
11th June 2002, 19:55
Hi,
Could someone add the code for Gunar Thalin's New "Deinterlace - Smooth v1.0"
Thanks
Acaila
11th June 2002, 20:51
Here ya go :)
function VD_DeinterlaceSmooth(clip clip, bool "deinterlaced_only", string "mode", bool "alternate_field_order",
\ int "threshold", int "edge_detect", bool "log_frames", int "interlaced_area")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\deinterlacesmooth.vdf", "_VD_DeinterlaceSmooth")
mode = default(mode, "interpolate")
mode = (mode=="interpolate") ? 0 : (mode=="blend") ? 1 : -1
Assert(mode>=0, """VD_DeinterlaceSmooth: "mode" parameter must be "interpolate" or "blend"""")
return clip._VD_DeinterlaceSmooth(default(deinterlaced_only,false)?1:0, mode,
\ default(alternate_field_order,false)?1:0, default(threshold,24), default(edge_detect,20),
\ default(log_frames,false)?1:0, default(interlaced_area,"0"))
}
# example:
# ConvertToRGB()
# VD_DeinterlaceSmooth(0,"interpolate",0,24,20,0,"0")
# ConvertToYUY2()
I get an 'arguments' error when I put that example in an avs file, but I can't seem to find the error in the script. I hope someone else knows what I did wrong?
kairen
12th June 2002, 01:33
I'm a newbie in vdub filter conversion but, it seem to me the problem lay on the last parameter, is it right to declare it as int and then use it as a string?
Wilbert
12th June 2002, 09:13
Yeah and the booleans. I didn't test it but I guess the following will work:
function VD_DeinterlaceSmooth(clip clip, bool "deinterlaced_only", string "mode", bool "alternate_field_order",
\ int "threshold", int "edge_detect", bool "log_frames", int "interlaced_area")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\deinterlacesmooth.vdf", "_VD_DeinterlaceSmooth")
mode = default(mode, "interpolate")
mode = (mode=="interpolate") ? 0 : (mode=="blend") ? 1 : -1
Assert(mode>=0, """VD_DeinterlaceSmooth: "mode" parameter must be "interpolate" or "blend"""")
return clip._VD_DeinterlaceSmooth(default(deinterlaced_only,false)?1:0, mode,
\ default(alternate_field_order,false)?1:0, default(threshold,24), default(edge_detect,20),
\ default(log_frames,false)?1:0, default("interlaced_area","0"))
}
# example:
# ConvertToRGB()
# VD_DeinterlaceSmooth(false,"interpolate",false,24,20,false,0)
# ConvertToYUY2()
Let us know if it works.
Acaila
12th June 2002, 10:59
# example:
# ConvertToRGB()
# VD_DeinterlaceSmooth(false,"interpolate",false,24,20,false,0)
# ConvertToYUY2()
Ah, just as I thought, a stupid mistake! I should have used "false" instead of "0". But I had to write it in 5 mins, so something like that was to be expected. :)
Anyway, I won't be home for a couple of hours, so if someone else can test it in the meantime?
I also tried:
default("interlaced_area","0"))
But because of the way I called it in the avs file it didn't work, so I left that out of the script.
Acaila
12th June 2002, 17:59
@Wilbert:
I just tested it, and the way you wrote it works just fine.
arman68
20th June 2002, 09:49
I wrote an import script for the PicFix virtualDub plugin a while ago. But after a few hard drive formatting and OS reinstall I can't seem to be able to find it anymore :(
Has anyone else done it? I would like to see it included in the next version of the vdub_filter script.
Wilbert
20th June 2002, 10:31
The virtualdub filter can be found here:
http://vobsub.edensrising.com/picfix/picfix.html
I'm having problems installing this filter, when I try to register it says "DllRegisterServer entry point was not found". But you can't make a script version of it, since it is a dll-file. Looking at the page above, I guess you can use it in AviSynth??? Thus
LoadPlugin("d:\picfix.dll")
Confused, I can't find a help file ...
mrwho
20th June 2002, 11:44
I'm having problems installing this filter, when I try to register it says "DllRegisterServer entry point was not found".
Strange, i just open virtualdub->video->filters->add->LOAD->filetype: dll
Tested with dub 1.4.10 and last picfix...
Wilbert
20th June 2002, 12:10
My mistake, I thought you had to register it. I guess the script will be the following. I haven't test it yet, let me know if it works.
#####################################
# PicFix by Gabest, v1.04 #
# #
# threshold (0-16), error_cor (1-4) #
#####################################
function VD_PicFix(clip clip, int "threshold", int "error_cor")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\picfix.dll", "_VD_PicFix")
return clip._VD_PicFix(default(threshold,6), default(error_cor,3))
}
# example:
# ConvertToRGB()
# VD_PicFix(6,3)
# ConvertToYUY2()
Wilbert
27th June 2002, 09:23
I attached a new version of the VirtualDub Filters Import File (v1.4), in time it will be on Donalds webpage. I will remove the older versions in this thread.
The main changes:
1) The following scripts were added:
- DeLogo by Karel Suhajda, v1.2.1
(It is a bit tricky to use this script, because you need to do some preprocessing in VDub. It's a two pass filter, or whatever you guys call that.)
- GeneralConvolution3D by Gunnar Thalin, v1.1
- DeinterlaceSmooth by Gunnar Thalin, v1.0
- Time Based DeInterlacer by Uwe Freese, v1.1
- Spatial Smoother by Dividee, v1.0
- Denoise by tHE fISH, v1.0
- PicFix by Gabest, v1.04
2) Added the zip file with bmp-pictures made by Pko. Thanks Pko!
edit: download v1.5
Wilbert
5th July 2002, 13:16
Some days ago I got the following script (for the Chroma Noise Reduction filter of Gilles Mouchard) from Alex. Of course it will be added in the next version:
##################################
# CNR Filter by Gilles Mouchard #
# #
# import code by lekx | 26.06.02 #
##################################
function VD_cnr(clip clip, bool "luma_wide", int "luma_m", int "luma_n",
\ bool "chroma1_wide", int "chroma1_m", int "chroma1_n",
\ bool "chroma2_wide", int "chroma2_m", int "chroma2_n",
\ int "chroma_shift")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\cnr.vdf", "_VD_CNR", 1)
return clip._VD_CNR(default(luma_wide,true)?1:0, default(luma_m,192), default(luma_n,35),
\ default(chroma1_wide,false)?1:0, default(chroma1_m,256), default(chroma1_n,47),
\ default(chroma2_wide,false)?1:0, default(chroma2_m,256), default(chroma2_n,47),
\ default(chroma_shift,0))
}
Richard Berg
5th July 2002, 13:56
Is that the filter from here (http://freevcr.ifrance.com/freevcr/virtualdub/cnr-en.html)? If so, I'll probably be adding it to Avisynth directly, unless sh0dan gets a YUV version of SSHiQ out before me.
Acaila
5th July 2002, 14:04
It has already been out a while. It's just that it has a new name, SmoothHiQ instead of SSHiQ, and it's native YUY2.
Wilbert
5th July 2002, 14:04
Yes. You probably know this but there exists a YUV version of SSHiQ, but it is slower than the VDub version.
Edit: This version can be found in the AviSynth Q&A.
Wilbert
7th October 2002, 15:44
I attached a new version of the VirtualDub Filters Import File (v1.5), in time it will be on Donalds webpage. I will remove the older versions in this thread.
The following scripts were added:
- CNR Filter by Gilles Mouchard, v1.1
- Shadow smoother by Valentim Batista, v0.7
- DeinterlacePALMovie Filter by Gunnar Thalin, v1.1
- Wavelet Noise Reduction by thejam79, v0.1
Corrected errors in the scripts of:
- Smart Smoother HiQ by Klaus Post, v2.11
BaronVlad
2nd November 2002, 13:48
hey Guys,
thanks for the great work !!!:)
as i am using the MAP Deinterlacer for my captures and I am too stupid to write a script has someone an idea for putting it into avs ?
Thanks
BTW: the Deinterlace MAP is here:
http://www.digtv.ws/html/filters/deinterlacemap.php
Wilbert
5th November 2002, 11:16
If you know the upper and lower limits for threshold, threshold_MD and ede_detect, please let me know ...
Added the following to vdub_filters.avs:
#########################################
# Deinterlace MAP by Shaun Faulds, v1.0 #
# #
# settings between ??? #
#########################################
function VD_DeInterlaceMAP(clip clip, int "threshold", int "threshold_MD", int "edge_detect", bool "enable_MD",
\ bool "smoothmap_MD", bool "effected")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\DeinterlaceMAP.vdf", "_VD_DeInterlaceMAP", 1)
return clip._VD_DeInterlaceMAP(default(threshold,110), default(threshold_MD,85), default(edge_detect,11),
\ default(enable_MD,true)?1:0, default(smoothmap_MD,true)?1:0, default(effected,false)?1:0)
}
# example:
# ConvertToRGB()
# VD_DeInterlaceMAP(110, 85, 11, true, true, false)
# ConvertToYUY2()
BaronVlad
5th November 2002, 12:33
:D Greeeaaat Wilbert Thank you al lot.
I "built" a very simple script for my movies, using your import script, if you know a bit German, you can find it here:
http://forum.doom9.de/viewtopic.php?t=1842
I will add the map deinterlacer soon to get more performance during encoding.
If you know the upper and lower limits for threshold, threshold_MD and ede_detect, please let me know ...
I always used the standard values, the filter did a good job, I am sorry, that I dont know the limits, but I will tell you, if (and immediately when) I Find out.
BTW: Does someone know a trick how to get the "avi audio" of the captured files directly into the avisynth script or VDub without "save wav" ? That would save at least about half an hour and a bit diskspace...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.