View Full Version : VirtualDub2 "Filter"
johnsonlam
16th April 2018, 04:40
Thanks for shekhjkl and other nice guys to make VirtualDub2 (I'm a bit confused since it's been called VirtualDub Filtermod sometime ago).
I've tried to move all the filter (plugin32 and plugin64 folder) and found that not all filter loaded, any documentation of this? Or the VirtualDub2 just load the plugin64 by default? I've tried to load the old filter manually and some of them works fine, but not loaded by default? Is there any "configuration" to set the loading folder?
Thanks.
Rgds,
Johnson.
StainlessS
16th April 2018, 16:44
I'm a bit confused since it's been called VirtualDub Filtermod sometime ago
Shekh just decided to change the name as VirtualDubFilterMod was a bit of a mouthfull and VirtualDub2 was nicer, there is nothing to be confused about.
I've tried to move all the filter (plugin32 and plugin64 folder) and found that not all filter loaded
It is not very clear what you are trying to say, Shekh will need a better description.
Plugins64 is only for the 64 bit version of VD2, so should not contain any of the 32 bit plugins.
Plugins32 is for the 'extended' plugins, which end in '.vdplugin', although for some reason my plugins32 also contains old format
'.vdf' plugins.
The old style 32 bit plugins should remain in 'Plugins' directory [I dont think VD2 has a Plugins directory as installed(not sure)], if not then
just create a 'Plugins'. directory inside the Vdub2 folder and copy your plugins from old Vdub into that folder, not into Plugins32 or Plugins64..
Do not mix the contents of the directories, which is what I am guessing that you are saying that you have done.
Lastly, I guess that Shekh would not have objected to you posting your question in the VDub2 thread.
shekh
17th April 2018, 01:31
There is not much changed in how plugins are loaded. "plugins" is kind of legacy directory, you can put both x86 and x64 plugins in it but it is better practice to separate them in 32/64 dirs.
All plugin types are equal, it does not matter .vdf or .vdplugin
btw, its better to deal with more threads. Unfortunately I only get subgroup notification at 3 am.
johnsonlam
17th April 2018, 02:29
There is not much changed in how plugins are loaded. "plugins" is kind of legacy directory, you can put both x86 and x64 plugins in it but it is better practice to separate them in 32/64 dirs.
All plugin types are equal, it does not matter .vdf or .vdplugin
btw, its better to deal with more threads. Unfortunately I only get subgroup notification at 3 am.
Thanks, and it's strange that even the structure didn't changed (I just copy the plugin folders from old version to new), and found that the list missing a lot of filters.
I'll try sorting them out, but since through out the years, some of the plugin filename is too short and I've no idea which filter matched it's filename, to clean up the folder is not an easy task.
And I found the processing script changed a little bit, the new one complain that the ** syntax have problem.
VirtualDub.audio.SetSource(1);
**VirtualDub.audio.SetMode(1);
VirtualDub.audio.SetInterleave(1,500,1,0,-700);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetEditMode(1);
shekh
17th April 2018, 10:53
The script must be backward compatible, only new functions are added.
Please be more specific. Post a script that fails as is, without any editing. Also post the error message from log.
Is your script literally contain "**" or did you only use it to indicate the failed line?
For filters: if it does not load it could be very old version. What is the previous VD it was running with? In any case there should be a message in the log.
If you can load that filter in your old VD, I guess you can see its title, description? Can you reveal it? Is this filter publicly available?
johnsonlam
17th April 2018, 13:22
The script must be backward compatible, only new functions are added.
Please be more specific. Post a script that fails as is, without any editing. Also post the error message from log.
Is your script literally contain "**" or did you only use it to indicate the failed line?
For filters: if it does not load it could be very old version. What is the previous VD it was running with? In any case there should be a message in the log.
If you can load that filter in your old VD, I guess you can see its title, description? Can you reveal it? Is this filter publicly available?
Today I've cleaned up the Virtualdub folder and move everything to "plugins", not separate into 32 and 64 anymore, all filters loaded, thanks and appreciated advise from all the nice people here.
I still keep the old script (created from official Virtualdub 1.10.4) and attached in this thread, the ** just to show the error line, not the script have the star, sorry for the misleading edit.
Guess I've run the wrong version, already forgot why I'll put the Virtualdub 1.10.2 AMD64 in the same folder, it did give the error message complaining (screen attached).
pinterf
18th April 2018, 09:47
Hi shekh, I'm upgrading the virtualdub filter in avs+.
I have downloaded the demo crossfade filter and working with that one.
I have two questions:
1.) This specific filter can have two input clips. What marks multiple (2,3...) clips in the parameter signature?
2.) The filter uses V19 interface and in videofilter.h i can see
struct VDXFilterDefinition2: public VDXFilterDefinition{
FilterModDefinition filterMod;
};
which extra filterMod is filled in
template<class T>
class VDXVideoFilterDefinition : public VDXFilterDefinition2
In current vd2 source from github:
struct VDXFilterDefinition {
... old members ...
// NEW - V20
FilterModDefinition* fm;
};
struct FilterModDefinition {
FilterModActivateProc activateProc;
FilterModParamProc paramProc;
};
which is now a pointer, probably incompatible, please note if I'm misunderstanding something.
Thanks in advance.
shekh
18th April 2018, 11:19
Hi,
> This specific filter can have two input clips
No, it is not input clips.
the two sets of mpSourceFrames are generated by PrefetchProc from same source:
prefetcher->PrefetchFrame(0, frame, 0); --> mpSourceFrames[0]
prefetcher->PrefetchFrame(0, frame+param.width, 0); --> mpSourceFrames[1]
Btw I have cloned sdk.chm, here is related stuff:
prefetching (https://github.com/shekh/VirtualDub2/wiki/videofilt_prefetchingmultiplesourceframes)
multiple sources (https://github.com/shekh/VirtualDub2/wiki/videofilt_handlingmultiplesources)
Haven't experimented with multiple sources yet, this is a bit complex.
videofilter.h provides helpers for the plugin, it is not part of binary interface.
VDXFilterDefinition2 is helper struct, this is full code:
struct VDXFilterDefinition2: public VDXFilterDefinition{
FilterModDefinition filterMod;
VDXFilterDefinition2() {
fm = 0;
}
VDXFilterDefinition2(const VDXFilterDefinition2& a)
:VDXFilterDefinition(a)
{
filterMod = a.filterMod;
fm = &filterMod;
}
};
Its purpose is to supply FilterModDefinition pointer to VDXFilterDefinition, the added size is plugin's private, not used by host.
Unrolled:
VDXFilterDefinition2{
VDXFilterDefinition{
...
// NEW - V17 / 1.10.2
VDXShowStaticAboutProc mpStaticAboutProc;
VDXShowStaticConfigureProc mpStaticConfigureProc;
// NEW - V20
FilterModDefinition* fm; ---------\ points to filterMod
} |
FilterModDefinition filterMod; <---/
}
pinterf
18th April 2018, 11:27
videofilter.h provides helpers for the plugin, it is not part of binary interface.
VDXFilterDefinition2 is helper struct, this is full code:
[...]
Its purpose is to supply FilterModDefinition pointer to VDXFilterDefinition, the added size is plugin's private, not used by host.
Thanks for the quick answer
EDIT: The reason of my confusion came from that in the provided source (crossfade.zip) this helper class did not match this logic, it uses an older version of videofilter.h (w/o the FilterModDefinition* fm pointer)
StainlessS
26th April 2018, 17:31
Teenie Weenie bug,
When exporting as single frame with eg jpeg as previously defaulted selection, can often be exported with bmp extension,
but is internally jpeg (hex viewer), has been like that for long time, never bothered me enough to mention it, I usually
pick another radio button export type, and then switch back and it works ok.
shekh
26th April 2018, 17:59
I noticed it recently and already have a fix in my local copy.
Is this the new "everything" thread? :)
StainlessS
26th April 2018, 18:10
Lovely, and yep, this is the new everything thread, great aint it :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.