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. |
![]() |
#1 | Link |
Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,356
|
new VirtualDub Filters Import File, v1.2
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 Last edited by Wilbert; 27th June 2002 at 09:24. |
![]() |
![]() |
![]() |
#4 | Link |
Good cop
Join Date: Nov 2001
Posts: 190
|
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.
__________________
<< Have you cleaned your pipes today? >> "It's good to be king" |
![]() |
![]() |
![]() |
#5 | Link | |
Registered User
Join Date: Feb 2002
Posts: 140
|
Quote:
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 |
|
![]() |
![]() |
![]() |
#6 | Link |
Registered User
Join Date: Feb 2002
Posts: 140
|
Here it is.
Code:
# 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) 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. |
![]() |
![]() |
![]() |
#7 | Link |
Good cop
Join Date: Nov 2001
Posts: 190
|
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 : ![]() Right?
__________________
<< Have you cleaned your pipes today? >> "It's good to be king" |
![]() |
![]() |
![]() |
#8 | Link | |
Registered User
Join Date: Feb 2002
Posts: 140
|
Quote:
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) |
|
![]() |
![]() |
![]() |
#9 | Link |
Registered User
Join Date: Oct 2001
Posts: 47
|
@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() ------------------------ |
![]() |
![]() |
![]() |
#10 | Link |
Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,356
|
Sorry for the late response, but I took a few days off
![]() @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 ... |
![]() |
![]() |
![]() |
#11 | Link |
Retired
Join Date: Jan 2002
Location: Netherlands
Posts: 1,529
|
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?
Code:
########################################## # 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() Last edited by Acaila; 16th May 2002 at 12:28. |
![]() |
![]() |
![]() |
#13 | Link |
Retired AviSynth Dev ;)
![]() Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
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.
__________________
Regards, sh0dan // VoxPod |
![]() |
![]() |
![]() |
#15 | Link |
Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,356
|
@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 ? |
![]() |
![]() |
![]() |
#16 | Link |
Retired
Join Date: Jan 2002
Location: Netherlands
Posts: 1,529
|
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.... |
![]() |
![]() |
![]() |
#18 | Link |
Retired AviSynth Dev ;)
![]() Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
No - Smart Smoother does not use previous frames. Enabling Interlaced mode just skips every second line when blurring. So it must be a misunderstanding.
__________________
Regards, sh0dan // VoxPod |
![]() |
![]() |
![]() |
#19 | Link |
Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,356
|
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)? |
![]() |
![]() |
![]() |
#20 | Link |
Registered User
Join Date: Oct 2001
Location: Brussels
Posts: 358
|
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
__________________
dividee |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|